Commit Graph
108 Commits
Author SHA1 Message Date
Incido Developer 6f16e87ec0 feat(phase-1/m5.4): desktop-release Gitea workflow — Linux packaging job
Tag (v*.*.*) + workflow_dispatch (same retry rationale as release.yml). Linux
runner only: jpackage cannot cross-compile and macOS/Windows GA is Phase 2
(§8) — commented job stubs record the matrix shape. createDistributable ->
image smoke under xvfb (SKIPPED-with-message if absent, never faked) ->
packageDeb only when dpkg exists (failure degrades to recorded skip) ->
tar.gz bundling packaging/incido.desktop + icon.png -> attach to the release
with release.yml's retry-and-verify upload pattern. .gitignore: root
libobjectbox-jni-linux-x64.so is ObjectBox CWD self-extraction noise.

Verify: python yaml parse (job + 6 steps); packageDeb/createDistributable/
printPackageVersion exist in :desktopApp:tasks; their local runs green per
M5.3 log. First real tag run remains the live check (recorded).
2026-10-06 23:10:11 +13:00
Incido Developer c894321fdf feat(phase-1/m5.3): packaging wired — derived version, icon/.desktop, image smoke, HiDPI+Wayland verdicts
packageVersion derived from app versionName (0.4.2.0 -> 0.4.2; printPackageVersion
task). packaging/icon.png + packaging/incido.desktop template ship the icon (1.7.3
DSL exposes no iconFile — recorded). Image smoke caught a REAL bug: jlink runtime
lacked jdk.unsupported, DataStore protobuf died on sun/misc.Unsafe only inside the
image; fixed via modules.add. createDistributable re-verified: 171 MB image,
bin/incido --self-test inside it rc=0. HiDPI: sun.java2d.uiScale=2 doubles requested
geometry (screen-clamp proves it). Native Wayland: AWT probe on JDK17 AND 27 both
resolve X11 XToolkit — stays XWayland; JBR bundling is Phase 2. New §3 traps +
M5.3 run log recorded.

Verify: :desktopApp:createDistributable (SUCCESSFUL, 171 MB); image bin/incido
--data-dir /tmp/incido-img-smoke --self-test --exit-after 6 (SELFTEST id=1, RENDER
notes=1, rc=0); :desktopApp:run --keys-smoke KEYS ALL-OK; :core:data-jvm:smoke
M1a PASS; assembleDebug SUCCESSFUL.
2026-10-06 23:05:54 +13:00
Incido Developer 0cad7729aa 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.
2026-10-06 22:54:48 +13:00
Incido Developer 639f39d187 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.
2026-10-06 22:37:37 +13:00
Incido Developer faab0cde98 chore(phase-1/m4.5c): delete spike modules; record M4.4/M4.5 findings
6.6 executed: :spike:data-jvm and :spike:compose-jvm leave the build
now that :desktopApp hosts the real screens (M4.5b) — everything they
proved has a permanent home in :core:data-jvm, :composeApp (jvm) and
:desktopApp; their findings already live in the feasibility log.

tools/DESKTOP_FEASIBILITY.md gains the M4.4a-e + M4.5a-c entries:
seam inventory (image decode, editor intake, voice slot, platform
back, shared settings sections, JVM EXIF), the hide-not-fake §6.5
rulings applied, the harness note about cold-build run timeouts,
the M4.4/M4.5 verification suite, and the M5 next-up.

Verified post-deletion: assembleDebug :desktopApp:build SUCCESSFUL
+ run --self-test --settings-smoke --editor-smoke (SELFTEST id=1,
SETTINGS shown, EDITOR shown, ST_EXIT=0) + :core:data-jvm:smoke
(M1a PASS) + orientationSmoke (M4.4e PASS).
2026-10-06 19:55:26 +13:00
Incido Developer cce35587fc feat(phase-1/m4.5b): desktop shell hosts the REAL shared screens
DesktopShell replaces the M1b placeholder two-pane window with the
app's own composables from commonMain: NoteListScreen (search, FAB,
cards), IncidoDrawer (filters + recent hashtags, in a
ModalNavigationDrawer) and NoteEditorScreen (ViewModel, attachments,
intake seam) — all over LocalAppGraph provides DesktopContainer (the
M4.3 AppGraph face). App.kt's navigation reduces to three pieces of
state (filter / editor / settings). IncidoTheme (shared theme, static
palettes on JVM via the null platformDynamicColorScheme actual) now
themes the window.

The M2/M3 menu skins (BackupActions/SecurityActions composables) are
removed — dead UI once the settings screen drives their exact flows
(BackupFlows / SecurityKeyFlows / toggleDesktopEncryption all live on).
RENDER logging simplified (the shell owns selection now).

Scripted legs: --settings-smoke and --editor-smoke compose the real
screens headlessly — the editor leg proves its ViewModel + intake seam
work on the JVM (JetBrains lifecycle's fallback store owner; the last
open M4 unknown). Both run to clean auto-exit; earlier 124s exits were
cold-build harness time, warm reruns exit 0.

Verified: assembleDebug :desktopApp:build SUCCESSFUL + :desktopApp:run
--self-test --settings-smoke (SELFTEST id=1, SETTINGS shown, ST_EXIT=0)
+ run --self-test --editor-smoke (EDITOR shown, EST_EXIT=0)
+ :core:data-jvm:smoke (M1a PASS); models clean.
2026-10-06 19:48:37 +13:00
Incido Developer d264238640 feat(phase-1/m4.5a): desktop settings screen on the shared sections
DesktopSettingsScreen composes the M4.4d common sections (Appearance
/ Backup / About + building blocks) plus desktop-only Encryption rows.
Android-incapable surfaces are hidden per 6.5: dynamic-color row
(onDynamicColor null), Carnet importer (onImportCarnet null),
SecuritySection entirely (no BiometricPrompt/FLAG_SECURE on the JVM).

Flow dedupe so settings drives the EXACT M2/M3 behaviour, not a copy:
- BackupActions split: BackupFlows/rememberBackupFlows owns the pick+
  bridge + dialog machinery; the menu is now a thin skin (launchImport/
  launchExportPlain/launchExportEncrypted + Dialogs()).
- SecurityActions split: SecurityKeyFlows owns the recovery-key export/
  import dialogs (hasKey gate, overwrite warning, import leg);
  toggleDesktopEncryption() keeps the enable/disable ordering.
- M4.4d sections became PUBLIC (desktopApp is a separate module).

Main.kt: gear button routes list-window <-> settings in-place (no nav
stack yet — desktop nav polish is M5). New scripted leg
--settings-smoke renders the screen headlessly before auto-exit.

Verified: assembleDebug :desktopApp:build SUCCESSFUL + :desktopApp:
run --self-test --settings-smoke (SELFTEST id=1, RENDER notes=1
selected=1, SETTINGS shown, ST_EXIT=0) + :core:data-jvm:smoke
(M1a PASS); models clean.
2026-10-06 19:27:02 +13:00
Incido Developer 0dc5935d1d feat(phase-1/m4.4e): real JVM EXIF orientation normalizer
The §6.3 EXIF row deferred implementation to "M4+ when the JVM
attachment intake lands" — it landed in M4.4c, so the last NoOp
placeholder is gone. JvmImageOrientationNormalizer keeps the Android
contract exactly: orientation 6/3/8 -> bake 90/180/270 into pixels,
re-encode JPEG @ 0.92, return input UNCHANGED for normal/absent/mirror
tags or any decode/rotate failure.

Tooling differs, contract doesn't: com.drewnoakes:metadata-extractor
2.19.0 (first Central pull this phase — recorded) for the tag read,
BufferedImage + AffineTransform for the rotate, ImageIO JPEG writer at
explicit 0.92 for the encode. DesktopContainer now wires it into
NoteRepositoryImpl (was ImageOrientationNormalizer.NoOp).

New probe: :core:data-jvm:orientationSmoke hand-builds an
EXIF-Orientation-90 JPEG (APP1 splice — metadata-extractor is
read-only) and asserts: no-EXIF passthrough, EXIF-90 rewrite, pixels
rotated (4x2 -> 2x4), output stability, garbage passthrough.

Verified: :core:data-jvm:orientationSmoke (RESULT: M4.4e PASS, 5/5)
+ ./gradlew assembleDebug :desktopApp:build SUCCESSFUL
+ :desktopApp:run --self-test (SELFTEST id=1 -> RENDER notes=1
selected=1); objectbox-models clean.
2026-10-06 19:04:09 +13:00
Incido Developer 018db4819c feat(phase-1/m4.4d): shared settings sections to commonMain
AppearanceSection / BackupSection / AboutSection + the building-blocks
helpers (SettingsSection, SettingsToggle, SettingsRow) lifted verbatim
to commonMain as internal — desktop settings (M4.5) composes exactly
these. SettingsScreen keeps the Android-only Security section, the
PIN/biometric screens, the timeout dialog and all SAF wiring.

Design decision (as planned): full commonization of the 1026-LOC
screen buys nothing — SecuritySection is BiometricPrompt + PIN state
machines and the export/import pickers are SAF; sharing the sections
shares the UI, each platform keeps its plumbing. Two callbacks went
nullable to HIDE platform-incapable rows (dynamic color on desktop,
Carnet importer) — Android passes non-null so its pixels are unchanged.

Verified: ./gradlew assembleDebug :desktopApp:build SUCCESSFUL
+ :composeApp:compileKotlinJvm :composeApp:compileDebugKotlinAndroid
+ :desktopApp:run --self-test (SELFTEST id=1 -> RENDER notes=1
selected=1).
2026-10-06 18:56:44 +13:00
Incido Developer 6b5c24e1bc feat(phase-1/m4.4c): editor to commonMain; intake/voice/back seams
NoteEditorScreen + its private helpers move to commonMain. New seams (§6.3/6.5):

- EditorIntake (interface + expect rememberEditorIntake): Android actual
  holds the verbatim launcher code (camera TakePicture + permission
  chain, SAF OpenDocument, RECORD_AUDIO dance, FileProvider/
  ACTION_VIEW open, Toasts, createTempCameraUri/queryDisplayName);
  JVM actual = AWT FileDialog picker + Desktop.open/xdg-open, with
  supportsCamera/supportsVoice=false so the editor HIDES camera + mic
  buttons instead of stubbing them (§6.5).
- VoiceNoteSlot expect composable: Android renders the untouched
  VoiceNoteSection (MediaStore recorder); JVM renders nothing.
- PlatformBackHandler: activity-compose BackHandler on Android, no-op
  on desktop (Esc routing is M5 polish).
- securityManager param became the neutral beginExternalActivity:
  (() -> Unit)? lambda (Android names the Android type only in its
  actual; call sites unchanged). VoiceNoteSection takes the same
  lambda now; App.kt adapts the one call site.

Verified: ./gradlew assembleDebug :desktopApp:build SUCCESSFUL
+ :composeApp:compileKotlinJvm :composeApp:compileDebugKotlinAndroid
+ :desktopApp:run --self-test (SELFTEST id=1 -> RENDER notes=1
selected=1) + :core:data-jvm:smoke (M1a PASS); models clean.
2026-10-06 18:51:47 +13:00
Incido Developer 56949c485f feat(phase-1/m4.4b): image-decode seam; viewer + list move to commonMain
expect/actual decodeImageBytes (§6.3 image-decode): Android actual is
the verbatim BitmapFactory.decodeByteArray + asImageBitmap; JVM actual
is skia Image.makeFromEncoded().toComposeImageBitmap() with
runCatching to keep the null-on-failure contract BitmapFactory gave
the screens. Screens switch produceState<Bitmap?> ->
produceState<ImageBitmap?> and the three BitmapFactory call sites
(list thumbnail, viewer, editor thumbnail stays with the screen next
step). Dispatchers.IO -> the existing M4.3c ioDispatcher seam
(identical actuals).

Verified: ./gradlew :composeApp:compileKotlinJvm
:composeApp:compileDebugKotlinAndroid (BUILD SUCCESSFUL); full gate +:desktopApp:run --self-test + :core:data-jvm:smoke run at the end
of the step chain.
2026-10-06 18:31:08 +13:00
Incido Developer bdb3d7157d feat(phase-1/m4.4a): first screens to commonMain + shared clipboard
Pure moves: IncidoDrawer, ReleaseNotesDialog, PassphraseDialog
(clipboard: Context.getSystemService -> LocalClipboardManager, the
SAME API both targets ship in Compose 1.7.3 - the section 6.3
LocalClipboard+ClipEntry swap is a Compose 1.8-only API, recorded
for M5+). PassphraseGenerator moves behind an internal expect/
actual secureRandomInt (blockingFirst precedent; identical
SecureRandom actuals - both targets ARE the JVM).

New seams justified: secureRandomInt (java.security is not common);
commonMain gains jetbrains lifecycle viewmodel-compose +
runtime-compose (the SAME coordinates androidMain resolved since
M4.1) and material-icons-extended (moved with the screens).

