feat(tui): run the highlighted search again with S
The search list survives a restart, but a restored query was only ever a reminder: seeing what the network has now meant typing it out again. In the Searches pane, `S` now re-runs the highlighted query in its place — no duplicate row, no reordering — cancelling a run still collecting first and starting the Results display over for what comes back. The key is listed in the shortcut bar, the `?` overlay, the README and the website. `start_search` is split into launching a search and showing it, so both paths share one implementation. A new `tui_e2e` suite drives the real window over a real session against soulfind: keys in, a screen out, a sharing peer on the other end. It restores a query from a previous run's state directory, presses `S`, and checks the peer's file lands on screen — then again once the query has been on the wire, proving a repeat is answered and the display does not stack. To make that possible `MainTui` is exported with `handle_key_event`, `render`, `poll_session` and a `state()` accessor, and CI runs the suite with `SOULSEEK_E2E_REQUIRED=1`. Closes #85
This commit is contained in:
@@ -110,6 +110,14 @@ jobs:
|
||||
SOULSEEK_E2E_REQUIRED: "1"
|
||||
run: cargo test -p soulseek-rs --test cli_e2e -- --nocapture
|
||||
|
||||
# The window over a real session: keys in, a screen out, a peer on the
|
||||
# other end. The unit tests drive it against a stand-in session and the
|
||||
# CLI suite never opens it, so this is the only place the two meet.
|
||||
- name: Run TUI e2e tests (required against soulfind)
|
||||
env:
|
||||
SOULSEEK_E2E_REQUIRED: "1"
|
||||
run: cargo test -p soulseek-rs --test tui_e2e -- --nocapture
|
||||
|
||||
# The control protocol as a third party meets it: the TCP transport, the
|
||||
# token, and the gate. None of it is reachable through the command
|
||||
# surface, so the CLI suite cannot cover it in either mode.
|
||||
|
||||
Reference in New Issue
Block a user