fix(host): restart home on early-edit cancel; clamp the dialog to short viewports

Escape canceling a path edit opened before any level listed relaunches
the home listing instead of stranding a blank picker (the editor had
superseded the initial request while parent was still null). The card's
height clamps to the viewport (min(420px, 100dvh - 32px)); header and
footer are flex-none and the columns scroll, so Open/Cancel stay
reachable on landscape phones and short embedded windows.
This commit is contained in:
creatixchu
2026-07-29 04:46:49 +08:00
parent 48141b0007
commit 1a9b84b19e
4 changed files with 34 additions and 5 deletions

View File

@@ -1,12 +1,15 @@
/* Directory-browser dialog (figma 813-23126 family). The shared Modal renders
* headless here — mask, card, Escape only — and this module owns the figma
* frame exactly: fixed 600×420 card, header (title + crumbs, l3 separator),
* frame: 600×420 card (viewport-clamped), header (title + crumbs, l3 separator),
* the one-or-two-column Miller content, and the bordered footer. */
/* Doubled class beats Modal's own .dialog regardless of stylesheet order. */
/* Short viewports clamp the card: header/footer are flex-none and the
* columns scroll, so shrinking the height keeps Open/Cancel reachable
* instead of clipping them below a fixed overlay. */
.dialog.dialog {
width: min(600px, 100%);
height: 420px;
height: min(420px, calc(100dvh - 32px));
padding: 0;
gap: 0;
}