Verified: ./gradlew assembleDebug :desktopApp:build SUCCESSFUL
+ :composeApp:compileKotlinJvm + :desktopApp:run --self-test
(SELFTEST id=1 -> RENDER notes=1 selected=1) + :core:data-jvm:smoke
(M1a PASS); objectbox-models clean.
2026-10-06 18:26:07 +13:00
Incido Developer 31408172df docs(phase-1/m4.3): M4.3 status + §1 gate output; plan handed to M4.4
Also two new §3 traps paid for during the gate re-run: daemon-surviving
desktop JVMs after a client kill (use pkill -9 before re-running against
the same data dir), and never parallelizing two --data-dir runs (leg B
against leg A's half-written library produces bogus FAILs).
2026-10-06 16:44:39 +13:00
Incido Developer 59bd6e106b feat(phase-1/m4.3c): ViewModels off APPLICATION_KEY; DesktopContainer implements AppGraph
Completes the M4.3 container seam:

* NoteListViewModel + NoteEditorViewModel (UiStates and SharedImage
  included) move to commonMain. NoteEditorViewModel had zero android.*
  imports; its four withContext(Dispatchers.IO) sites become
  withContext(ioDispatcher) — a new internal expect/actual whose ACTUALS
  are literally Dispatchers.IO on both targets, so Android behaviour is
  byte-identical (invariant §2.1), merely spelled through the seam.
* New commonMain EncryptionBadge/LibraryVerification: the read-only
  mirror of :core:data's EncryptionVerification. Required because
  :core:data is an androidLibrary invisible to commonMain and must stay
  so (invariant §2.3 — objectbox-android vs objectbox-java classpaths).
  AppGraph gains encryptionBadge; both containers map the real verifier
  result 1:1 at their own seam.
* SettingsViewModel stays in androidMain (SecurityManager, Keystore key
  provider, BackupManager Uri IO, CarnetImporter are genuine Android-only
  services — the graph was NOT widened to fake them, §9) but its factory
  now takes the concrete AppContainer via a new LocalAndroidContainer,
  provided alongside LocalAppGraph in IncidoApp. No APPLICATION_KEY /
  IncidoApplication reference survives in ANY ViewModel: all six call
  sites (drawer, list, editor, settings, pin setup, pin change) build
  factories from the graph/container locals at composition time.
* M4.3 exit proof: DesktopContainer : AppGraph — the same face
  (noteRepository/settingsRepository/encryptionBadge) the commonMain
  ViewModels consume, compiler-checked by :desktopApp building against
  :composeApp's jvm target. repository → noteRepository rename.
  The stand-in two-pane UI still runs (M4.5 consumes the real screens).

Verification (all green, one suite):
  ./gradlew assembleDebug :composeApp:compileKotlinJvm :desktopApp:build
      → BUILD SUCCESSFUL
  ./gradlew :desktopApp:run … --self-test --exit-after 6 → SELFTEST id=1, clean exit
  ./gradlew :core:data-jvm:smoke → RESULT: M1a PASS
  crypto legs (separate processes): leg-A ALL-OK → LEG-B PASS/ALL-OK
  git diff '*/objectbox-models/*' → empty
2026-10-06 16:42:48 +13:00
Incido Developer cd363c7aa5 feat(phase-1/m4.3b): AppGraph seam + first commonMain ViewModel (§6.4 probe GREEN)
M4.3's container seam, proven with the smallest ViewModel:

* commonMain di/AppGraph.kt — the platform-neutral container face
  (noteRepository + settingsRepository) plus LocalAppGraph /
  requireAppGraph. Scope discipline per §9: only services BOTH platforms
  can honestly serve; Keystore/SecurityManager/BackupManager/CarnetImporter
  stay on the concrete AppContainer.
* :core:settings + lifecycle-viewmodel enter commonMain (settings as api —
  AppGraph exposes it). Lifecycle coordinates are the SAME
  org.jetbrains.androidx.lifecycle 2.8.4 aliases androidMain already
  resolved since M4.1, so the §6.4 "verify the artifact set" question is
  answered GREEN for both targets and the state-holder fallback is NOT
  needed: DrawerViewModel moves with its androidx.lifecycle.* imports
  UNCHANGED (offline set keeps the androidx FQCNs).
* DrawerViewModel.Factory(APPLICATION_KEY as IncidoApplication) →
  factory(graph: AppGraph). AppContainer implements AppGraph; IncidoApp
  provides LocalAppGraph at the root (same fallback chain it already used).

Verification (one run):
  ./gradlew :composeApp:compileKotlinJvm assembleDebug → BUILD SUCCESSFUL
  (jvm target = first compile of a commonMain ViewModel on desktop deps)
2026-10-06 16:33:53 +13:00
Incido Developer 5bce1934c1 feat(phase-1/m4.3a): :core:settings → multiplatform (androidTarget + jvm)
Verbatim M4.2 (:core:domain) playbook — both source files moved UNMODIFIED
into commonMain (git records the rename; UserSettings.kt is a pure rename).
This is the visibility gate for M4.3's AppGraph: a KMP commonMain cannot see
plain kotlin("jvm") modules, and M4.3's container seam needs
SettingsRepository/UserSettings from composeApp commonMain.

One new seam, justified per §9 (never widen silently): kotlinx.coroutines
`runBlocking` has no commonMain declaration, so SettingsRepository.snapshot()
now goes through an internal expect/actual `blockingFirst(Flow<T>): T`.
Both actuals are the identical two-liner because both targets are JVM.
Same startup-safety contract (block off the UI thread at startup only).

Consumers unchanged by design: :desktopApp (plain jvm) and :composeApp's
androidMain resolve through variant metadata — zero import changes.

Verification (both green):
  ./gradlew assembleDebug :composeApp:compileKotlinJvm :core:data-jvm:smoke
      → BUILD SUCCESSFUL — RESULT: M1a PASS (one run, all consumers)
  ./gradlew :desktopApp:run --args="--data-dir /tmp/incido-desktop-smoke --self-test --exit-after 6"
      → SELFTEST wrote note id=1 → RENDER notes=1 selected=1
  git diff core/data/objectbox-models → empty (ID model file unchanged)
2026-10-06 16:27:10 +13:00
Incido Developer b774a1feb6 docs(phase-1/m4.2): M4.2 status; plan handed to M4.3 (container seam) 2026-10-06 12:23:00 +13:00
Incido Developer 9ad7c60537 feat(phase-1/m4.2): :core:domain → multiplatform (androidTarget + jvm); NoteColors to commonMain
Phase-0 recommendation #1 ("core:domain is already JVM-clean —
convert it first; zero code changes"), now unlocked by M4.1: common
source sets cannot see plain kotlin("jvm") projects, so the domain
deploy was the gate for making composeApp's commonMain depend on
Note/NoteColor/NoteRepository. Sources move untouched (pure renames);
Flow moves implementation → api (it is in the public repository
interfaces — was already leaking, now stated).

androidTarget() drags in the AGP plugin + a namespace — the module is
now a library-for-Android too, but emits no Android-specific code and
needed no manifest (AGP 8 + namespace). Plain-JVM consumers
(:core:data-jvm, :core:backup, :core:settings, :desktopApp) and AGP
consumers (:core:data, :app) resolve through variant metadata with
ZERO import or build-line changes — verified below.

Then composeApp: api(project(":core:domain")) in commonMain (up from
androidMain), NoteColors.kt moves to commonMain — first real shared
UI-layer file with a domain dependency.

Verified: ./gradlew assembleDebug + :composeApp:compileKotlinJvm +
:core:data-jvm:smoke (M1a PASS) in one run, and
:desktopApp:run --args="--data-dir /tmp/incido-desktop-smoke3
--self-test --exit-after 6" (SELFTEST wrote note id=1).
2026-10-06 12:20:05 +13:00
Incido Developer bce8e9a0dc docs(phase-1/m4.1): M4.1 status + §1 gate re-run output; plan carried to M4.2 2026-10-06 12:17:51 +13:00
Incido Developer fef8f9c2e9 feat(phase-1/m4.1): :composeApp in-place → Kotlin Multiplatform (androidTarget + jvm)
Plan §6.1 step 1, the conservative shape: build converts, Android code
moves UNMODIFIED (git shows pure renames; behaviour diff = zero), and
commonMain starts with only the files that compile for both targets
today — theme Color/Type, PasswordPolicy, ReleaseNotes, LinkedShare-
Composer — behind two new expect/actual seams (justification per §9):

* platformDynamicColorScheme — Android actual keeps the pre-M4
  Build.VERSION + dynamicColorScheme branch verbatim; JVM actual
  returns null (desktop hides dynamic color, per M3's posture).
* relativeTimestamp — Android actual is DateUtils verbatim; JVM
  actual is a java.time approximation of the same format (English-
  only until M4 follow-up; desktop has no locale switch yet).

New friction found paying itself into §3/§2 (all fixed in-tree):
* kotlinMultiplatform must be registered at the ROOT with apply false
  like the other Kotlin markers — sibling modules' markers put KGP on
  the buildscript classpath and the subproject request then dies with
  the kapt-style 'already on classpath with unknown version' (§2.5).
* KMP source-set dependency handlers: platform(libs.x) returns raw
  notation, not a Dependency — use project.dependencies.platform(…);
  debugImplementation is not on the handler (moved to a project-level
  dependencies block); androidTestImplementation dropped (no tests).
* ColorScheme is androidx.compose.material3.ColorScheme, NOT
  ui.graphics — desktop ships it inside material3-desktop, no extra
  artifact needed.
* AGP 8.7.2 > KGP 2.0.21's tested max 8.5 — warning only, same as
  the kapt modules; assembleDebug green.

Deliberate deferrals (documented in the build file): :core:domain is
still kotlin("jvm") so commonMain can't see it — NoteColors moves
when domain converts (M4.2, per the Phase-0 recommendation); screens,
ViewModels and AppContainer move with the container seam (M4.3).

Verified: ./gradlew :composeApp:compileKotlinJvm + assembleDebug +
:core:data-jvm:smoke (M1a PASS) + :desktopApp:run --self-test
(SELFTEST wrote note, clean exit) + git status clean over
core/**/objectbox-models (ID model file unchanged, invariant 2).
2026-10-06 12:15:15 +13:00
Incido Developer 6b8db18cdf docs(phase-1/m3.4): M3 status + scripted key-envelope legs; plan handed to M4
Closes milestone M3 (DESKTOP_PHASE_PLAN §5).

Code (one addition): --key-export / --key-import CLI legs in Main.kt —
the SecurityActions menu's exact codec calls, headless. This makes the
pending physical-phone leg a one-liner once a Waydroid container is
live (recipe recorded in the feasibility doc).

Docs: DESKTOP_FEASIBILITY.md gains the M3.1–M3.4 status section with
the actual run output (leg A/B, KEYENV logs, 0600 ls lines); plan §1
lists the two crypto legs among the must-stay-green commands; §5 marked
DONE; first-actions now point a fresh session at M4 task 1.

Exit criteria, per the plan's wording:
- encrypted desktop library passes EncryptionVerifier's trial-decrypt
  sweep: MET (leg A verified=1 failed=0, wrong key -> AEAD failure
  count, leg B relaunch all-ok).
- phone-exported recovery key decrypts on desktop: MET at format level
  (shared codec source, 84B INCKEY1 envelope, AEADBadTagException on
  wrong passphrase, byte-identical key into a fresh 0600 file); the
  physical phone export is FLAGGED pending (Waydroid container FROZEN,
  start is sudo-gated) with the exact re-run recipe — not assumed done.

Verified: ./gradlew assembleDebug, :core:data-jvm:smoke,
:spike:data-jvm:run, :desktopApp:run --self-test, and both crypto legs
— all green in one final pass (one self-test teardown hang under the
compositor, rc=124, clean on immediate rerun — recorded, environmental).
2026-10-06 07:39:54 +13:00
Incido Developer 000f4095cc feat(phase-1/m3.3): desktop at-rest encryption — key file, container wiring, security menu
Milestone M3 task 3 (DESKTOP_PHASE_PLAN §5). Three pieces:

1. DesktopKeyProvider — the JVM FieldKeyProvider. The plan's keyring
   condition is FAILed honestly: no keyring library is in the catalog
   and the candidates are unverified on this stack, so the sanctioned
   fallback applies: the 32-byte field key lives in `field.key` inside
   the library dir, written via temp+atomic-move with 0600 POSIX perms
   (File.setReadable/setWritable fallback for non-POSIX fs). It speaks
   the phone's recovery format natively through EncryptedKeyCodec
   (importRecoveryKey / exportRecoveryKey — INCKEY1, PBKDF2-200k,
   AES-GCM, wrong passphrase throws before anything is written).
   Key retention on disable: the sweep decrypts first, then flags
   clear, but the key file stays (Android's deleteKey-on-disable is
   Keystore-scoped; keeping it lets users re-enable and re-export).
   Stated, not silent.

2. DesktopContainer now mirrors AppContainer fully: settings -> cipher
   auto-install from snapshot (isEncryptionActive AND key on disk)
   BEFORE the repository -> NoteCryptoService -> EncryptionVerifier ->
   checkNow at startup. shutdown() cancels appScope.

3. UI: SecurityActions menu (theme cycle + encrypt/decrypt toggle +
   recovery-key import/export, incl. Android's overwrite-warning gate)
   reusing the backup menu's pickFile/PassphraseDialog (now internal,
   parameterized title/extensions). theme_mode drives Material3 via
   colorScheme (M3 MaterialTheme has no darkTheme param). dynamic_color
   / use_biometric / block_screenshots are NOT shown — no JVM
   equivalent, hide-don't-fake. Window geometry persists to its own
   incido_window.preferences_pb (desktop-only state; position left to
   KWin).

Verification (scripted legs in Main.kt, --crypto-self-test / --crypto-reopen):
  leg A: probe note -> key+cipher+sweep -> verifier trial-decrypt
    PASS (verified=1 failed=0) -> transparent repo read -> WRONG KEY
    REJECTED via AEAD tag -> INCKEY1 envelope 84 bytes, wrong-pw
    rejected, key byte-match -> LEG-A PASS.
  leg B (separate process = real relaunch): settings survived, cipher
    auto-installed, sweep all-ok, decrypt sweep reverses it -> PASS.
  :desktopApp:run --self-test regression green; assembleDebug green.
  ls confirms field.key is -rw------- (0600).
One environmental note: a leg-A run earlier in the session wedged in
XWayland window teardown (never reached exitApplication); the rerun
auto-exited cleanly — same one-off as the M3.2 startup wedge.
2026-10-06 07:26:17 +13:00
Incido Developer 40e2b9ff52 feat(phase-1/m3.2): FieldKeyProvider seam — AesGcmFieldCipher + EncryptionVerifier shared
Milestone M3 task 2 (DESKTOP_PHASE_PLAN §5): the cipher the desktop
build needs. AesGcmFieldCipher never touched Android APIs — only its
key SOURCE (ObjectBoxKeyProvider) did. New fun interface
FieldKeyProvider { getOrCreateKey(): ByteArray } in org.incido.data.crypto
is the seam; the class moves into the shared sources compiled by BOTH
:core:data (Android) and :core:data-jvm (desktop).

EncryptionVerifier (pure coroutines over NoteCryptoService) moves with
it — M3's desktop container needs the same trial-decrypt badge logic,
and the plan names the CipherHolder/NoteCryptoService/EncryptionVerifier
wiring as the thing to preserve.

Android diff is mechanical: AppContainer + SettingsViewModel pass
objectBoxKeyProvider::getOrCreateKey (SAM conversion) instead of the
provider object; NoteListViewModel's FQN import follows the package.
Behavior unchanged — same class, same bytes on the wire.

Justification for widening the seam (rules of engagement §9): the
interface replaces the concrete-class constructor parameter exactly as
planned; no other API moved.

Verified: ./gradlew assembleDebug (green) + ./gradlew :desktopApp:run
--args="--data-dir /tmp/incido-desktop-smoke --self-test --exit-after 6"
(green — :core:data-jvm compiles the shared crypto). One unrelated
GTK/XWayland window-startup wedge observed on a background run (process
never reached first composition; not reproducible on re-run, not a data
regression) — recorded for honesty.
2026-10-06 06:31:18 +13:00
Incido Developer 8db835640e feat(phase-1/m3.1): :core:settings — SettingsRepository shared, store injected
Milestone M3 task 1 (DESKTOP_PHASE_PLAN §5): move UserSettings +
SettingsRepository into a plain kotlin("jvm") module so the desktop
build reads/writes the SAME preferences keys and .preferences_pb format
the phone uses. Package name org.incido.compose.data.settings kept, so
the Android diff is file moves + one constructor change.

Seam: SettingsRepository now takes an injected DataStore<Preferences>.
Android supplies the preferencesDataStore(name = "incido_settings")
Context-extension store (new AndroidSettingsStore.kt, moved verbatim);
desktop builds it with PreferenceDataStoreFactory.create(
corruptionHandler = ReplaceFileCorruptionHandler, produceFile) — the
Phase-0 API delta (no Context extension on the multiplatform core
artifact). snapshot() keeps runBlocking for startup-only use.

DesktopContainer grows settingsRepository first, mirroring AppContainer
construction order ahead of M3's cipher install. dynamic_color /
use_biometric / block_screenshots keys ride along but have no desktop
UI — hidden, not faked (M3 exit rule).

Verified: ./gradlew assembleDebug (green; :app needed :core:settings on
its classpath — MainActivity reads userSettingsFlow, same pattern as
:core:domain) + ./gradlew :desktopApp:run --args="--data-dir
/tmp/incido-desktop-smoke --self-test --exit-after 6" (RENDER/SELFTEST
sequence intact) + ./gradlew :core:data-jvm:smoke (green).
2026-10-06 06:20:13 +13:00
Incido Developer 561d16eb0c fix(phase-1/m2.4b): encrypted imports were a silent no-op on-device
Manual Waydroid pass (phone exports encrypted -> re-imports the same
file through the real UI) caught it: the confirm dialog closed but no
import ran and no snackbar appeared. PassphraseDialog.onConfirm's
shared preamble nulls all URI slots before routing on mode, and the
IMPORT branch never re-armed pendingImportUri -- so the preview
confirm dialog's Import button read null and skipped viewModel.import
entirely. Plain-JSON imports bypass the passphrase dialog, which is
why every scripted desktop leg (M2.1-2.5) stayed green.

Fix: re-arm pendingImportUri in the IMPORT branch before preview;
wrong-pw/dismiss paths still null it and zero the retained chars.

Verified on-device after rebuild + `waydroid app install`: export
snackbar, magic-sniffed "Decrypt backup" sheet, 4-note preview, and
the dedupe snackbar "Imported 0 note(s), skipped 4 already imported."

Also lands the Waydroid test rig used for the pass (tools/WAYDROID_
TESTING.md + tools/inject2.c: uinput tap/move/key/text/swipe injector)
and the full M2.4b write-up in DESKTOP_FEASIBILITY.md. M2 exit
criteria met: bidirectional lossless round-trip plain+encrypted.
2026-10-06 05:40:44 +13:00
Incido Developer 29288b0370 test(m2): make :core:data-jvm:smoke idempotent — wipe its probe library in doFirst
The probe asserts exact note counts; running it twice in a row against the surviving build/data-jvm-smoke directory failed on count assertions (found while verifying m2.5). The task now cleans the directory like backupSmoke does.
2026-10-05 19:48:54 +13:00
Incido Developer 9cb7fdbf58 perf(phase-1/m2.5): export memory measured on synthesized worst-case libraries
Phase 1 M2 task 5 (tools/DESKTOP_PHASE_PLAN.md §4): measure & record,
no redesign. New :core:data-jvm:backupMemory probe (2g heap) samples
heap-used at 1 ms during BackupBridge.exportPlain — the phone's own
export path — across four fresh libraries:

  24 MB data (3 att)  → peak 230 MB   |  2 MB text x2000 notes → 140 MB
  80 MB data (10 att) → peak 777 MB   | 320 MB data (40 att)  → OOM at -Xmx2g

Attachments drive memory (~9–10x allocation pressure: store load →
base64 String → UTF-8 bytes → JsonElement tree); note count alone is
trivial. The plan's 250 MB gate trips at ~25–30 MB of attachments, and
the phone (no largeHeap) shares the ceiling — a pre-existing Android
limitation, unchanged by the bridge extraction. The real library
exports at 366 KB ≈ 1000x headroom. Bonus: a ~1.6 GB library dies in
objectbox-java's DbFullException before the bridge ever sees it.

Verdict: record, don't redesign. Streaming formatVersion=2 stays parked
for Phase 2, required only if attachment libraries approach ~25 MB.
2026-10-05 19:48:02 +13:00
Incido Developer 52ccceb732 feat(phase-1/m2.4a): scripted encrypted backup legs — the app round-trips ICDBKP1 envelopes
Phase 1 M2 task 4, desktop half (tools/DESKTOP_PHASE_PLAN.md §4). New
--backup-export-enc <path> + --backup-passphrase <pw> flags drive the
exact calls the RequirePassphrase/Passphrase dialogs make, headlessly.

Verified across two launches on fresh libraries:
  run A: import plain(27) → reimport skipped=27 → exported-enc=27 magic ok
  run B: preview encrypted=true → imported=27 → wrong-pw preview rejected
         → reimport imported=0 skipped=27

Gotcha found (and honoured): EncryptedBackupCodec zeroes the passphrase
CharArray in BOTH encrypt and decrypt — the array is single-use fuel.
The dialogs already comply (fresh toCharArray() per call); the scripted
block re-derives it via newPw() for the same reason.

Device half (4b: phone re-imports a desktop-made envelope + sees the
dedupe snackbar) follows on Waydroid with the M2 wrap-up.
2026-10-05 19:43:42 +13:00
Incido Developer 031d8570b4 feat(phase-1/m2.3): import dedupe — importing the same file twice adds nothing
Phase 1 M2 task 3 (tools/DESKTOP_PHASE_PLAN.md §4). Logic lives in
BackupBridge so both platforms get it through the one bridge:

- BackupBridge.import gains skipExisting (default true) and returns
  ImportSummary(imported, skipped). A note is skipped when the library
  already holds the key (createdAt, updatedAt, sha256(content)) — the
  triple the export preserves verbatim, trustworthy only since the M2
  import-timestamp fix. Keys are snapshotted BEFORE importing, so two
  genuinely identical notes inside one file still both import into a
  fresh library; only a second import of the same file is a no-op.
  Snapshotted keys include trashed notes. skipExisting=false restores
  the old additive behaviour (the documented override).
- Android: BackupManager.import passes the flag and returns the summary
  (signature-identical call for SettingsViewModel); its snackbar now
  reports the skip count. Screen layouts untouched — exit criterion
  "Android backup screens unchanged" holds.
- Desktop: the import confirm dialog swaps its "duplicates persist"
  warning for a working "Skip notes that are already here" checkbox
  (default ON); scripted path prints the re-import outcome.
- Format unchanged: formatVersion stays 1 (streaming/dedupe-at-format
  level stays a Phase-2 formatVersion=2 idea).

Verification passed: :core:data-jvm:backupSmoke (new step — re-import
skipped=27, override added 27, store=54; RESULT M2 round-trip PASS on
the real export) + :desktopApp:run --args="--data-dir /tmp/incido-m2t3
--backup-import <export> --backup-export … --exit-after 8" (imported=27
skipped=0 → exported=27 → reimport imported=0 skipped=27, clean exit) +
assembleDebug + :core:data-jvm:smoke + :desktopApp:run --self-test —
all green; output recorded in DESKTOP_FEASIBILITY.md.

