Skip to content

fix(viz): per-panel picker finds feedBackViz_* factories (3D highway missing in split screen)#15

Merged
topkoa merged 1 commit into
mainfrom
fix/viz-picker-feedback-global
Jun 24, 2026
Merged

fix(viz): per-panel picker finds feedBackViz_* factories (3D highway missing in split screen)#15
topkoa merged 1 commit into
mainfrom
fix/viz-picker-feedback-global

Conversation

@topkoa

@topkoa topkoa commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What

In split screen, the per-panel viz picker stopped offering migrated visualizations (the 3D highway, etc.). The main-player picker was fine.

Root cause

The viz-factory global was renamed window.slopsmithViz_<id>window.feedBackViz_<id> in the feedBack rename. Core's main-player picker (static/app.js) and highway_3d both register/look up under the new name. Splitscreen was the one laggard — it still gated every per-panel viz option on window['slopsmithViz_' + id], which is now always undefined, so no migrated viz showed up in the split picker.

Fix

Add a dual-prefix helper and route every lookup through it:

const VIZ_FACTORY_PREFIXES = ['feedBackViz_', 'slopsmithViz_'];
function vizFactory(id) { /* feedBackViz_ first, then legacy slopsmithViz_ */ }
function hasVizFactory(id) { return typeof vizFactory(id) === 'function'; }
  • Prefers the new feedBackViz_<id>, falls back to the legacy slopsmithViz_<id> (core still keeps it as a compat shim for third-party viz) — so this works whether a viz migrated or not.
  • Routed all ~10 sites: _rescanVizPluginsFromWindow (window-scan), _startVizFactoryWatch seed/tick/all-present, populateSelect filter + watch trigger, getPanelControlsFor (panelControls override), and the three factory-instantiation paths (enterVizMode, viz restore in initPanel, and the in-place viz switch in select.onchange).
  • Version bump 1.10.6 → 1.10.7 so installs cache-bust the updated screen.js (and the Plugin Manager sees the update).

Scope / notes

  • Behavior-only; no API or layout change. A few inline comments still narrate the old slopsmithViz_ name — left as-is to keep the diff focused; the helper documents the rename.
  • node --check screen.js passes.

Test

Split screen → per-panel picker now lists the 3D highway (and other migrated viz), selecting it installs the renderer, and a saved 3D-viz panel restores on reload.

…ds migrated viz

The viz-factory global was renamed window.slopsmithViz_<id> ->
window.feedBackViz_<id> in the feedBack rename (core's main-player picker
and highway_3d register under the new name). Splitscreen still gated every
per-panel viz option on the old window['slopsmithViz_'+id], so migrated viz
— notably the 3D highway — never appeared in the split-screen picker (the
main player was unaffected).

Add a dual-prefix helper (vizFactory/hasVizFactory) that resolves
feedBackViz_<id> first, then the legacy slopsmithViz_<id> (core keeps it as
a compat shim for third-party viz), and route all ~10 lookup sites + the
window-scan rescan through it. Bump 1.10.6 -> 1.10.7 so installs cache-bust
the updated screen.js.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: topkoa <topkoa@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The job was not started because recent GitHub Actions payments have failed or your spending limit needs to be increased.

@topkoa
topkoa merged commit e24f97e into main Jun 24, 2026
1 check failed
@topkoa
topkoa deleted the fix/viz-picker-feedback-global branch June 24, 2026 12:38
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.

2 participants