Skip to content

fix(mobile): recover from screen render errors - #13197

Merged
juliusmarminge merged 11 commits into
mainfrom
agent/mobile-error-recovery-minimal
Sep 23, 2026
Merged

juliusmarminge merged 11 commits into
mainfrom
agent/mobile-error-recovery-minimal

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

A render error in a mobile route, thread feed, or split-view pane currently ends the session. This adds small boundaries at those render seams so the user can retry immediately, copy the error details, and leave a failed route. A feed failure keeps its header and composer visible.

This replaces the larger approach in #13145. It uses the native stack's screenLayout, a feed boundary, and boundaries around the split-view sidebar and inspector. It does not add a second error log or Diagnostics UI. Errors above navigation still follow Expo's existing fatal recovery path.

Device proof

A temporary, uncommitted render throw was inserted at the same feed call site on the base and this branch. Both devices used the same seeded environment and thread. The development error overlay was dismissed on the branch to show the in-session fallback.

Before · iOS feed render error

Before: iOS render error covers the app

After · iOS feed recovers in place, with header and composer visible

After: iOS conversation recovery with retry and copy actions

A forced Home render error also kept a way into Settings on iOS and Android:

After: iOS Home recovery with Open settings

After: Android Home recovery with Open settings

Verification

  • iPhone 16 Pro simulator (iOS 18.6) and Pixel 10 Pro emulator (Android 17): forced feed and Home render errors reached their fallbacks; Open settings reached Settings on both. On Android, removing the feed fault and tapping Try again restored the conversation in place.
  • The recovery fallback scrolls so its actions remain reachable with larger accessibility text; the updated iOS Home capture above uses the scrollable fallback.
  • apps/mobile: pnpm exec tsc --noEmit passed. Targeted lint passed with only existing warnings in the large touched components; RenderErrorBoundary.tsx has none.
  • React Doctor reported complexity warnings in the existing large AdaptiveWorkspaceLayout, ThreadDetailScreen, and ThreadRouteScreen components.
  • The app has no runnable React Native component renderer in its node test harness, so the boundary is checked on devices instead of by static-markup tests. The persistent split inspector was reviewed by code; the iPad mini used for an additional pass selected its compact Files route, so that layout was not device-verified.

Model: GPT-6 Astra (Codex). Design consensus and review: Claude Opus 5.5 (T3 delegated agent).


Devin Review

Summary by CodeRabbit

  • Bug Fixes
    • Added recovery screens for rendering failures across mobile screens, conversations, workspace sidebars, and inspectors.
    • Where available, recovery screens let you retry, copy error details, or leave the affected view. Navigation options vary by screen.
    • Failures reset when the relevant route or conversation context changes.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 23, 2026
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB −15 B (−0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB 0 B (0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.5 KiB 6.5 KiB −15 B (−0.2%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.3 KiB 56.3 KiB 0 B (0.0%) 66.4 KiB ✅
Codex Live turn messages 10 10 0 (0.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB −3 B (−0.0%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +1 B (+0.0%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB −4 B (−0.1%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: db898a3 · PR result: 05a542e · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 114.0 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@macroscopeapp

macroscopeapp Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — Adds a new render-error recovery UI and applies it across the mobile navigation stack, conversation feed, sidebar, and inspector panes. Because this changes failure behavior across multiple existing production paths and introduces new user-facing actions, the scope merits human validation.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 37c8241c-4d9c-438e-a5d0-75f7bd89bc00

📥 Commits

Reviewing files that changed from the base of the PR and between db898a3 and 05a542e.

📒 Files selected for processing (7)
  • apps/mobile/src/Stack.tsx
  • apps/mobile/src/components/RenderErrorBoundary.tsx
  • apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx
  • apps/mobile/src/features/layout/workspace-inspector-pane.tsx
  • apps/mobile/src/features/threads/ThreadDetailScreen.tsx
  • apps/mobile/src/features/threads/ThreadRouteScreen.tsx
  • apps/mobile/src/features/threads/thread-inspector-content-stack.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Mobile screens, workspace areas, and thread content now use render error boundaries. Failures display a shared fallback view with error details and retry controls. Route, pathname, thread, and working-directory values reset boundaries where configured.

Changes

Mobile render error handling

Layer / File(s) Summary
Shared boundary and fallback
apps/mobile/src/components/RenderErrorBoundary.tsx
Adds error capture, reset-key and retry handling, error-detail formatting, and a fallback view with retry, copy-details, and optional exit actions.
Navigator screen guard
apps/mobile/src/Stack.tsx
Wraps root screens and new-task flow content in a boundary. The fallback provides route-aware exit actions, and the boundary resets when route params change.
Workspace sidebar and inspector guards
apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx, apps/mobile/src/features/layout/workspace-inspector-pane.tsx
Adds render boundaries for the sidebar and inspector. The inspector receives the pathname and resets its boundary when the pathname changes.
Thread feed and inspector guards
apps/mobile/src/features/threads/ThreadDetailScreen.tsx, apps/mobile/src/features/threads/ThreadRouteScreen.tsx, apps/mobile/src/features/threads/thread-inspector-content-stack.tsx
Adds render boundaries for the thread feed and inspector panes. The reset keys use thread identity and working-directory values.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Navigator
  participant GuardedScreenLayout
  participant RenderErrorBoundary
  participant ScreenRenderFallback
  participant RenderFailureView
  Navigator->>GuardedScreenLayout: supplies route and screen content
  GuardedScreenLayout->>RenderErrorBoundary: wraps content with route params as reset keys
  RenderErrorBoundary->>RenderErrorBoundary: captures a render error
  RenderErrorBoundary->>ScreenRenderFallback: renders route-aware fallback
  ScreenRenderFallback->>RenderFailureView: supplies error details and exit action
Loading

Suggested reviewers: chrisdeeming, pixpmusic

Merge Risk: ⚪ Minimal · up to 05a54

The mobile recovery change is ready to merge after normal checks; no actionable issue is established by the supplied evidence.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: mobile screens recover from render errors.
Description check ✅ Passed The description explains what changed, why it changed, the affected areas, UI behavior, screenshots, and verification results. It does not include the template checklist, and it notes that the persist…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@juliusmarminge
juliusmarminge merged commit 23c7ab9 into main Sep 23, 2026
30 checks passed
@juliusmarminge
juliusmarminge deleted the agent/mobile-error-recovery-minimal branch September 23, 2026 05:00
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 23, 2026
## What's Changed
* hatch/variant functions by @juliusmarminge in pingdotgg/t3code#13191
* refactor(web): context chips render through one ContextChip component by @juliusmarminge in pingdotgg/t3code#13192
* refactor(web): ui components drop their secondary className props by @juliusmarminge in pingdotgg/t3code#13193
* refactor(web): menu triggers and items stop restyling ui/menu by @juliusmarminge in pingdotgg/t3code#13205
* refactor(web): field controls stop restyling Input, Select, Combobox and Command by @juliusmarminge in pingdotgg/t3code#13206
* refactor(web): app code stops restyling sidebar, popover, table and misc ui exports by @juliusmarminge in pingdotgg/t3code#13207
* refactor(web): Button consumers outside the composer stop restyling it by @juliusmarminge in pingdotgg/t3code#13208
* refactor(web): composer controls own their look instead of restyling ui components by @juliusmarminge in pingdotgg/t3code#13209
* chore(web): no-restyle fails lint, and the ceiling gate goes by @juliusmarminge in pingdotgg/t3code#13210
* fix(mobile): recover from screen render errors by @juliusmarminge in pingdotgg/t3code#13197
* feat(web): navigate back and forward with mod+[ and mod+] by @juliusmarminge in pingdotgg/t3code#13212
* fix(web): sort title matches by recent activity by @Yash-Singh1 in pingdotgg/t3code#13219
* test(desktop): remove redundant keyring module-load test by @t3-code[bot] in pingdotgg/t3code#13220


**Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260923.2135...v0.0.43-nightly.20260923.2150

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260923.2150
aorwall added a commit to aorwall/t3code that referenced this pull request Sep 24, 2026
Merges `pingdotgg/t3code` up to `78af372cf`: 27 commits on top of base
`aca3c87cd`. It branches from `main`; no earlier merge PR was open.

## Resolution

Six files conflicted, and each was resolved with the verdict
`preflight.mjs` printed:
- `AGENTS.md` (decide): the fork's Taste prose stays. Upstream's rule
change is folded into it: `shadcn/no-restyle` now fails lint, and a look
that belongs to one feature stays in that feature's component.
- `GitActionsControl.tsx`, `ProjectScriptsControl.tsx`,
`settings/ProjectActionsList.tsx`, `settings/SettingsSidebarNav.tsx`
(converged): these take upstream's markup that no longer restyles `ui`
components. The `FEATURES.openInEditor` gate, the
`editable`/`taskScoped` gates and the personal/admin settings-nav split
are re-applied at their new anchors.
- `pnpm-lock.yaml` (theirs): upstream's copy, re-derived with
`install.mjs`.

`projectScriptEditor.tsx` merged without a conflict but had no
path-policy entry, so it now has one: `project-script-editor`.

**Changes needed after the merge.** Upstream pingdotgg#13210 made
`shadcn/no-restyle` a lint error. That surfaced 65 violations, all in
fork-only files, and I fixed them at the call sites:
- `DialogPanel` in the Moatless settings dialogs keeps its own padding.
- Inputs use `font="mono"`.
- The sandbox tooltip uses `variant="code"`.
- The repository search field uses `InputGroup`.
- Muted captions in the sidebar filter are plain elements.
- The task-link empty state uses the `Empty` defaults.

`ui/textarea.tsx` gained the same `font` prop `Input` already has,
recorded as inventory entry `textarea-mono-font`. **Visual change to
review:** these panels now use the `ui` defaults for font size (13px →
14px) and dialog padding.

## Numbers
- Landed: 255 files, against 239 in the upstream range. The gap of 16 is
the lint fixes above plus `docs/fork/inventory.json`.
- Fork delta: 787 files.

## Verification
`verify.mjs` passed all 10 checks, including the full test step. The
unsupported-method derivation had nothing to add or drop.

## Feature classification

### Usable as-is
- Back/forward navigation with mod+[ and mod+] (pingdotgg#13212,
`AppSidebarLayout.tsx`, keybindings contract).
- Command palette sorts title matches by recent activity (pingdotgg#13219).
- The previous worktree branch shows on a second line in the branch
toolbar (pingdotgg#13314).
- A context-chip component, `ui` components owning their own variants,
composer chip rings no longer clip, a brain icon for the effort
dropdown, and accessible switch state (pingdotgg#13192–pingdotgg#13210, pingdotgg#13301, pingdotgg#13309,
pingdotgg#11580).
- CSV preview keeps a final quoted empty record (pingdotgg#11425).
- Mobile recovers from screen render errors (pingdotgg#13197); mobile version
bump.

### Unsupported in Moatless / needs implementation
- **Interactive 3D device workspace** (pingdotgg#12787,
`apps/web/src/components/device/**`). It sits behind the existing
`FEATURES.deviceHub` gate, and the `device.*` methods are still not
dispatched. It is covered by the existing device-hub gap.
- **Preview automation drives the visible browser for new agent
sessions** (pingdotgg#13064, `PreviewAutomationBroker.ts`,
`previewAutomation.ts`). Added to the existing preview-automation gap.
- **Mobile environment and provider update management** (pingdotgg#13302). It is
a paired-device surface, covered by the existing mobile gap.
- Desktop-only fixes (SnapShot Dock icon pingdotgg#13286, keyring test removal):
not applicable.

### Backend behavior to consider reproducing in Moatless
- **Don't replay stale agent alerts after a restart** (pingdotgg#13340,
`AgentAwarenessRelay.ts`). The relay publishes a completed or failed
thread only if its latest turn finished after the server started.
- **Normalise vendor-specific provider versions before the compatibility
check** (pingdotgg#13328, `providerCompatibility.ts`, `model-manifest.json`). It
strips Cursor's build hash and Antigravity's `agy_acp_server_` prefix,
and restores the ranges for every harness.

Both are recorded under "Runtime fixes upstream made to its own server"
in `docs/fork/gaps.md`. The tracker entry is in
`docs/fork/upstream-merge-log.md`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---
Moatless task:
https://moatless.soaplabstest.com/tasks/0735cf38-d4cd-497a-87e7-ed2bc5c58ba6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant