From 184b94538cdcc807aa382f2766beb0b615776e43 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 6 Jun 2026 15:17:51 -0500 Subject: 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. --- pearl.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pearl.el') 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) -- cgit v1.2.3