diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-03 19:07:48 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-03 19:07:48 -0500 |
| commit | c23592e3c175b4c31b775b57c3985bfcbef90d9c (patch) | |
| tree | 35b1c7a90d1f313a8f97657eabc9454e4d82e1f7 /tests/test-pearl-compose.el | |
| parent | 8e0f0eedc91558e5d45edeb5a731103ba83e4d8b (diff) | |
| download | pearl-c23592e3c175b4c31b775b57c3985bfcbef90d9c.tar.gz pearl-c23592e3c175b4c31b775b57c3985bfcbef90d9c.zip | |
feat(compose): @-mention Linear users from a picker
Mentioning a teammate meant recalling their exact Linear handle, dotted last names and all. Now a picker inserts it for you.
In a comment or description compose buffer, typing @ at the start of a word pops a completing-read over the issue team's members, showing "Full Name (@handle)" so you can find someone by name, and inserts @displayName, the bare handle Linear resolves to a mention (no id or link wrapper). C-; L @ (pearl-mention-user) runs the same picker explicitly and also works inline in an issue buffer, resolving the team from the heading at point. An @ mid-word (an email) stays literal, and cancelling the picker leaves a literal @, so neither case is hijacked.
The compose buffer now carries the issue's team id so the picker knows whom to offer. The @ trigger is bound only when a team is in context. @displayName survives the md/org round-trip unchanged, so it reaches Linear intact.
Not yet confirmed: that writing a body with @displayName through the API fires Linear's mention notification (the web app does, and stored bodies carry the bare handle, so it almost certainly round-trips). Worth one self-mention write-test before relying on it.
Diffstat (limited to 'tests/test-pearl-compose.el')
| -rw-r--r-- | tests/test-pearl-compose.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-pearl-compose.el b/tests/test-pearl-compose.el index 4f4d611..db56ebc 100644 --- a/tests/test-pearl-compose.el +++ b/tests/test-pearl-compose.el @@ -107,7 +107,7 @@ Binds `captured' to the value the on-finish receives (or `:none'). Stubs (test-pearl--in-issue (let (sent) (cl-letf (((symbol-function 'pearl--compose-in-buffer) - (lambda (_label _instr initial on-finish) + (lambda (_label _instr initial on-finish &optional _team-id) ;; the composer would start empty for a new comment (should (string= "" initial)) (funcall on-finish "see *bold* and `code`"))) @@ -136,7 +136,7 @@ Binds `captured' to the value the on-finish receives (or `:none'). Stubs (test-pearl--in-issue (let (seeded synced) (cl-letf (((symbol-function 'pearl--compose-in-buffer) - (lambda (_label _instr initial on-finish) + (lambda (_label _instr initial on-finish &optional _team-id) (setq seeded initial) (funcall on-finish "Edited description"))) ((symbol-function 'pearl-sync-current-issue) |
