Skip to content

fix(mobile,web): settled threads show their PR in its state colour - #524

Merged
NoahHendrickson merged 1 commit into
customfrom
t3/ios-settled-thread-pr-colors
Nov 26, 2026
Merged

NoahHendrickson merged 1 commit into
customfrom
t3/ios-settled-thread-pr-colors

Conversation

@NoahHendrickson

Copy link
Copy Markdown
Owner

Settled threads hid their PR state: on iOS the slim settled row drew no PR mark at all, and on desktop the sidebar greyed a settled row's PR badge until you hovered the row, so a merged PR never read purple at rest.

  • iOS (apps/mobile/fork/No3yThreadRow.tsx): the card's PR button is hoisted into a shared prMark and the slim row draws it between the title and the time, coloured by state (merged purple, open green, closed red, draft grey). Tapping it opens the PR, as on cards. The row already fetched its PR, so this adds no requests. Snoozed rows share the slim variant and get the mark too.
  • Desktop/web (apps/web/src/components/Sidebar.tsx): dropped the fork class that muted a settled slim row's badge at rest; upstream's badge colour now shows all the time. The sidebarV2CardRows guard now asserts the mute stays gone, and a stale theme.custom.css comment is corrected.

Checks: vp run check:changed (format, lint, knip, typecheck, tests, browser tests, react compiler), design-lint, and the fork lint ratchet pass. Not yet checked on a device or in the dev app.

Reviewed with neon-review: 1 round with Gemini 4 Neon (high) on the iOS change. Neon verdict: approved


🤖 Signed: Claude Opus 5.5 (claude-opus-5-5) via Claude Code
🤖 Gemini 4 Neon (gemini-4-neon) via Antigravity: reviewed the iOS change, no findings

🤖 Generated with Claude Code

iOS settled (slim) rows now draw the same coloured PR mark the thread cards
do, between the title and the time. The desktop sidebar no longer mutes a
settled row's PR badge until hover, so a merged PR reads purple at rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M labels Nov 26, 2026
@NoahHendrickson

Copy link
Copy Markdown
Owner Author

Code quality review of af73358

No major structural issues. The change goes the right way on both surfaces:

  • iOS: moving the card's PR Pressable into one shared prMark is the right move. The slim row reuses it instead of getting a second copy, so the two variants can't drift apart.
  • Web: this is a pure deletion. A fork-only conditional class (variant === "slim" && variantAction === "unsettle") comes out of an already busy cn(...) call, so the badge falls back to upstream's default colour. Nothing is left dangling: variantAction is still used elsewhere, and the theme.custom.css comment now matches the code. File sizes don't change in any way that matters (No3yThreadRow.tsx stays at 875 lines, and Sidebar.tsx shrinks).

Two small, optional notes. Neither blocks the PR:

  1. apps/mobile/fork/No3yThreadRow.tsx:611: prBadgeLabel is now only read inside prMark. You could compute it there, accessibilityLabel={resolveThreadPrBadgeAction(pr).accessibilityLabel} inside the pr ? branch. That drops the separate nullable value and its ?? undefined step.
  2. apps/web/src/__fork_guards__/sidebarV2CardRows.test.ts:166: the new assertion checks that a deleted string is still absent. A fork guard is there to protect something the fork keeps. Upstream never had this class on the fork's row surface, so nothing is likely to add it back. You could delete the line along with its comment, since the data-fork-sidebar-pr-badge and theme assertions under it already cover the state colour.

Not approving: this was a review-only pass.

@NoahHendrickson NoahHendrickson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Code review — af73358

No correctness issues found.

What I checked

  • iOS slim row (apps/mobile/fork/No3yThreadRow.tsx): prMark is the card's former inline Pressable hoisted unchanged (same label, hitSlop, onLongPress swallow, 12/16 text style), so cards render identically. useThreadPr(thread) already runs for every variant, so the slim mark adds no fetch. OneLineTitle is flex: 1, so a long title truncates and the mark keeps its width beside the time label. The nested Pressable takes the tap ahead of the row, the same way it already does on cards. The chat variant still draws no PR mark; that seems intended, since the PR only covers settled/snoozed rows.
  • Web sidebar (Sidebar.tsx): removing the variant === "slim" && variantAction === "unsettle" class leaves variantAction still used elsewhere. The theme.custom.css number-ink rule (.text-secondary-label { color: inherit }) now applies on settled rows too, so the number follows the glyph's state colour at rest. The project favicon still mutes at rest. The PR badge no longer does, which matches the PR's intent.
  • Guard (sidebarV2CardRows.test.ts): the new not.toContain("not-group-hover/v2-row:not-group-focus-within/v2-row") matches the removed class string. Nothing else in Sidebar.tsx, the theme CSS or .fork/customizations.yaml referred to the removed mute.

Not verified here: I didn't run the guard test or typecheck locally (this review worktree has no installed deps), and I haven't checked either surface on a device or in the dev app. CI and a visual pass cover those.


🤖 Reviewed by Claude Opus 5.5 (claude-opus-5-5) via Claude Code

@NoahHendrickson
NoahHendrickson merged commit 2978721 into custom Nov 26, 2026
32 checks passed
@NoahHendrickson
NoahHendrickson deleted the t3/ios-settled-thread-pr-colors branch November 26, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants