feat: show git commit link on crash screen (#150) #170

Merged
guettlibot merged 1 commits from issue-150-fix into main 2026-05-23 11:45:09 +00:00
guettlibot commented 2026-05-23 11:40:23 +00:00 (Migrated from codeberg.org)

Summary

  • Added static const _gitHash = String.fromEnvironment('GIT_HASH') to CrashScreen, following the same pattern as AboutScreen
  • On the crash screen, when GIT_HASH is set (release builds), a clickable "Git Commit" link is shown that opens the Codeberg commit page
  • In the "Copy to Clipboard" report text, the git commit is included as a Markdown link: [hash](https://codeberg.org/guettli/sharedinbox/commit/hash)
  • Added a widget test verifying clipboard content includes version/platform info and does not include a git commit line when GIT_HASH is empty (debug/test builds)

Closes #150

Test plan

  • All existing widget tests pass (no regressions)
  • New clipboard test passes
  • flutter analyze --fatal-infos reports no issues
  • In a release build (--dart-define=GIT_HASH=$(git rev-parse --short HEAD)), the crash screen shows the commit hash as a tappable link
  • The clipboard report includes the Markdown commit link

🤖 Generated with Claude Code

## Summary - Added `static const _gitHash = String.fromEnvironment('GIT_HASH')` to `CrashScreen`, following the same pattern as `AboutScreen` - On the crash screen, when `GIT_HASH` is set (release builds), a clickable "Git Commit" link is shown that opens the Codeberg commit page - In the "Copy to Clipboard" report text, the git commit is included as a Markdown link: `[hash](https://codeberg.org/guettli/sharedinbox/commit/hash)` - Added a widget test verifying clipboard content includes version/platform info and does not include a git commit line when `GIT_HASH` is empty (debug/test builds) Closes #150 ## Test plan - [ ] All existing widget tests pass (no regressions) - [ ] New clipboard test passes - [ ] `flutter analyze --fatal-infos` reports no issues - [ ] In a release build (`--dart-define=GIT_HASH=$(git rev-parse --short HEAD)`), the crash screen shows the commit hash as a tappable link - [ ] The clipboard report includes the Markdown commit link 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.