Commit Graph
88 Commits
Author SHA1 Message Date
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
Incido Developer 32166a3100 feat(lists): task and shopping-list note types with running total
dev / Build debug APK (push) Canceled after 15m52s
NoteType (TEXT / TASK_LIST / SHOPPING_LIST) persists in an additive
NoteEntity.typeKey column (ObjectBox auto-migrates; old rows = TEXT).
List bodies stay GitHub-flavoured '- [ ]' lines so search, field
encryption, backups (defaulted noteType) and Trash keep working.

Editor: checklist + basket buttons convert any note; rows are uniform
underlined line fields (13sp) - product, 'Quan.' quantity (defaults to
1 on blur), and POS-style price showing raw cents while focused and
$1.23 on focus loss. Sticky total bar sums qty x price of checked
rows in integer cents via an explicit {q.. p..} end-of-line marker so
product text is never scanned for numbers.

Fixes found in device testing: cards rendered raw markdown for list
notes stranded as TEXT by partial builds - read-time Note.inferListType
now heals them; quantity field was clipped invisible (64dp vs the 48dp
icon target) - replaced by the free-text line; the serializer emitted
a bare 'q' slot (broken '{q p1.23}' markers, stray ' x' folds) - now
null-when-default. Add-tag suggestions rebuilt on flatMapLatest so the
autocomplete re-queries per keystroke.

versionCode 32->33, versionName 0.3.8.0, APP_VERSION in lockstep.
2026-09-17 15:43:43 +12:00
Incido Developer 7b6187f99a ci(release): attach per-version notes from PREVIOUS_HISTORY.md to releases
Per-version user-facing changelog moved out of the README table into
PREVIOUS_HISTORY.md (newest-first sections, Development Plan §11.1).
On tag push the workflow now harvests the matching section via
scripts/ci/release-notes.py and uses it as the release description,
uploading an Incido-<version>-changes.md beside the APKs; a missing
section falls back to the plain default description. CONTRIBUTING §5
documents the new release-notes maintenance step.
2026-09-17 15:43:20 +12:00
Incido Developer 576080c8b5 ci(release): persist signing keystore in runner cache for stable signatures
dev / Build debug APK (push) Successful in 36s
release / Build & attach release APK (push) Successful in 6m50s
The build step minted a fresh keystore inside the checkout on every
run, so each CI release was signed with a different key. Upgrading
from any previous release then failed with a signature conflict
(INSTALL_FAILED_UPDATE_INCOMPATIBLE) — and with allowBackup=false,
the only workaround was uninstalling, which destroys the user's
notes.

The keystore is now minted once in /tmp/gitea-runner-work (the same
persistent cache that already holds the JDK and Android SDK) and
copied into the checkout before building. Every release from now on
shares one signing key, so in-place upgrades work. Only a runner-host
rebuild would mint a new key (breaking exactly one upgrade).

Note: v0.3.7.0 was signed with an ephemeral key that no longer
exists, so the v0.3.7.0 -> v0.3.7.1 upgrade still requires a one-time
uninstall (export a backup first).
v0.3.7.1
2026-08-30 11:02:50 +12:00
Incido Developer 4a28f4f52b ci(release): tolerate Cloudflare 524 timeouts on APK uploads
dev / Build debug APK (push) Successful in 36s
The v0.3.7.1 release run failed in the attach step: the 28.7 MB debug
APK upload took ~126s through the Cloudflare proxy, which returned
"error code: 524" (origin timeout, ~100s limit). The step then crashed
parsing the non-JSON error page as JSON, and the release APK was never
attempted — leaving release 36 with zero assets.

upload_asset() now:
- retries with --retry-all-errors so HTTP error responses (524) are
  retried, not just connection failures;
- verifies success server-side by listing the release assets after
  each attempt (a 524 often means the origin saved the file before
  Cloudflare gave up, so the response body is not trusted);
- only fails after 5 attempts with the asset still missing.
2026-08-30 10:41:04 +12:00
Incido Developer 37e9c14d1e release: v0.3.7.1 — UI polish, image-viewer fix, new flat icon
dev / Build debug APK (push) Successful in 1m52s
release / Build & attach release APK (push) Failing after 6m30s
Maintenance release.

UI polish:
- Editor top bar decluttered: camera / attach-file / add-tag moved out of
  the title bar into a Keep-style bottom action row, so the title and
  remaining buttons (favourite, save, overflow) always fit, even on
  narrow screens. Title is now "New note" / "Edit note" with ellipsis.
- Search auto-focuses when opened and shows a clear button while typing.
- Long tag lists in the navigation drawer now scroll within the sheet
  instead of overflowing the bottom (weight(1f) on the scroll column).
- Add-tag sheet opens with the keyboard already up.

Bug fix:
- Image viewer no longer flashes a false "couldn't decode" error on
  every persisted image open (the old LaunchedEffect checked the bitmap
  before the async load finished); genuine failures now show
  "Couldn't load image" in place of "Loading…".

New flat app icon:
- incido_flat_icon.png replaces the v0.3.3.8 artwork: adaptive
  foregrounds (108-432px) + legacy mipmaps (48-192px) regenerated;
  ic_launcher_background re-tinted #010435 -> #352999 to match.

Hygiene:
- Unused persistedBytes param dropped from AttachmentStrip; redundant
  repoForViewer alias and dead _ignored val removed; fully-qualified
  Spacer/Image/Column/Dispatchers references replaced with imports.

versionCode 31->32, versionName "0.3.7.0"->"0.3.7.1",
SettingsViewModel.APP_VERSION bumped in lockstep.
2026-08-30 10:19:49 +12:00
Incido Developer 4b41b0dedb chore: increase Gradle heap from 1536m to 4g (more RAM available)
dev / Build debug APK (push) Successful in 24s
release / Build & attach release APK (push) Successful in 4m8s
v0.3.7.0
2026-08-21 02:33:59 +12:00
Incido Developer 9f390a4047 fix(release): use external web address for API, remove LAN IP workaround
dev / Build debug APK (push) Successful in 20s
2026-08-21 01:43:34 +12:00
Incido Developer fa7e50b0db fix(release): use name= query param and attachment field for multipart upload
dev / Build debug APK (push) Successful in 32s
release / Build & attach release APK (push) Failing after 11m1s
2026-08-20 14:56:07 +12:00
Incido Developer 92e4a99e11 fix(release): use LAN IP (192.168.8.17) to bypass Cloudflare proxy for API calls
dev / Build debug APK (push) Successful in 25s
release / Build & attach release APK (push) Failing after 1m2s
2026-08-20 14:39:08 +12:00
Incido Developer c7c82ec68a fix(release): Gitea assets API returns a list, not {assets:[]}
dev / Build debug APK (push) Successful in 29s
release / Build & attach release APK (push) Failing after 2m41s
2026-08-20 14:25:37 +12:00
Incido Developer 639f66f08c fix(release): use base64-encoded Python script to avoid heredoc-in-block-scalar YAML parsing errors
dev / Build debug APK (push) Successful in 33s
release / Build & attach release APK (push) Failing after 33s
2026-08-20 14:22:52 +12:00
Incido Developer 57b6cf99d2 fix(release): rewrite with verbose upload diagnostics
dev / Build debug APK (push) Successful in 29s
release / Build & attach release APK (push) Failing after 33s
2026-08-20 13:59:04 +12:00
Incido Developer a9b90aab9e fix(release): remove unsupported --retry-connrefuse flag
dev / Build debug APK (push) Successful in 24s
release / Build & attach release APK (push) Failing after 2m11s
2026-08-20 13:54:56 +12:00
Incido Developer ed9d8d0ce2 fix(release): generate keystore on-the-fly, no KEYSTORE_BASE64 secret needed
dev / Build debug APK (push) Successful in 30s
release / Build & attach release APK (push) Failing after 2m3s
2026-08-20 13:47:22 +12:00
Incido Developer 486e2d01cf fix(release): remove duplicate chmod/ls and duplicate APK check
dev / Build debug APK (push) Successful in 35s
release / Build & attach release APK (push) Failing after 2m1s
2026-08-20 13:39:44 +12:00
Incido Developer a0be9f8123 fix(release): align SDK setup with working dev.yml
dev / Build debug APK (push) Successful in 21s
release / Build & attach release APK (push) Failing after 52s
2026-08-20 13:35:21 +12:00
Incido Developer 04f9cda95a fix(release): verbose build output + set JAVA_HOME before sdkmanager
dev / Build debug APK (push) Successful in 33s
release / Build & attach release APK (push) Failing after 1m7s
2026-08-20 13:31:03 +12:00
Incido Developer 594525ed10 fix(release): use correct APK filenames (app-debug.apk, app-release.apk)
dev / Build debug APK (push) Successful in 32s
release / Build & attach release APK (push) Failing after 33s
2026-08-20 13:27:56 +12:00
Incido Developer 3c8d01cca9 fix(release): fix checkout step, remove duplicate git checkout
dev / Build debug APK (push) Successful in 30s
release / Build & attach release APK (push) Failing after 43s
2026-08-20 13:24:33 +12:00
Incido Developer c4c8ef365f debug(release): add verbose build output
dev / Build debug APK (push) Successful in 37s
release / Build & attach release APK (push) Failing after 1s
2026-08-20 13:21:06 +12:00