Android app review: fixes, performance and cleanups #336
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "android-app-review"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The findings of a review of the Android app, one commit each. The architecture findings were filed as #332, #333, #334 and #335; all four are solved here.
Bugs
Streamd.ready()now returns aReadiness, and only a disconnected repository withdraws the notifications.IOExceptionor a KeystoreProviderException, which ended the app. These now fail asGitException, and the screens show the failure.extensible,2 rules,breaks into …,or,3 days, …). The helpers now returnLineParts, whichlineTextwords fromstrings.xml.Performance
Stream::loadof the core now gives the summary of every file, made while the text is read (store::load_shards_with), and the bindings carry it inLoadedStream.summaries.health()read the whole repository after every save. Only the Changes tab and the configuration ask for it now, while they are shown.timesheetReportWeekgives the report and its week in one call. The activity screen asked for a day twice; the facade now returns a day with every shard of it, andactivityViewis gone.Duplicated and dead code
RepositoryConnection:written,renamedandwrittenAllnow sharecommitSaved.StreamSession:withReadyandfailingreplace the hand-copied checks and catches. Several methods caught only the core's exceptions, so a failing store could escape them.TextRange.indices()replaces six copies of the same conversion.Moves/rememberMoveshold the move, undo and problem logic thatStateListScreenandNoteScreenboth copied, without the redundant reload after a refused move.File.replaceAtomicallyreplaces the atomic write thatFileStoreandCredentialseach had.ruleText,DateScroll.dateAtandRangeDraft.applicable, which only the tests called.Architecture
core/no longer uses Compose.ActivitySerieskeeps its colour as text (hex), andui/Activity.ktmakes it aColor.core/Activity.ktis documented like the rest ofcore/, andActivitieshas no "Unavailable" defaults.StreamViewModelno longer implements eleven interfaces. Each interface has a small adapter in the new packageadapters/, built on aStreamAccessthat does the shared work once: the session orNO_STREAM, the moment of the call, and telling the repository about a write.Apptakes oneAppActionsinstead of eleven parameters. The view model keeps the flows, the pins and the start.core/, the repository's ingit/.RepositoryActions(fromStreamViewModel.kt) andChangesActions(fromui/Changes.kt) moved togit/RepositoryActions.kt, and AGENTS.md names the rule.StreamState.Readyhas aStreamVersion, which the session makes anew with every change. The seven screens that took the bindings'StreamasAnyto key their effects now take that version.Checks
nix flake checkpasses.nix build .#streamd-apppasses, including the unit tests and the screenshot validation; the screenshots are unchanged.