Skip to content

docs: document the per-feature minimum host matrix (splitscreen#69) - #77

Merged
cchacs merged 3 commits into
mainfrom
pullfrog/69-document-minimum-host-matrix
Oct 1, 2026
Merged

cchacs merged 3 commits into
mainfrom
pullfrog/69-document-minimum-host-matrix

Conversation

@pullfrog

@pullfrog pullfrog Bot commented Oct 1, 2026

Copy link
Copy Markdown

Closes #69.

Splitscreen's features span several core API generations, so no single version string describes them — and no minHost is declared. This PR documents the requirement per feature and adds the diagnostics that make an unsupported host distinguishable from a broken one.

Documentation (README "Host compatibility")

Feature Required? Needs Added in Canonical main?
Basic split view Required window.createHighway() + renderer lifecycle, chart/playback access v0.3.0-alpha.1 (source-level check) yes
LAN sharing Optional server /ws/sync/{session_id} 03e1c1d (core #1030/#1032) yes
Coordinated / offline frame rendering Optional renderFrame / renderFrameAt / setExternalFrameDriver f7c761c (fork #81) no — fork only
Per-player identity Optional window.feedBack.playerContexts, player-difficulty.v1 7633211 (fork #83) no — fork only

Verified against both upstreams: 03e1c1d is on main of got-feedBack/feedBack and the get-flashbacks/feedBack fork; f7c761c and 7633211 are ancestors of the fork's main only. The v0.3.0-alpha.1 floor is a source-level reading (that tag's static/highway.js exposes createHighway, the setRenderer lifecycle and every hw.* method basic mode calls, and its index.html loads the file as a classic script) — not an end-to-end certification, and the README says so.

Also adds "Why there is no minHost": core's loader exposes minHost as metadata with no frontend enforcement found, so a value would be a claim that doesn't stop an incompatible install — and declaring one before the basic path has been exercised against a released host would advertise something untested (feedBack#102 tracks the core side).

Diagnostics

Every optional feature is capability-checked, so an older core ran the plugin fine — but silently. An unsupported relay, a non-exportable panel set and a missing player-context namespace were indistinguishable from a bug:

  • _warnOnce() names the missing core commit for the coordinated-frame and player-identity paths; the LAN path also toasts, since a share dialog nobody can join needs an on-screen reason.
  • window.slopsmithSplitscreen.hostFeatures() exposes the same answers to consumers — Visual Export already reads it to avoid promising a deterministic frame the host can't produce.
  • One predicate per feature, shared by the probe and the call site: _hasPlayerContextApi() (a namespace without upsert isn't reported as supported) and _recordHostFrameApi() (the export warning gates on exactly what renderFrameAt() will then reject).
  • A relay socket that never opens is counted across every attempt, including a WebSocket the browser refuses to construct at all (mixed content, blocked scheme) which never reaches onclose; after three it is reported as a missing relay. _lanRelayOk stays null until an attempt exists — a server endpoint can't be feature-detected — and a share that opened once is never misreported for a later drop.
  • The reconnect loop is untouched in every case, so a server upgraded mid-share still recovers on its own.

Verification

  • node tests/screen.test.js — 196 tests, 196 pass, 0 fail (5 → 14 new tests in a "Host-feature diagnostics" section: probe baseline, required floor, partial-namespace rejection, all three halves of the frame API, both warning paths, and the LAN never-open / constructor-throw / opened-once routes).
  • node --check screen.js clean; plugin.json parses.

Notes

  • No minHost is added — see the README section above.
  • Version bumped 1.14.21 → 1.15.0 for the new public API and the diagnostics. No CHANGELOG.md exists in this repo.
  • CLAUDE.md gained the matching matrix and the rules for working on these paths, so the two docs stay in sync.

Pullfrog  | View workflow run | via Pullfrog | Using big-pickle (free) | 𝕏

Splitscreen's features span several core API generations, so a single
version string cannot describe them and no minHost is declared. README
now carries the per-feature matrix instead: basic split view is the
required floor (source-level check at v0.3.0-alpha.1), while LAN sharing
(core 03e1c1d, on canonical and fork main), coordinated/offline frame
rendering (f7c761c, fork only) and per-player identity (7633211, fork
only) each need their own newer host.

Because every optional feature is capability-checked, an older core ran
the plugin fine but silently: an unsupported LAN relay, a non-exportable
panel set and a missing player-context namespace were indistinguishable
from a bug. Each now says so once, naming the commit that added the API
it wants, and hostFeatures() exposes the same answers to consumers:

- _warnOnce() for the three gated features, plus a toast for the relay
- _recordHostFrameApi() and _hasPlayerContextApi(), one predicate per
  feature shared by the probe and the guarded call site, so the probe
  cannot disagree with the path that uses it
- a relay socket that never opens is counted across every attempt,
  including a WebSocket the browser refuses to construct at all, and
  diagnosed after three; the reconnect loop is untouched, so a server
  upgraded mid-share still recovers

Bumps to 1.15.0 for the new public API and diagnostics; no minHost is
declared (see README 'Why there is no minHost').
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Comment thread screen.js Resolved
Comment thread screen.js Resolved
Comment thread tests/screen.test.js Resolved
@pullfrog

pullfrog Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Author

All three findings from the review were verified against the code and stood up — fixed in c975674, pushed, threads replied to and resolved.

  • lanRelay reported a stale verdict (screen.js:727) — startLanShare now clears _lanRelayOk before _lanConnect() and stopLanShare clears it next to _lanShare = null, so the probe's tri-state matches the documented contract (null whenever no share is in flight). README and CLAUDE.md wording updated to state the same thing, and two new tests pin the verdict across stop/restart in both directions (true → stop → new share, and false → stop → new share → open).
  • _maybeResumeLanShare built a differently-shaped share (screen.js:4011) — it now initialises opened: false, failures: 0 like startLanShare, so the documented _lanShare shape holds on the crash-recovery path instead of relying on undefined being falsy.
  • The dedup test passed on the early return (tests/screen.test.js:3807) — confirmed by experiment: with the _warnOnce guard removed, the old back-to-back beginOfflineRender() test stayed green. It now calls endOfflineRender() between the two passes, and fails as it should when the dedup guard is deleted.

node tests/screen.test.js — 198 tests, 198 pass, 0 fail (196 → 198, the two new relay-lifecycle tests). node --check screen.js clean.

Task list (1/6 completed)

Pullfrog  | View workflow run | via Pullfrog | Using big-pickle (free) | 𝕏

@kilo-code-bot

kilo-code-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

All three findings from the previous review are fixed in c975674: startLanShare/stopLanShare now reset _lanRelayOk to null, _maybeResumeLanShare initialises opened/failures, and the offline-render test closes each pass with endOfflineRender() so the warn-once dedup is actually exercised. The two new relay-lifecycle tests cover the reset in both directions (verdict dropped on stop, and a diagnosed-missing verdict not leaking into the next share). The README/CLAUDE.md wording matches the new null contract.

Files Reviewed (4 files)
  • screen.js
  • tests/screen.test.js
  • CLAUDE.md
  • README.md
Previous Review Summary (commit 1e41031)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 1e41031)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
screen.js 726 lanRelay is never reset in startLanShare/stopLanShare, so hostFeatures() reports a stale verdict for a share that has ended — contradicting the null contract documented in README/CLAUDE.md

SUGGESTION

File Line Issue
screen.js 4010 _maybeResumeLanShare (line 4238) builds the share object without the new opened/failures fields; harmless today only because undefined is falsy and (_lanShare.failures || 0) absorbs it
tests/screen.test.js 3802 The "warns once" test passes on beginOfflineRender's _offlineRenderActive early return, so it never reaches _warnOnce and would stay green if the dedup were removed
Files Reviewed (5 files)
  • screen.js - 2 issues
  • tests/screen.test.js - 1 issue
  • CLAUDE.md - 0 issues
  • README.md - 0 issues
  • plugin.json - 0 issues

Fix these issues in Kilo Cloud


Reviewed by free · Input: 0 · Output: 0 · Cached: 0

…itscreen#69)

- startLanShare/stopLanShare clear _lanRelayOk, so hostFeatures().lanRelay
  reports the share in flight instead of a finished one; README and CLAUDE.md
  state the same contract
- _maybeResumeLanShare initialises opened/failures like startLanShare, so the
  documented _lanShare shape holds on the crash-recovery path too
- the beginOfflineRender dedup test now closes each pass before the next one, so
  it really re-reaches _warnOnce rather than passing on the early return
- two tests pin the verdict lifecycle across stop/restart

cchacs commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

@pullfrog this PR now conflicts with main: #76 merged (version 1.14.22, README, plugin.json, tour.json, settings.html, screen.js header and tests/screen.test.js all changed). Please merge main into this branch (no rebase or force-push), resolve the conflicts keeping both sides' intent, and keep the version at 1.15.0 (it is still a minor bump above 1.14.22). Re-run node --check screen.js and node tests/screen.test.js before pushing. Please don't merge it.


Generated by Claude Code

@pullfrog

pullfrog Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Author

Merged main (1.14.22) into PR #77 branch, resolved the single conflict in plugin.json by keeping version 1.15.0, and pushed the merge commit. All other files merged cleanly. Verified with node --check screen.js and node tests/screen.test.js (203/203 passing).

Pullfrog  | View workflow run | via Pullfrog | Using big-pickle (free) | 𝕏

@cchacs
cchacs merged commit 1600e8c into main Oct 1, 2026
8 checks passed
@cchacs
cchacs deleted the pullfrog/69-document-minimum-host-matrix branch October 1, 2026 23:23
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.

Document feature-specific minimum hosts for split view, LAN, export and player identity

1 participant