Visitar URL original
Fix/ignore piece content status by ustinvaskin · Pull Request #1835 · Sofie-Automation/sofie-core · GitHub
Skip to content

Fix/ignore piece content status - #1835

Open
ustinvaskin wants to merge 1 commit into
Sofie-Automation:release53from
ustinvaskin:fix/ignore-piece-content-status
Open

ustinvaskin wants to merge 1 commit into
Sofie-Automation:release53from
ustinvaskin:fix/ignore-piece-content-status

Conversation

@ustinvaskin

@ustinvaskin ustinvaskin commented Sep 24, 2026 •

Copy link
Copy Markdown

About the Contributor

I am contributing an individual. You can contact me through GitHub: @ustinvaskin. or my email ustin.vaskin2011@gmail.com

Type of Contribution

This is a:

Bug fix for Fixes #1337.

Current Behavior

Fixes #1337.

The ignore_piece_content_status=1 URL parameter was read correctly, but several UI components still used contentStatus.status directly. This caused missing-media zebra styling and warning icons to remain visible.

New Behavior

When ignore_piece_content_status=1 is enabled, piece-content-status styling and warning icons are hidden consistently throughout the rundown UI.

The underlying content-status data is not changed.

Testing

  • [ X] I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

Compared the same rundown using:

  • ?ignore_piece_content_status=0
  • ?ignore_piece_content_status=1

Results:

  • Without the flag: 10 missing-source classes and 9 warning icons.
  • With the flag: 0 missing-source classes and 0 warning icons.

Also verified Timeline, Storyboard, Segment List, Shelf, Dashboard, and Inspector views visually.

yarn unit pieceUiClassNames.test.ts pieceContentStatus.test.ts --runInBand
yarn lint --max-warnings=0
yarn check-types
git diff --check

Affected areas

This PR affects content status presentation in the UI, web:

Timeline, Storyboard, Segment List views, shelf items, Dashboard buttons, and the Inspector, also rundown media-status notifications.

Time Frame

Not urgent, but we would like to get this merged into the in-development release.

Other Information

The Studio-level Mock Piece Content Status setting is a server-side overrides the entire studio and provides mock status and preview data. see the comment on the issue 1337.

The URL parameter is a client-side presentation option. It hides status warnings in the current browser w/o changing the underlying data.

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests have been added / updated.
  • No documentation changes are needed cuz this PR restores the intended behavior of an URL parameter that was already there.

Restore the existing URL flag across timeline, storyboard, segment-list, shelf, inspector, and notification presentation paths.

Constraint: Keep the URL flag client-side and distinct from the studio-wide mock content-status setting
Tested: Focused Jest tests locally, ESLint, TypeScript checking, diff validation, and live UI A/B verification
Not-tested: Full repository test suite
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • release/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 581f7bc2-c497-41b9-a461-5f13177da330

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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.

import type { ReadonlyDeep } from 'type-fest'
import { getIgnorePieceContentStatus } from '../localStorage.js'

export function getVisiblePieceContentStatusCode(

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The flag was already available through getIgnorePieceContentStatus(), but individual UI renderers continued reading contentStatus.status directly.

'source-broken': contentStatus?.status === PieceStatusCode.SOURCE_BROKEN,
'source-not-ready': contentStatus?.status === PieceStatusCode.SOURCE_NOT_READY,
'unknown-state': contentStatus?.status === PieceStatusCode.UNKNOWN,
contentStatusCode === PieceStatusCode.SOURCE_MISSING ||

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

CSS classes are now calculated from the filtered status code. When ignoring is enabled, none of those classes are added.


previewSession.current?.setPointerTime(
newMousePosition * (piece.instance.piece.content.sourceDuration ?? contentStatus?.contentDuration ?? 0)
)
}

const noticeLevel = getNoticeLevelForPieceStatus(contentStatus?.status)
const noticeLevel = getNoticeLevelForPieceStatus(getVisiblePieceContentStatusCode(contentStatus))

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The alternative Segment List view had its own warning-icon calculation and did not use pieceUiClassNames.


export function VTThumbnailRenderer(props: Readonly<IProps>): JSX.Element {
const contentStatus = useContentStatusForPieceInstance(props.pieceInstance.instance)

const noticeLevel = getNoticeLevelForPieceStatus(contentStatus?.status)
const noticeLevel = getNoticeLevelForPieceStatus(getVisiblePieceContentStatusCode(contentStatus))

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Same as above was calculated was calculated from raw content status ignoring the pieceUiClassNames.

@@ -29,7 +31,7 @@ function InspectorTitle(props: IProps): JSX.Element {
className={ClassNames(
'shelf-inspector__title__icon',
layer && RundownUtils.getSourceLayerClassName(layer.type),
RundownUtils.getPieceStatusClassName(contentStatus?.status)
getIgnorePieceContentStatus() ? undefined : RundownUtils.getPieceStatusClassName(contentStatus?.status)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Opening the Shelf Inspector could still display a missing-media status class even though the Shelf item itself was clean.

selected: this.props.isNext || this.props.isSelected,
},
!this.inBucket && this.props.layer && RundownUtils.getSourceLayerClassName(this.props.layer.type),
getIgnorePieceContentStatus()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

getPieceStatusClassName(undefined) normally returns unknown-state. That existing behavior should remain when a status is trulky unavailable. We only skip the class when the ignore flag is enabled.

@ustinvaskin
ustinvaskin changed the base branch from main to release36 September 24, 2026 13:44
@ustinvaskin
ustinvaskin changed the base branch from release36 to release53 September 24, 2026 13:44
@ustinvaskin
ustinvaskin requested a review from a team as a code owner September 24, 2026 13:44

This branch has not been deployed

No deployments
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.

Bug Report: URL param "ignore_piece_content_status" doesn't work

2 participants