You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GTK backend has silently lost its VS Code–style Command Center — the ◀ ▶ nav arrows
plus the centered 🔍 <project> search box in the title-bar row (quadraui's CommandCenter
primitive, landed for both backends in #310 / b5fdd7d). Clicking the search box is the
discoverable entry point to the unified picker with prefix routing (> commands, @ symbols, : line, # …).
It is collateral damage from the Relm4 → ShellApp cutover, commit c35aea4
("feat(#540): flip GTK main loop from Relm4 to ShellApp runner (#448-C)", 2026-06-28).
That commit deleted impl SimpleComponent for App (~3,059 lines). Inside the deleted Relm4 view! scaffolding lived the titlebar DrawingArea draw closure that called quadraui::gtk::draw_command_center(...) and stashed the result in engine.command_center_layout,
plus the sibling click handler that hit-tested it. The replacement impl quadraui::ShellApp for App::render_contentnever ported either half.
This is the same bug family as the other #540 fallout already fixed one at a time — #546
(dialog / context menu never painted), #547 (nerd fonts), #552 (window controls / CSD), #555
(breadcrumb bar), #556 (dock icon), #557 (extension panels), #587 (picker + panel accelerators), #544 (sidebar panel clicks). The command center is simply the one nobody re-listed.
Expected
On GTK, the title-bar row shows ◀ ▶ nav arrows and a centered 🔍 <project-name> search box
between the menu labels (File / Edit / View …) and the inline window controls (min / max / close).
Clicking ◀/▶ navigates tab history; clicking the search box opens the unified picker
(Engine::open_command_center()).
Actual
Nothing is painted in that region and nothing is clickable there. The band from the end of the
menu labels to the right window edge is claimed end-to-end by the window-controls status bar.
Repro
cargo run --features gui (GTK build).
Look at the title-bar row: File / Edit / View … on the left, min/max/close on the right, empty band in between — no arrows, no search box.
Click anywhere in that empty band → nothing happens.
Compare with the TUI (cargo run in vscode-mode, or Alt to reveal the menu bar): the arrows
and search box are present and clickable.
Evidence — current state of the tree
Paint
Click
Status
TUI
✅ src/tui_main/shell_app.rs:1359-1377 (ported by #635, Stage 6b item A)
✅ src/tui_main/mouse.rs:1978-1995
intact
GTK
❌ nothing in src/gtk/** calls draw_command_center or build_command_center_view
❌ no command_center_layout hit-test anywhere in src/gtk/
gone
Corroborating details:
The real estate is being painted over.src/gtk/mod.rs:8255-8276 computes controls_rect = menu_end → right window edge, and src/gtk/mod.rs:8884 paints render::window_controls_status_bar across all of it. quadraui::gtk::draw_status_bar
background-fills its entire rect (quadraui/src/gtk/status_bar.rs:73-80), so even the gap is
claimed.
engine.command_center_layout is permanently None on GTK — never written by the ShellApp
path, so any hit-test would fail even if one existed.
menu_bar_da is a dead husk. Declared src/gtk/mod.rs:509, initialised to None at :1544, and never assigned Some — four dead reads remain at :2134, :5452, :5460, :7532. That is the orphaned handle to the old Relm4 titlebar drawing area.
src/gtk/draw.rs never had it — the legacy Cairo path (already dead under ShellApp) has no
command-center code, so there is no second call site to revive. The only one was in mod.rs's
deleted view! block.
Docs are stale: PROJECT_STATE.md:92 still claims Command center (nav arrows + search box) | CommandCenter | ✅ | ✅.
What still works on GTK: :CommandCenter (src/core/engine/execute.rs:1999) and Ctrl+Shift+P
(accelerators restored in #587) both open the picker correctly. It is purely the bar — the
visible entry point and its arrows — that is missing.
Nothing was deleted from quadraui
The whole API surface is live and already exported, so this is wiring, not a rebuild:
quadraui::{CommandCenter, CommandCenterHit, CommandCenterLayout, CommandCenterMeasure}
(quadraui/src/lib.rs:159, primitive at quadraui/src/primitives/command_center.rs)
Backend::draw_command_center (quadraui/src/backend.rs:1157) and Backend::command_center_layout (:1160) — trait methods, available to GTK today
quadraui::gtk::draw_command_center (quadraui/src/gtk/command_center.rs:50) — the GTK
rasteriser, still implemented and still wired into the GTK backend at quadraui/src/gtk/backend.rs:2882
Narrow controls_rect. In render_content (src/gtk/mod.rs:8255-8276), measure the three
window-control buttons with backend.status_bar_layout(...) and shrink the controls rect to
just that right-aligned width, instead of handing them the entire menu_end → right edge band.
Paint the command center in the freed gap, using render::build_command_center_view( engine.tab_nav_can_go_back(), engine.tab_nav_can_go_forward(), &title) and backend.draw_command_center(gap_rect, &cc). Ordering is load-bearing: it must be painted aftermenu_system.borrow().render(...)
(src/gtk/mod.rs:8788), which repaints draw_menu_bar across the full menu_row_rect band.
Painting before it reproduces the #448-E: GTK window chrome lost after ShellApp flip — WM titlebar returns, menu bar + inline min/max buttons gone #552 round-2/3 "buttons render blank" regression verbatim.
Cache the layout into engine.command_center_layout (and clear it to None when menu_bar_visible is false), mirroring src/tui_main/shell_app.rs:1377 / :1381.
Hit-test on click in handle_mouse_click_msg (src/gtk/mod.rs:3698): Back → tab_nav_back(), Forward → tab_nav_forward(), SearchBox → open_command_center()
— mirroring src/tui_main/mouse.rs:1983-1993. Must run before the window-controls
hit-test so it isn't swallowed.
Delete the dead menu_bar_da field and its four dead reads.
Fix PROJECT_STATE.md:92 to reflect reality once the fix lands.
Design note — deliberate GTK/TUI divergence
GTK forces menu_bar_visible = true at startup (src/gtk/mod.rs:8171), whereas the TUI shows the
menu row only in vscode-mode or on Alt. So on GTK the command center returns permanently
visible — which is both the pre-#540 behaviour and the VS Code behaviour this was modelled on.
Gate the GTK paint on engine.menu_bar_visible anyway (same condition as TUI) so the two
backends stay structurally identical; the flag just happens to always be true on GTK.
Black-box test
Per CLAUDE.md this is behaviour-changing and needs a black-box test. Use the GTK headless
pixel-probe harness in src/gtk/testing.rs and follow the pattern established by #555
("test(#555): assert the breadcrumb dropdown paints via pixels, not painted text", 755d732) —
assert on painted pixels, not on painted text, since these are icon glyphs. Cover:
the search box and both arrows paint inside the title-bar band, to the left of the window
controls and to the right of the last menu label (no overlap with either);
a click on the search box opens the picker (engine.picker_open == true with picker_source == PickerSource::CommandCenter);
Summary
The GTK backend has silently lost its VS Code–style Command Center — the
◀ ▶nav arrowsplus the centered
🔍 <project>search box in the title-bar row (quadraui'sCommandCenterprimitive, landed for both backends in #310 /
b5fdd7d). Clicking the search box is thediscoverable entry point to the unified picker with prefix routing (
>commands,@symbols,:line,#…).It is collateral damage from the Relm4 → ShellApp cutover, commit
c35aea4("feat(#540): flip GTK main loop from Relm4 to ShellApp runner (#448-C)", 2026-06-28).
That commit deleted
impl SimpleComponent for App(~3,059 lines). Inside the deleted Relm4view!scaffolding lived the titlebarDrawingAreadraw closure that calledquadraui::gtk::draw_command_center(...)and stashed the result inengine.command_center_layout,plus the sibling click handler that hit-tested it. The replacement
impl quadraui::ShellApp for App::render_contentnever ported either half.This is the same bug family as the other #540 fallout already fixed one at a time — #546
(dialog / context menu never painted), #547 (nerd fonts), #552 (window controls / CSD), #555
(breadcrumb bar), #556 (dock icon), #557 (extension panels), #587 (picker + panel accelerators),
#544 (sidebar panel clicks). The command center is simply the one nobody re-listed.
Expected
On GTK, the title-bar row shows
◀ ▶nav arrows and a centered🔍 <project-name>search boxbetween the menu labels (File / Edit / View …) and the inline window controls (min / max / close).
Clicking
◀/▶navigates tab history; clicking the search box opens the unified picker(
Engine::open_command_center()).Actual
Nothing is painted in that region and nothing is clickable there. The band from the end of the
menu labels to the right window edge is claimed end-to-end by the window-controls status bar.
Repro
cargo run --features gui(GTK build).empty band in between — no arrows, no search box.
cargo runin vscode-mode, orAltto reveal the menu bar): the arrowsand search box are present and clickable.
Evidence — current state of the tree
src/tui_main/shell_app.rs:1359-1377(ported by #635, Stage 6b item A)src/tui_main/mouse.rs:1978-1995src/gtk/**callsdraw_command_centerorbuild_command_center_viewcommand_center_layouthit-test anywhere insrc/gtk/Corroborating details:
src/gtk/mod.rs:8255-8276computescontrols_rect = menu_end → right window edge, andsrc/gtk/mod.rs:8884paintsrender::window_controls_status_baracross all of it.quadraui::gtk::draw_status_barbackground-fills its entire rect (
quadraui/src/gtk/status_bar.rs:73-80), so even the gap isclaimed.
engine.command_center_layoutis permanentlyNoneon GTK — never written by the ShellApppath, so any hit-test would fail even if one existed.
menu_bar_dais a dead husk. Declaredsrc/gtk/mod.rs:509, initialised toNoneat:1544, and never assignedSome— four dead reads remain at:2134,:5452,:5460,:7532. That is the orphaned handle to the old Relm4 titlebar drawing area.src/gtk/draw.rsnever had it — the legacy Cairo path (already dead under ShellApp) has nocommand-center code, so there is no second call site to revive. The only one was in
mod.rs'sdeleted
view!block.PROJECT_STATE.md:92still claimsCommand center (nav arrows + search box) | CommandCenter | ✅ | ✅.What still works on GTK:
:CommandCenter(src/core/engine/execute.rs:1999) andCtrl+Shift+P(accelerators restored in #587) both open the picker correctly. It is purely the bar — the
visible entry point and its arrows — that is missing.
Nothing was deleted from quadraui
The whole API surface is live and already exported, so this is wiring, not a rebuild:
quadraui::{CommandCenter, CommandCenterHit, CommandCenterLayout, CommandCenterMeasure}(
quadraui/src/lib.rs:159, primitive atquadraui/src/primitives/command_center.rs)Backend::draw_command_center(quadraui/src/backend.rs:1157) andBackend::command_center_layout(:1160) — trait methods, available to GTK todayquadraui::gtk::draw_command_center(quadraui/src/gtk/command_center.rs:50) — the GTKrasteriser, still implemented and still wired into the GTK backend at
quadraui/src/gtk/backend.rs:2882render::build_command_center_view(src/render.rs:4065) — backend-agnostic, already sharedProposed fix
controls_rect. Inrender_content(src/gtk/mod.rs:8255-8276), measure the threewindow-control buttons with
backend.status_bar_layout(...)and shrink the controls rect tojust that right-aligned width, instead of handing them the entire
menu_end → right edgeband.render::build_command_center_view( engine.tab_nav_can_go_back(), engine.tab_nav_can_go_forward(), &title)andbackend.draw_command_center(gap_rect, &cc).Ordering is load-bearing: it must be painted after
menu_system.borrow().render(...)(
src/gtk/mod.rs:8788), which repaintsdraw_menu_baracross the fullmenu_row_rectband.Painting before it reproduces the #448-E: GTK window chrome lost after ShellApp flip — WM titlebar returns, menu bar + inline min/max buttons gone #552 round-2/3 "buttons render blank" regression verbatim.
engine.command_center_layout(and clear it toNonewhenmenu_bar_visibleis false), mirroringsrc/tui_main/shell_app.rs:1377/:1381.handle_mouse_click_msg(src/gtk/mod.rs:3698):Back → tab_nav_back(),Forward → tab_nav_forward(),SearchBox → open_command_center()— mirroring
src/tui_main/mouse.rs:1983-1993. Must run before the window-controlshit-test so it isn't swallowed.
menu_bar_dafield and its four dead reads.PROJECT_STATE.md:92to reflect reality once the fix lands.Design note — deliberate GTK/TUI divergence
GTK forces
menu_bar_visible = trueat startup (src/gtk/mod.rs:8171), whereas the TUI shows themenu row only in vscode-mode or on
Alt. So on GTK the command center returns permanentlyvisible — which is both the pre-#540 behaviour and the VS Code behaviour this was modelled on.
Gate the GTK paint on
engine.menu_bar_visibleanyway (same condition as TUI) so the twobackends stay structurally identical; the flag just happens to always be true on GTK.
Black-box test
Per CLAUDE.md this is behaviour-changing and needs a black-box test. Use the GTK headless
pixel-probe harness in
src/gtk/testing.rsand follow the pattern established by #555("test(#555): assert the breadcrumb dropdown paints via pixels, not painted text",
755d732) —assert on painted pixels, not on painted text, since these are icon glyphs. Cover:
controls and to the right of the last menu label (no overlap with either);
engine.picker_open == truewithpicker_source == PickerSource::CommandCenter);◀/▶drive tab-nav history;Files
src/gtk/mod.rssrc/gtk/testing.rsPROJECT_STATE.md