diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-06 15:11:15 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-06 15:11:15 -0500 |
| commit | 690faf7538bb7fcd47367b4801923beea40a0ff1 (patch) | |
| tree | ffc2f2b6deb1be447582981f3935e9941d732ad4 /README.org | |
| parent | 0a3794ccfc56045a2e4155538c145021447d09e3 (diff) | |
| download | pearl-690faf7538bb7fcd47367b4801923beea40a0ff1.tar.gz pearl-690faf7538bb7fcd47367b4801923beea40a0ff1.zip | |
feat(views): regroup issue subtrees in place, preserving edits
Phase 2 of the interactive-grouping spec: the buffer transform, still no command. pearl--regroup-issue-subtrees re-lays-out the active view's issues by an issueGrouping value, or flattens them when given nil. It moves each issue subtree byte-for-byte and shifts only its heading stars, so descriptions, comments, and unsaved edits ride along untouched. The group label comes from the subtree's own drawer (pearl--buffer-issue-group-label), so the regroup matches a server-grouped render without a refetch.
It works from either starting state. It climbs to the level-1 view parent, captures every issue (level-2 in a flat buffer, level-3 under a group heading in a grouped one) normalized to a canonical level, then re-emits them flat at level 2 or sectioned under level-2 group headings at level 3. Group headings are regenerated, so a stale one never lingers. A non-issue level-2 subtree is kept and placed after the groups rather than dropped.
pearl--shift-heading-levels is the level mechanic, isolated and tested both directions. 29 tests cover the shift, grouping by each dimension, the unset bucket, regrouping to a new dimension, flatten and round-trip, edit preservation, malformed-last, and no-issues.
Diffstat (limited to 'README.org')
0 files changed, 0 insertions, 0 deletions
