feat: unattended active rundown view#1757
Conversation
WalkthroughThis PR adds a ChangesLock View Feature Implementation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/webui/src/client/ui/RundownView.tsx`:
- Around line 1522-1524: The beforeunload listener registered by
handleBeforeUnloadEventAttach is still added even when lockView is true, so
browser/tab close still shows a leave confirmation; update
handleBeforeUnloadEventAttach to only add the window.beforeunload listener when
!this.props.lockView (and ensure handleBeforeUnloadEventDetach removes it when
appropriate), and update places that call these helpers (e.g.,
componentDidMount/componentDidUpdate or wherever handleBeforeUnloadEventAttach
is invoked in RundownView.tsx) to respect this.props.lockView so the listener is
never attached for locked screens and is removed when lockView becomes
true->false.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d8163ec0-eb42-4ade-8014-f0905ac64a57
📒 Files selected for processing (7)
packages/documentation/docs/for-developers/url-query-parameters.mdpackages/documentation/docs/user-guide/features/sofie-views-and-screens.mdxpackages/webui/src/client/ui/ActiveRundownView.tsxpackages/webui/src/client/ui/RundownView.tsxpackages/webui/src/client/ui/RundownView/RundownHeader/RundownContextMenu.tsxpackages/webui/src/client/ui/RundownView/RundownHeader/RundownHeader.scsspackages/webui/src/client/ui/RundownView/RundownHeader/RundownHeader.tsx
|
do we need a url parameter, or could this be the only behaviour on this screen? I'm worried about this being another 'secret' option/parameter when in my mind the default usage of this is for renderering on an unattended screen |
About the Contributor
This pull request is posted on behalf of the BBC.
Type of Contribution
This is a:
Feature
Current Behavior
The Active Rundown view (/activeRundown/:studioId) follows the studio’s active playlist, but operators can leave via the header close button, the context menu “Close Rundown” action. After leaving to the lobby, they are not automatically returned when another rundown is activated.
When no rundown is active, the view shows a static message with a “Return to list” link.
New Behavior
Promptare disabled.lockView=1, showsStudioScreenSaver(same as prompter/director) instead of the “no active rundown” message and return link.Example URLs:
Note:
lockViewdoes not block browser back, manual URL changes, or tab close.Testing
Manual testing:
/activeRundown/{studioId}with an active playlist — no X, no “Close Rundown”, no in-app navigation prompt; header layout unchanged.StudioScreenSavershown (not the old message + return link)./rundown/{playlistId}— exit controls and idle behavior unchanged (locking does not apply)./activeRundown/{studioId}/shelf— same locked behavior when applicable.Affected areas
ActiveRundownView)RundownHeader,RundownContextMenu)Time Frame
Not urgent, but we would like to get this merged into the in-development release.
Other Information
First step toward unattended Active Rundown displays; auto-return from lobby when a rundown activates is out of scope for this PR.
Per review feedback, locking is the default (and only) behavior on Active Rundown routes rather than an opt-in query parameter.
Status