refactor(client): share filesystem browse navigation - #4797
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:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Co-authored-by: codex <codex@users.noreply.github.com>
f789747 to
a508142
Compare
ApprovabilityVerdict: Approved Mechanical refactor extracting shared filesystem browse navigation logic from web and mobile apps into the client-runtime package. The implementations are functionally equivalent with consistent call site updates and preserved tests. You can customize Macroscope's approvability policy. Learn more. |
## What's Changed * Add OTA update checks to mobile settings by @juliusmarminge in pingdotgg/t3code#4686 * fix(mobile): threads load snapped to bottom on iOS by @t3dotgg in pingdotgg/t3code#4689 * feat: default sidebar v2 on for nightly and dev builds by @t3dotgg in pingdotgg/t3code#4491 * fix(web): 33 web UI fixes by @maxktz in pingdotgg/t3code#4700 * Make mobile Thread List v2 the default by @juliusmarminge in pingdotgg/t3code#4717 * Fix mobile showcase workflow without Clerk by @juliusmarminge in pingdotgg/t3code#4718 * Fix relay credential lookup for unlinked environments by @juliusmarminge in pingdotgg/t3code#4692 * Settle merged PR threads immediately by @t3dotgg in pingdotgg/t3code#4704 * feat(web): add maria's sidebar header artwork toggle by @maxktz in pingdotgg/t3code#4652 * feat(web): add appearance settings category by @maxktz in pingdotgg/t3code#4715 * fix(desktop): allow updater-controlled relaunch by @0x4bs3nt in pingdotgg/t3code#4721 * fix(web): prevent diff panel scroll jumping by @0x4bs3nt in pingdotgg/t3code#4724 * Link inline code file paths in chat markdown by @juliusmarminge in pingdotgg/t3code#4726 * Fix Android showcase capture and rebuild v2 queued rows by @juliusmarminge in pingdotgg/t3code#4730 * perf(server): negotiate permessage-deflate on the websocket by @t3dotgg in pingdotgg/t3code#4705 * docs: overhaul agent guidance by @t3dotgg in pingdotgg/t3code#4782 * Prevent sidebar row labels from truncating by @juliusmarminge in pingdotgg/t3code#4789 * perf(server): gzip large thread snapshots by @t3dotgg in pingdotgg/t3code#4788 * fix(web): stashed prompts now survive switching providers by @t3dotgg in pingdotgg/t3code#4787 * Fix Git ref refresh resource storms by @juliusmarminge in pingdotgg/t3code#4727 * perf(server): trim stale context-window rows and drop dead replay RPC by @t3dotgg in pingdotgg/t3code#4791 * fix(web): defer command palette filesystem navigation by @juliusmarminge in pingdotgg/t3code#2109 * fix(release): skip scripts during Vercel installs by @t3dotgg in pingdotgg/t3code#4796 * refactor(client): share filesystem browse navigation by @juliusmarminge in pingdotgg/t3code#4797 * fix(mobile): defer filesystem navigation by @juliusmarminge in pingdotgg/t3code#4799 * refactor(server): use native HTTP compression streams by @juliusmarminge in pingdotgg/t3code#4798 * Remove Connect waitlist and add GA announcement tooling by @juliusmarminge in pingdotgg/t3code#4691 **Full Changelog**: pingdotgg/t3code@v0.0.29...v0.0.30 ## What's Changed * Add OTA update checks to mobile settings by @juliusmarminge in pingdotgg/t3code#4686 * fix(mobile): threads load snapped to bottom on iOS by @t3dotgg in pingdotgg/t3code#4689 * feat: default sidebar v2 on for nightly and dev builds by @t3dotgg in pingdotgg/t3code#4491 * fix(web): 33 web UI fixes by @maxktz in pingdotgg/t3code#4700 * Make mobile Thread List v2 the default by @juliusmarminge in pingdotgg/t3code#4717 * Fix mobile showcase workflow without Clerk by @juliusmarminge in pingdotgg/t3code#4718 * Fix relay credential lookup for unlinked environments by @juliusmarminge in pingdotgg/t3code#4692 * Settle merged PR threads immediately by @t3dotgg in pingdotgg/t3code#4704 * feat(web): add maria's sidebar header artwork toggle by @maxktz in pingdotgg/t3code#4652 * feat(web): add appearance settings category by @maxktz in pingdotgg/t3code#4715 * fix(desktop): allow updater-controlled relaunch by @0x4bs3nt in pingdotgg/t3code#4721 * fix(web): prevent diff panel scroll jumping by @0x4bs3nt in pingdotgg/t3code#4724 * Link inline code file paths in chat markdown by @juliusmarminge in pingdotgg/t3code#4726 * Fix Android showcase capture and rebuild v2 queued rows by @juliusmarminge in pingdotgg/t3code#4730 * perf(server): negotiate permessage-deflate on the websocket by @t3dotgg in pingdotgg/t3code#4705 * docs: overhaul agent guidance by @t3dotgg in pingdotgg/t3code#4782 * Prevent sidebar row labels from truncating by @juliusmarminge in pingdotgg/t3code#4789 * perf(server): gzip large thread snapshots by @t3dotgg in pingdotgg/t3code#4788 * fix(web): stashed prompts now survive switching providers by @t3dotgg in pingdotgg/t3code#4787 * Fix Git ref refresh resource storms by @juliusmarminge in pingdotgg/t3code#4727 * perf(server): trim stale context-window rows and drop dead replay RPC by @t3dotgg in pingdotgg/t3code#4791 * fix(web): defer command palette filesystem navigation by @juliusmarminge in pingdotgg/t3code#2109 * fix(release): skip scripts during Vercel installs by @t3dotgg in pingdotgg/t3code#4796 * refactor(client): share filesystem browse navigation by @juliusmarminge in pingdotgg/t3code#4797 * fix(mobile): defer filesystem navigation by @juliusmarminge in pingdotgg/t3code#4799 * refactor(server): use native HTTP compression streams by @juliusmarminge in pingdotgg/t3code#4798 * Remove Connect waitlist and add GA announcement tooling by @juliusmarminge in pingdotgg/t3code#4691 **Full Changelog**: pingdotgg/t3code@v0.0.29...v0.0.30 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.30
What changed
Web and mobile independently derived filesystem browse paths and filtered directory entries, so the same behavior lived in both apps and had already drifted around hidden directories.
This follow-up moves the React-free browse model into
client-runtime: target-directory derivation, leaf filtering, parent navigation, hidden-directory visibility, and exact matches. It relocates the existing web deferred-navigation coordinator and preload policy beside that model. Web and mobile are now thin consumers that provide the current query and render the returned state; mobile keeps its existing immediate-navigation behavior without a second app-specific state machine.Mobile and web now expose hidden directories consistently when the typed leaf starts with
.. Desktop inherits the web behavior. No provider or wire-contract changes are involved.Diff accounting:
+126 / -140— net-14+70 / -64— net+6, consolidated underclient-runtime+196 / -204— net-8Validation
vp test run packages/client-runtime/src/state/filesystem.test.ts apps/web/src/components/CommandPalette.logic.test.ts— 10 tests passedvp run --filter @t3tools/client-runtime typecheckvp run --filter @t3tools/web typecheckvp run --filter @t3tools/mobile typecheckvp lint --report-unused-disable-directivesfor all changed filesvp run lint:mobile— SwiftLint, ktlint, and detekt passedvp fmt --checkfor all changed filesGPT-5.6-sol via the Codex harness in T3 Code.
Note
Low Risk
Refactor with behavior preserved via moved tests; no auth, RPC, or data-model changes—main risk is subtle browse UX regressions in add-project flows.
Overview
Moves filesystem browse logic out of web and mobile into
@t3tools/client-runtime/state/filesystem: path derivation (getFilesystemBrowsePath), entry filtering (filterFilesystemBrowseEntries), deferred navigation (createBrowseNavigationCoordinator), and browse preload gating (canPreloadBrowsePath).Web command palette and mobile add-project folder browser now call those helpers instead of duplicating browse-path math, filtering, and coordinator code in
CommandPalette.logic/AddProjectScreen. Browse-related tests move fromCommandPalette.logic.test.tstofilesystem.test.ts.Shared filtering aligns hidden-directory behavior (e.g. showing dot-prefixed folders when the typed leaf starts with
.) across platforms without wire or provider changes.Reviewed by Cursor Bugbot for commit a508142. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Share filesystem browse navigation utilities across mobile and web clients
getFilesystemBrowsePath,filterFilesystemBrowseEntries,createBrowseNavigationCoordinator, andcanPreloadBrowsePathtopackages/client-runtime/src/state/filesystem.tsas shared utilities.CommandPalette.tsxandAddProjectScreen.tsxto use these shared utilities instead of duplicated local logic.createBrowseNavigationCoordinator,canPreloadBrowsePath, andfilterBrowseEntriesfromCommandPalette.logic.tsalong with their tests.FolderBrowserare no longer sorted alphabetically; they now render in source order.Macroscope summarized a508142.