Known limitation (by design): attachments are not in the key.
2026-10-05 19:33:07 +13:00
Incido Developer cf0e74b68d feat(phase-1/m2.2): desktop Import/Export — the phone bridge has a UI
Phase 1 M2 task 2 (tools/DESKTOP_PHASE_PLAN.md §4): :desktopApp can now
speak the phone's backup format through the extracted bridge.

- New BackupActions.kt: top-bar overflow menu (Import from file… /
  Export plain / Export encrypted). Import = AWT FileDialog ->
  BackupBridge.preview -> passphrase dialog on INCDBK1 (wrong passphrase
  stays open for retry) -> BackupPreview confirm dialog -> import.
  Export = save-picker -> exportPlain / passphrase + exportEncrypted.
  All heavy bridge calls run on Dispatchers.IO; results via Snackbar.
- Same package-level BackupBridge calls Android's BackupManager shim
  makes — format shared by construction, not reimplementation. Android's
  PassphraseDialog.kt deliberately NOT ported (M4 moves the real one to
  common code).
- :desktopApp gains implementation(:core:backup).
- Scripted headless path for CI: --backup-import/--backup-export drive
  the identical bridge calls without dialog clicking.

Verification passed: :desktopApp:run --args="--data-dir /tmp/...
--backup-import <real phone export> --backup-export /tmp/m2t4-exp.json
--exit-after 8" (preview 27 / imported 27 / exported 27, clean exit) +
:core:data-jvm:backupSmoke on the DESKTOP-written export (all PASS) +
python cross-check: notes (createdAt,updatedAt,content) and attachment
Base64 identical phone->desktop->phone + assembleDebug +
:core:data-jvm:smoke + :desktopApp:run --self-test — all green.
Output recorded in DESKTOP_FEASIBILITY.md (incl. one unreproduced
first-run exit hang to watch in M5).
2026-10-05 19:23:47 +13:00
Incido Developer 8facbe718b test(m2): backupSmoke — round-trip a real Android export through :core:backup, + import-timestamp fix
Phase 1 M2 verification probe, driven by a real phone export (27 notes,
1 attachment, 14 orphan tags; the file is user data and stays out of the
repo):

- :core:data-jvm:backupSmoke --args="<export.incido.json> [libDir]" —
  preview, import into a fresh JVM library, re-export + field-by-field
  compare, encrypted envelope export (wrong passphrase rejected),
  encrypted import into a 2nd library with attachment-byte equality.

The probe caught a PRE-EXISTING Android bug the phone also has: upsert /
saveNoteWithHashtags stamped createdAt+updatedAt to now on every insert,
so backup import rewrote every note's history — and would defeat the
(createdAt, updatedAt, sha256(content)) dedupe key M2 task 3 depends on.
Justified behavior change (invariant 1: not silent): non-zero caller
timestamps are now honoured, 0 still means now. The Android editor
passes its own stamps (verified at both Note(...) sites), so only the
import path changes. addAttachment gains createdAt: Long = 0L;
importSnapshot passes the phone value through.

Verification passed: :core:data-jvm:backupSmoke (RESULT: M2 round-trip
PASS on the real export) + assembleDebug + :core:data-jvm:smoke (after a
forced codegen regen: "ID model file unchanged") + :desktopApp:run
--self-test + :spike:data-jvm:run — all green; output recorded in
DESKTOP_FEASIBILITY.md.

Known pre-existing gap left open (documented): importSnapshot never
recreates orphaned hashtag rows.
2026-10-05 19:03:31 +13:00
Incido Developer 7cc4eda90d feat(phase-1/m2.1): :core:backup — codecs + stream-based BackupBridge
Phase 1 M2 task 1 (tools/DESKTOP_PHASE_PLAN.md §4): extract the backup
bridge from :composeApp into a plain kotlin("jvm") module so the desktop
build can import/export the phone file format.

- git mv BackupCodec / EncryptedBackupCodec / EncryptedKeyCodec into
  core/backup, keeping the org.incido.compose.data.backup package so the
  Android diff is file moves + one dependency line (no import churn).
- New BackupBridge: the four BackupManager operations over
  InputStream/OutputStream instead of Uri (incl. the v0.3.3.3 preview
  hotfix catches); BackupPreview moves with it, same package.
- BackupManager stays in :composeApp as a thin Uri -> stream SAF shim,
  public API unchanged. Dedupe = task 3, desktop picker UI = task 2.

Verification passed: ./gradlew :core:backup:build :core:data-jvm:smoke
:spike:data-jvm:run + assembleDebug + :desktopApp:run --args="--data-dir
/tmp/incido-desktop-smoke --self-test --exit-after 6" — all green; run
output recorded in tools/DESKTOP_FEASIBILITY.md (Phase 1 status).
2026-10-05 18:51:07 +13:00
Incido Developer b11c02e1b4 docs(phase-1): cold-start handoff plan for the desktop track
Adds tools/DESKTOP_PHASE_PLAN.md: everything a fresh session needs with no
prior context — current module shape, the exact commands that must stay
green, pinned versions, the invariants (tracked ObjectBox model file, the
objectbox-android / objectbox-java classpath rule, kapt and Compose
Desktop plugin quirks), the traps already paid for, and the M2/M3/M4/M5
milestones with exit criteria.

Every claim is checked against the working tree rather than remembered:
the coupling inventory (per-file android.* import counts), the 8
DataStore keys, AesGcmFieldCipher's single getOrCreateKey() call, the
portability of BackupCodec/EncryptedBackupCodec, and the pinned versions
(Kotlin 2.0.21, AGP 8.7.2, Compose Multiplatform 1.7.3, ObjectBox 4.0.3).

Open questions are marked as such rather than guessed — the JVM EXIF
decoder and OS-keyring libraries are unverified, and the AGP/KMP
friction around the composeApp conversion is called out as the least-known
part of M4, with a fallback shape and a time-boxed decision rule.
2026-10-05 18:38:52 +13:00
Incido Developer 5f45b0921b feat(phase-1/m1b): :desktopApp — desktop shell over the real repository
Phase 1 milestone M1b: a Compose Multiplatform window driven by the same
NoteRepositoryImpl the Android app uses, over its own ObjectBox library.

  DesktopContainer  mirrors AppContainer's construction order (store,
                    CipherHolder, repository). Owns its library at
                    $XDG_DATA_HOME/incido — a separate library per machine,
                    since ObjectBox is single-writer; the backup file (M2)
                    is the only bridge to the phone. --data-dir opens
                    another library, e.g. one pulled off a phone.
  Main.kt           two panes, save-as-you-type with a 400ms debounce,
                    favourite toggle. Material 3 defaults on purpose: the
                    app's theme and screens arrive with the M4 composeApp
                    conversion, which deletes this stand-in.

Verified headlessly (--self-test drives the same repository calls the "+"
button and the star make, --exit-after auto-closes), against a library
previously written by :core:data-jvm:smoke — i.e. a different module's
generated MyObjectBox, same schema:

  RENDER notes=0 selected=null    first frame (collectAsState initial value)
  RENDER notes=1 selected=1       ObjectBox flow delivered
  SELFTEST wrote note id=2        write path through the UI's own calls
  RENDER notes=2 selected=2       and it came back through the flow
  reopen -> RENDER notes=2        persisted

Gotcha recorded in the findings doc: the first composition always sees the
empty initial value of collectAsState, so anything asserting on note counts
must watch the flow rather than the first frame.

Still synthetic: theme + screens. Not wired yet: settings, encryption (M3),
backup bridge (M2), packaging (M5). assembleDebug verified green.
2026-10-05 18:28:24 +13:00
Incido Developer 9fe4763aa7 feat(phase-1/m1a): platform-neutral data layer + :core:data-jvm
Phase 1 milestone M1a (Development Plan §6, desktop track): make the whole
data layer usable from a non-Android build, without touching what the
Android app compiles.

:core:data splits its sources:
  src/main/kotlin      platform-neutral — entities, repository, field
                       crypto, NoteCryptoService. Compiled by BOTH
                       :core:data and :core:data-jvm. Must not import
                       android.*
  src/androidMain/kotlin  Android-only seam implementations.

Two seams were required, both identified by the Phase-0 spike:
  ObjectBoxStore          Context on Android, a directory on desktop. Same
                          FQN in sibling modules that are never on one
                          classpath — which is also what keeps
                          objectbox-android and objectbox-java (they ship
                          the same io.objectbox.* classes) apart.
  ImageOrientationNormalizer  EXIF rotation needs a bitmap decoder; the
                          implementation moved verbatim out of
                          NoteRepositoryImpl, which is now platform-free.
                          The parameter is required, not defaulted, so a
                          platform that forgets it fails the build.

New :core:data-jvm compiles those shared sources against objectbox-java /
objectbox-linux with its own codegen. `:core:data-jvm:smoke` runs the real
NoteRepositoryImpl (save + hashtags + attachment round-trip + close/reopen)
on the JVM: PASS, with the generator reporting "ID model file unchanged" —
one schema, two generated runtimes.

Also: .gitignore excluded **/objectbox-models/, so the schema contract was
never committed and a fresh clone regenerated UIDs. default.json is now
tracked; the rest of that directory stays ignored. This matters more now
that two modules generate from it.

Verified: :core:data-jvm:smoke PASS, assembleDebug green.
2026-10-05 18:20:59 +13:00
Incido Developer 8b66e82acb spike(desktop): Phase 0 feasibility probes + findings
Adds the throwaway Phase-0 spike (Development Plan §6.3) that answers
whether Incido can become a Compose Multiplatform desktop app without
abandoning ObjectBox, its crypto layer, or its UI layer. All six
questions came back PASS; findings live in tools/DESKTOP_FEASIBILITY.md.

  :spike:data-jvm    ObjectBox kapt codegen + native runtime on a plain
                     JVM, DataStore Preferences without a Context, and
                     the app's own EncryptedKeyCodec round-tripping.
  :spike:compose-jvm Compose Desktop rendering the app's real theme
                     layer + core:domain, plus jpackage packaging.

Additive only: nothing outside spike/ depends on these, and the Android
build is untouched (assembleDebug verified green).
2026-10-05 18:20:46 +13:00
Incido Developer f87ca17ded feat: v0.4.2.0 — voice notes (Opus 32 kbps mono), toolbar reorder, backup-first release notes
dev / Build debug APK (push) Successful in 57s
release / Build & attach release APK (push) Successful in 1m31s
Voice notes: record in-note via framework MediaRecorder; takes stored as compact Opus-in-Ogg (.opus, 32 kbps, single channel, 48 kHz) on API 29+ with AAC/.m4a fallback on API 26-28; MediaPlayer bar with Download to system Downloads. Editor toolbar reordered Photo / Voice / Attach / Tasks / Shopping list, hashtag justified flush right. Release notes across README / PREVIOUS_HISTORY / ReleaseNotes / CONTRIBUTING / Development Plan now open every release with a back-up-before-installing warning (standing convention). versionCode 38, versionName 0.4.2.0, APP_VERSION lockstep; assembleDebug + assembleRelease green.
v0.4.2.0
2026-09-23 16:56:57 +12:00
Incido Developer 1d97376aef fix: v0.4.1.1 — saved notes leave Drafts; Enter adds row in price box
dev / Build debug APK (push) Successful in 47s
release / Build & attach release APK (push) Successful in 1m20s
Two editor regressions shipped in v0.4.1.0, both fixed here:

- Saving a note published it but left UiState.existing.isDraft = true,
  so the editor's dispose-time flushDraft() re-persisted the note as a
  draft and it reappeared under Drafts. The save path now adopts the
  published row into state (isDraft = false, current hashtags kept),
  letting persistDraftNow()'s already-published guard make that flush
  a no-op; saved notes stay on Home.
- Enter on a shopping-list Price field had no keyboard handler, so the
  bare ImeAction.Next fell through to system focus traversal and — the
  price being the row's last field inside the LazyColumn — wrapped the
  cursor back to the Title. The field now wires
  KeyboardActions(onNext = onAddAfter) like the Product field: Enter
  adds a fresh row with the cursor in its Product box.

Version lockstep per §11.1: versionCode 37, versionName 0.4.1.1,
APP_VERSION, README intro + current-release line + smoke-test
regression steps, PREVIOUS_HISTORY.md section, ReleaseNotes.RECENT
(v0.3.8.1 drops off the 5-entry tail), Dev Plan §10 row.

assembleDebug + assembleRelease both green (CONTRIBUTING step 4).
v0.4.1.1
2026-09-23 06:14:36 +12:00
Incido Developer d9043db857 feat: v0.4.1.0 — colour filters, drafts, empty trash, editor polish
dev / Build debug APK (push) Successful in 58s
release / Build & attach release APK (push) Successful in 1m27s
Ships everything staged since v0.4.0.0 as v0.4.1.0:

- Colour filters: a five-swatch strip under the drawer's Favorites
  narrows the list to active notes of that colour (NoteFilter
  ByColor, observeByColor/searchByColor, color:<NAME> route).
- Auto-saved drafts: new notes persist as drafts while typed
  (Note.isDraft, Drafts filter + drawer row, debounced autosave
  with flush-on-exit) and ride along in encrypted backups.
- Empty Trash: a DeleteForever button + confirmation dialog in the
  Trash view; deleteAllTrashed() cascades hashtag xrefs and
  attachments exactly like delete().
- Editor row rebuild: EditorLineField unified on one underlined
  BasicTextField (M3 TextField's 56 dp min container was the root
  of the double-height rows); checklist controls centre vertically
  beside wrapping labels.
- Untitled drafts read "Shopping List — (draft)" on cards and in
  the editor bar via NoteType.displayName (display-only; stored
  content untouched).

Version lockstep per §11.1: versionCode 36, versionName 0.4.1.0,
APP_VERSION, README intro + smoke-test checklist, PREVIOUS_HISTORY.md
section, ReleaseNotes.RECENT (v0.3.7.0 drops off the tail), Dev Plan
§10 row.
v0.4.1.0
2026-09-23 05:24:23 +12:00
Incido Developer d45cb7c31e docs(release-notes): drop stray trailing rule from v0.4.0.0 section
dev / Build debug APK (push) Successful in 3m16s
v0.4.0.0 was the only per-version section ending with its own '---', which combined with the CI footer divider rendered as a doubled rule on the published release. Removing it matches every other section (heading separated by a blank line) and is part of the same single-line-consistency cleanup.
2026-09-18 18:13:46 +12:00
Incido Developer 3d234f307e docs(release-notes): unwrap PREVIOUS_HISTORY notes to single lines
dev / Build debug APK (push) Successful in 3m21s
release-notes.py copies each version section verbatim, so the hard-wrapping in the v0.4.0.0 and v0.3.8.1 sections (and the file preamble) shipped as premature returns in the Gitea release description and Incido-<version>-changes.md asset. Unwrap them to one line per note, matching every section from v0.3.8.0 down. Also normalise the redundant '- **Title.** — desc' bullet heads to the house '- **Title.** desc' style across the file. Record the rule (write each note as one complete line; the release UI reflows it) in Development Plan 11.1 and CONTRIBUTING 5 so it does not recur.
2026-09-18 17:58:21 +12:00
Incido Developer ffa821bf28 docs(readme): sync README with the v0.4.0.0 release
dev / Build debug APK (push) Successful in 37s
Bump the intro + 'Current release' to v0.4.0.0 and add the new in-app Carnet/QuickNote (.zip) import to the feature list. Reframe the reinstall note: the new CI signing key dates from v0.3.8.1 and is reused on every release, so only installs from v0.3.8.0 or earlier need a clean reinstall; v0.3.8.1 onwards upgrades in place. Drop the now-wrong 'identical to v0.3.8.0' line, which predates the import feature.
2026-09-18 17:27:14 +12:00
Incido Developer f337e162f7 chore(release): v0.4.0.0
dev / Build debug APK (push) Successful in 1m58s
release / Build & attach release APK (push) Successful in 3m11s
Bump versionName 0.3.8.1 -> 0.4.0.0 (versionCode 34 -> 35) and mirror it in SettingsViewModel.APP_VERSION. Add the v0.4.0.0 'What's New' entry (drops v0.3.6.0 off the 5-recent tail) and a PREVIOUS_HISTORY.md section for the CI release description. Marks the in-app Carnet/QuickNote import as a minor feature release.
v0.4.0.0
2026-09-18 16:09:24 +12:00
Incido Developer cbe015839b feat(import): import Carnet/QuickNote (.sqd) archives in-app
Adds an 'Import 3rd Party Notes' button to Settings > Backup & Restore that reads a Carnet/QuickNote .zip export (a single archive bundling one .sqd per note) and imports every note directly on-device, no pre-conversion step. Each .sqd is itself a zip (index.html + metadata.json + optional data/ attachments); the importer does a nested-zip read. Rich-text bodies are flattened to plain text, colours/keywords/links carry over, to-do lists become native checklists, and image attachments are imported (auto-generated preview thumbnails skipped). Additive import with per-note fault isolation.
2026-09-18 16:04:53 +12:00
Incido Developer 7e335d14ef docs(plan): add 11.5 - how to re-run a failed release
dev / Build debug APK (push) Successful in 19s
Records why re-running a red release run replays the tag's old workflow (and wipes assets on the way down), the dispatch-from-main retry path, and the task-id-vs-run-number / script-echo log gotchas.
2026-09-17 19:09:04 +12:00
Incido Developer c8c2c98c8e ci(release): add a workflow_dispatch retry path for releases
dev / Build debug APK (push) Successful in 21s
A tag push pins the workflow file to the tag's own commit, so re-running a red release run replays the OLD workflow even when main is already fixed - that is precisely why run 78 kept dying on the cp bug after the fix landed, and each retry deleted the changelog asset before failing to re-upload it.

Adds workflow_dispatch with a required 'tag' input plus a RELEASE_TAG env (input on dispatch, tag name on push) used by both checkouts and the release step, so a release can be re-published from main's current workflow against any existing tag. The checkout also gains a targeted shallow fetch of the tag, since a --depth=1 default-branch clone may not carry the tag's commit when dispatched from main.
2026-09-17 19:04:34 +12:00
Incido Developer cbebac3254 fix(release): stop copying the notes file onto itself before upload
dev / Build debug APK (push) Successful in 22s
release / Build & attach release APK (push) Successful in 26s
NOTES_FILE is already /tmp/Incido-<version>-changes.md, so 'cp $NOTES_FILE /tmp/$NOTES_ASSET' was a self-copy: cp exits 1 and set -e aborted the step AFTER both APKs had uploaded. That is what turned run 78 (tag v0.3.8.1) red - the LAN API change itself worked, the release and both APK assets landed first. Upload $NOTES_FILE directly instead.
v0.3.8.1
2026-09-17 18:24:12 +12:00
Incido Developer ab26fe5f98 fix(release): v0.3.8.1 emergency rebuild, reinstall required
dev / Build debug APK (push) Successful in 46s
release / Build & attach release APK (push) Failing after 28s
Re-release v0.3.8.0 unchanged so the repaired pipeline can actually publish it: the v0.3.8.0 run was cancelled and never produced a release or APKs.

The build ran on a runner with an empty keystore cache, so CI minted a NEW signing key: installs cannot be upgraded in place (signature conflict), and with allowBackup=false an uninstall takes the user's notes. The release notes, README, and in-app What's New now all lead with export-a-backup-first.

Lockstep per Dev Plan 11.1: versionCode 33->34, versionName -> 0.3.8.1, APP_VERSION, README, PREVIOUS_HISTORY section, ReleaseNotes.RECENT (0.3.5.1 drops off the tail), Dev Plan 10 row.
2026-09-17 18:07:41 +12:00
Incido Developer dee20bf0f4 ci(release): point release API at LAN Gitea instance
dev / Build debug APK (push) Successful in 21s
Target http://192.168.8.17:3000 instead of https://git.trevena.info for the release create/asset-upload calls, so the release job talks to the instance over the LAN.
2026-09-17 17:35:47 +12:00
Incido Developer a5b5d334c1 ci: move runner toolchain cache from /tmp to /var/lib/gitea-runner/work
dev / Build debug APK (push) Successful in 2m18s
release / Build & attach release APK (push) Canceled after 7m28s
/tmp is wiped on every reboot, forcing re-download of the JDK and
Android SDK (~700 MB) and, worse, re-minting the release signing
keystore. Persist the cache under /var/lib/gitea-runner/work so it
survives reboots. Genuine per-run scratch files stay in /tmp.
v0.3.8.0
2026-09-17 16:40:31 +12:00