tui-config-uis

TUI config UIs (new coordinator + others): populate from launcher_history; record all CLI -x/-m/-e invocations

Metadata

Statusdone
Assignedagent-174
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-04-26T16:00:22.186205584+00:00
Started2026-04-26T23:46:53.783265550+00:00
Completed2026-04-27T00:11:32.765174234+00:00
Tagseval-scheduled
Tokens0 in / 0 out
Eval score0.09
└ blocking impact0.10
└ completeness0.00
└ coordination overhead0.20
└ correctness0.10
└ downstream usability0.10
└ efficiency0.20
└ intent fidelity0.43
└ style adherence0.00

Description

Description

User expectation (saved in feedback memory): every wg config UI should surface prior CLI/TUI invocations as recall options. Right now only the TUI's CreateCoordinator IPC writes to launcher_history (src/commands/service/ipc.rs:1404). No CLI commands record, and no config UI reads from it.

Spec

  1. Record-side: every CLI command that takes -x, -m, -e, or --model flags should call launcher_history::record_use after a successful invocation. Surfaces:

    • wg init (already takes -x/-m/-e)
    • wg nex (-m, -e)
    • wg add --model X
    • wg setup (when implemented per the wg-setup-5-smooth-2 task)
    • Any other entry point that touches model/executor/endpoint.
  2. Read-side: config UIs should query launcher_history for prior entries, sorted by recency, deduplicated by (executor, model, endpoint) tuple. Display the FULL invocation, not just the model id, so the user recognizes the combo. Picker should support 'pick from history' as a first-class option above the model list.

  3. History pruning: keep last N entries (default 50) per (executor, model, endpoint) tuple. Don't grow unbounded.

  4. Persistence: history goes in ~/.wg/launcher-history.jsonl (already exists per memory; verify path).

Surfaces to wire (read-side)

  • TUI new-coordinator dialog (depends on the dialog-fix task above; coordinate)
  • Any future setup wizard (per wg-setup-5-smooth-2)
  • Model picker in 'change executor for this coordinator' flow
  • Anywhere in the TUI that prompts for model/executor/endpoint

Concrete example user wants to work

wg nex -m qwen3-coder -e https://lambda01.tail334fe6.ts.net:30000 from CLI should appear as a one-click recall in the TUI new-coordinator dialog as 'nex / qwen3-coder / lambda01.tail334fe6.ts.net'.

Validation

  • Failing tests first:
    • test_cli_init_records_to_launcher_history
    • test_cli_nex_records_to_launcher_history
    • test_history_dedup_by_tuple
    • test_history_pruning_to_max_n
    • test_tui_dialog_reads_history_and_offers_picker (TUI test feasibility caveats apply)
  • Implementation makes tests pass
  • cargo build + cargo test pass with no regressions
  • Manual smoke:
    • In a scratch dir, run wg nex -m qwen3-coder -e https://lambda01.tail334fe6.ts.net:30000 (one message, then quit)
    • Open wg tui in same dir
    • Open new-coord dialog → 'nex / qwen3-coder / lambda01' appears as a one-click recall option

Depends on

Required by

Log