diff --git a/Incido Development Plan.txt b/Incido Development Plan.txt index 780cad7..13302d4 100644 --- a/Incido Development Plan.txt +++ b/Incido Development Plan.txt @@ -370,6 +370,7 @@ A short reference for AI assistants: | Version | Date | Notes | |---------|------|-------| +| 0.4.1.1 | 2026-09-23 | **Emergency hotfix — two v0.4.1.0 editor regressions.** **1. Saved notes landed in Drafts.** `NoteEditorViewModel.save()` published the note but left `UiState.existing.isDraft = true`, so the editor's dispose-time `flushDraft()` immediately re-persisted the just-saved note as a draft — every confirmed note ended up in Drafts. The save path now adopts the published row into state (`isDraft = false`, current hashtags kept), letting `persistDraftNow()`'s already-published guard turn that flush into a no-op. **2. Enter on a shopping-list Price field wrapped the cursor to the Title.** A bare `ImeAction.Next` with no handler fell through to system focus traversal — price being the row's last field inside the LazyColumn wrapped focus all the way back to the Title; the field now passes `KeyboardActions(onNext = { onAddAfter() })`, matching Enter on the Product field (fresh row, cursor in its Product box). **Lockstep (§11.1).** versionCode 36→37, versionName "0.4.1.0"→"0.4.1.1", SettingsViewModel.APP_VERSION bumped, README current-release line + two smoke-test regression steps, PREVIOUS_HISTORY.md section (feeds the release description + `Incido-0.4.1.1-changes.md` asset), ReleaseNotes.RECENT (v0.3.8.1 drops off the 5-entry tail). | | 0.4.1.0 | 2026-09-23 | **Feature release — colour filters + auto-saved drafts, plus Trash & editor polish.** **1. Colour filters.** The drawer gains a horizontal five-swatch strip (Blue / Green / Amber / Red / Purple) between Favorites and Drafts — no labels, the colours are self-explanatory; selecting a swatch shows ONLY **active** notes of that colour (tagged and untagged eligible, trashed never — same rules as Favorites / Untagged), search narrows within the colour, re-tapping the selected swatch returns to Home. `NoteFilter` gains `ByColor` (+ `color:` route parsing in `App.kt`); the repository gains `observeByColor` / `searchByColor` reusing the shared `decorate()` / `matchingNoteIds()` trash-exclusion path. **2. Auto-saved drafts.** New notes persist as drafts while being written: `Note.isDraft` (indexed ObjectBox property; mirrored in `BackupNote`, defaulted false for older backups), `NoteFilter.Drafts` (+ `drafts` route + drawer row) with repository `observeDrafts` / `searchDrafts`; `NoteEditorViewModel` runs a debounced signature-driven autosave with `flushDraft()` on back-navigation / dispose; drafts appear ONLY in the Drafts view until saved (then Home) or trashed (then Trash); an untitled draft is labelled by kind — "Task List — (draft)", "Shopping List — (draft)" — on cards and the editor bar via `NoteType.displayName` + `Note.UNTITLED` (display-only; stored content untouched). **3. Empty Trash.** Trash view shows a `DeleteForever` top-bar action whenever it holds notes, gated by a confirmation `AlertDialog`; `deleteAllTrashed()` cascades note rows + hashtag xrefs + attachment rows exactly like `delete()`. **4. Editor row rebuild.** `EditorLineField` unified on one `BasicTextField` with a hand-drawn 2 dp underline — the old two-branch design mixed M3 `TextField`'s 56 dp min container with compact fields, producing double-height rows; `ChecklistItemRow` moved `Alignment.Top`→`Alignment.CenterVertically` so checkbox / delete / +/- controls ride centred beside wrapping labels. versionCode 35→36, versionName "0.4.0.0"→"0.4.1.0", SettingsViewModel.APP_VERSION bumped in lockstep, README current-release line, PREVIOUS_HISTORY.md section, and the in-app What's New dialog (ReleaseNotes.RECENT — v0.3.7.0 drops off the 5-entry tail). | | 0.4.0.0 | 2026-09-18 | **Feature release — in-app import of 3rd-party notes.** Settings → Backup & Restore gains an "Import 3rd Party Notes" button that reads a Carnet / QuickNote `.zip` export (a single archive bundling one `.sqd` per note, where each `.sqd` is itself a zip of index.html + metadata.json + optional data/ attachments) and imports every note directly on-device — no pre-conversion step. Rich-text bodies are flattened to plain text; colours, keywords (imported as tags) and links carry over; to-do lists become native checklists; image attachments are imported (auto-generated preview thumbnails are skipped). Import is additive with per-note fault isolation, and imported notes get fresh IDs. New `CarnetImporter` in `composeApp/data/backup` + entry point in the Settings screen/view model. versionCode 34→35, versionName "0.3.8.1"→"0.4.0.0", SettingsViewModel.APP_VERSION bumped in lockstep, README current-release line, PREVIOUS_HISTORY.md section, and the in-app What's New dialog (ReleaseNotes.RECENT — v0.3.6.0 drops off the 5-entry tail). | | 0.3.8.1 | 2026-09-17 | **Emergency hotfix — rebuild / re-release of v0.3.8.0. Zero app-code changes; release-pipeline fix only.** **1. Why.** The release job had been failing to publish reliably. `.gitea/workflows/release.yml` now addresses the Gitea API as `http://192.168.8.17:3000/api/v1/repos/nick/incido` (LAN, direct) instead of the Cloudflare-fronted `https://git.trevena.info/...`, which was the source of the mid-upload 524 origin timeouts that 4a28f4f could only retry around. **2. Signing key rotated — INSTALLED BUILDS CANNOT UPDATE IN PLACE.** The job ran on a runner whose `/var/lib/gitea-runner/work` cache held no `release.jks`, so the mint-if-absent branch (release.yml) generated a NEW certificate; Android rejects an APK whose signing cert differs from the installed one, so v0.3.8.1 must be uninstalled before it will install. Because `allowBackup="false"` (AndroidManifest) keeps notes out of Android's cloud/D2D restore, an uninstall DESTROYS the user's notes — so the release notes lead with "export a backup first" (Settings → Backup → Export, plus Settings → Security → Export encryption key when encryption is on), then uninstall → install → restore. **Follow-up worth doing:** copy the original `release.jks` onto the runner at `/var/lib/gitea-runner/work/release.jks` to restore in-place upgrades and stop the rotation; until then every release repeats this. **3. Lockstep (§11.1).** versionCode 33→34, versionName "0.3.8.0"→"0.3.8.1", SettingsViewModel.APP_VERSION bumped, README current-release line + reinstall warning, PREVIOUS_HISTORY.md section (feeds the release description + `Incido-0.3.8.1-changes.md` asset), and the in-app What's New dialog (ReleaseNotes.RECENT — v0.3.5.1 drops off the 5-entry tail). | diff --git a/PREVIOUS_HISTORY.md b/PREVIOUS_HISTORY.md index 0fefdf2..bf28635 100644 --- a/PREVIOUS_HISTORY.md +++ b/PREVIOUS_HISTORY.md @@ -8,6 +8,13 @@ Current downloads ship **with their own notes**: every release on the [Releases --- +## v0.4.1.1 — 2026-09-23 + +Hotfix over v0.4.1.0 — two editor fixes, nothing else changed. Installing it over v0.4.1.0 is a normal in-place update. + +- **Saved notes stay put.** In v0.4.1.0 every note you saved ended up in Drafts instead of Home — the editor still believed the note was a draft and quietly re-saved it as one when you left the screen. Saving now publishes the note properly: it goes to Home and leaves Drafts for good. +- **Enter behaves in the price box.** In a shopping list, pressing Enter in a row's Price field jumped the cursor all the way back to the note title. It now works exactly like Enter in the product field: a fresh item row appears below, with the cursor ready in its Product box. + ## v0.4.1.0 — 2026-09-23 New in this release: **colour filters**, **auto-saved drafts** and an **Empty Trash** button — plus a steadier editor. diff --git a/README.md b/README.md index 5d91c81..6be88eb 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Incido is a privacy-first, on-device note-taking application for Android. All data stays on your device by default — no accounts, no cloud, no trackers. -This repository contains the **v0.4.1.0** release: a single-user, offline +This repository contains the **v0.4.1.1** release: a single-user, offline note app with hashtags, favourites, task lists, shopping lists with a running total, colour-coded notes with per-colour swatch filters, auto-saved drafts, photo and file attachments, share-into from other @@ -18,8 +18,10 @@ encrypted backup and restore, and an exportable encryption key for device migrations. The architecture is multi-module Android today and is structured so iOS / Desktop ports can happen later without UI rewrites. -**Current release:** v0.4.1.0 — full release notes ship **on its entry on -the [Releases page](https://git.trevena.info/nick/incido/releases)**. +**Current release:** v0.4.1.1 (hotfix over v0.4.1.0: saved notes no +longer land in Drafts; Enter in a shopping-list price box adds a row) — +full release notes ship **on its entry on the [Releases +page](https://git.trevena.info/nick/incido/releases)**. > **Upgrading from v0.3.8.0 or earlier?** Releases are signed with a **new CI > key introduced in v0.3.8.1**, so Android won't update an old install in place @@ -180,6 +182,8 @@ After the first push: [ ] Tap "Untagged" → list shows only notes with zero hashtags [ ] Tap a colour swatch (e.g. Blue) → list shows only ACTIVE notes of that colour; untagged ones appear, trashed ones never; search narrows within the colour; tapping the selected swatch again returns to Home [ ] Start a new note, type, then back out without saving → it lands under "Drafts"; an untitled draft is titled "Task List — (draft)" / "Shopping List — (draft)"; reopening it restores the content; saving it moves it to Home +[ ] Save a note (new or draft) → it appears on Home and NOT in Drafts — saving exits draft mode for good (v0.4.1.1 regression) +[ ] Shopping list: press Enter in a row's Price field → a fresh row appears below with the cursor in its Product field, not back in the Title (v0.4.1.1 fix) [ ] Tap a recent hashtag → list filters to that tag [ ] Tap "Trash" → list shows only soft-deleted notes [ ] Delete a note → it disappears from Home/search/tag/Favorites and appears in Trash diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 051d5e6..86ea0bb 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -28,24 +28,21 @@ android { applicationId = "org.incido.app" minSdk = 26 targetSdk = 35 - // v0.4.1.0: FEATURE release — colour filters + auto-saved - // drafts, plus Trash & editor polish. The drawer gains a - // five-swatch strip (Blue / Green / Amber / Red / Purple) under - // Favorites: a swatch shows ONLY active notes of that colour - // (untagged included, trashed never), search narrows within it, - // re-tapping returns Home (NoteFilter.ByColor + observeByColor / - // searchByColor on the shared decorate() / matchingNoteIds() - // path). New notes autosave as drafts: Note.isDraft (indexed - // ObjectBox property, carried in backups), a "drafts" route + - // drawer row, and a debounced autosave with flush-on-exit; - // untitled drafts title themselves by kind ("Shopping List — - // (draft)"). Trash gains an Empty Trash button (deleteAllTrashed - // cascade incl. attachments, confirmed by dialog); editor fields - // are rebuilt as uniform-height underlined rows with centred - // checkbox / +/- controls. - // - versionCode monotonic +1 from v0.4.0.0 (35). - versionCode = 36 - versionName = "0.4.1.0" + // v0.4.1.1: EMERGENCY hotfix — two editor regressions shipped + // in v0.4.1.0. (1) Saving a note landed it in Drafts: the save + // path published the note but left UiState.existing.isDraft = + // true, so the editor's dispose-time flushDraft() immediately + // re-persisted it as a draft; the state now adopts the + // published row (isDraft = false), letting persistDraftNow()'s + // already-published guard make the flush a no-op. (2) Enter on + // a shopping-list Price field fell through to system focus + // traversal and wrapped the cursor back to the Title; it now + // wires KeyboardActions(onNext = onAddAfter) like the Product + // field — Enter adds a fresh row with the cursor in its + // Product box. + // - versionCode monotonic +1 from v0.4.1.0 (36). + versionCode = 37 + versionName = "0.4.1.1" } // --- Signing --- diff --git a/composeApp/src/main/kotlin/org/incido/compose/data/settings/ReleaseNotes.kt b/composeApp/src/main/kotlin/org/incido/compose/data/settings/ReleaseNotes.kt index 4c7e589..351f59e 100644 --- a/composeApp/src/main/kotlin/org/incido/compose/data/settings/ReleaseNotes.kt +++ b/composeApp/src/main/kotlin/org/incido/compose/data/settings/ReleaseNotes.kt @@ -25,6 +25,23 @@ object ReleaseNotes { * Append a new entry on top each release. */ val RECENT: List = listOf( + ReleaseNote( + version = "0.4.1.1", + date = "2026-09-23", + bullets = listOf( + "Saved notes stay put: in v0.4.1.0 every note you " + + "saved ended up in Drafts instead of Home \u2014 " + + "the editor still believed it was a draft and " + + "quietly re-saved it as one when you left the " + + "screen. Saving now publishes properly: the note " + + "goes to Home and leaves Drafts for good.", + "Enter behaves in the price box: in a shopping list, " + + "Enter in a row's Price field used to jump the " + + "cursor back to the note title \u2014 it now works " + + "like Enter in the product field: a fresh row " + + "appears below, cursor ready in its Product box.", + ), + ), ReleaseNote( version = "0.4.1.0", date = "2026-09-23", @@ -75,27 +92,6 @@ object ReleaseNotes { "an archive at any time.", ), ), - ReleaseNote( - version = "0.3.8.1", - date = "2026-09-17", - bullets = listOf( - "Read this first \u2014 reinstall required. This build is signed " + - "with a new CI key (the previous key lived in the old build " + - "runner's cache and wasn't carried over), so Android refuses " + - "to install it over an existing Incido: it reports a " + - "signature conflict.", - "Export a backup BEFORE uninstalling: Settings \u2192 Backup " + - "\u2192 Export, plus Settings \u2192 Security \u2192 Export " + - "encryption key if you use encryption. Incido doesn't use " + - "Android's automatic backup, so uninstalling deletes your " + - "notes. Then install this APK and restore from that backup.", - "Nothing else changed: v0.3.8.1 is a re-release of v0.3.8.0 " + - "with the same task lists, shopping lists with the running " + - "total, and add-tag suggestions fix. The rebuild exists " + - "because the release pipeline had been failing to publish " + - "builds reliably; staying on v0.3.8.0 is perfectly fine.", - ), - ), ReleaseNote( version = "0.3.8.0", date = "2026-09-16", @@ -142,6 +138,6 @@ object ReleaseNotes { "and pen-nib artwork.", ), ), - // v0.4.1.0 push drops v0.3.7.0 off the "5 most recent" tail. + // v0.4.1.1 push drops v0.3.8.1 off the "5 most recent" tail. ) } diff --git a/composeApp/src/main/kotlin/org/incido/compose/ui/editor/NoteEditorScreen.kt b/composeApp/src/main/kotlin/org/incido/compose/ui/editor/NoteEditorScreen.kt index a264db7..44a89d7 100644 --- a/composeApp/src/main/kotlin/org/incido/compose/ui/editor/NoteEditorScreen.kt +++ b/composeApp/src/main/kotlin/org/incido/compose/ui/editor/NoteEditorScreen.kt @@ -1209,6 +1209,14 @@ private fun ChecklistItemRow( keyboardType = KeyboardType.Number, imeAction = ImeAction.Next, ), + // v0.4.x FIX: Enter/Return on Price now behaves exactly + // like Enter on the product field — a fresh row appears + // below and the cursor lands directly in its Product + // field. (A bare ImeAction.Next with no handler fell + // through to system focus traversal, which — the price + // being the row's last field inside a LazyColumn — + // wrapped the cursor all the way back to the Title.) + keyboardActions = KeyboardActions(onNext = { onAddAfter() }), formatUnfocused = { digits -> if (digits.isEmpty()) "" else "$" + Note.amountFromPriceDigits(digits) }, diff --git a/composeApp/src/main/kotlin/org/incido/compose/ui/editor/NoteEditorViewModel.kt b/composeApp/src/main/kotlin/org/incido/compose/ui/editor/NoteEditorViewModel.kt index 81b5e65..48aabad 100644 --- a/composeApp/src/main/kotlin/org/incido/compose/ui/editor/NoteEditorViewModel.kt +++ b/composeApp/src/main/kotlin/org/incido/compose/ui/editor/NoteEditorViewModel.kt @@ -739,7 +739,25 @@ class NoteEditorViewModel( } } } - _state.update { it.copy(isSaving = false, pendingAttachments = emptyList(), pendingAttachmentBytes = emptyMap()) } + _state.update { + it.copy( + // v0.4.x FIX: adopt the PUBLISHED row into the UI + // state. Without this the state still reported + // isDraft = true, and the flushDraft() fired by the + // editor's disposal immediately re-persisted the + // note as a draft — every confirmed note landed in + // Drafts. With the published row adopted, the + // already-published guard in persistDraftNow() turns + // that flush into a no-op. + existing = saved.copy( + isDraft = false, + hashtags = current.hashtags, + ), + isSaving = false, + pendingAttachments = emptyList(), + pendingAttachmentBytes = emptyMap(), + ) + } onDone() } } diff --git a/composeApp/src/main/kotlin/org/incido/compose/ui/settings/SettingsViewModel.kt b/composeApp/src/main/kotlin/org/incido/compose/ui/settings/SettingsViewModel.kt index 30cbca2..33d23cf 100644 --- a/composeApp/src/main/kotlin/org/incido/compose/ui/settings/SettingsViewModel.kt +++ b/composeApp/src/main/kotlin/org/incido/compose/ui/settings/SettingsViewModel.kt @@ -354,7 +354,7 @@ class SettingsViewModel( /** The version string baked into backup payloads and shown on * the About card. Mirrors `app/build.gradle.kts` `versionName` * — if you bump one, bump both. */ - const val APP_VERSION = "0.4.1.0" + const val APP_VERSION = "0.4.1.1" val Factory: ViewModelProvider.Factory = viewModelFactory { initializer {