Skip to content

feat(workspaces): setting to disable the new-folder mapping prompt - #177

Merged
its-mash merged 1 commit into
mainfrom
feat/setting-disable-mapping-prompt
Jun 18, 2026
Merged

feat(workspaces): setting to disable the new-folder mapping prompt#177
its-mash merged 1 commit into
mainfrom
feat/setting-disable-mapping-prompt

Conversation

@its-mash

Copy link
Copy Markdown
Member

What & why

The "map this folder?" sheet pops whenever a connected app opens an unmapped folder. It's helpful, but some users find it noisy — so add a way to turn it off. On by default. With it off, an unmapped folder still works (it uses the default Starter set); the user just isn't prompted.

Changes

  • Backendget/set_workspace_mapping_prompt_enabled commands (key workspaces.mapping_prompt_enabled, default true via a testable mapping_prompt_enabled_from helper). Registered in the invoke handler.
  • Sheet (WorkspaceBindingSheet) — reads the setting fresh on each workspace-needs-binding event (so a toggle takes effect immediately, no re-subscribe) and swallows the event when disabled. Adds an in-sheet "Asked too often? Stop asking about new folders" link that turns the setting off and closes — the quick escape hatch.
  • Settings — new Workspaces card with an "Ask to map new folders" toggle.

Tests

  • Rust: test_mapping_prompt_enabled_defaults_on (missing/garbage → on; only "false" disables).
  • TS: WorkspaceBindingPrompt.test.tsx — sheet shows when enabled, stays hidden when disabled, and the disable link calls set_workspace_mapping_prompt_enabled({enabled:false}) then closes.

Local validation: desktop crate settings tests, typecheck, ESLint (0 errors), fmt. Pre-commit (fmt + clippy incl. desktop + eslint + typecheck) green.

Adds an "Ask to map new folders" toggle (on by default) so users who find the
"map this folder?" sheet noisy can turn it off — from Settings → Workspaces or
a "stop asking" link in the sheet itself. The folder still works on the default
Starter set when the prompt is off.

- Backend: get/set_workspace_mapping_prompt_enabled commands (key
  `workspaces.mapping_prompt_enabled`, default true via a testable helper).
- Sheet: reads the setting fresh on each `workspace-needs-binding` event and
  swallows it when disabled (no re-subscribe needed); adds an in-sheet "stop
  asking about new folders" link that turns it off and closes.
- Settings: new Workspaces card with the toggle.
- Tests: Rust `test_mapping_prompt_enabled_defaults_on`; TS sheet gating
  (enabled shows / disabled hides) + the disable link.

Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
@its-mash
its-mash merged commit d5df002 into main Jun 18, 2026
13 checks passed
@its-mash
its-mash deleted the feat/setting-disable-mapping-prompt branch June 18, 2026 12:34
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