refactor(mobile): one inspector column, declared with <Inspector>#27085

open1
t3/fix-android-filter-icon-shift
t3/workspace-split-1
opened4d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 1h ago

Screens filled the workspace's third column in two ways. Some registered content as the "inspector". A /files regex and checks on route names chose between that and a "supplementary" role that nothing ever drew. Each role kept its own visibility and width.

Screens now render <Inspector revealKey?>{content}</Inspector>. The column has a single preference, and it only takes up space while a screen fills it, so a stale preference can no longer hide the sidebar beside a page that has no inspector. The Files and Review routes pass a revealKey, which opens the column once per thread and replaces the layout's checks on route names.

Fold, wide: the Files route renders in the inspector column beside the thread list

Part of the workspace split: router β†’ shell β†’ feature screens β†’ design system β†’ native. Stacked on #26741.

Opus 5.5 via Claude Code in T3 Code.

πŸ€– Generated with Claude Code

Checks

22 successful Β· 10 skipped
All checks passed
3bf1ebc
Synced from GitHub

Approvability

Verdict: Approved at 3bf1ebc

Macroscope's review found this PR approvable β€” This refactor consolidates mobile inspector rendering into a single declarative column and prevents inactive inspectors from reserving sidebar space. Its effects are limited to UI layout and transient visibility state.

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

Synced from GitHub

Review in Change Stack β†’

No actionable comments were generated in the recent review.

External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between 10935b014e5e6f6ce9a82743f1699e3439e9e869 and 3bf1ebcbd2be2f544b979cac736c32b935b617bd.

External image Files selected for processing: 7
  • apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx
  • apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx
  • apps/mobile/src/features/review/ReviewSheet.tsx
  • apps/mobile/src/features/threads/ThreadRouteScreen.tsx
  • apps/mobile/src/features/threads/thread-inspector-navigation.test.tsx
  • apps/mobile/src/lib/layout.test.ts
  • apps/mobile/src/lib/layout.ts
External image Files with no reviewable changes: 1
  • apps/mobile/src/lib/layout.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

Walkthrough

The mobile adaptive workspace layout replaces role-based auxiliary panes with a file inspector pane. Screens render inspector content through Inspector, and thread actions use showInspector to reveal the pane.

Changes: Adaptive workspace inspector

Layer / File(s)Summary
File inspector pane layout
apps/mobile/src/lib/layout.ts, apps/mobile/src/lib/layout.test.ts
Auxiliary-pane support, visibility, and width now use file-inspector layout calculations. The role-based pane type and input are removed, and existing visibility expectations remain unchanged.
Inspector registration and reveal
apps/mobile/src/Stack.tsx, apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx, apps/mobile/src/features/layout/adaptive-workspace-context.ts
The layout registers focused inspector content and tracks reveal keys by route. It exposes showInspector and uses file-inspector preferences for pane visibility and width. Workspace route data now provides the active route key and name instead of keys for all routes.
Screen inspector integration
apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx, apps/mobile/src/features/threads/ThreadRouteScreen.tsx, apps/mobile/src/features/review/ReviewSheet.tsx, apps/mobile/src/features/threads/thread-inspector-navigation.test.tsx
File, thread, and review screens render inspector content through Inspector. Thread actions reveal the file inspector, file-screen branches retain the inspector wrapper, and the navigation test exercises registration through rendered content.

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

Change: Refactor

Sequence Diagram(s)

mermaid
1sequenceDiagram
2 participant ThreadRouteScreen
3 participant Inspector
4 participant AdaptiveWorkspaceContext
5 participant AdaptiveWorkspaceLayout
6 ThreadRouteScreen->>Inspector: Render inspector content with revealKey
7 Inspector->>AdaptiveWorkspaceContext: Register focused content and reveal data
8 AdaptiveWorkspaceContext->>AdaptiveWorkspaceLayout: Provide registered content and reveal data
9 AdaptiveWorkspaceLayout->>AdaptiveWorkspaceLayout: Record reveal key and show file inspector

Suggested reviewers: pixpmusic, maria-rcks, t3dotgg

Merge Risk: External image Minimal Β· up to 3bf1e

No actionable merge-blocking issue was identified in this change. Normal checks remain appropriate before merging.

Pre-merge checks: Passed 3 Β· Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description explains the problem and the implementation, but it does not follow the required section structure. It lacks explicit Scope and approval details and provides no focused verification re…Add the required Problem, Change, Scope and approval, and Verification sections. Link the triaged issue or maintainer approval, and document the tests or manual checks performed with their observed results. Include before/after UI evidence …
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title is concise, specific, and accurately describes the main change: replacing separate workspace-pane roles with a declared Inspector component.
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem and the implementation, but it does not follow the required section structure. It lacks explicit Scope and approval details and provides no focused verification results or stated limitations.

Resolution

Add the required Problem, Change, Scope and approval, and Verification sections. Link the triaged issue or maintainer approval, and document the tests or manual checks performed with their observed results. Include before/after UI evidence if required.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix Β· Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Synced from GitHub

Thread transfer impact

βœ… Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wireβ€”5.0 KiBβ€”6.8 KiBβœ…
CodexThread snapshot wireβ€”3.8 KiBβ€”4.9 KiBβœ…
CodexLive turn WebSocket wireβ€”1.3 KiBβ€”2.0 KiBβœ…
CodexLive turn WebSocket decodedβ€”21.6 KiBβ€”24.4 KiBβœ…
CodexLive turn messagesβ€”2β€”8βœ…
ClaudeTotal thread wireβ€”5.0 KiBβ€”6.8 KiBβœ…
ClaudeThread snapshot wireβ€”3.8 KiBβ€”4.9 KiBβœ…
ClaudeLive turn WebSocket wireβ€”1.3 KiBβ€”2.0 KiBβœ…
ClaudeLive turn WebSocket decodedβ€”21.9 KiBβ€”24.4 KiBβœ…
ClaudeLive turn messagesβ€”2β€”8βœ…

Baseline: unavailable Β· PR result: 61fea7c Β· 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: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

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

Added 1 commit

  • refactor(mobile): one inspector column, declared with <Inspector>3bf1ebc