feat(phase-1/m5.1): desktop Esc back stack + Ctrl+N/Ctrl+comma shortcuts
JVM PlatformBackHandler made real (PlatformBackStack + LocalPlatformBackStack); window drains it on Esc via Window(onPreviewKeyEvent) — the editor rides the shared seam unchanged (draft flush + discard prompt). Shell registers drawer/settings Esc; preview-phase shortcuts. New --keys-smoke leg drives the exact dispatch headlessly. Keypress capture pending-manual (KWin/Wayland drops xdotool XTEST events to the XWayland window). Verify: ./gradlew assembleDebug :composeApp:compileKotlinJvm :desktopApp:build (SUCCESSFUL); :desktopApp:run --args="--data-dir /tmp/incido-keys --keys-smoke --exit-after 12" (KEYS ALL-OK); --self-test/--settings-smoke/--editor-smoke green; :core:data-jvm:smoke M1a PASS.
This commit is contained in:
1 parent
faab0cde98
commit
639f39d187
5 files changed
+300
-56
No files matched your search
@@ -802,6 +802,57 @@ M4.4/M4.5 suite (per commit; final run this entry):
|
||||
window/menu integration, packaging (`createDistributable` re-verify +
|
||||
the M4.3d artifact notes), and the §9 perf pass on the real screens.
|
||||
|
||||
**§1 gate re-run this session: GREEN** (fresh dirs; the two crypto legs
|
||||
as SEPARATE processes; spike probes correctly absent — deleted in
|
||||
M4.5c):
|
||||
|
||||
```
|
||||
:core:data-jvm:smoke RESULT: M1a PASS, exit 0
|
||||
:desktopApp:run … --self-test SELFTEST id=1 → RENDER, exit 0
|
||||
assembleDebug BUILD SUCCESSFUL, exit 0
|
||||
crypto leg A (own process) leg-A ALL-OK (9×PASS), exit 0
|
||||
crypto leg B (own process) LEG-B PASS, leg-B ALL-OK, exit 0
|
||||
```
|
||||
|
||||
**M5.1 — Esc routing + keyboard shortcuts: DONE.**
|
||||
|
||||
- `PlatformBackHandler`'s JVM actual is no longer a no-op:
|
||||
`PlatformBackStack` + `LocalPlatformBackStack` (composeApp jvmMain).
|
||||
Entries are position-stable (remembered object, callback slot
|
||||
refreshed per composition) so a lower screen's recomposition can never
|
||||
jump above the editor. `dispatchBack()` runs the topmost ENABLED
|
||||
entry, false = unconsumed so Esc still reaches popups.
|
||||
- `Main.kt` provides the stack and drains it from
|
||||
`Window(onPreviewKeyEvent)` on Esc (logs `esc(captured)` for manual
|
||||
verification). **The editor changed zero lines** — its commonMain
|
||||
`BackHandler { tryClose() }` rides the seam, so desktop Esc gets the
|
||||
draft flush + "Discard changes?" prompt exactly like Android.
|
||||
- `DesktopShell` registers Esc for drawer + settings; shortcuts **Ctrl+N**
|
||||
(new note) and **Ctrl+comma** (settings) go on `onPreviewKeyEvent` —
|
||||
preview phase wins over focused text fields.
|
||||
- New `--keys-smoke` leg drives the window's exact dispatch
|
||||
(`dispatchBack`) headlessly: clean-editor Esc closes, nothing-enabled
|
||||
does NOT consume, settings Esc closes. One fix en route: the KEYS-leg
|
||||
settings mirror needed `LaunchedEffect(showSettings)` sync or leg (c)
|
||||
read a stale mirror.
|
||||
- **Pending-manual:** real keypresses could not be verified headless —
|
||||
KWin under Wayland does not deliver xdotool XTEST events to the
|
||||
XWayland window (focus probes confirmed the app HAS focus; zero
|
||||
events arrived). One real Esc + Ctrl+N at the desk is the outstanding
|
||||
check; `esc(captured)` logs on the console when it works.
|
||||
|
||||
```
|
||||
M5.1 suite:
|
||||
assembleDebug :composeApp:compileKotlinJvm :desktopApp:build BUILD SUCCESSFUL
|
||||
:desktopApp:run … --keys-smoke KEYS ALL-OK (editor/no-consume/settings 3×PASS), exit 0
|
||||
:desktopApp:run … --self-test SELFTEST id=1, exit 0
|
||||
:desktopApp:run … --settings-smoke SETTINGS shown, exit 0
|
||||
:desktopApp:run … --editor-smoke EDITOR shown, exit 0
|
||||
:core:data-jvm:smoke RESULT: M1a PASS
|
||||
```
|
||||
|
||||
**Next up: M5.2** — tray + single-instance + first-run onboarding.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user