From 0eaad7e9470dcad666c9c7ece7991d6e852595b4 Mon Sep 17 00:00:00 2001 From: Brad Groux <3053586+BradGroux@users.noreply.github.com> Date: Thu, 3 Sep 2026 22:28:33 -0500 Subject: [PATCH 1/2] fix: register reopened overlays before browser input --- docs/audits/DISCOVERY-POPOUTS-1440.md | 6 ++++++ web/src/components/ui/UiOverlay.tsx | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/audits/DISCOVERY-POPOUTS-1440.md b/docs/audits/DISCOVERY-POPOUTS-1440.md index 4d17ce5f..20a02bbc 100644 --- a/docs/audits/DISCOVERY-POPOUTS-1440.md +++ b/docs/audits/DISCOVERY-POPOUTS-1440.md @@ -13,3 +13,9 @@ Rebuilt packaged macOS acceptance passed on integration candidate `6044bd62ea726 The complete discovery flow passed in light and dark themes at 1700×900/16px and 1180×760/20px, with normal animations enabled. Initial focus, scrolling, footer containment, disabled-command behavior, nested menu Escape, route navigation, chained Search/Settings/Create handoffs, and exact opener restoration passed. Search responses were deterministic fixtures; no real save, launch, or provider message was sent. The native harness initially expected the full-mode Settings title; the packaged Board Only badge correctly contributes to its accessible name. The selector now explicitly accepts either exact title. That was a harness mismatch, not a failed handoff. The previously reported Settings controls were also visibly aligned in the native capture. Native captures live under `/private/tmp/vk-native-ui-1389.8cJNtK/discovery-*.png`. Screenshots are diagnostic acceptance evidence, not final maintained media. This remains an unsigned version-6.1.6 candidate; installed-app replacement, final maintained screenshots/GIFs, full integration CI, and release completion are not claimed. + +## Interrupted-reopen timing correction + +Integration QA `33830608672` caught Escape failing immediately after an animated palette was reopened. The original browser regression reproduced locally with no test changes. A targeted key-event trace then caught Escape while the palette's ancestor was still inert: passive stack registration had not made the reopened overlay active yet. Registration now runs in a layout effect, completing before the next browser input. Stack ordering, opener retention, cleanup, and handoff cancellation are unchanged. + +After the correction, the unchanged rapid-reopen regression passed 100 consecutive runs with normal animations, zero retries, and all debug instrumentation removed. Sixteen focused overlay/command unit tests, web typecheck, and changed-source lint passed. Specification and standards reviews found no actionable findings. The prior packaged evidence predates this timing delta; updated packaged acceptance is still required. diff --git a/web/src/components/ui/UiOverlay.tsx b/web/src/components/ui/UiOverlay.tsx index 3c6fcd89..77f5f499 100644 --- a/web/src/components/ui/UiOverlay.tsx +++ b/web/src/components/ui/UiOverlay.tsx @@ -4,6 +4,7 @@ import { useContext, useEffect, useId, + useLayoutEffect, useMemo, useRef, useState, @@ -90,7 +91,9 @@ export function UiModal({ const stack = useContext(OverlayStack); const register = stack?.register; const opener = useRef(undefined); - useEffect(() => { + // Reopened overlays must join the Escape/focus stack before the browser can + // deliver another key event to their still-mounted transition content. + useLayoutEffect(() => { if (!props.opened) return; // Effect replay (including a lazy surface reveal) must not replace the // original opener with a field or background heading focused during mount. From 23cdfabd5d2c4ba4dd1ca1b95f078a32bdc5a50d Mon Sep 17 00:00:00 2001 From: Brad Groux <3053586+BradGroux@users.noreply.github.com> Date: Thu, 3 Sep 2026 22:31:28 -0500 Subject: [PATCH 2/2] docs: record native interrupted palette acceptance --- docs/audits/DISCOVERY-POPOUTS-1440.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/audits/DISCOVERY-POPOUTS-1440.md b/docs/audits/DISCOVERY-POPOUTS-1440.md index 20a02bbc..a1ecd88e 100644 --- a/docs/audits/DISCOVERY-POPOUTS-1440.md +++ b/docs/audits/DISCOVERY-POPOUTS-1440.md @@ -18,4 +18,6 @@ Native captures live under `/private/tmp/vk-native-ui-1389.8cJNtK/discovery-*.pn Integration QA `33830608672` caught Escape failing immediately after an animated palette was reopened. The original browser regression reproduced locally with no test changes. A targeted key-event trace then caught Escape while the palette's ancestor was still inert: passive stack registration had not made the reopened overlay active yet. Registration now runs in a layout effect, completing before the next browser input. Stack ordering, opener retention, cleanup, and handoff cancellation are unchanged. -After the correction, the unchanged rapid-reopen regression passed 100 consecutive runs with normal animations, zero retries, and all debug instrumentation removed. Sixteen focused overlay/command unit tests, web typecheck, and changed-source lint passed. Specification and standards reviews found no actionable findings. The prior packaged evidence predates this timing delta; updated packaged acceptance is still required. +After the correction, the unchanged rapid-reopen regression passed 100 consecutive runs with normal animations, zero retries, and all debug instrumentation removed. Both complete discovery browser flows also passed at their three viewport/text sizes. Sixteen focused overlay/command unit tests, web typecheck, and changed-source lint passed. Specification and standards reviews found no actionable findings. + +Integration candidate `b1b167a784e4adb8bd901bf781daa27f0b34957f` rebuilt successfully with `pnpm desktop:package:mac:dir`. Its packaged web index SHA-256 is `0a43c7a7b7834b43cbdc2a5f76efa4b75655a63384cb08b87498524e5a67977f`; `index-RL49OtTu.js` is `b9d4a582de4cb37a713a0cbe08985080485c6ac5a97c772f59be3ab2fc0a9bee` and matches the built source asset byte-for-byte. The strengthened native discovery scope passed both themes at 1700×900/16px and 1180×760/20px, with five rapid-reopen/Escape cycles per combination followed by the complete discovery flow. All 20 rapid cycles retained exact opener focus and canceled the stale Create Task command. The initial harness attempt wrongly required a palette toolbar button at the compact size; the corrected harness uses the supported keyboard shortcut from visible Search, matching the existing discovery helper. No product assertion was relaxed. No unexpected write occurred and the isolated unsigned app was closed. Full integration CI, installed-app acceptance, and final maintained media remain outstanding.