feat: allow naming aux timers - #2158
Open
cpvalente wants to merge 7 commits into
Open
Conversation
Adds custom, persisted names for the three aux timers, editable in the editor settings and surfaced everywhere an aux title is shown. - Persist `auxTimerNames` on the Settings object (default empty, falls back to the stock "Aux N" label when unset). Reuses the existing settings pipeline: validation sanitises to a fixed-length trimmed array, the parser normalises loaded/legacy data, and migrations carry the field forward. - New "Aux timers" settings section to name each timer, plus a shortcut button next to the aux timers in the playback control that jumps straight to it. - Resolve names via a shared getAuxTimerLabel helper in the aux timer control, Studio view, secondary-source selector and preview, and the automation action labels. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCZejVTzuAY3tHTE6nB3JH
Addresses review feedback on the aux timer naming feature:
- Automation action labels now reference the timers by index
("Aux timer 1: start") rather than the custom names, keeping the
automation config stable regardless of naming.
- Expose the custom names through the consumer-facing runtime interface:
the aux timer objects broadcast over the websocket now carry a `name`
field. Names are seeded from the persisted settings at bootstrap and
kept in sync whenever the settings change, so every consumer (views and
integrations) reads them from the same runtime data.
- The client control and view consumers now read the name from the
runtime store instead of querying settings directly; the settings form
remains the persisted editing source.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WCZejVTzuAY3tHTE6nB3JH
Addresses the review findings on the aux timer naming feature. - Aux timer names are project data, but they were only applied at bootstrap and on a settings POST. Loading another project left the previous project's names in the runtime store, so the controls and views disagreed with the settings panel until a restart. The names are now applied when a project is loaded, and patching the current project settings applies them and sends a settings refetch to the clients (loading a project already triggers a full refetch via the rundown). - Consolidate the name handling into a single normaliser in ontime-utils, used by the project file parser, the API validation and to build the default value. This creates the property when importing project files saved before the feature existed, and enforces the name length limit server side rather than only in the form. - loadNames normalises its input, so the runtime state is consistent regardless of the shape of the stored settings. - Clarify that auxTimerNames is ordered (index 0 is aux timer 1), and derive the settings form from the shared aux timer count. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCZejVTzuAY3tHTE6nB3JH
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
- Revert the automation action labels back to "Aux N: action" (no functional reason to change this wording). - Simplify the aux timers header in the playback control: the flex container now only handles layout, and the label text reuses the same font-size/color as the per-timer labels below it, instead of a bespoke style block duplicating those values. - Replace the generic, length-driven normaliser with an explicit sanitiseAuxTimerNames() that always deals with exactly three timers, and rename it away from "normalise" (which didn't convey that it trims, caps length and fills in missing entries). Static defaults now use a plain ['', '', ''] literal instead of calling the sanitiser with no input to sanitise. - Settings.type.ts and AuxTimerSettings.tsx no longer generate their three fields from a loop; the form mirrors the same explicit, one-field-per-row style already used by GeneralSettings.tsx. - Trim comments that only restated what the following line already says, keeping the ones that explain non-obvious behaviour (why AuxTimerService needs to be resynced separately from the data provider, why SimpleTimer.reset() preserves the name). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCZejVTzuAY3tHTE6nB3JH
… labels - AuxTimer.tsx (editor playback control) now always shows the timer's index alongside its custom name, eg. "Aux 1: Speaker", instead of replacing the index entirely. Truncates to a single line with an ellipsis (and a title tooltip) so long names don't wrap and break the compact three-column layout. - Revert the secondary-source select and its preview label (TimerViewControl.tsx, TimerPreview.tsx) back to plain "Aux 1/2/3" - these identify a fixed technical source, not the timer's identity, so they should stay stable regardless of naming. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCZejVTzuAY3tHTE6nB3JH
The aux timer label sits inside a 3 column CSS grid. Grid items default to min-width: auto, so their minimum width is set by their content - with white-space: nowrap forcing that to the full unbroken name, the column would grow to fit it instead of the ellipsis ever kicking in, breaking the equal column layout for long names. Set min-width: 0 on the label so it can shrink to its grid column, and swap the native title attribute for the app's shared Tooltip component so the full name is still available on hover, consistent with how truncated text is handled elsewhere in the app. Verified in the browser: a long name now truncates with an ellipsis without disturbing the three-column layout, and hovering shows the full name in a tooltip. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCZejVTzuAY3tHTE6nB3JH
- Add a collapse toggle next to the aux timers settings shortcut, mirroring the chevron pattern already used for rundown groups. State persists in localStorage via the existing editorSettings store, so it's a durable per-user preference rather than resetting on reload. This matters most on small viewports, where the aux timer controls (3 rows) are a disproportionate cost relative to their usage. - When collapsed, a small active-indicator dot appears next to the "Aux timers" label if any aux timer is currently running, so a running timer never goes silently invisible. - Switch both header icon buttons (settings shortcut, collapse toggle) from the 'subtle' variant (blue, reserved for actions) to 'subtle-white', matching how utility/navigation icon buttons are styled elsewhere (eg. the rundown group collapse chevron). Verified in the browser: collapsing reclaims the three-row control block, the indicator dot appears while a timer runs and the panel is collapsed, and both icon buttons render white/gray instead of blue. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCZejVTzuAY3tHTE6nB3JH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.