Skip to content

Add seek and stop keys to the TUI - #360

Merged
maximmaxim345 merged 5 commits into
mainfrom
feat/tui-seek
Dec 4, 2026
Merged

maximmaxim345 merged 5 commits into
mainfrom
feat/tui-seek

Conversation

@maximmaxim345

@maximmaxim345 maximmaxim345 commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

What does this implement/fix?

< and > in the TUI now seek 10 seconds back and forward, and o stops playback. The seek hint only shows while the server allows seeking, which live streams often don't.

I first used Shift+Left and Shift+Right, but on Windows those arrive as plain Left and Right and skip tracks.

Tested in the TUI against Music Assistant.

Related issue (if applicable):

Types of changes

  • Bugfix (non-breaking change which fixes an issue): bugfix
  • New feature (non-breaking change which adds functionality): new-feature
  • Enhancement to an existing feature: enhancement
  • Breaking change (changes CLI options, settings, hooks or the protocol in a way that is not backwards compatible): breaking-change
  • Refactor (no behavior change): refactor
  • Documentation only: documentation
  • Maintenance / chore: maintenance
  • CI / workflow change: ci
  • Dependencies bump: dependencies

@maximmaxim345
maximmaxim345 requested an adaptive review from Copilot December 4, 2026 11:09
@github-actions github-actions Bot added the new-feature Adds new functionality label Dec 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Disconnecting leaves can_seek true after supported commands are cleared, so the progress panel advertises seeking during reconnects even though the seek handler does nothing.

1 open issue
What changed in this PR

Adds seek and stop shortcuts to Sendspin’s TUI player, with seek hints based on server capabilities.

Changes:

  • Adds Shift+Left/Right for 10-second seeking and o to stop playback.
  • Completes truncated Shift+arrow input sequences and updates shortcut hints.
  • Documents seeking and adds input-decoding coverage.
File Description
tests/​tui/​test_seek.py Tests Shift+arrow sequence completion.
tests/​tui/​test_metadata_clear.py Updates the UI stub for seek capability.
sendspin/​tui/​ui.py Displays stop and conditional seek hints.
sendspin/​tui/​keyboard.py Handles new shortcuts and relative seek commands.
sendspin/​tui/​app.py Passes server seek capability to the UI.
README.md Documents seek shortcuts.

Review effort: Balanced (adaptive)

Comment thread sendspin/tui/ui.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The stop shortcut remains undocumented, and relative-seek behavior lacks tests for signed offsets and no-op cases when seeking is unsupported or the client is missing.

No open issues 🎉

2 previously missed issues

In code that hasn't changed since last review

Low severity Document the new o stop shortcut in the README

README.md:463

The new o stop shortcut is not documented anywhere in the README; this section only covers the seek keys. Please document o as well so both new playback controls are discoverable outside the TUI.

Low severity Test relative-seek command sending and unsupported cases

sendspin/​tui/​keyboard.py:113

The new test only checks escape-sequence completion, leaving relative-seek command sending untested despite existing CommandHandler tests in tests/tui/test_volume_state.py. Please add async tests asserting the signed offsets sent to the client and that unsupported seeking or a missing client sends nothing.

1 resolved since last review

Review effort: Balanced (adaptive)

Windows reports Shift+Left and Shift+Right as plain Left and Right,
so they skipped tracks while the hint said seek.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed to decide whether the seek handler’s missing automated coverage is significant enough to affect approval.

No open issues 🎉

Review effort: Balanced (adaptive)

@maximmaxim345
maximmaxim345 marked this pull request as ready for review December 4, 2026 11:29
@maximmaxim345
maximmaxim345 merged commit 9b6d8d3 into main Dec 4, 2026
12 checks passed
@maximmaxim345
maximmaxim345 deleted the feat/tui-seek branch December 4, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature Adds new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants