diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-27 21:46:00 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-27 21:46:00 -0500 |
| commit | 2a6ffb0e6a10fdf4fd42fe3e5689f300b25c7cf6 (patch) | |
| tree | 293e12ed09dbb8f38a921396a13ab1d9d01e53a4 /todo.org | |
| parent | fa924acccc2e85bc39433cae608dcc9292795ed2 (diff) | |
| download | dotemacs-2a6ffb0e6a10fdf4fd42fe3e5689f300b25c7cf6.tar.gz dotemacs-2a6ffb0e6a10fdf4fd42fe3e5689f300b25c7cf6.zip | |
docs(signel): harden initiate-message spec to Ready
I wrote an initiate-message workflow spec on top of the existing Signal client design doc, covering the keymap, name-based picker, message-to-self, and the whole flow. A follow-up review caught three blockers I'd hand-waved: signel had no JSON-RPC success-result dispatch path (so cj/signel--fetch-contacts couldn't actually receive listContacts results), D4's "auto-connect when linked" didn't define what "linked" meant or how process death surfaced, and the contact cache had no ownership or invalidation story.
I verified the central one against the fork. signel--dispatch handles only "receive" and error responses, so success results were dropped. Then I folded all three into an Architecture additions subsection: a request-callback table keyed by JSON-RPC id with cleanup on success/error/reconnect, a cj/signel--ensure-started contract with branches for live process / account-set / account-nil, and a cj-owned cj/signel--contact-cache separate from signel's receive-time map.
A second review pass caught the remaining sync/async boundary. completing-read is synchronous and the fetch is async. I resolved it with pre-warm on connect plus a bounded accept-process-output fallback for cold caches, so the warm case feels instant and a dead daemon can't hang Emacs.
The follow-up re-review then converged to Ready-with-caveats and surfaced one concrete code finding I'd missed: the #2 input-clobber fix has to cover both signel--insert-msg AND signel--insert-system-msg, since both delete from the prompt line through point-max. The pieces-to-build entry and the prompt-preservation regression test now name both paths.
A few smaller tightenings landed in the same pass. The listContacts assumption is now a researched fact (verified on 94 contacts), the two open questions on account source and fork remote are marked decided (defcustom in the gitignored local config, local checkout with no remote for now), and a forward-flag in the scope summary names the four notification details to spec before that later slice starts.
docs/design/signal-client-review.org carries the review as the closure record. todo.org gets two tasks: a [#B] for the JSON-RPC success-result dispatch (the first build step), and a [#D] for groups in the picker as a vNext after the 1:1 flow is stable.
Spec is Ready. Implementation order is pinned to the Pieces-to-build list. RPC dispatch first, then the guard, then fetch/cache, then the picker and keymap, then the clobber fix.
Diffstat (limited to 'todo.org')
| -rw-r--r-- | todo.org | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -53,6 +53,9 @@ Installed signal-cli 0.14.4.1 (AUR; imported AsamK's signing key FA10826A... to *** TODO [#B] Contact picker command :feature: =cj/signel-pick-contact=: call signal-cli =listContacts= over JSON-RPC, feed the result through =cj/signal--parse-contacts= (done), =completing-read= the labels, open the chosen recipient's chat. signel today opens by raw phone number only. +*** TODO [#B] JSON-RPC success-result dispatch for signel :feature: +The contact picker needs =listContacts= results, but signel currently dispatches only =receive= notifications and RPC errors; successful =((id . N) (result . VALUE))= responses have no callback/result path. Add a request handler table or equivalent success-result dispatch in the fork, clean handlers up on success/error/reconnect, then build =cj/signel--fetch-contacts= on that contract. Review: [[file:docs/design/signal-client-review.org][docs/design/signal-client-review.org]]. + *** TODO [#B] Notify only for the unviewed conversation :feature: Wire =cj/signal--should-notify-p= (done) into signel's =signel--handle-receive= notify block (signel.el:277), route through Craig's notify script instead of bare =notifications-notify=, and gate sound behind a defcustom that defaults off. @@ -65,6 +68,9 @@ signel.el:502 (=signel--insert-msg=) does =(delete-region (point) (point-max))=, *** TODO [#B] use-package wiring :feature: =use-package signel :load-path "~/code/signel" :ensure nil= in =signal-config.el=, plus a keybinding prefix (candidate =C-; M= for Messages), and the account source (defcustom vs authinfo, mirroring slack-config). +*** TODO [#D] Include Signal groups in the picker :feature: +vNext after the 1:1 initiate-message flow is stable. Merge =listGroups= with =listContacts=, label groups distinctly, and preserve the current v1 behavior where the picker is contacts-only. + *** 2026-05-26 Tue @ 15:15:43 -0500 Candidate Signal clients / CLIs Signal has no official API, so everything below is unofficial and can break on Signal-Server changes (signal-cli notably expires after about three months without updates). All link as a secondary device to an existing phone, the safer model. |
