Skip to content

fix(signage): remember remote pause and retry template loads - #528

Merged
MrYuion merged 3 commits into
developfrom
fix/signage-player-rendering
Oct 2, 2026
Merged

MrYuion merged 3 commits into
developfrom
fix/signage-player-rendering

Conversation

@MrYuion

@MrYuion MrYuion commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Three issues in the player panel and templates:

  • Overlapping single passes: two single-pass takeovers that overlap share one override, and the first playlist_through cleared it, cutting the second short.
  • Remote pause: pause from the host shell was not remembered. A takeover that started while paused played, and the background resumed when it ended.
  • Template loads: one failed template dropped all of them, and a failed plugin query left empty bands, with no retry.

Changes

  • signage.component.ts:
    • The override clears only when the playlist that owns the last valid item reports a full pass.
    • A remote_paused state (also in signage.state()) pauses any player that starts while paused, and keeps the background paused during a takeover.
  • template.component.ts: templates load with allSettled. Template, plugin and background failures retry after 15 s, doubling to 5 min. Changing the mappings cancels the retry, and loads that finish after destroy are ignored.
  • Smaller fixes: a type predicate instead of a cast, a shared DEBUG_STORAGE_KEY, a cleared debug time input is ignored, and new DEBUGGING.md rows.

Testing

  • Unit tests for each fix. Each fails without its fix.
  • nx test signage (424) and nx build signage pass.
  • Local PlaceOS stack: 9/9 checks pass. These covered pause then takeover, takeover end while paused, resume during a takeover, two overlapping single passes, a template failure then success, plugin query retry, the time input, and regression.

Notes

  • A template that was deleted (permanent 404) is retried every 5 min.

Independent of the other signage PRs from this review. Based on develop.


Changes made by Claude Opus 5.5 (1M context) in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

- Overlapping single-pass takeovers clear only after the playlist that
  owns the last valid item reports a full pass.
- Remember a remote pause. Players that start while paused stay paused,
  and the background does not resume after a takeover.
- Load each template on its own and retry failed templates, plugins
  and backgrounds with a capped backoff.
- Ignore a cleared debug time input, share the debug storage key, and
  pin the floating layout default in a test.
@vercel

vercel Bot commented Oct 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
frontend-templates Ignored Ignored Oct 2, 2026 3:14am UTC

@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Fixes pause state handling and template load retries in signage player.

The PR appears safe to merge based on the reviewed changes.

Findings

  1. P1 Old content survives assignment changes ▶

Summary

Signage takeovers now respect shared playlist endings and remember host pause state as players change. Template displays keep successful content visible while retrying failed loads, and the PR also fixes cleared debug-time input.

  • Overlapping single-pass takeovers wait for the last valid playlist to finish.
  • Host pauses carry over to takeover players and the background player.
  • Failed template, plugin, and background loads retry with growing delays.
  • Clearing the debug time field no longer changes the edited time.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Mappings change] --> B[Load assigned templates]
  B -->|None load| C[Clear old template and background]
  B -->|Template loads| D[Load plugins and background]
  D -->|Background fails with a different ID| E[Clear old background]
  D -->|Part fails| F[Retry with backoff]
  F --> B
Loading

Reviews (3) · Last reviewed commit: "fix(signage): keep template content only..."

Comment thread apps/signage/src/app/template.component.ts
A retry where every template, or the background, failed to load
cleared content an earlier attempt had shown, leaving the screen blank
until the next attempt. Failed parts of a load now keep what is on
screen. Content is cleared only when the mappings become empty.
@vercel

vercel Bot commented Oct 2, 2026

Copy link
Copy Markdown

Deployment failed for project frontend-templates with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/placeos?upgradeToPro=build-rate-limit

non_merge.filter(({ mapping }) => mapping.schedule).at(-1) ||
non_merge[0] ||
merge.shift();
if (!base) return false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Old content survives assignment changes

When the assigned template changes from A to B and B fails to load, this return leaves A on screen even though it is no longer assigned. If B loads but its background fails, the page shows B over A’s old background. Retries can leave that wrong content visible indefinitely. Keep working content on a retry of the same assignment, but not after the assignment changes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 4f90cec. Content is now kept only on a retry of the same assignment: _shown_load_id records which load put the template on screen, and _load_id changes only when the mappings change. If no template loads and what is on screen came from other mappings, the template and background are cleared. A background that fails to load is kept only when it is still the template's background_item_id. Tests: "clears a template that is no longer assigned when the new one fails" and "clears the old background when the new template background fails". The same-assignment retry tests still pass.

…nment

Keeping content after a failed load also kept a template, or a
background, that was no longer assigned. Content is now kept only when
it came from the same mappings, and a background only when it is still
the template's background. Otherwise a failed load clears it.
@MrYuion
MrYuion merged commit c3d5dd6 into develop Oct 2, 2026
4 of 5 checks passed
@MrYuion
MrYuion deleted the fix/signage-player-rendering branch October 2, 2026 04:07
MrYuion added a commit that referenced this pull request Oct 2, 2026
A floating panel with no saved position now defaults to 0, 0, so it
fills the frame. The player makes the same change in #528.
MrYuion added a commit that referenced this pull request Oct 2, 2026
A floating panel with no saved position now defaults to 0, 0, so it
fills the frame. The player makes the same change in #528.
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.

1 participant