Android: merge on pull, resolve merge conflicts, check of the stream #339
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "337_merge-conflicts"
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?
Closes #337, following the plan in the issue.
What changes
A pull merges instead of failing. When both the phone and the remote changed:
Merge origin/<branch>), which is pushed if "Push right after committing" is on.PullState.NeedsYou), with a Pull button on the Changes tab and an amber dot on the tab.Merge conflicts can be resolved on the phone. A pull by the user that conflicts leaves a merge waiting; it survives an app restart.
· merging, the sync card shows the conflict, and a list of conflicted files ("X of Y resolved") replaces the commit section. The buttons are Abort and Finish merge ("& push" when push is on). The menu gains Pull / Push / Abort merge. Auto-commit is paused, and its switch says so.ui/Conflict.kt): one card per conflict, with both sides and Keep phone / Keep origin / Keep both. A chosen conflict shows its result with Change. Mark resolved writes and stages the file.<<<<<<< this phone…>>>>>>> origin/main) tinted and a banner. Saving a note with no markers left marks it resolved.A card shows the check of the stream. It replaces the green sentence on the Changes tab.
Layers
document/conflicts.rs(conflicts,resolve_conflicts,conflict_markers),maintenance/check.rs(stream_check), anddocument::file_name_problems, now shared withapi::file_problems. All of it is exposed inapi.rs.conflicts,resolveConflicts,conflictMarkers,project.streamCheckand their records.pull(remote, Merging?),merge(),markResolved,finishMerge,abortMerge. The files a merge marked are kept in.git/STREAMD_CONFLICTS, because Git no longer reports a file as conflicted once it is staged.StreamCheckreplacesStreamHealth,TextCheckis added for the editor, andConflictsAdapterimplements a newResolvinginterface. The number badge on Changes becomes an amber dot.Differences from the handover spec
Checks
nix flake checkpasses.nix build .#streamd-apppasses: 493 unit tests, plus the screenshot tests with new references for the check states, the merge states, the resolver and the editor banners.