Repository navigation
fix(mobile): keep selected offline environment threads visible - #83
Merged
Merged
Conversation
Hide offline environments removed every thread from an environment the user had explicitly selected, so an active remote thread disappeared under its own ubuntu-main + blaze filter and the empty state blamed the offline setting. An explicitly selected environment is no longer hidden by the offline filter in the thread list, its settled shelf, or pending tasks, and the offline empty state only shows when no environment is selected. Verified with the useThreadListV2 regression (selected offline environment keeps its threads, pending task, and shelf scope) and vp run check:changed. Model: muse-wonder-1.0-contributor via Muse Code
|
Desktop had the same contradiction as mobile: scoping the sidebar to a project on an offline environment hid all of its threads. filterSidebarV2VisibleThreads now keeps explicitly scoped threads, the older settled shelf still pages scoped offline environments, and mobile also exempts environments whose project is explicitly scoped (not only a selected environment). Empty states only blame the offline filter when nothing is explicitly selected or scoped. Verified: Sidebar.logic (87 tests) and useThreadListV2 regressions failed before and pass after; combined surface tests and vp run check:changed pass. A second-model review (opencode/deepseek/deepseek-flash) confirmed both surfaces with no blocking findings. Model: muse-wonder-1.0-contributor via Muse Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With Hide offline environments on, mobile showed "No visible threads" under the ubuntu-main + blaze filter even though an active remote thread existed there (Finish Blaze V2 distributed integration on Ubuntu, remote project blaze at /fast/projects/blaze). The thread was readable through tools, but not discoverable or openable in the list. The offline filter removed every thread from an environment the user had explicitly selected, and the empty state blamed the offline setting regardless of the selected filter. Desktop (web/Electron sidebar) had the same contradiction on the project axis: scoping to a project on an offline environment hid all of its threads.
Change
Mobile:
useThreadListV2no longer hides an explicitly selected environment, or an environment whose project is explicitly scoped: its threads, pending tasks, and older settled shelf scope stay listed even when that environment counts as offline. Aggregate (nothing explicitly selected/scoped) offline hiding is unchanged, so archived/offline filtering still works as intended.Desktop/web (Electron wraps web):
filterSidebarV2VisibleThreadskeeps a thread whose environment+project is explicitly scoped, even when its environment is offline; unscoped offline hiding and the open-thread (keptThreadKey) retention are unchanged, andsidebarHidesOfflineThreadsno longer claims rows are hidden under a scope.useSidebarThreadsstill pages a scoped offline environment, narrowed to the scoped projects.Regressions:
useThreadListV2test: selecting the offline environment, and separately scoping only to its project, each keep its threads (85 items), pending task, and shelf scope, while the unselected view still hides them. Both cases returned 0 items before the fix.Sidebar.logictest: scoping to the offline environment's project now lists its thread (visibleIds(remoteScope, hidden())was[]), andsidebarHidesOfflineThreadsis false under that scope.Scope and approval
Focused fix of an obvious bug in the offline-filter features (#80 mobile, #29 web): the explicit filter and the offline filter contradicted each other on both clients. No prior issue; the user reported it directly with a screenshot and asked for this fix, then asked for the desktop surface to be covered too.
Verification
vp test run apps/web/src/components/Sidebar.logic.test.ts apps/mobile/src/features/threads/useThreadListV2.test.tsx apps/mobile/src/features/home/home-list-options.test.tsx packages/client-runtime/src/state/presentation.test.ts— 4 files, 94 tests passed.vp run check:changed— format, lint, knip, typecheck (3 packages), changed tests, and react compiler all pass.Model: muse-wonder-1.0-contributor via Muse Code