Checklists in the body, colour from tags, and commit-derived CalVer #4

Merged
bvandeusen merged 73 commits from dev into main 2026-08-29 13:39:45 -04:00
Showing only changes of commit 9a3c4ec377 - Show all commits
@@ -413,9 +413,10 @@ class BoardViewModel(
/**
* The one path every store mutation takes.
*
* Each core mutation returns the reloaded note, which goes straight into
* [BoardState.editing] so an open editor shows its own change without a
* re-query. The BOARD list is then reloaded rather than patched in place:
* Each core mutation returns the reloaded note, which refreshes
* [BoardState.editing] so an OPEN editor shows its own change without a
* re-query — and does nothing at all when the editor is closed, because that
* field doubles as "which screen is up". The BOARD list is then reloaded rather than patched in place:
* pinning re-sorts it, archiving removes the note from it, and adding a label
* can move it in or out of a label view — a splice would have to reimplement
* the core's ordering and membership rules in Kotlin to get any of that right.
@@ -451,7 +452,12 @@ class BoardViewModel(
withContext(Dispatchers.IO) { onRemindersChanged() }
state.copy(
notes = notes,
editing = if (closeEditor) null else updated ?: state.editing,
// Only REFRESHES an open editor; it must never open one.
// `editing != null` IS "the editor is on screen", so writing
// the reloaded note in unconditionally meant any mutation
// started from the BOARD threw the editor open on top of it —
// which is exactly what ticking a checkbox on a card did.
editing = if (closeEditor) null else state.editing?.let { updated ?: it },
saving = false,
error = null,
)