Skip to content

Agentic UI: Close the create-site flow on Escape - #4453

Draft
sejas wants to merge 2 commits into
trunkfrom
close-create-site-modal-on-escape-080319
Draft

Agentic UI: Close the create-site flow on Escape#4453
sejas wants to merge 2 commits into
trunkfrom
close-create-site-modal-on-escape-080319

Conversation

@sejas

@sejas sejas commented Aug 5, 2026

Copy link
Copy Markdown
Member

Related issues

  • None — small UX follow-up to the create-site onboarding flow.

How AI was used in this PR

AI-assisted editing helped draft the Escape-handling tests; the behavior, guards, and final code were reviewed and verified manually.

Proposed Changes

Pressing Escape now closes the create-site onboarding flow, matching how the fullscreen Settings overlay already behaves. Guards keep it from firing when it shouldn't:

  • Ignored when there are no sites yet (the flow can't be dismissed, same as the hidden close button).
  • Ignored while a site creation/import is in flight, so a stray Escape can't abandon a running submit.
  • Ignored when an open menu, select, or dialog already consumed the keypress (defaultPrevented), so Escape closes the popover instead of the whole flow.

Also aligns the Settings overlay's close icon with the onboarding one: the settings view portals outside the classic-density container, so its close icon rendered oversized; it now matches at 16px, and a redundant 32px override in the fullscreen chrome is removed.

Testing Instructions

  1. Run npm start (or serve the agentic UI via npm run cli:build:ui && node apps/cli/dist/cli/main.mjs ui --no-open).
  2. With at least one site, open New site → Create and press Escape — the flow closes back to the workbench.
  3. Open a select/menu inside the flow, press Escape — only the popover closes; press again to close the flow.
  4. Start a site creation and press Escape while it runs — the flow stays.
  5. Delete all sites (or first run), open onboarding — Escape does nothing.
  6. Open Settings and compare the close button size with onboarding's — they match.

Pre-merge Checklist

  • Unit tests pass (npm test) — 4 new Escape cases in layout-onboarding
  • Type checks pass
  • Lint passes on modified files

@sejas sejas self-assigned this Aug 5, 2026
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