Skip to content

Session card: indicator for auto-merge sessions (CROW-504)#506

Merged
dgershman merged 1 commit into
mainfrom
feature/crow-504-auto-merge-card-icon
Jun 14, 2026
Merged

Session card: indicator for auto-merge sessions (CROW-504)#506
dgershman merged 1 commit into
mainfrom
feature/crow-504-auto-merge-card-icon

Conversation

@dgershman

Copy link
Copy Markdown
Collaborator

Closes #504

Summary

Adds a small, muted arrow.triangle.merge SF Symbol to each session card in the left pane when the session has had GitHub native auto-merge enabled on its PR. Lets users tell at a glance which sessions are on the auto-merge track without opening each one — useful especially under the multi-workspace flow.

Source of truth

Reads Session.autoMergeEnabledAt: Date? directly — the same persisted flag the existing IssueTracker auto-merge watcher writes via attemptEnableAutoMerge (and the same flag its one-shot guard reads). No new state, no new wiring. Because AppState is @Observable, the icon appears/disappears reactively when the watcher mutates that field.

Design choices

  • Glyph: arrow.triangle.merge — already used in this codebase at SessionListView.swift:342 for the "Add label crow:merge to PR" context-menu action, so the vocabulary is consistent.
  • Color: .foregroundStyle(CorveilTheme.textSecondary) — informational, not a status alert (per ticket request for muted tone).
  • Size: .font(.caption) — matches the existing inReview/completed status icons.
  • Placement: in the top HStack between Spacer() and the existing status indicator, so it sits in the upper-right corner of the card without disturbing the session name or other affordances.
  • Tooltip: .help("Auto-merge enabled") on hover.
  • Accessibility: .accessibilityLabel("Auto-merge enabled") for VoiceOver.
  • Scope: SessionRow only. ManagerSessionRow is intentionally excluded — the watcher explicitly skips managers (IssueTracker.swift:1662).

Test plan

  • swift build --arch arm64 — clean
  • swift test --arch arm64 — 211 tests pass, including the existing IssueTrackerAutoMergeTests covering autoMergeEnabledAt
  • Manual: session with autoMergeEnabledAt set shows the icon; one without doesn't
  • Manual: hover the icon → "Auto-merge enabled" tooltip appears
  • Manual: clear autoMergeEnabledAt → icon disappears without restart (reactive via @Observable)
  • Manual: drag left pane to minimum width — session name truncates as before, icon sits between name and status indicator without layout breakage
  • Manual: VoiceOver reads "Auto-merge enabled" when focused on the icon
  • Manual: Increase Contrast on — icon still legible

Out of scope (per ticket)

  • Other automation-mode indicators (auto-create, auto-rebase, auto-respond)
  • Toggle auto-merge from the card itself (read-only indicator for v1)
  • Session-card redesign

🤖 Generated with Claude Code

Add a small, muted arrow.triangle.merge glyph in the upper-right of each
session card when Session.autoMergeEnabledAt is non-nil, so users can
tell at a glance which sessions are on the auto-merge track without
opening each one. Reads from the same persisted flag the IssueTracker
auto-merge watcher writes — no new source of truth.

🐦‍⬛ Generated with Claude Code, orchestrated by Crow

Co-Authored-By: Claude <noreply@anthropic.com>
Crow-Session: 5FDFB71B-3BC4-4C57-BA1D-456A204CA967
@dgershman dgershman requested a review from dhilgaertner as a code owner June 14, 2026 20:11
@dgershman dgershman added the crow:merge Crow auto-merge on green label Jun 14, 2026

@dhilgaertner dhilgaertner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code & Security Review

Critical Issues

None.

Security Review

Strengths:

  • Read-only, presentational change. No new state, network, input handling, or persistence — the icon merely reflects the existing Session.autoMergeEnabledAt flag. No security surface introduced.

Code Quality

  • Source of truth is correct and verified. Session.autoMergeEnabledAt: Date? exists (Packages/CrowCore/Sources/CrowCore/Models/Session.swift:35) and is the same flag written by the watcher (Sources/Crow/App/IssueTracker.swift:1708) and read by its one-shot guard (IssueTracker.swift:1621). Because AppState is @Observable, the icon appears/disappears reactively — as described.
  • Symbol vocabulary is consistent. arrow.triangle.merge is already used in this file at SessionListView.swift:342 for the crow:merge context-menu action.
  • Theme token valid. CorveilTheme.textSecondary resolves (CorveilTheme.swift:24); muted tone matches the ticket's request and the sibling status icons.
  • Layout is sound. Placed between Spacer() and the status indicator (SessionListView.swift:644-650); the session name carries lineLimit(1), so the added glyph won't break truncation behavior.
  • Accessibility covered. Both .help(...) (tooltip) and .accessibilityLabel(...) (VoiceOver) are present.
  • Manager scope correctly excluded. ManagerSessionRow is a separate view and the watcher never sets autoMergeEnabledAt for managers, so omitting the icon there is consistent.

Summary Table

Color Meaning Verdict effect
Red Must fix Request changes
Yellow Should fix Request changes
Green Consider Approve allowed

Recommendation: Approve — driven by [0 Red, 0 Yellow, 0 Green] findings. Minimal, well-scoped, and all referenced symbols/claims verified against the codebase.


🐦‍⬛ Reviewed by Crow via Claude Code

@dgershman dgershman merged commit c4a8e9f into main Jun 14, 2026
2 checks passed
@dgershman dgershman deleted the feature/crow-504-auto-merge-card-icon branch June 14, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crow:merge Crow auto-merge on green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session card: show small icon when set to auto-merge

2 participants