aboutsummaryrefslogtreecommitdiff
path: root/pearl.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-06 15:17:51 -0500
committerCraig Jennings <c@cjennings.net>2026-06-06 15:17:51 -0500
commit184b94538cdcc807aa382f2766beb0b615776e43 (patch)
tree3ec7bb5bad619f13ae01951cf59e62216c972a0d /pearl.el
parent23c741c4dc8a3e5a753b3c42389b8c673052d2ce (diff)
downloadpearl-184b94538cdcc807aa382f2766beb0b615776e43.tar.gz
pearl-184b94538cdcc807aa382f2766beb0b615776e43.zip
feat(views): route grouping consumers through the effective-grouping resolver
Phase 4 of the interactive-grouping spec: the integration that makes an interactive grouping survive a refresh. The full render (pearl--build-org-content) and both merge-refresh paths (the dirty-merge branch and pearl--merge-query-result) read the source's grouping straight from :group. I pointed all three at pearl--effective-grouping instead, so a buffer the user grouped by hand redraws the same way rather than snapping back to the view's server grouping. The swap is backward-compatible: with no :client-group set, the resolver returns :group, so a server-grouped view renders exactly as before. 2 render tests lock both directions: a :client-group overrides the server :group, and a server-only view still groups by :group.
Diffstat (limited to 'pearl.el')
-rw-r--r--pearl.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/pearl.el b/pearl.el
index 3c9e7d0..ed183dd 100644
--- a/pearl.el
+++ b/pearl.el
@@ -4250,7 +4250,7 @@ no side effects."
(let* ((src (or source '(:type filter :name "Linear issues" :filter nil)))
(name (pearl--source-name src))
(filter (plist-get src :filter))
- (grouping (plist-get src :group))
+ (grouping (pearl--effective-grouping src))
(groups (pearl--group-issues issues grouping)))
(with-temp-buffer
;; The view name renders verbatim, matching Linear's own capitalization;
@@ -4390,7 +4390,7 @@ just writing the file and leaving it off-screen."
(?m ; merge by LINEAR-ID, keeping edits
(with-current-buffer existing-buf
(let ((counts (pearl--merge-issues-into-buffer
- issues (plist-get source :group))))
+ issues (pearl--effective-grouping source))))
(pearl--update-source-header (length issues) truncated)
(pearl--update-derived-todo-header (pearl--gather-header-states issues))
(pearl-highlight-comments)
@@ -6822,7 +6822,7 @@ of the replace path."
(cdr eff)))
(truncated (pearl--query-result-truncated-p result))
(counts (pearl--merge-issues-into-buffer
- issues (plist-get source :group))))
+ issues (pearl--effective-grouping source))))
(pearl--update-source-header (length issues) truncated)
(pearl--update-derived-todo-header (pearl--gather-header-states issues))
(pearl-highlight-comments)