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.
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.
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.
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.
- Deleting a note now soft-deletes it (trashed flag on NoteEntity,
additive schema, auto-migrated); trashed notes are hidden from Home,
Favorites, Untagged, tag views, and ordinary search.
- New Trash drawer entry lists soft-deleted notes; each Trash card's
overflow menu exposes Restore and Delete permanently.
- NoteFilter gains a Trash case; repository gains moveToTrash /
restoreFromTrash / deletePermanently; backups round-trip the
trashed state.
- Version bump (lockstep): versionCode 30->31, versionName
0.3.6.3->0.3.7.0, SettingsViewModel.APP_VERSION, README intro +
changelog, ReleaseNotes.kt 5-most-recent window.
- Development Plan §10: fix the merged 0.3.4.0/0.3.3.8 table row and
backfill the missing 0.3.6.2/0.3.6.3 rows; add the 0.3.7.0 row.
- README changelog: backfill the missing 0.3.6.2 row; promote the
Unreleased Trash row to 0.3.7.0.
v0.3.0.0 bundles four user-facing features, the plan-compliance polish
that was deferred from v0.2, and a permanent change to how we name
releases going forward.
VERSION SCHEME (app/build.gradle.kts)
- versionName = '0.3.0.0' (MAJOR.MINOR.MAINTENANCE.EMERGENCY)
- versionCode = 5
- New gradle taskGraph validator fails the build if versionName
doesn't match ^\d+\.\d+\.\d+\.\d+$ — we can't accidentally
regress the scheme.
- History re-keyed across README, Plan §10, CONTRIBUTING.md.
HASHTAGS
- value class Hashtag (domain/model) with normalise/parseOrNull
helpers; pattern: ^[a-z0-9][a-z0-9._-]{0,30}$
- data class HashtagUsage (name, noteCount, lastUsedAt)
- sealed class NoteFilter { Home, Favorites, Untagged, ByTag(name) }
- Note gains hashtags: List<String> (sorted ascending)
- Repository:
- new entities HashtagEntity (@Index on name) and
NoteHashtagCrossRef (many-to-many junction)
- new methods: observeFavorites / observeUntagged /
observeNotesForHashtag / observeHashtagsByRecentUse /
observeAllHashtags / searchHashtags / addHashtag / removeHashtag
- search() now matches content OR hashtag-name (case-insensitive)
- ObjectBox queries use explicit StringOrder + type annotations
(kapt's stubs are finicky around Property<String> overloads)
UI
- CenterAlignedTopAppBar on both list and editor screens
- List:
- Hamburger top-left opens a ModalNavigationDrawer (Home /
Favorites / Untagged / divider / scrollable Recent tags)
- Drawer selection drives a NoteFilter state held at root
- Search bar visible only when filter == Home
- NoteCard redesign — 14 dp vertical gradient stripe +
tinted surface (12 % colour blend) + 10 dp corner chip
- Empty-state copy is filter-aware
- Editor:
- Persistent hashtag chip row above the text field
- Tag # icon in the top bar + '+ add' chip opens a ModalBottomSheet
- Autocomplete suggestions live from repository.searchHashtags
- '+ Create name' button when the typed value is valid + new
- Snackbar 'Maximum 5 tags reached.' when the cap is hit
- Reconciled on save via addHashtag / removeHashtag diff
DOCS
- README v0.3.0.0 section + re-keyed changelog
- Development Plan §10 history re-keyed (0.1.0.0 / 0.1.1.0 /
0.2.0.0 / 0.2.0.1 / 0.3.0.0)
- CONTRIBUTING.md release-process note updated for the new scheme
VERIFIED
- ./gradlew assembleDebug assembleRelease both green
- Debug 25.7 MB, release 19.8 MB (v2-signed)
- versionCode=5, versionName='0.3.0.0'
- No INTERNET permission
- Validator regression: setting versionName='0.3' causes
assembleDebug to fail with the new scheme error message