Skip to content

chatbot: !skip and !back UX improvements#446

Draft
dmerrick wants to merge 2 commits into
developfrom
feat/skip-back-ux-improvements
Draft

chatbot: !skip and !back UX improvements#446
dmerrick wants to merge 2 commits into
developfrom
feat/skip-back-ux-improvements

Conversation

@dmerrick

Copy link
Copy Markdown
Collaborator

Summary

  • !skip and !back now accept negative numbers — !skip -30 is equivalent to !back 30, and !back -3 is equivalent to !skip 3.
  • Both commands now reply in chat with a one-line confirmation naming the magnitude (videos, singular/plural-aware) and direction the playhead moved.
  • Two atomic commits, per the project's commit-style convention. The shared param parser was lifted into a small testable helper (parseSkipParams), seeding pkg/chatbot/'s previously-empty test set.

A couple of notes on the unit chosen for the reply:

  • !skip N / !back N operate on videos (N entries forward/back in the playlist), not seconds — the reply uses "videos" as the unit accordingly. The TODO copy said "amount of time skipped", but no per-video duration is stored in the project, so summing real durations would have meant new infra (a video-length helper or constant) and pulled the change out of "easy". Happy to re-scope to durations in a follow-up if you want; lmk.
  • n=0 is normalised to 1 (matching today's silent behaviour: the underlying client drops 0 and the server defaults to 1) so the reply is never "Skipped 0 videos".

Test plan

  • go build ./pkg/chatbot/... and go vet ./pkg/chatbot/... pass
  • task test passes (full repo suite, run via bin/devenv)
  • Send !skip 3 in chat and confirm bot replies "Skipped 3 videos forward!"
  • Send !skip -3 and confirm same effect as !back 3 (reply: "Skipped 3 videos back!")
  • Send !back -2 and confirm same effect as !skip 2 (reply: "Skipped 2 videos forward!")
  • Send !skip 1 and confirm singular form ("1 video forward")

dmerrick and others added 2 commits May 9, 2026 23:36
`!skip -3` is now equivalent to `!back 3`, and `!back -3` is equivalent
to `!skip 3`. Previously the underlying vlc-client dropped any
non-positive offset before forwarding, so negative inputs silently
collapsed to a single-step skip — surprising behaviour for anyone
typing the more natural `!skip -N` to rewind.

Negatives are routed through the opposite client call rather than
relying on the VLC server's modular wrap-around, so the request shape
on the wire matches the user's intent and the existing client API
keeps its non-negative contract.

The shared parameter parsing is lifted into `parseSkipParams` to keep
the two handlers aligned and to give the new behaviour a unit-testable
seam (no chatbot tests existed previously).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Both commands were silent: viewers had no chat-side confirmation that
the playhead had actually moved. Now they reply with a one-line summary
naming the magnitude (videos, with proper singular/plural) and the
direction the playhead moved.

The reply uses the post-negative-routing values, so `!skip 3` and
`!back -3` both render as "Skipped 3 videos forward!" — consistent
with the unified mental model the previous commit established.

Reply length stays well under Twitch IRC's 500-char limit (a test
asserts <100 chars to leave headroom).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@dmerrick dmerrick marked this pull request as draft May 15, 2026 00:50
@dmerrick

Copy link
Copy Markdown
Collaborator Author

Attempted automated conflict resolution; bailed due to non-mechanical conflicts in: pkg/chatbot/playback.go. Needs manual merge — likely affected by command-registry refactor on develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant