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:
1 parent
639f39d187
commit
0cad7729aa
7 files changed
+255
No files matched your search
@@ -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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,12 @@ Commands that must stay green:
|
||||
# after leg A (it proves the relaunch), against the same fresh data dir:
|
||||
./gradlew :desktopApp:run --args="--data-dir /tmp/incido-desktop-crypto --crypto-self-test --crypto-passphrase m3-script-pw --exit-after 20" # leg A (leaves lib encrypted)
|
||||
./gradlew :desktopApp:run --args="--data-dir /tmp/incido-desktop-crypto --crypto-reopen --exit-after 15" # leg B (verifies + decrypts back)
|
||||
# M5.1/M5.2 keyboard + onboarding legs. Onboarding legs are SEQUENTIAL
|
||||
# against the same fresh dir (smoke writes the onboarded flag, verify
|
||||
# asserts the gate):
|
||||
./gradlew :desktopApp:run --args="--data-dir /tmp/incido-desktop-keys --keys-smoke --exit-after 12"
|
||||
./gradlew :desktopApp:run --args="--data-dir /tmp/incido-desktop-ob --onboarding-smoke --exit-after 8" # fresh dir: shown + flag
|
||||
./gradlew :desktopApp:run --args="--data-dir /tmp/incido-desktop-ob --onboarding-verify --exit-after 6" # same dir: stays hidden
|
||||
```
|
||||
|
||||
Versions that matter: Compose Multiplatform `1.7.3`, AndroidX Compose BOM
|
||||
@@ -107,6 +113,15 @@ app version `0.4.2.0` (code 38).
|
||||
command group — leg B opening the library leg A is still writing produces
|
||||
bogus FAIL lines and a corrupt-on-paper result. Sequential, separate processes,
|
||||
fresh dir first.
|
||||
* Compose 1.7.3 `Window`: passing the `iconBitmap` arg makes the two overloads
|
||||
ambiguous — the error surfaces as "cannot infer type" on an UNRELATED lambda
|
||||
parameter. Leave it out; the distribution icon (jpackage) owns the taskbar.
|
||||
* `Tray` (1.7.3) is an `ApplicationScope` extension — call it in `application {}`
|
||||
next to `Window`, not inside window content. Params: icon/state/tooltip/menu
|
||||
(no onClick); menu members are capitalized `Item`/`Separator`/`CheckboxItem`.
|
||||
* KWin under Wayland drops xdotool XTEST keys aimed at the XWayland window even
|
||||
when focus probes show it focused — desktop key handling can't be injected
|
||||
headless here; verify real keypresses by hand.
|
||||
|
||||
## 4. M2 — the backup bridge (next up; the product's reason to exist)
|
||||
|
||||
|
||||
Reference in new issue
Block a user