Skip to content

GTK regressions from #515: editor breadcrumbs broken + explorer treeview icons don't use Nerd Fonts (converge on quadraui; fix quadraui gaps first) #547

Description

@JDonaghy

Summary

Dogfooding #515 (editor-group tab drag-drop → quadraui) surfaced two GTK-backend regressions in the editor. Both are the same class of problem the Platform-Neutral milestone exists to eliminate: GTK render paths that diverge from the shared / quadraui-provided path the TUI uses.

As ever, the goal is elimination of backend-specific logic in vimcode. For each regression, the fix is to converge GTK onto the shared/quadraui path — and if quadraui has the gap (a missing or regressed primitive), fix quadraui FIRST (pull ~/src/quadraui, land the quadraui change), then adopt it in vimcode. Do not paper over either regression with GTK-only patch code.

Parent: Platform-Neutral milestone (same as #515). Surfaced by: #515.


Regression 1 — GTK editor breadcrumbs are broken

The breadcrumb bar (file path + symbol hierarchy, below the tab bar; settings.breadcrumbs, src/core/settings.rs:281-283) is broken in the GTK editor.

This is a shared-model feature that both backends already render from screen.breadcrumbs:

Backend Path
Shared model screen.breadcrumbs
GTK draw loop src/gtk/draw.rs:330-341draw_breadcrumb_bar (src/gtk/draw.rs:1226-1234), which draws via quadraui::ScreenLayout::draw()
TUI draw loop src/tui_main/render_impl.rs:338-400draw_breadcrumb_bar (src/tui_main/render_impl.rs:1392-1400), via the D6 StatusBar pipeline

Because GTK already routes breadcrumbs through quadraui (ScreenLayout::draw()), a GTK-only break most likely means a quadraui-side regression/gap in the breadcrumb (ScreenLayout / StatusBar) primitive on the GTK path — or a divergence between what the GTK adapter feeds ScreenLayout::draw() and what the TUI feeds the D6 StatusBar pipeline.

Fix approach:

  1. Reproduce and localize: is the break in the quadraui ScreenLayout::draw() breadcrumb primitive (GTK path), or in the vimcode GTK adapter that builds the bar model?
  2. If it's a quadraui primitive gap/regression → fix it in quadraui first, file/reference the quadraui issue, pull ~/src/quadraui, then let vimcode consume it.
  3. Ensure GTK and TUI render breadcrumbs from the same shared model + quadraui primitive with no backend-specific breadcrumb layout/geometry logic left in src/gtk/.

Regression 2 — Explorer treeview icons don't use Nerd Fonts on GTK

In the Explorer sidebar treeview, file/folder icons render the plain-Unicode/ASCII fallback instead of the Nerd Font glyph on the GTK backend.

The icon system is already platform-neutral and Nerd-Font-aware:

  • src/icons.rs — every Icon carries a Nerd Font glyph + a fallback (Icon::new("\u{e7a8}", "R") etc.; explorer icons at src/icons.rs:54-85: EXPLORER, FOLDER, FOLDER_OPEN, FILE_RUST, …).
  • Icon::s() (src/icons.rs:38) picks glyph-vs-fallback off the global USE_NERD_FONTS flag; set at startup via set_nerd_fonts(bool) (src/icons.rs:16).
  • Explorer state/logic is already sharedsrc/gtk/explorer.rs is a 4-line stub; the logic lives on the engine (explorer_ops.rs).

So the GTK treeview is falling to the fallback for one of these reasons — determine which:

  1. GTK never calls set_nerd_fonts(true) (or sets it false) at startup, unlike the TUI path → the shared Icon::s() returns fallbacks. (Check the GTK app init vs the TUI init.)
  2. The GTK font stack lacks a Nerd Font, so glyphs would render as tofu — if that's the intent behind the fallback, the detection/selection needs to run on GTK too (cf. detect_nerd_font_windows, src/icons.rs:169-204).
  3. The Explorer tree is drawn through a quadraui tree/list primitive that doesn't carry or gate the Nerd-Font icon (drops the glyph, or renders the fallback) → quadraui gap → fix quadraui first, then adopt.

Fix approach: trace the GTK explorer icon path end-to-end; make GTK honor the shared Nerd-Font-aware icons.rs path exactly as the TUI does. If the icon is being dropped inside a quadraui treeview/list primitive, fill that gap in quadraui first (pull ~/src/quadraui) rather than adding a GTK-only icon shim.


Acceptance criteria

  • GTK editor breadcrumbs render correctly again, from the shared screen.breadcrumbs model via the same quadraui primitive as the TUI — no new backend-specific breadcrumb layout logic in src/gtk/.
  • Explorer treeview icons render Nerd Font glyphs on GTK (matching the TUI), via the shared src/icons.rs path — no GTK-only icon shim.
  • Any quadraui gap uncovered (breadcrumb ScreenLayout::draw() regression; treeview/list primitive dropping the icon) is fixed in quadraui first, referenced here, with ~/src/quadraui pulled; the vimcode change then consumes it. Name the quadraui PR/branch in the briefing (vimcode builds against ../../quadraui/quadraui).
  • Black-box coverage per vimcode CLAUDE.md: a test that drives the GTK render path and asserts breadcrumb presence + Nerd-Font glyph selection in the explorer tree (or the platform-neutral equivalent asserting the shared model/icon selection both backends consume).

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcoordTracked by coord-tui pipelinestatus:readyRefined and ready to enter the work pipeline

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions