Skip to content

fix(mobile): preserve Android Usage across layout changes - #25231

Open
maria-rcks wants to merge 3 commits into
mainfrom
maria/takeover-pr-24903
Open

maria-rcks wants to merge 3 commits into
mainfrom
maria/takeover-pr-24903

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Crossing Android's compact/split workspace boundary remounts Usage, resetting its selected page, filters, and scroll container.

Change

Keep one workspace tab tree mounted across both layouts, retaining the original implementation's layout-specific safe-area insets, bottom clearance, navigation, and pull request content. Reuse the existing workspace test file instead of adding a new one.

Verification

  • Both compact-to-split and split-to-compact regression cases failed on current main with Limits replacing Usage.
  • Blacksmith vp run check:changed passed formatting, lint, both knip passes, affected mobile/scripts typechecks, and all 18 workspace tests. The regression drives the actual Android root with a stateful leaf and checks its state and DOM identity through repeated transitions.
  • Android native folding, resizing, scroll behavior, and before/after native captures remain unverified: this VM has no attached Android device. The web client does not exercise the Android root. No substitute web captures are presented as Android evidence.
  • Merged github/main (32bf48f42820) with merge commit 1a76f93797, preserving both mobile test registrations. Blacksmith vp run check:changed passed on this head; All 30 reported checks are green and GitHub reports no conflicts.
  • Two independent source reviews approved 1a76f93797 without findings. CodeRabbit reported no actionable findings on this head and its description check now passes.
  • Production changes affect Android only; provider, server, contracts, web, desktop, and iOS paths are unchanged.

Scope and approval

This is a focused fix for the Android layout transition resetting Usage state. It keeps the existing screen mounted and adds regression coverage in the existing test file. Maria requested this takeover of https://git.cafe/pingdotgg/t3code/pulls/24903.

Takeover

Replaces https://git.cafe/pingdotgg/t3code/pulls/24903, with thanks to @PixPMusic for the original implementation.

Built with GPT-6.1-Sol in the Codex harness on T3 Code.

Co-authored-by: Alex <5401039+PixPMusic@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 334b33d and 1a76f93.

Files selected for processing: 1
  • apps/mobile/vite.config.ts

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

Walkthrough

Android workspace rendering now uses a shared tab structure for split and non-split layouts. A mounted-render test checks that Usage content retains its state when the layout changes.

Changes: Android workspace layout

Layer / File(s) Summary
Shared workspace rendering
apps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsx
Split view uses workspace bottom clearance and preserves the safe-area bottom inset. Empty-state, pull-request content, headers, and Android navigation render according to the active layout.
Layout-switch persistence test
apps/mobile/src/features/workspace/workspace-tabs-state.test.ts, apps/mobile/vite.config.ts
A mounted-render test alternates layouts and checks that the Usage label and button instance persist. The React test project includes the test.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Suggested labels: bugfix, 📱 Native Change, takeover

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 1a76f

No actionable merge-blocking risk remains in the reviewed changes.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title "fix(mobile): preserve Android Usage across layout changes" matches the main change. The changeset keeps one workspace tab tree mounted across split and compact layouts in WorkspaceRootScree…
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.
Description check Passed The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains the regression, implementation, test results, scope, and unverified native Android che…
Full details: Title check

Explanation

The title "fix(mobile): preserve Android Usage across layout changes" matches the main change. The changeset keeps one workspace tab tree mounted across split and compact layouts in WorkspaceRootScreen.android.tsx, so the Usage page keeps its state. It uses a conventional commit prefix and plain language, and it names the platform, area, and symptom. The title is specific and accurate, so it passes.

Full details: Description check

Explanation

The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains the regression, implementation, test results, scope, and unverified native Android checks. It does not include before/after Android screenshots, but it clearly states why those captures were unavailable. The description is otherwise complete and focused.

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

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 26, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at f40df47

Macroscope's review found this PR approvable — This is a focused Android bug fix that preserves the existing Usage screen instance across split-view and compact-layout transitions. The production change is localized, behavior is covered by a targeted regression test, and no sensitive, schema, deployment, or default-setting changes are introduced.

No code changes detected at 1a76f93. Prior analysis still applies.

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

Copy link
Copy Markdown
Collaborator Author

Note

Written by gpt-6.1-sol on behalf of Maria

Merged main into the existing head with merge commit 334b33db08ed7429ee258d560ca50d3dbb3d3c39. The sole conflict was the mobile test registration list; both sides' entries are preserved. The PR remains three files, 109 insertions and 37 deletions against main.

Blacksmith vp run check:changed passed formatting, lint, both knip passes, mobile/scripts typechecks, and all 18 workspace tests. Two independent source reviews found no issues on this head. New-head CI is awaiting mirror synchronization.

Native Android resizing/folding and captures remain unverified: adb lists no attached devices. Browser evidence cannot exercise the Android workspace root.

# Conflicts:
#	apps/mobile/vite.config.ts

Copy link
Copy Markdown
Collaborator Author

Note

Written by gpt-6.1-sol on behalf of Maria

Pushed merge commit 1a76f93797484e041de6f72b47bbe5e79b42ad3c without force. The mobile test-list conflict preserves both sides. Scope remains three files, 109 additions and 37 deletions.

All 30 reported checks are green, with no conflicts. Blacksmith vp run check:changed passed formatting, lint, both knip passes, affected typechecks, and all 18 workspace tests. Two independent source reviews approved this head. CodeRabbit found no actionable issues; its description finding is addressed.

Native Android resizing/folding, scroll behavior, and captures remain unverified because adb lists no attached devices. This remains a verification gap before calling the UI ready. No dev servers were started; the task testbox is stopped.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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