Skip to content

feat(gateway): default FeatureSet for unmapped roots + Mapped workspaces filter - #175

Merged
its-mash merged 1 commit into
mainfrom
feat/default-featureset-unmapped-roots
Jun 18, 2026
Merged

feat(gateway): default FeatureSet for unmapped roots + Mapped workspaces filter#175
its-mash merged 1 commit into
mainfrom
feat/default-featureset-unmapped-roots

Conversation

@its-mash

Copy link
Copy Markdown
Member

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 explicit WorkspaceBinding is 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)

  • Scope (broadest): Tier 1b (roots reported, no binding) and Tier 3 (rootless / no grants / unknown) fall back to the default Starter FS. Tier 1c PendingRoots and Tier 2 ClientGrant unchanged.
  • Grace window (~5s, DEFAULT_PENDING_ROOTS_GRACE): a roots-capable/unknown session is held at PendingRoots before 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-session first_seen clock in SessionRootsRegistry.
  • Broadcast: SpaceDefault yields a real fingerprint (Some(starter)), so the existing record_resolutionnotify_peer_lists_changed flip fires the moment a root is reported — the client re-pulls and lands on either the default fallback or its mapped FS.
  • Off-switch: the Starter is builtin (un-deletable), so the lever is emptying it → still resolves, grants nothing. The Deny branch is now purely defensive (no default Space / degenerate no-Starter state).

UX

  • Auto-prompt kept: unmapped folders still emit 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."
  • Workspaces tab: new Mapped filter segment (All / Live / Mapped / Unmapped) with counts + stable 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 SpaceDefault outcomes.

Local validation: 283 Rust integration + 118 gateway unit + 203 TS tests, full-workspace clippy -D warnings, typecheck, ESLint (0 errors).

…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>
@its-mash
its-mash merged commit 7fc50a0 into main Jun 18, 2026
13 checks passed
@its-mash
its-mash deleted the feat/default-featureset-unmapped-roots branch June 18, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant