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
Sub-task 4/4 of #592 — the closer. Depends on #592-A, #592-B and #592-C: src/gtk/draw.rs is the reference implementation those three port from, so it cannot be deleted until they land.
What
Two halves, in order:
1. Re-home the state the dead path was the sole writer of. Per #592, GTK's scroll and
click dispatch currently run against structures nothing live ever fills:
engine.scroll_surfaces is written only from dead code (draw.rs:85, :644, :709).
GTK's dispatch_scroll (mod.rs:1838) and dispatch_click (mod.rs:3577) therefore
hit-test against a permanently empty list. TUI registers its surfaces every frame.
src/gtk/draw.rs is 3,733 lines under a file-level #![allow(dead_code)]. Of its 29
exported pub(super) fns, zero have a live caller (verified on origin/develop
2026-08-26; the one apparent hit on draw_editor is a comment). That file-level allow is
what muted the warning that would have caught #587 and #592 years earlier — deleting the
file removes both ~3.7k lines of dead code and the mechanism that hid the bug.
Design
Do the re-homing before the delete, and land it as its own commit, so a regression is
bisectable to one half.
Register scroll surfaces from the live render_content path at paint time, the way TUI
does — one shared registration path, not a GTK-specific one.
Remove the file-level #![allow(dead_code)] from any file that still carries it and let
the compiler name whatever is left. Anything it flags is either a real orphan (delete) or a
missed port (a bug in A/B/C — go back and fix it there rather than reviving draw.rs).
If deleting draw.rs reveals a surface no one ported, stop and say so rather than
copying the function back into mod.rs.
Acceptance criteria
src/gtk/draw.rs no longer exists.
No file under src/gtk/ carries a file-level #![allow(dead_code)].
GTK scroll-wheel dispatch and click dispatch hit-test against a surface list that is
actually populated — proven by a GtkDriver test that scrolls a scrollable surface and
asserts the content moved, which cannot pass against an empty list.
Sub-task 4/4 of #592 — the closer. Depends on #592-A, #592-B and #592-C:
src/gtk/draw.rsis the reference implementation those three port from, so it cannot be deleted until they land.What
Two halves, in order:
1. Re-home the state the dead path was the sole writer of. Per #592, GTK's scroll and
click dispatch currently run against structures nothing live ever fills:
engine.scroll_surfacesis written only from dead code (draw.rs:85,:644,:709).GTK's
dispatch_scroll(mod.rs:1838) anddispatch_click(mod.rs:3577) thereforehit-test against a permanently empty list. TUI registers its surfaces every frame.
path — enumerate them from GTK live render path silently drops 13 populated ScreenLayout fields (rest of #587's blast radius) #592's table and from a compile check once
draw.rsis gone.2. Delete
src/gtk/draw.rs.Why this is the payoff
src/gtk/draw.rsis 3,733 lines under a file-level#![allow(dead_code)]. Of its 29exported
pub(super) fns, zero have a live caller (verified onorigin/develop2026-08-26; the one apparent hit on
draw_editoris a comment). That file-level allow iswhat muted the warning that would have caught #587 and #592 years earlier — deleting the
file removes both ~3.7k lines of dead code and the mechanism that hid the bug.
Design
bisectable to one half.
render_contentpath at paint time, the way TUIdoes — one shared registration path, not a GTK-specific one.
#![allow(dead_code)]from any file that still carries it and letthe compiler name whatever is left. Anything it flags is either a real orphan (delete) or a
missed port (a bug in A/B/C — go back and fix it there rather than reviving
draw.rs).draw.rsreveals a surface no one ported, stop and say so rather thancopying the function back into
mod.rs.Acceptance criteria
src/gtk/draw.rsno longer exists.src/gtk/carries a file-level#![allow(dead_code)].actually populated — proven by a GtkDriver test that scrolls a scrollable surface and
asserts the content moved, which cannot pass against an empty list.
cargo build && cargo testEXIT=0.Files
src/gtk/draw.rssrc/gtk/mod.rssrc/gtk/click.rssrc/gtk/testing.rssrc/render.rsOut of scope
enum Msgbus (mod.rs:990-1319) — related debt from the same #448-C: Flip GTK main loop from Relm4 to ShellApp runner; delete Relm4 scaffolding (sub-task 3/3 of #448) #540migration, but a separate decision; file it if this issue makes the case clearer.
Ctrl+V/UiEvent::ClipboardPaste), same root cause, different fix.