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 editor area, find/replace panel, tab bar, and status bar all render from shared ScreenLayout data — backends just iterate and draw. This is the pattern that makes "test once, works everywhere" possible. The sidebar does NOT follow this pattern: each backend (GTK, TUI, Win-GUI) builds its own sidebar UI independently.
Current state:
Component
Renders from ScreenLayout?
Clicks centralized?
Editor content
✅ all backends
✅
Find/replace
✅ all backends
✅
Tab bar
✅ all backends
TUI ✅, GTK/Win-GUI ❌
Status bar
✅ all backends
TUI ✅, GTK/Win-GUI ❌
Sidebar
❌ each backend builds own
❌ each backend has own logic
GTK is the biggest outlier — it uses native GTK widgets (buttons, tree views) for the sidebar while TUI and Win-GUI do coordinate-based rendering and click detection.
Goal
Move sidebar panel content into ScreenLayout so backends become thin drawing loops:
Activity bar — ScreenLayout provides a list of ActivityBarItem { icon, label, panel_id, is_active } entries. Backends iterate and draw icons. Click → resolve_activity_bar_click() (already done in Hit regions for sidebar #42).
Explorer tree — ScreenLayout provides pre-built rows (ExplorerRow { indent, icon, name, is_dir, is_expanded, is_selected, ... }). Backends iterate and draw. Currently TUI has TuiSidebar.rows and GTK uses a TreeView — both should consume the same data.
Git/debug/extensions/AI panels — ScreenLayout already has SourceControlData, DebugSidebarData, ExtSidebarData, AiPanelData. These just need scroll-aware row computation so backends don't recompute positions.
Tab bar + status bar click migration — GTK and Win-GUI still use their own pixel-based hit caches for tab bar (Hit regions for tab bar #40) and status bar (Hit regions for status bar #41) clicks instead of the shared hit regions. Migrate them.
Scope
Add sidebar rendering data to ScreenLayout (activity bar items, panel content rows)
Migrate GTK sidebar from native widgets to DrawingArea rendering from ScreenLayout data (or keep widgets but drive them from shared data)
Migrate GTK/Win-GUI tab bar and status bar clicks to use shared hit regions
Ensure all 3 backends produce visually consistent sidebars
A change to sidebar panel rendering or click logic in render.rs / engine/ should work in all backends without per-backend fixes. Testing in one backend gives high confidence for the others.
Context
The editor area, find/replace panel, tab bar, and status bar all render from shared
ScreenLayoutdata — backends just iterate and draw. This is the pattern that makes "test once, works everywhere" possible. The sidebar does NOT follow this pattern: each backend (GTK, TUI, Win-GUI) builds its own sidebar UI independently.Current state:
GTK is the biggest outlier — it uses native GTK widgets (buttons, tree views) for the sidebar while TUI and Win-GUI do coordinate-based rendering and click detection.
Goal
Move sidebar panel content into
ScreenLayoutso backends become thin drawing loops:Activity bar —
ScreenLayoutprovides a list ofActivityBarItem { icon, label, panel_id, is_active }entries. Backends iterate and draw icons. Click →resolve_activity_bar_click()(already done in Hit regions for sidebar #42).Explorer tree —
ScreenLayoutprovides pre-built rows (ExplorerRow { indent, icon, name, is_dir, is_expanded, is_selected, ... }). Backends iterate and draw. Currently TUI hasTuiSidebar.rowsand GTK uses aTreeView— both should consume the same data.Git/debug/extensions/AI panels —
ScreenLayoutalready hasSourceControlData,DebugSidebarData,ExtSidebarData,AiPanelData. These just need scroll-aware row computation so backends don't recompute positions.Tab bar + status bar click migration — GTK and Win-GUI still use their own pixel-based hit caches for tab bar (Hit regions for tab bar #40) and status bar (Hit regions for status bar #41) clicks instead of the shared hit regions. Migrate them.
Scope
ScreenLayout(activity bar items, panel content rows)DrawingArearendering fromScreenLayoutdata (or keep widgets but drive them from shared data)Dependencies
Acceptance
A change to sidebar panel rendering or click logic in
render.rs/engine/should work in all backends without per-backend fixes. Testing in one backend gives high confidence for the others.