Skip to content

improve(replay): set-speed default title should match configured speed (#295)#299

Merged
niklam merged 1 commit into
masterfrom
improve/set-speed-dynamic-title
Apr 9, 2026
Merged

improve(replay): set-speed default title should match configured speed (#295)#299
niklam merged 1 commit into
masterfrom
improve/set-speed-dynamic-title

Conversation

@niklam
Copy link
Copy Markdown
Owner

@niklam niklam commented Apr 9, 2026

Summary

  • Pass the formatted speed label (e.g., "4x", "1/2x") as the default title for set-speed mode instead of the static "SET SPEED" text
  • Clear stale <desc> title metadata in the set-speed SVG to prevent fallback to old static text
  • Add test coverage verifying dynamic title and absence of "SET SPEED"

Closes #295

Test plan

  • npx vitest run packages/actions/src/actions/replay-control.test.ts — 102 tests pass
  • pnpm build — succeeds
  • Manual: configure set-speed action with various speeds (1x, 4x, 1/2x, 1/16x) and verify title matches

Summary by CodeRabbit

  • Bug Fixes
    • Fixed the replay speed control to display the actual speed value (e.g., "4x", "1x") instead of generic text, improving clarity for users adjusting playback speed.

Pass the formatted speed label (e.g., "4x", "1/2x") as the default
title instead of the static "SET SPEED" text, so users can tell at a
glance which speed the button will activate.

Closes #295
@github-actions github-actions Bot added the type: improvement Improvements to existing functionality label Apr 9, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 18491a74-fab1-466e-b7c7-d78f05cd1ee0

📥 Commits

Reviewing files that changed from the base of the PR and between 3b0b3a8 and acb136e.

⛔ Files ignored due to path filters (2)
  • packages/icons/preview/replay-control/set-speed.svg is excluded by !**/*.svg
  • packages/icons/replay-control/set-speed.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • packages/actions/src/actions/replay-control.test.ts
  • packages/actions/src/actions/replay-control.ts

📝 Walkthrough

Walkthrough

The default title for the "set-speed" replay control mode now dynamically reflects the configured speed (e.g., "4x", "1/4x") instead of always displaying "SET SPEED". Test assertions verify the new dynamic behavior and confirm the static text is no longer present.

Changes

Cohort / File(s) Summary
Dynamic title resolution
packages/actions/src/actions/replay-control.ts
Changed set-speed mode title fallback from hardcoded defaultTitle to mainLabel (the formatted speed label).
Test coverage
packages/actions/src/actions/replay-control.test.ts
Added assertions to verify SVG output excludes "SET SPEED" text while including speed labels; added test case for speed "1".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

type: improvement

Poem

🐰 A speed dial dressed up fine,
No more "SET" when speeds align—
Four-times fast, or quarter slow,
The button's label steals the show! ⚡

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: making the set-speed default title dynamic based on configured speed rather than static.
Description check ✅ Passed The description covers all required template sections: Related Issue (Closes #295), What changed (clear summary), How to test (with checklist), and overall structure is complete.
Linked Issues check ✅ Passed The PR fully addresses issue #295 objectives: replaces hardcoded 'SET SPEED' with dynamic speed labels, ensures single-line labels without 'SET' prefix, preserves override behavior, and updates all required files.
Out of Scope Changes check ✅ Passed All changes directly support the linked issue requirements: test updates verify the new behavior, code changes implement dynamic title logic, and no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve/set-speed-dynamic-title

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@niklam niklam merged commit d4d94c3 into master Apr 9, 2026
6 checks passed
@niklam niklam deleted the improve/set-speed-dynamic-title branch April 9, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: improvement Improvements to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve(replay): set-speed default title should match configured speed

1 participant