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
Continuation of #733, slice 6 of 6.#733 declared a 6-slice plan and was
closed when slice 1's PR merged — the remaining slices were never filed. This issue is
one of them. Measured on develop @ 44882e9 (2026-09-02):
handle_mouse (src/tui_main/mouse.rs) 3,044 · handle_mouse_event
(src/tui_main/shell_app.rs) 365 · handle_mouse_click_msg (src/gtk/mod.rs) 919 · handle_mouse_drag_msg356 · try_route_sidebar_mouse_event177 — 4,861 lines total,
against the 4,994 #733 was filed on. Slice 1 converged 133.
Locate everything below by symbol, not by line number — #733's own body warns that
its numbers drift, and they already have.
The closing slice
Slices 2a–5 move every rung into src/render.rs. This one deletes what is left and makes
the convergence permanent:
handle_mouse (src/tui_main/mouse.rs) — gone, or a translate-and-delegate shim under
~150 lines.
No rung remains that one backend arbitrates and the other does not, or each surviving
asymmetry carries a comment saying why it is genuinely one-sided (the folder picker is the
known legitimate case — GTK uses a native chooser).
Acceptance criteria
Inherited verbatim from #733 — these are the rules that make a slice done:
The rung is implemented once, in shared code (src/render.rs), and called from both
backends.
Both backends' bespoke arms for that rung are deleted in the same PR. A migration that
leaves both paths is not done (GOALS.md, "How to use this doc").
Black-box coverage on both backends — TuiDriver via driver_with_shell(TuiShellApp, …)
in src/tui_main/shell_app.rs, and GtkDriver in src/gtk/testing.rs. Assert on rendered
output, never on state being populated (CLAUDE.md rule 1).
The PR states the new tests were verified RED against unfixed develop (CLAUDE.md rule 2).
This is one slice. Do not attempt the rungs belonging to the sibling issues listed in
Sequencing — they conflict in the same files and are queued behind this one on purpose.
Files
src/render.rs (the shared router)
src/tui_main/mouse.rs, src/tui_main/shell_app.rs
src/gtk/mod.rs
src/gtk/testing.rs (GtkDriver coverage)
Sequencing
Last of the #733 chain — after slices 2a, 2, 3, 4 and 5.
The closing slice
Slices 2a–5 move every rung into
src/render.rs. This one deletes what is left and makesthe convergence permanent:
handle_mouse(src/tui_main/mouse.rs) — gone, or a translate-and-delegate shim under~150 lines.
handle_mouse_click_msg,handle_mouse_drag_msg,try_route_sidebar_mouse_event(
src/gtk/mod.rs) — same.handle_mouse_event(src/tui_main/shell_app.rs) — same.Acceptance, in addition to the inherited block
the number.
ScreenLayout+ point to the sameroute, verified RED by reordering one rung on one backend — the mouse twin of the
FrameOp-sequence test Converge frame composition — ~4,500 lines laying down the same surfaces in two hand-kept orders #735 asks for. Without this, the ladder re-forks the first timesomeone adds a surface.
asymmetry carries a comment saying why it is genuinely one-sided (the folder picker is the
known legitimate case — GTK uses a native chooser).
Acceptance criteria
Inherited verbatim from #733 — these are the rules that make a slice done:
src/render.rs), and called from bothbackends.
leaves both paths is not done (
GOALS.md, "How to use this doc").TuiDriverviadriver_with_shell(TuiShellApp, …)in
src/tui_main/shell_app.rs, andGtkDriverinsrc/gtk/testing.rs. Assert on renderedoutput, never on state being populated (
CLAUDE.mdrule 1).develop(CLAUDE.mdrule 2).before/after. (Converge the two mouse routers — ~4,800 lines implementing the same precedence ladder twice #733 slice 1 met this only barely — 4,994 → 4,861 — and Converge frame composition — ~4,500 lines laying down the same surfaces in two hand-kept orders #735 slice 1 did not
meet it at all. State the numbers.)
cargo build && cargo test && cargo clippy -- -D warnings && cargo fmt --checkEXIT=0.Scope discipline
This is one slice. Do not attempt the rungs belonging to the sibling issues listed in
Sequencing — they conflict in the same files and are queued behind this one on purpose.
Files
src/render.rs(the shared router)src/tui_main/mouse.rs,src/tui_main/shell_app.rssrc/gtk/mod.rssrc/gtk/testing.rs(GtkDriver coverage)Sequencing
Last of the #733 chain — after slices 2a, 2, 3, 4 and 5.
Milestone
#7 Platform-Neutral