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.
This commit is contained in:
1 parent
9fe4763aa7
commit
5f45b0921b
7 files changed
+442
No files matched your search
@@ -68,6 +68,10 @@ kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serializa
|
||||
# Coroutines
|
||||
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
|
||||
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
|
||||
# Phase 1 (M1b): Compose Desktop drives its event loop through Swing/AWT, which
|
||||
# needs the Swing dispatcher for Dispatchers.Main (the desktop analogue of
|
||||
# kotlinx-coroutines-android).
|
||||
kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
|
||||
|
||||
# Data
|
||||
objectbox-android = { module = "io.objectbox:objectbox-android", version.ref = "objectbox" }
|
||||
|
||||
Reference in new issue
Block a user