Skip to content

fix: retire workspace picker results when dismissed - #61

Open
ooiuuii wants to merge 1 commit into
tt-a1i:mainfrom
ooiuuii:fix/workspace-picker-dismissal
Open

ooiuuii wants to merge 1 commit into
tt-a1i:mainfrom
ooiuuii:fix/workspace-picker-dismissal

Conversation

@ooiuuii

@ooiuuii ooiuuii commented Oct 9, 2026

Copy link
Copy Markdown

Why

After the native folder picker has returned, Add Workspace may still wait for command presets. Pressing Escape closes the picking dialog, but its still-active continuation later reopens confirmation when that older response arrives. AppOverlays intentionally retains the flow component after first use, so unmount cleanup does not retire this dismissed request.

Approach

Expose the existing effect cancellation closure through a ref and invoke it from the common cancel handler. Route picking dismissal and demo close through that handler. Keep trigger-replacement/unmount cleanup and API/store behavior unchanged. One UI owner file changes.

Validation

New checks on 2026-10-09 against main f8f1343:

  • RED 02:13:27–02:13:31 UTC: Escape closes the dialog, then releasing the captured preset response reopens one dialog (expected zero)
  • Final GREEN controls 02:15:05–02:15:28: late successful/error responses stay dismissed; normal/repeated opens select the correct folder; current preset/native errors remain visible; native cancellation closes silently; old failed request does not replace a newly opened folder; workspacePath rerender does not revive a dismissed flow. Zero page errors
  • Actual AppOverlays → AddWorkspaceFlow → AddWorkspaceDialog and Radix Escape behavior in Chromium; production HTTP routes, temporary SQLite, real directory probes and real preset response bodies
  • Native picker selection is explicitly synthetic through its existing service seam. The picker HTTP response completes before Escape; no real OS-modal dialog was operated
  • pnpm install --frozen-lockfile, pnpm check, pnpm build, web-source TypeScript and git diff --check passed
  • One scoped review found no blockers; no code changes afterward

Runnable browser proof is retained outside the production diff under the current UI testing exception. An initial GREEN diagnostic stopped on an incorrect hidden-input textContent assertion; the proof was corrected to inputValue without changing the product, then controls passed.

Not run: real OS picker, Windows/mobile/real-device/layout acceptance, demo interaction, successful workspace creation/persistence, full pnpm test, whole-project tsc, release/package/native matrix. Workspace transition proof is an actual AppOverlays prop rerender, not full sidebar navigation. Existing build/style warnings retained; no full-suite or remote-CI pass claimed.

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