Repository navigation
feat(mobile): linked pull requests as glass cards led by the PR number - #448
Conversation
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>
NoahHendrickson
left a comment
There was a problem hiding this comment.
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.
Layeris a second copy ofLinkedPullRequestRow'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-pressMenu. The copy has already drifted: its spoken label dropsconflicts with {branch}and the stack size, reorders the parts, and saysWatchingwhere upstream sayswatching. Only the layout should differ. Pull the shared model (label parts, press handler, menu wrap) into one place both use, and letLayerown only the layout.- The sheet's fence duplicates two ICU strings that already sit in
content. The summary and empty-stategt(...)calls now appear twice in one upstream file. The cards already receivelinesandactions, andactions.terminologygives the term, so they can build their own copy. Then the fence shrinks to<No3yLinkedPullRequestCardsSwap lines openPullRequest actions>{content}</…>,summary/emptyLabelleave the props, and the upstream diff gets smaller to sync. - The meta line's model is ad hoc. The repository goes into
meta[0]only to be dropped again withmeta.slice(1)for the spoken label.spoken?is optional, and the review colour is a nested ternary onreviewDecisionthat repeatspullRequestListReviewStatus'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 smallcheckstable and one review-ink lookup, so the branches go away instead of growing. This also fixeskey={item.text}, which collides if a repository's short name matches a label. - Boundary: the cards now import from
No3yStatusPill.tsx(712 lines, with query, watcher and animation dependencies) for two leafViews. MoveChecksRunningMark/ChecksFailingMarkinto 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={[ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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={ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 }> = [ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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 outsidegt.config.json'ssrc. That matches the fork's convention that fork copy stays English, so I'm not flagging it. ScrollViewinstead ofLegendList: 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) => ( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 }}> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact
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>
|
Merged 🤖 Signed: Claude Opus 5.5 ( |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
useNo3yBottomNavEnabledgate), the sheet now shows the Agents sheet's glass cards (apps/mobile/fork/No3yLinkedPullRequestCards.tsx):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.owner/repoand the full review state.Everywhere else (the Git overview sheet, iPad, Android), the upstream
LinkedPullRequestRownow 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-rowedits. That id is recorded in.fork/customizations.yamland pinned byapps/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 fenceduseLinkedPullRequestModelandLinkedPullRequestMenuthat the upstream row uses too, so both surfaces behave the same. The checks marks moved from the status pill intoapps/mobile/fork/No3yChecksMarks.tsx, which both import.Verification:
vp run check:changed,.fork/lint-owned.mjsandvp run i18n:checkpass. 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 Codegpt-6.2-sol) via Codex: reviewed the change in two sol-loop rounds; its Dynamic Type, VoiceOver and owner/repo findings were applied.