feat(phase-1/m5.2): tray + single-instance lock + first-run onboarding

SingleInstanceLock (OS FileLock on <dataDir>/incido.lock) claims the library
before the container starts; a second launch prints INSTANCE and exits 0 —
which also converts the wedged-child trap into a clean message. Tray
(ApplicationScope extension; Item/Separator menu) attaches only for
non-scripted, non-headless, SystemTray-capable sessions; close=quit kept.
First-run dialog explains the per-machine library + backup bridge, gated on
onboarded_v1 in the window store. Two new §3 traps recorded (Window
iconBitmap overload ambiguity; Tray receiver/params) + new harness legs in §1.

Verify: second launch same dir (INSTANCE ... exits, 0); interactive run
(TRAY attached, live KDE SNI); :desktopApp:run --args="--data-dir
/tmp/incido-m52-ob --onboarding-smoke --exit-after 8" (shown=true,
flag-persisted=true PASS) then --onboarding-verify (shown=false gate
respected); --keys-smoke KEYS ALL-OK; --self-test id=1;
:core:data-jvm:smoke M1a PASS; assembleDebug SUCCESSFUL.
This commit is contained in:
Incido Developer committed 2026-10-06 22:54:48 +13:00
1 parent 639f39d187
commit 0cad7729aa
7 files changed
+255

No files matched your search

+43
View File
@@ -853,6 +853,49 @@ M5.1 suite:
**Next up: M5.2** — tray + single-instance + first-run onboarding.
**M5.2 — tray + single-instance + first-run onboarding: DONE.**
- **Single instance:** `SingleInstanceLock` claims an OS `FileLock` on
`<dataDir>/incido.lock` BEFORE the container opens the library. A
second launch prints `INSTANCE another Incido already owns …` and
exits 0. Bonus: this converts the §3 "wedged AWT child holds the
ObjectBox lock" trap into that same clean message. OS locks die with
the process, so `kill -9` needs no cleanup — a pid file would.
- **Tray:** `Tray` sits directly in `application {}` (it is an
*ApplicationScope* extension, NOT callable from window content — and
its params are icon/state/tooltip/menu only, no onClick; menu items
are capitalized `Item(…)`/`Separator()`). Show = unminimize, Quit =
exitApplication. Closing the window still quits (no hide-to-tray —
keeps exit semantics and every harness leg). Guarded
`!headless && SystemTray.isSupported()`; scripted legs never attach.
`TRAY attached` proven live under KDE.
- **Onboarding:** first-run dialog (window.Dialog per the §3 trap) says
where the library lives and that the backup file is the phone bridge.
Gate = `onboarded_v1` flag in the desktop-only window store; dismiss
writes it; scripted legs skip it. `--onboarding-smoke` (fresh dir:
shown + flag persisted) and `--onboarding-verify` (same dir: not
shown) close both directions.
- **New §3 trap paid:** Compose 1.7.3 `Window` goes AMBIGUOUS between
its two overloads when the `iconBitmap` arg is passed ("cannot infer
type" on an unrelated lambda param). Window/taskbar icon therefore
comes from the distribution icon (M5.3).
```
M5.2 suite:
second launch, same dir INSTANCE … this copy exits (exit 0)
:desktopApp:run (interactive-style) TRAY attached (live KDE SNI)
:desktopApp:run … --onboarding-smoke shown=true PASS, flag-persisted=true PASS
:desktopApp:run … --onboarding-verify shown=false PASS (gate respected)
:desktopApp:run … --keys-smoke KEYS ALL-OK (regression)
:desktopApp:run … --self-test SELFTEST id=1
:core:data-jvm:smoke RESULT: M1a PASS
assembleDebug BUILD SUCCESSFUL
```
**Next up: M5.3** — packaging: version wired to versionName, icons,
`.desktop` entry, createDistributable re-verify + size, Wayland/HiDPI
verdict.