refactor(tui): migrate Extension Panel to quadraui TreeView (#476) - #482
Merged
Conversation
`render::ext_panel_to_tree_view()` adapts `ExtPanelData` into a `quadraui::TreeView`: section headers become `Decoration::Header` rows with `is_expanded: Some(section.expanded)`; items map indent + `ExtPanelStyle` → `Decoration` (Accent uses a `StyledSpan` with `theme.keyword` since the primitive has no first-class accent); badges + action labels + hint combine into one right-aligned `Badge`; expandable items carry `is_expanded: Some(item.expanded)` so the primitive draws the chevron. `build_ext_panel_data()` resolves `engine.ext_panel_tree_expanded` overrides into the cloned `item.expanded` so the builder stays engine-free (matches the `ext_sidebar_to_tree_view()` pattern). The TUI `render_ext_panel()` now takes `(backend, frame, area, engine, theme)`: chrome routes through `quadraui::tui::draw_settings_chrome` (1 row when input hidden, 2 rows when visible — matching the legacy conditional), body routes through `Backend::draw_tree` inside `enter_frame_scope`. Scrollbar drawing + scroll-surface registration stay manual (TreeView primitive doesn't paint a scrollbar yet) and the help-popup overlay is unchanged. Net: `panels.rs −252 / +101`, `render.rs +154` (builder + two unit tests covering tree shape, selection mapping, focus state). Separator rows (`item.is_separator`) render as a `Decoration::Muted` row with a single `─` glyph rather than the full-width rule the legacy renderer drew. The primitive has no `Decoration::Separator`; acceptable for now since no shipping plugin uses separators. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
Author
Coordinator review — approveClean migration. −252 lines of manual cell-painting replaced by
Ready to merge. Smoke test needed on Desktop A (GTK) to confirm no regression on that backend — this PR only changed TUI + render.rs, but the render.rs builder is shared. |
This was referenced May 19, 2026
JDonaghy
added a commit
that referenced
this pull request
May 19, 2026
Logs the parallel agent stream that ran alongside session 388: TUI convergence backlog (#474 → #475-#481 + quadraui#218), Extension Panel → TreeView (#476 / PR #482), and 3 pre-existing ext-panel bugs filed during smoke testing (#483, #484, #485). Bumps the SESSION_HISTORY pointer in PROJECT_STATE to "Sessions 388 and earlier" now that 389 lives there. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
render::ext_panel_to_tree_view()adaptsExtPanelDataintoquadraui::TreeView(section headers + indented items + chevrons + combined badges/action labels).render_ext_panel()rewired: chrome viaquadraui::tui::draw_settings_chrome, body viaBackend::draw_tree. Manual scrollbar + scroll-surface registration kept (TreeView doesn't paint scrollbars yet); help-popup overlay unchanged.build_ext_panel_data()now resolvesengine.ext_panel_tree_expandedoverrides into the cloneditem.expandedso the builder stays engine-free, matching theext_sidebar_to_tree_view()pattern.Net:
panels.rs −252 / +101,render.rs +154(builder + 2 unit tests).Known visual difference
Separator rows (
item.is_separator) render as a single─glyph instead of the full-width rule the legacy renderer drew — the TreeView primitive has noDecoration::Separator. No shipping plugin uses separators today; if we want the full rule back, file a quadraui gap for the primitive.Pre-existing bugs surfaced during smoke testing (not introduced by this PR)
mouse.rsis unchanged by this PR. Three behaviors flagged during smoke test that are byte-for-byte identical todevelop:/activates search input but typing doesn't filter — engine firespanel_inputto the plugin; filtering is the plugin's job.handle_ext_panel_key(\"Return\", ...)Enter does. Likely an Alacritty Down/Up quirk similar to TUI: right-click on explorer does nothing (engine state opens but menu doesn't render or dispatch) #451.develop.Filed as separate follow-ups.
Test plan
cargo build --no-default-featurescargo test --no-default-features(43 binaries, 0 failures, 2 new render tests covering tree shape + focus state)cargo clippy --no-default-features -- -D warningscargo fmtgit_insightsplugin: title renders, chrome shows search row when active, j/k navigates, Enter expands sections, scrollbar thumb tracks, help popup unaffectedCloses #476.
🤖 Generated with Claude Code