fix(mobile): defer filesystem navigation - #4799
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Co-authored-by: codex <codex@users.noreply.github.com>
443baa5 to
c34f344
Compare
ApprovabilityVerdict: Approved This PR adds async navigation coordination to the mobile file browser, using an existing pattern from the web app. The changes are self-contained UX improvements with no security or sensitive implications, and the author is the primary contributor to this file. You can customize Macroscope's approvability policy. Learn more. |
Co-authored-by: codex <codex@users.noreply.github.com>
What changed
Mobile currently commits a folder tap before the destination browse data is ready, replacing the current directory with an intermediate loading state. This PR brings the deferred-navigation behavior from web to the mobile add-project and clone-destination browsers.
Connected environments preload the destination before committing the path. The shared latest-intent coordinator prevents slower overlapping taps from overwriting a newer navigation, while typed path edits invalidate pending navigation. Offline environments skip preloading and still navigate immediately instead of waiting on a query that may never settle.
#4797 has merged, and this branch is now restacked directly on its merge commit in
main. The diff changes one mobile file only.Validation
vp test run packages/client-runtime/src/state/filesystem.test.ts— 4 tests passedvp run --filter @t3tools/mobile typecheckvp lint --report-unused-disable-directives apps/mobile/src/features/projects/AddProjectScreen.tsxvp run lint:mobile— SwiftLint, ktlint, and detekt passed before restacking; the mobile patch is byte-for-byte equivalent after rebasevp fmt --check apps/mobile/src/features/projects/AddProjectScreen.tsxSimulator/video verification is pending explicit approval to launch the mobile test environment.
GPT-5.6-sol via the Codex harness in T3 Code.
Note
Low Risk
Scoped UX change to mobile add-project browsing only; reuses existing client-runtime navigation helpers with no auth, data, or API surface changes.
Overview
Mobile add-project and clone-destination folder browsers no longer update the path immediately on folder taps, which was showing an intermediate loading state before the destination listing was ready.
A shared
useBrowsePathInputhook centralizes path state and routesFolderBrowsernavigation throughnavigateToBrowsePath. When the remote environment is connected, the destination browse query is preloaded before the path commits; offline environments skip preload and commit right away.createBrowseNavigationCoordinatorserializes overlapping taps so only the latest navigation wins, and manual path edits invalidate pending navigation. Primary actions stay disabled while navigation is in flight.Reviewed by Cursor Bugbot for commit 91f32fc. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Defer filesystem navigation in mobile project screens to preload directory entries before committing path
useBrowsePathInputhook that coordinates folder navigation: when possible, it preloads directory entries vialoadBrowsePathbefore updating the displayed path, and exposes anisBrowseNavigatingflag.FolderBrowserto delegate 'up one level' and entry selection to the newnavigateToBrowsePathprop instead of immediately setting path state.AddProjectLocalFolderScreenandAddProjectDestinationScreenwhile navigation is in progress.Macroscope summarized 91f32fc.