Problem Summary
In the dual-screen presentation mode, the Audience Output Preview inside the Presenter Console (PresenterConsoleWindowView / SharedPresenterConsole) fails to match the actual live audience output display (FullScreenPresentationView / SharedSlideViewer).
When viewing a slide configured with a black background and text (e.g. B:Prayer from expert entry, or a black blank slide with custom text added via the slide editor):
- Live Output Window (
Audience Display): Displays the slide content as intended (e.g.,"Prayer"centered in white text on a black background). - Presenter Console Preview (
Audience Output Preview): Renders a completely solid black rectangle, completely omitting the slide’s text and custom elements. - Presenter Console Controls: Incorrectly asserts that blackout is active:
- The status tag displays
[BLACKOUT]in red instead ofLIVEin green. - The Blackout toggle button turns red (
DestructiveButton). - The caption text reads
Blackout Active.
- The status tag displays
Root Cause Analysis
Thorough investigation of the codebase revealed several interconnected issues and diverged code paths across sfw_shared and sfw_desktop:
1. Conflation of Dynamic Live Blackout with Slide Background Styling
In [packages/sfw_shared/lib/src/widgets/shared_presenter_console.dart](file:///Users/rodydavis/dev/slides-for-worship/packages/sfw_shared/lib/src/widgets/shared_presenter_console.dart#L609-L610):
final isBlack = state.isLiveBlackout || (activeSlide?.isBlack ?? false);
final isWhite = state.isLiveWhiteout || (activeSlide?.isWhite ?? false);
state.isLiveBlackoutrepresents a dynamic runtime override toggled by the presenter (e.g., via shortcut keyBor the blackout toolbar button).activeSlide?.isBlackis simply a static styling attribute of the slide item (e.g.,ServiceBlankItem(isBlack: true, content: 'Prayer')).- Conflating both into a single
isBlackboolean causes any slide with a black background to be treated by the presenter console as if the user engaged an emergency blackout!
2. Short-Circuiting Slide Rendering in _buildSlideContent
In [packages/sfw_shared/lib/src/widgets/shared_presenter_console.dart](file:///Users/rodydavis/dev/slides-for-worship/packages/sfw_shared/lib/src/widgets/shared_presenter_console.dart#L1918-L1923):
Widget _buildSlideContent(
RemoteSlideData? slide,
bool isBlack,
bool isWhite,
bool isWidescreen,
) {
if (isBlack) {
return Container(color: m.Colors.black);
}
if (isWhite) {
return Container(color: m.Colors.white);
}
...
return FittedBox(
...
child: SharedSlideCompositionWidget.fromSlideData(slide, ...),
);
}
- Because
isBlackis true wheneveractiveSlide?.isBlackis true,_buildSlideContentimmediately returnsContainer(color: Colors.black)and never callsSharedSlideCompositionWidget! - Even though commit
a5930db1updatedSharedSlideCompositionWidgetso thatisBlack && text.isEmptyonly blacks out empty slides and renders text when present,shared_presenter_console.dartbypassed this completely.
3. Summary Slide Thumbnails Also Bypass Rendering
In [packages/sfw_shared/lib/src/widgets/shared_presenter_console.dart](file:///Users/rodydavis/dev/slides-for-worship/packages/sfw_shared/lib/src/widgets/shared_presenter_console.dart#L1951-L1964):
Widget _buildSummarySlideContent(
RemoteSlideSummary summary,
bool isWidescreen,
) {
if (summary.isBlack) {
return Container(
color: m.Colors.black,
alignment: Alignment.center,
child: const Text('BLACK', ...),
);
}
- The “Next Slide” (Up Next) preview and the overview thumbnails also bypass composition if
summary.isBlackis true, displaying the wordBLACKinstead of rendering the slide preview text.
4. Duplicate and Diverged Slide Rendering Pipelines
- Actual Presentation Output ([
SharedSlideViewer](file:///Users/rodydavis/dev/slides-for-worship/packages/sfw_shared/lib/src/widgets/shared_slide_viewer.dart#L380-L414)):- Checks
isLiveBlackout/isLiveWhiteoutfor dynamic blackouts. - Delegates all slides directly to
SharedSlideCompositionWidget.fromSlideData(). - Supports transitions via
SlideTransitionEngineView.
- Checks
- Presenter Console Preview ([
SharedPresenterConsole](file:///Users/rodydavis/dev/slides-for-worship/packages/sfw_shared/lib/src/widgets/shared_presenter_console.dart#L1062-L1113)):- Wraps in bespoke
Containerwith shadow, border, and custom background logic. - Intercepts slides with custom
_buildSlideContentlogic that short-circuits.
- Wraps in bespoke
- Main Studio Editor ([
ScaledSlidePreview](file:///Users/rodydavis/dev/slides-for-worship/packages/sfw_desktop/lib/widgets/scaled_slide_preview.dart)):- Uses
AspectRatio+FittedBox+SlideCompositionWidget.
- Uses
As a result, slides are not rendered consistently across the app.
Requirements & Proposed Solution
- Decouple Live Blackout/Whiteout from Slide Background Color:
- In
SharedPresenterConsole:- Toolbar button states (
DestructiveButton), tooltip (Exit Blackout), status badge ([BLACKOUT]), and status label (Blackout Active) MUST inspectstate.isLiveBlackoutandstate.isLiveWhiteoutexclusively. - A slide having a black background (
slide.isBlack == true) must NOT trigger the “Blackout Active” UI indicator.
- Toolbar button states (
- In
- Single Canonical Slide Renderer:
- Establish a single, shared slide presentation widget (or reuse
SharedSlideCompositionWidgetwith a unified wrapper) used by:SharedSlideViewer(Audience Display & Remote Audience View)SharedPresenterConsole(Audience Output Preview)SharedPresenterConsole(Next Slide Preview & Thumbnails)ScaledSlidePreview(Studio Main Editor & Film Strip)
- Only dynamic live blackout (
isLiveBlackout) and whiteout (isLiveWhiteout) should overlay a blank color over the slide. - Any slide with text or custom elements must always render its content through
SharedSlideCompositionWidget.
- Establish a single, shared slide presentation widget (or reuse
- Summary Slide Fix:
- In
_buildSummarySlideContent, only render placeholder text'BLACK'/'WHITE'ifsummary.previewText.isEmptyand no elements exist.
- In