fix(workspace): exclude MiniApp workspaces from recent workspaces list - #1869
Merged
bobleer merged 1 commit intoJul 30, 2026
Merged
Conversation
MiniApp agent runs work inside directories the MiniApp owns under `<userRoot>/data/miniapps/` (deck folders, customization drafts). Those directories were tracked as ordinary workspaces, so they appeared in the recent workspaces list on the Welcome page and in the nav workspace switcher, and could even be auto-opened on startup when no workspace was active. Filter them out at the web data source next to the existing linked worktree exclusion, which also hides entries already recorded in local history. On the backend, workspace options for MiniApp-owned paths no longer add to recent, and startup history load drops entries persisted before this change. MiniApp workspaces stay registered, so their agent sessions keep resolving them.
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.
Summary
MiniApp agent runs work inside directories the MiniApp owns under
<userRoot>/data/miniapps/(deck folders, customization drafts). Those directories were tracked as ordinary workspaces, so they appeared in the recent workspaces list on the Welcome page and in the nav workspace switcher, and could even be auto-opened on startup when no workspace was active.They are now excluded, following the same approach as #1865 for linked worktrees:
global-state.ts): newisMiniAppWorkspacenext toisLinkedWorktreeWorkspace, both applied through oneisExcludedFromRecentWorkspacespredicate in the startup snapshot andgetRecentWorkspaces. This also hides entries already recorded in a user's local history.workspace/service.rs):normalize_workspace_options_for_pathforcesadd_to_recent = falsefor MiniApp-owned paths, so no new entries accumulate; startup history load drops recent ids persisted before this change. MiniApp workspaces stay registered, so their agent sessions keep resolving them.Type and Areas
Type: bug fix
Areas: Rust core, web UI
Motivation / Impact
Opening a MiniApp that runs an agent (for example the built-in PPT Live decks) polluted the recent workspaces list with one
deck-<timestamp>-<id>entry per deck. These are MiniApp storage rather than user projects, so they pushed real projects out of the capped recent list, andAppLayoutcould auto-switch into one of them on startup when no workspace was active.Users now see only real workspaces in the Welcome page list and the nav switcher menu; already-recorded MiniApp entries disappear on next launch and are cleaned out of
workspace_dataat startup. No behavior change for MiniApp agent sessions themselves.Verification
New tests:
global-state.test.ts— a deck path under.../bitfun/data/miniapps/builtin-ppt-live/decks/...is dropped from the startup snapshot's recent list.service.rs::track_workspace_activity_keeps_miniapp_workspaces_out_of_recent_history— tracking a MiniApp deck path still registers the workspace (resolvable by path) but leaves recent history empty.Note:
cargo clippy -p bitfun-core --lib --testsfails on a pre-existing, unrelatedsuspicious_open_optionslint inservices-core/src/json_store.rs:346, untouched by this PR.Reviewer Notes
path_manager.miniapps_dir()withPath::starts_with(exact), while the web layer has no app-paths API and matches the/data/miniapps/segment on the normalized root path.user_data_diris always<userRoot>/data, so that segment holds on macOS, Linux, and Windows, and it covers.draftscustomization roots as well as agent workspaces.