fix(mobile): PR card failing-checks treatment and merged/closed rows
Merged
SA
3mo ago+575+575+012345678901234567890123456789-52-52-01234567890123456789
Summary
Two regressions on the mobile pull-request card, both cases the story fixtures never exercised:
- A failed check hid behind the progress ring. The checks row only listed failures once nothing was running, so a PR with 1 failed + 2 running checks showed the ring under a "1 Check Failed" headline. Failures now outrank the ring: the card lists what is wrong (View All beneath for the rest) even while other checks run. A draft in that state also gains Fix Checks with Agent next to Mark Ready.
- A merged PR showed "No Reviewers Assigned". Rows rendered the same in every state. They are now resolved per state: merged keeps only the receipt row (with a "now · August 15, 2026 at 3:25 PM" sub-line), closed drops the status rows entirely, open states are unchanged.
Also per the designs, conflicts reuse the checks agent label ("Fix Checks with Agent") rather than bespoke wording.
Details
resolveCardRowsjoinsresolvePullRequestState/resolveActionsas the pure card-composition layer;checksRowModeextracts the failures/ring/settled decision; both import concrete modules so bun can load them without react-native.compactTimemoves from(home)/home/utilstoworkspace/[id]/utils— its consumers (CommitsSheet, now the card) both live under[id].- The
merged/closedfixtures previously used empty checks and zero required approvals, which is exactly why the stories never caught this; they now carry realistic data, plus a new fixture/story for the failed-while-running draft.
Tests
- 32 bun tests pass (
cd apps/mobile && bun test): state precedence, per-state actions, row composition, checks-row treatment, headline/label copy, and the merged sub-line (timezone-safe). - Biome clean; typecheck shows only the pre-existing baseline errors (verified identical with changes stashed).
https://claude.ai/code/session_013JpsbZr4U8nsSxwk6ivFUN
Summary by cubic
Fixes two regressions in the mobile pull‑request card. Previously a failed check could hide behind the running ring and merged/closed PRs showed a stray “No Reviewers Assigned”; now failures outrank the ring and rows collapse per state.
- Adds
checksRowModeso the card lists failing checks even while others run; a draft in that state also shows “Fix Checks with Agent” next to “Mark Ready”. - Adds
resolveCardRowsto choose rows by state: merged keeps only the receipt (“Merged by …” withmergedSubLabelshowing “now · August 15, 2026 at 3:25 PM”), closed drops status rows; open states unchanged. - Reuses the “Fix Checks with Agent” label for conflicts per the designs.
- Moves
compactTimetoworkspace/[id]/utils; updates imports to concrete modules so bun tests don’t pull inreact-native. - Updates fixtures/stories and adds tests for state precedence, actions, row composition, checks treatment, and copy — now also pinning queued, needs‑action (singular/plural), unresolved‑conversations and blocked headlines, plus “Remove from Queue”.
Summary by CodeRabbit
- Bug Fixes
- Pull request cards now show failed checks immediately, even while other checks are still running.
- Draft pull requests with failed checks can offer an option to request fixes.
- Status rows now appear consistently for checks and reviewers.
- Merged pull requests display the merge time alongside the full date and time.
- Pull requests without merger details no longer show an empty merged-by row.
- Removed the obsolete conflict-resolution action label.
- Pull request actions and status displays now behave more consistently across draft, merged, closed, and waiting states.