diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-27 22:54:43 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-27 22:54:43 -0500 |
| commit | dcfecf3e4f46c920eb77ca9b3169d0719fa0b9fd (patch) | |
| tree | dc710dc4412152897aa7fa617c0cabc6bbc08caa /tests/test-pearl-adhoc.el | |
| parent | 15ce896744a8095c221bdeaf887f6311f9a94526 (diff) | |
| download | pearl-dcfecf3e4f46c920eb77ca9b3169d0719fa0b9fd.tar.gz pearl-dcfecf3e4f46c920eb77ca9b3169d0719fa0b9fd.zip | |
feat(sources): favorites, views, and filters via pick-source
Pearl now treats Linear sources (favorites, custom views, ad-hoc filters, saved queries) as one surface. `pearl-pick-source` is the unified picker: it lists every Linear favorite alongside every locally saved query, and dispatches by kind. View / project / cycle / label / user favorites resolve to runnable filter or view sources; issue / document / dashboard favorites open in the browser since they aren't lists.
The filter compiler grows id-based forms (`:label-id` and `:assignee-id`), so favorites that name a Linear entity (a user, a label) compile to rename-proof queries rather than fragile name matching. The ad-hoc builder gets a matching member-assignee option ("me / member / any"), so a one-off "what's a teammate working on?" doesn't require building a saved query first.
Two pre-existing builder bugs surfaced during verify and got fixed in the same pass. The builder previously passed display names straight to the compiler, but `:team` compiles to `team.key.eq` and `:project` to `project.id.eq`, so Linear rejected every builder run that pinned a team or project. Now the builder resolves the picked name to its key / id before assembling. And `pearl-list-issues-by-project` previously injected `:assignee :me` into the filter, hiding every teammate's work in the project. It now returns the whole project.
The save prompt on the builder was rewritten so the local-only nature is unambiguous, and the README grew a Sources section plus a keymap-table entry for `f s`.
Diffstat (limited to 'tests/test-pearl-adhoc.el')
| -rw-r--r-- | tests/test-pearl-adhoc.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test-pearl-adhoc.el b/tests/test-pearl-adhoc.el index 97ac22e..23aad79 100644 --- a/tests/test-pearl-adhoc.el +++ b/tests/test-pearl-adhoc.el @@ -52,6 +52,12 @@ (let ((f (pearl--assemble-filter nil nil nil nil '() nil))) (should-not (plist-member f :labels)))) +(ert-deftest test-pearl-assemble-filter-string-assignee-is-assignee-id () + "A string assignee (resolved member id) lands as :assignee-id, not :assignee." + (let ((f (pearl--assemble-filter nil t nil nil nil "user-1"))) + (should (string= "user-1" (plist-get f :assignee-id))) + (should-not (plist-member f :assignee)))) + ;;; --save-query (ert-deftest test-pearl-save-query-adds-entry () |
