Make TicketCard issue and PR chips clickable#174
Merged
dhilgaertner merged 1 commit intomainfrom Apr 16, 2026
Merged
Conversation
dgershman
approved these changes
Apr 15, 2026
Collaborator
dgershman
left a comment
There was a problem hiding this comment.
Code & Security Review
Critical Issues
None found.
Security Review
Strengths:
- URL validation via
URL(string:)before callingNSWorkspace.shared.open()— prevents crashes on malformed strings - No user-controlled data flows into shell commands or unsafe APIs
- PR link only renders when both
prNumberandprURLare non-nil (theif let prNum, let prURLguard), preventing dead chips with no destination
Concerns:
- None.
NSWorkspace.shared.open()delegates URL handling to the OS, which is the standard safe pattern for macOS apps.
Code Quality
- Clean extraction:
LinkChipmoved fromSessionDetailView.swiftinto its own file with zero functional change — the diff confirms the struct is byte-identical before and after the move - Good guard tightening (
TicketBoardView.swift:413): The oldticketPRBadgeaccepted an optionalurl: String?and silently rendered a non-clickable badge when nil. The new code requires bothprNumberandprURLviaif let, so no chip renders when there's no URL — strictly better behavior - Consistent styling: Both issue and PR chips now use the same gold
LinkChipstyle, replacing the old purpleticketPRBadgeand plain#Ntext. This unifies the visual language between the session header and ticket board - Net deletion: +45 / -54 — the refactor removes more code than it adds, which is a good sign for a reuse extraction
LinkChipisinternal(default access), which is correct — it's used within theCrowUImodule only
Summary Table
| Priority | Issue |
|---|---|
| Green | Consider adding accessibilityLabel to LinkChip for VoiceOver (e.g., "Open Issue #42 in browser") |
Recommendation: Approve — straightforward extraction + reuse with no regressions, correct nil-guarding, and consistent UI.
Extract LinkChip into its own file so the ticket board rows can reuse the same clickable capsule the session header already uses. Replace the static purple PR badge and the plain issue-number text in TicketCard with gold LinkChips that open the issue and PR URLs in the default browser. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
85b150d to
4240d69
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LinkChipfromSessionDetailView.swiftinto its own file so it can be reused beyond the session header.ticketPRBadgeand the plain#Nissue-number text inTicketCardwith goldLinkChips — every row now has a clickable Issue #N chip, and rows with a linked PR also show a PR #N chip. Both open the URL in the default browser, matching the session-header interaction.Closes #171
Test plan
make buildsucceeds🤖 Generated with Claude Code