Skip to content

feat(mobile): linked pull requests as glass cards led by the PR number - #448

Merged
NoahHendrickson merged 7 commits into
customfrom
t3/improve-pr-list-readability
Nov 24, 2026
Merged

NoahHendrickson merged 7 commits into
customfrom
t3/improve-pr-list-readability

Conversation

@NoahHendrickson

@NoahHendrickson NoahHendrickson commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

The thread's Linked pull requests sheet was hard to read on iPhone. Every row put the full owner/repo, number, stack, checks and diff stats on one fixed-height line above the title. At larger text sizes the repo name truncated and the diff stats were cut off mid-number.

On no3y iPhone (the redesign's useNo3yBottomNavEnabled gate), the sheet now shows the Agents sheet's glass cards (apps/mobile/fork/No3yLinkedPullRequestCards.tsx):

  • One card per stack, with a "Stack of N" label and full-width dividers between layers. A PR that isn't in a stack gets its own card.
  • Each layer leads with its number on the status pill's tinted PR pill (palette.prPill, with its open, merged, closed or draft glyph). The status pill's checks marks follow it: a red dot when checks fail, a yellow pie while they run. Diff stats and a chevron sit on the right.
  • Under that come the title, then a line with the repo's short name, conflicts, review state, watching and the updated time. That line wraps instead of truncating.
  • Tap opens the PR. Long-press keeps the existing actions menu. VoiceOver reads the full owner/repo and the full review state.
  • The pill and the top line grow with Dynamic Type instead of clipping.

Everywhere else (the Git overview sheet, iPad, Android), the upstream LinkedPullRequestRow now leads with the title, and its info line wraps instead of being clipped at a fixed height.

Fork records: both upstream files carry fenced no3y-linked-pr-row edits. That id is recorded in .fork/customizations.yaml and pinned by apps/web/src/__fork_guards__/no3yLinkedPullRequestRow.test.ts. The cards only do layout. State, the VoiceOver label, opening and the long-press menu come from a fenced useLinkedPullRequestModel and LinkedPullRequestMenu that the upstream row uses too, so both surfaces behave the same. The checks marks moved from the status pill into apps/mobile/fork/No3yChecksMarks.tsx, which both import.

Verification: vp run check:changed, .fork/lint-owned.mjs and vp run i18n:check pass. Not yet run on a device or simulator.

Reviewed with sol-loop: 2 rounds with gpt-6.2-sol. Sol verdict: approved


🤖 Signed: Claude Opus 5.5 (claude-opus-5-5) via Claude Code

  • GPT-6.2 Sol (gpt-6.2-sol) via Codex: reviewed the change in two sol-loop rounds; its Dynamic Type, VoiceOver and owner/repo findings were applied.

xxxxxxxxxxxxx and others added 3 commits November 24, 2026 02:43
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…view states

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:L labels Nov 24, 2026

@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-quality review of 870aa47200763030a88c08c50ae150ccb56b3845.

The overall shape is right. The swap follows the existing No3y*Swap convention, the upstream edits are fenced and pinned by a guard, and no file crosses 1k lines. The upstream row change is a real simplification: it deletes metaLineHeight, the fixed-height clip, the -ml-1.5/w-0 spacer hack and flexShrink: 100.

I'm not approving yet. The new card copies the upstream row's behaviour instead of sharing it, and the copy has already drifted. The upstream fence also carries duplicated strings that the fork could own.

  1. Layer is a second copy of LinkedPullRequestRow's behaviour, not just its look. It repeats the derivations (open/checks/review/status/conflict/watching/term), the accessibility label, the open-or-alert press handler and the long-press Menu. The copy has already drifted: its spoken label drops conflicts with {branch} and the stack size, reorders the parts, and says Watching where upstream says watching. Only the layout should differ. Pull the shared model (label parts, press handler, menu wrap) into one place both use, and let Layer own only the layout.
  2. The sheet's fence duplicates two ICU strings that already sit in content. The summary and empty-state gt(...) calls now appear twice in one upstream file. The cards already receive lines and actions, and actions.terminology gives the term, so they can build their own copy. Then the fence shrinks to <No3yLinkedPullRequestCardsSwap lines openPullRequest actions>{content}</…>, summary/emptyLabel leave the props, and the upstream diff gets smaller to sync.
  3. The meta line's model is ad hoc. The repository goes into meta[0] only to be dropped again with meta.slice(1) for the spoken label. spoken? is optional, and the review colour is a nested ternary on reviewDecision that repeats pullRequestListReviewStatus's dispatch. The checks state also branches twice (marks, then a second nested ternary for speech). Keep the repository out of the list, and use one small checks table and one review-ink lookup, so the branches go away instead of growing. This also fixes key={item.text}, which collides if a repository's short name matches a label.
  4. Boundary: the cards now import from No3yStatusPill.tsx (712 lines, with query, watcher and animation dependencies) for two leaf Views. Move ChecksRunningMark/ChecksFailingMark into their own small module that both import, instead of exporting them from the pill.

Minor: no3yPullRequestCards is exported but only used in this file. Unexport it.

No file-size concerns. The guard and manifest entry look good.


🤖 Signed: Claude Opus 5.5 (claude-opus-5-5) via Claude Code

const card = (
<Pressable
accessibilityRole="button"
accessibilityLabel={[

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.

This copies LinkedPullRequestRow almost line for line: the derivations above, this label, the open-or-alert onPress and the Menu wrap below. The copy has already drifted. It drops conflicts with {branch} and the stack size, reorders the parts, and capitalises Watching. Only the layout should differ between the two surfaces. Can we pull the label parts, the press handler and the menu wrap into one shared helper, so Layer only renders?

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.

Fixed in cb197e1. The row's derivations, spoken label, open-or-alert handler and long-press menu now live in one fenced useLinkedPullRequestModel + LinkedPullRequestMenu in LinkedPullRequestList.tsx. Both LinkedPullRequestRow and the card's Layer use them, so Layer only does layout and VoiceOver says exactly what upstream says (conflicts with {branch}, stack size, lowercase watching).

{/* fork:begin no3y-linked-pr-row — see .fork/customizations.yaml#no3y-linked-pr-row */}
<No3yLinkedPullRequestCardsSwap
lines={lines}
summary={

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.

These two gt(...) strings repeat the ones in content a few lines up, inside an upstream file. The cards already get lines and actions, and actions.terminology gives the term. Can the cards build the summary and empty label themselves? Then this fence is just lines, openPullRequest and actions, with less upstream surface to sync.

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.

Fixed in cb197e1. The cards build the summary and empty label themselves from lines and actions.terminology. The sheet's fence is now just lines, openPullRequest and actions around {content}.

(sourceControlClients.findByChangeRequestUrl(link.url) ?? sourceControlClients.get(undefined))
.changeRequest,
);
const meta: Array<{ readonly text: string; readonly spoken?: string; readonly color: string }> = [

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.

The repository goes into meta[0] only for line 195 to drop it with slice(1), and the review colour is a nested ternary that repeats pullRequestListReviewStatus's dispatch. Checks also branch twice: marks at 260–261, speech at 196–202. Can we keep the repository separate, use one checks record (mark + spoken label) and a review-ink lookup, and drop the optional spoken? That also fixes key={item.text}, which collides if the short repo name equals a label.

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.

Fixed in cb197e1. The repository renders on its own, ahead of a statuses list with stable keys (conflict, review, watching), so the item.text key collision is gone. Checks are one CHECKS_MARKS lookup and review colour is one REVIEW_INK lookup. spoken is gone because speech comes from the shared model.

import { useNo3yBottomNavEnabled } from "./no3yBottomNavEnabled";
import { NO3Y_PULL_REQUEST_GLYPHS } from "./No3yPullRequestMark";
import { no3yPullRequestTone } from "./no3yPullRequestTone";
import { ChecksFailingMark, ChecksRunningMark } from "./No3yStatusPill";

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.

This couples the cards to No3yStatusPill.tsx (712 lines, query/watcher/animation deps) for two leaf Views. Can the two marks move into their own module that both files import, instead of becoming exports of the pill?

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.

Fixed in cb197e1. ChecksRunningMark and ChecksFailingMark moved to apps/mobile/fork/No3yChecksMarks.tsx, which both the status pill and the cards import. no3yPullRequestCards is no longer exported.

@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 of 870aa47200 (base d0a25f8702).

No blocking issues. Three nits are below, inline. Each one was checked against the source.

I checked two more candidates and dropped them:

  • English-only card strings ("Stack of {size}", "Conflicts", "Watching"): apps/mobile/fork/ is outside gt.config.json's src. That matches the fork's convention that fork copy stays English, so I'm not flagging it.
  • ScrollView instead of LegendList: every card mounts, but a thread links only a few PRs, so this doesn't matter in practice.

🤖 Signed: Opus 5.5 (claude-opus-5-5) via Claude Code

</Text>
</View>
) : null}
{card.map((line, index) => (

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.

nit: a branching stack is drawn as a straight one. Derived chains can branch: resolveThreadPullRequestChains gives siblings the same depth ("Siblings share a depth", packages/source-control-core/src/shared/threadPullRequests.ts:47). The upstream row indents by depth (LinkedPullRequestList.tsx:142). These cards ignore line.depth and label the whole group "Stack of N".

Example: base #10 (head feat), then #11 and #12, both based on feat. The depths are [0,1,1], but the card says "Stack of 3" and shows #12 as if it sat on #11. Possible fixes: indent or mark layers by line.depth, or show the "Stack of N" header only for a linear chain.

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.

Fixed in c6d406e. Each layer indents its content by line.depth (12pt a level, capped at 3), matching the upstream row. Siblings in a branching stack now sit at the same indent, under the base they share. Dividers stay full width.

</Text>
<Text style={{ fontSize: 13, color: palette.metaInk }}>
{meta.map((item, index) => (
<Text key={item.text} style={{ color: item.color }}>

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.

nit: meta segments can share a React key. key={item.text} collides when the repository's short name equals another segment's text, for example a repo named Review or Approved next to that review badge. React then warns about duplicate keys, and a segment can be reused with the wrong colour. The segment slots are fixed, so key={index} (or a slot id such as repo/conflicts/review/watching) is safe here.

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.

Already fixed in cb197e1. The repository renders on its own, and the statuses use fixed slot keys (conflict, review, watching), so the keys can't collide.

)
: null;
const status = snapshot === null ? null : pullRequestStatus(snapshot, messages);
const conflicts = snapshot !== null && pullRequestConflict(snapshot, messages) !== null;

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.

nit: the spoken conflict label drops the base branch. pullRequestConflict() already returns "Conflicts with {branch}" when baseBranch is known, but its result is thrown away with !== null. VoiceOver then reads just "Conflicts" here, while the upstream row says which branch. Keep the result and pass its label as the Conflicts item's spoken text. The short "Conflicts" can stay as the visible text.

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.

Already fixed in cb197e1. The card's VoiceOver label now comes from the shared useLinkedPullRequestModel, which says "conflicts with {branch}" exactly as the upstream row does. The short "Conflicts" stays as the visible text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added size:XL and removed size:L labels Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for c6d406e.

This comment will update automatically after the next completed run.

The Pull requests list cards that landed on custom imported the checks marks
from No3yStatusPill; this branch moves them to No3yChecksMarks, so the list
card now imports them from there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NoahHendrickson

Copy link
Copy Markdown
Owner Author

Merged origin/custom into the branch (b9dc192). Besides the manifest, No3yStatusPill.tsx conflicted: custom's new Pull requests list card (No3yPullRequestListCard.tsx) imported ChecksRunningMark/ChecksFailingMark from the pill, and this branch moves them to No3yChecksMarks.tsx. I kept the move, repointed the list card's import, and added the list card to No3yChecksMarks' header. Mobile typecheck, src/features/threads tests (365) and both PR guards pass.


🤖 Signed: Claude Opus 5.5 (claude-opus-5-5) via Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NoahHendrickson
NoahHendrickson merged commit d01b458 into custom Nov 24, 2026
32 checks passed
@NoahHendrickson
NoahHendrickson deleted the t3/improve-pr-list-readability branch November 24, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 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