feat(gateway): default FeatureSet for unmapped roots + Mapped workspaces filter - #175
Merged
Merged
Conversation
…ces filter Unmapped/rootless/unknown sessions now fall back to the default Space's Starter FeatureSet (new `ResolutionSource::SpaceDefault`) instead of being denied, so a freshly-opened folder works out of the box. An explicit WorkspaceBinding is only needed when a folder should see something other than the default. Reverses the prior resolver-v3 "deny unmapped" design. - Scope: Tier 1b (roots reported, no binding) and Tier 3 (rootless / no grants / unknown) both fall back to the default Starter FS. - Grace window (~5s) holds roots-capable sessions at PendingRoots before defaulting, so a client about to report a folder resolves straight to its mapped FS instead of flashing default-then-mapped. After the grace it goes straight to the Space default, never to another client's grants. - Off-switch: empty the Starter (builtin, can't be deleted); the Deny branch is now purely defensive. - Auto-prompt kept: still emits WorkspaceNeedsBinding on SpaceDefault (gated on a folder root, so rootless sessions stay silent). UI copy reframed from "no tools until you map" to "already using your default Starter tools". - Workspaces tab: new "Mapped" filter segment + stable filter test ids. Tests: resolver fallback, grace-lapse-not-grants, empty-Starter off-switch, unbound effective features, Mapped/Unmapped filter. Updated all resolver integration tests for the new 5-arg constructor and SpaceDefault outcomes. Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
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.
What & why
Unmapped/rootless/unknown sessions now fall back to the default Space's Starter FeatureSet (new
ResolutionSource::SpaceDefault) instead of being denied. A freshly-opened folder works out of the box; an explicitWorkspaceBindingis only needed to give a folder something other than the default. This deliberately reverses the prior resolver-v3 "deny unmapped is the safe default" design to solve the "every folder needs mapping" pain.Resolver changes (
feature_set_resolver.rs)PendingRootsand Tier 2ClientGrantunchanged.DEFAULT_PENDING_ROOTS_GRACE): a roots-capable/unknown session is held atPendingRootsbefore defaulting, so a client about to report a folder resolves straight to its mapped FS instead of flashing default-then-mapped (the "not default and mapped" guarantee — exactly one resolution). After the grace it goes straight to the Space default, never to another client's grants (per-session isolation preserved). Backed by a new per-sessionfirst_seenclock inSessionRootsRegistry.SpaceDefaultyields a real fingerprint (Some(starter)), so the existingrecord_resolution→notify_peer_lists_changedflip fires the moment a root is reported — the client re-pulls and lands on either the default fallback or its mapped FS.Denybranch is now purely defensive (no default Space / degenerate no-Starter state).UX
WorkspaceNeedsBinding(gated on a folder root, so rootless sessions stay silent). The sheet + cards + tooltips are reframed from "no tools until you map" to "already using your default Starter tools — map for a specific set."data-testids. (Clear-unmapped already shipped in feat(workspaces): bulk-clear unmapped folders + clearer approval opt-out #172.)Tests
New: resolver fallback, grace-lapse-not-grants, empty-Starter off-switch, unbound effective-features, Mapped/Unmapped filter. Updated all resolver integration tests for the new 5-arg constructor and
SpaceDefaultoutcomes.Local validation: 283 Rust integration + 118 gateway unit + 203 TS tests, full-workspace
clippy -D warnings, typecheck, ESLint (0 errors).