From 052aef8689af897c20e02d069fcdb09490996d2d Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 26 May 2026 12:48:22 -0500 Subject: fix(comments): apply comment highlighting on the bulk render path Comment headings only got their green (editable) / grey (read-only) coloring after `pearl-refresh-current-issue`, an add-comment, or a view merge (the three paths that call `pearl-highlight-comments`). A plain `pearl-list-issues` rendered through `pearl--update-org-from-issues`, which never called it, so a fresh fetch showed no coloring until I refreshed. I added the highlight call to branches A and B of `pearl--update-org-from-issues`, right after the content lands in the buffer. Branch C defers a dirty buffer without writing, so it stays uncolored. The regression test renders the comment fixture and asserts both headings carry the editability overlay (own to editable, other's to read-only) straight from the bulk render. --- pearl.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pearl.el') diff --git a/pearl.el b/pearl.el index 20e4936..30557a4 100644 --- a/pearl.el +++ b/pearl.el @@ -2910,7 +2910,9 @@ just writing the file and leaving it off-screen." (message "Updated Linear issues in %s with %d active issues" org-file-path (length issues)) (let ((buf (find-file-noselect org-file-path))) - (with-current-buffer buf (pearl--restore-page-visibility)) + (with-current-buffer buf + (pearl--restore-page-visibility) + (pearl-highlight-comments)) (pearl--surface-buffer buf))) ;; Branch B: buffer exists and is clean -- replace contents in place. @@ -2924,7 +2926,8 @@ just writing the file and leaving it off-screen." (insert new-content) (save-buffer) (goto-char (min recorded-point (point-max))) - (pearl--restore-page-visibility))) + (pearl--restore-page-visibility) + (pearl-highlight-comments))) (message "Updated Linear issues in %s with %d active issues" org-file-path (length issues)) (pearl--surface-buffer existing-buf)) -- cgit v1.2.3