Skip to content

Adopt quadraui FolderPickerController — 3.5-month-old adoption, and IRREDUCIBLE_SURFACE.md has since recorded the gap as a constraint #815

Description

@JDonaghy

Problem — a 3.5-month-old adoption that was never done, and has since been recorded as a constraint

quadraui/src/compose/folder_picker.rs (FolderPickerController) landed 2026-05-25 (6946fcf, quadraui#166). Its module doc says exactly what was supposed to happen next:

"Extracted verbatim from vimcode's TUI-local FolderPickerState (src/tui_main/mod.rs, ~285 lines). After the quadraui PR lands, vimcode removes the TUI-local code and rewires both TUI and GTK."

vimcode today:

  • struct FolderPickerState still at src/tui_main/mod.rs:251 (to ~343)
  • src/render.rs:3702 route_folder_picker_key
  • src/tui_main/render_impl.rs:502, src/tui_main/shell_app.rs:3948, FrameOp::FolderPicker
  • 94 references across 7 files. Zero references to FolderPickerController. No vimcode issue has ever mentioned it.

It got worse than "not done". docs/IRREDUCIBLE_SURFACE.md:24 now records the TUI-only folder picker as Irreducible — one of only three verdicts in that document — on the grounds that GTK uses a native GtkFileChooser. A shipped, 3.5-month-old cross-backend controller contradicts that verdict. The gap was canonised as a constraint, which is worse than leaving it open, because planning now routes around it.

Fix

  1. Adopt quadraui::compose::FolderPickerController on the TUI; delete FolderPickerState and its 94 references.
  2. Wire GTK to the same controller so the folder picker is one implementation. PlatformServices (quadraui/src/backend.rs:2136) exposes file open/save but not directory select — if the controller needs a native-select escape hatch on GTK, use it there, but the picker UI and key routing must be shared.
  3. Correct docs/IRREDUCIBLE_SURFACE.md: strike the folder-picker row from the irreducible list and record why the verdict was wrong (the aggregation post-dated the controller by 3 months and did not check upstream). This is the point of the document — a wrong entry there misdirects every future planning pass.

If adoption turns out to be genuinely blocked by a controller gap, file the quadraui issue and leave this open behind it — do not close it. See GOALS.md's milestone-discipline rule; #47 is the cautionary example.

Acceptance

  • Black-box tests required, both backends. TUI via quadraui::tui::testing::driver_with_shell; GTK via GtkDriver. Assert on rendered output — locate targets with find/screen_contains, never hardcode coordinates.
  • State in the PR that the new tests fail against unfixed develop.
  • cargo test, cargo clippy -- -D warnings, cargo fmt pass.

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

    coordTracked by coord-tui pipelineplatformPlatform-specific (macOS, Windows, Linux)status:readyRefined and ready to enter the work pipeline

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions