Skip to content

fix(panel): keep open forms in sync with changes made outside the panel - #352

Merged
egdev6 merged 6 commits into
mainfrom
fix/panel-widgets-remote-sync
Nov 25, 2026
Merged

egdev6 merged 6 commits into
mainfrom
fix/panel-widgets-remote-sync

Conversation

@egdev6

@egdev6 egdev6 commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Summary

Changes made outside the panel (MCP, another window, the generic config API, imports) now reach every open panel form, and «Descartar» restores the latest saved values. Before, a form could keep a stale value; editing it and saving wrote the old value back, which is how the «Últimos» styles were lost.

  • Widgets: the panel now refreshes config.widgets from the widgets event it already received.
  • Every panel-edited section: global alert settings (overlay.css, volume), commands, timers, filters, TTS, Meld, YouTube/Twitch, panel and sessions publish to the panel when they change, and keep travelling in later events because the bus keeps only the latest snapshot. They use the same public projection as the initial load, so credentials stay masked. Timers also refresh their list; interactive, teleprompter and viewers settings written through the generic config publish their snapshots. Program/OBS keep publishing after the OBS password is stored; Meld connect/disconnect now reach the panel.
  • Discard: open drafts move their baseline to the values the server sends, so Discard shows the latest saved value (general config, widgets, interactive, alert/variation/command/timer editor, Apariencia, chat variants, custom overlays). Never during a save or for a draft of another theme. Shortcuts, teleprompter scripts and interviews have no server event carrying the entity and keep the previous behaviour.
  • Separate docs commit: narrows the custom widgets sentence in docs/releases/v0.21.0.md (the published release body was corrected with the owner's approval).

Validation

  • Focused checks passed: panel-config-sync (7), widgets-remote-sync-browser (5: remote change reaches the form, unsaved edit survives, global alert CSS, Discard for widgets and for the alert editor), updated config-snapshot-coalescing and config-versioning. RED observed for the widgets sync, the server sections, the global alert CSS and both Discard cases. Two regressions found during the work were fixed (program alias publication order, OBS passwordSet).
  • Full suite: 3394 tests, 3392 pass, 0 fail, 2 skipped. pnpm typecheck passes.
  • Independent verification (shared panel state and server publication): PASS. No credential in any frame to any client, correct OBS passwordSet, Meld routes reach the panel, Discard/rebase semantics, no weakened assertions. Its probes are regression tests.
  • Documentation and configuration are updated when needed: code comments; the release notes doc.

Not covered by a dedicated test: the Apariencia, chat variant and custom overlay rebases (same mechanism; typecheck and existing suites).

Linked issue

Closes #351

…anel

The widgets event already carries the saved widget settings, but the
panel only stored the widget data and never refreshed config.widgets,
so an open form kept stale values after an MCP or other-window change.
Editing such a stale field and saving wrote the old value back.

config.widgets is now refreshed from the event when it differs; draft
protection keeps unsaved local edits on top.

Refs #351
Custom widgets only use the data antena already offers; the published
sentence implied any new widget could ship without a release. The fix
from the release verification was lost when the commit was amended
before the edit landed.
Global alert settings (overlay.css, volume), commands, timers, filters,
TTS, Meld, YouTube/Twitch, panel and sessions only reached the panel on
reload, so an open form could save a stale value over a change made by
MCP, another window, the generic config API or an import.

Once one of these sections changes it now travels in every later panel
config event (the bus keeps only the latest snapshot), using the same
public projection as the initial load, so secrets stay masked. Timers
also refresh their list, and interactive, teleprompter and viewers
settings written through the generic config publish their snapshots.
Program/OBS keep publishing after the OBS password is stored.

Refs #351
…anges

Every manual editor captured its Discard baseline at the first edit, so
after a change saved elsewhere (MCP, another window) Discard put back
the older values, and editing that stale form could save them again.

Open drafts now move their baseline to the values the server sends
(config, widgets, theme, interactive and custom overlay events): the
general config and program drafts, widgets, interactive settings, the
alert/variation/command/timer editor, Apariencia, chat variants and
custom overlays. Not during a save, and never for a draft of another
theme. Shortcuts, teleprompter scripts and interviews have no server
event carrying the entity and keep the previous behaviour.

Refs #351
…sync

Adds the independent verifier's probes: OBS password writes publish the
right passwordSet without leaking the password to any client, Meld
connect/disconnect reach the panel, and viewers written through the
generic config send only the public projection to widgets.

Refs #351
@egdev6 egdev6 added the type:bug Bug fix or reliability correction label Nov 25, 2026
…r false positive

The #351 panel sync test used a key-shaped literal for a fake YouTube
key, which gitleaks reports as generic-api-key. Following the repository
convention, the value is now built at runtime and the two findings in
d24bf88 are recorded in .gitleaksignore.

Refs #351
@egdev6
egdev6 merged commit 1125735 into main Nov 25, 2026
5 checks passed
@egdev6
egdev6 deleted the fix/panel-widgets-remote-sync branch November 25, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug fix or reliability correction

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(panel): widget changes made outside the panel do not reach open forms

1 participant