diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-25 00:19:47 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-25 00:19:47 -0500 |
| commit | 56511a51afc66bc7efebee657bf040624defde65 (patch) | |
| tree | 72cf78aa7898e95111a901ee72e55075038edd87 /tests/test-pearl-menu.el | |
| parent | c2fc84a11a0db1df981fcb978a675c516afc2252 (diff) | |
| download | pearl-56511a51afc66bc7efebee657bf040624defde65.tar.gz pearl-56511a51afc66bc7efebee657bf040624defde65.zip | |
feat: add the unified ticket save model with save-issue and save-all
Editing a ticket meant remembering which per-field command to run: pearl-sync-current-issue for the description, pearl-sync-current-issue-title for the heading, pearl-edit-current-comment for a comment. Three fields, three commands, and no single way to edit several fields (or several tickets) and push them at once.
I added a layered save engine and two commands over it. pearl--run-field-save does the fetch, the three-way conflict gate, and the push for one field, emitting a single structured outcome instead of messaging from its callback. The three interactive sync commands are now thin wrappers over the per-field savers, so they keep working and gain the outcome. pearl-save-issue diffs the ticket at point and pushes only what changed. pearl-save-all scans the whole file, confirms once naming the field counts, and saves every diff in a sequential pass that continues past a per-ticket conflict. A queue runner keeps at most one conflict-resolution buffer live at a time.
I also fixed a correctness bug: a description push now advances both LINEAR-DESC-SHA256 (the markdown the remote gate hashes against) and LINEAR-DESC-ORG-SHA256 (the rendered-Org baseline the local scan uses). Advancing only the markdown hash left the Org hash stale, so the next local scan would flag a just-saved ticket as dirty again.
The conflict resolver gained an optional outcome callback so the engine can report cancel, use-local, use-remote, and the deferred smerge commit or abort as distinct outcomes. I removed the now-dead pearl--commit-sync-decision. The keybinding scheme and the transient menu retarget are a separate follow-up.
Spec: docs/ticket-save-model-spec.org.
Diffstat (limited to 'tests/test-pearl-menu.el')
0 files changed, 0 insertions, 0 deletions
