Commit Graph
6 Commits
Author SHA1 Message Date
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 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 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 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 1477e2426d Initial v0.1.1 scaffold
- Multi-module Android project: app/ (entry point), composeApp/ (UI),
  core/domain/ (pure-Kotlin interfaces), core/data/ (ObjectBox-backed
  repository).
- Privacy-first: no INTERNET permission, no analytics, auto-backup
  disabled (data_extraction_rules.xml excludes all domains).
- AGPL-3.0 licensed with full LICENSE + NOTICE files.
- Material 3 UI with dynamic color on Android 12+, dark/light theme
  follows system.
- v0.1.1 polish:
    * Editor text field shrinks above the soft keyboard (Scaffold
      contentWindowInsets union(systemBars, ime) + windowSoftInputMode
      adjustResize).
    * List cards now render title (first non-empty line, titleMedium)
      plus abbreviated body preview (max 2 lines, ellipsised). Empty
      notes display as 'Untitled'.
    * versionCode 1 -> 2, versionName 0.1.0 -> 0.1.1.
2026-08-14 22:51:59 +12:00