Skip to content

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

Merged
sejas merged 5 commits into
trunkfrom
close-create-site-modal-on-escape-080319
Aug 13, 2026
Merged

Agentic UI: Close the create-site flow on Escape#4453
sejas merged 5 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
@sejas
sejas marked this pull request as ready for review August 12, 2026 15:18
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 3973305 vs trunk

app-size

Metric trunk 3973305 Diff Change
App Size (Mac) 1406.64 MB 1406.64 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 3973305 Diff Change
load 1020 ms 1063 ms +43 ms ⚪ 0.0%

site-startup

Metric trunk 3973305 Diff Change
siteCreation 7518 ms 7530 ms +12 ms ⚪ 0.0%
siteStartup 2861 ms 2870 ms +9 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and works as expected 👍
Nice improvement

@sejas
sejas merged commit 5527443 into trunk Aug 13, 2026
13 checks passed
@sejas
sejas deleted the close-create-site-modal-on-escape-080319 branch August 13, 2026 10:06
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.

3 participants