@volter/world-console 3.0.22 → 3.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1932,6 +1932,9 @@ function CanvasSurface({ name, token, session, retry, snapshot, back, canWrite,
1932
1932
  const [reads, setReads] = useState(0);
1933
1933
  const branches = useDoor<{ branches: BoardBranch[] }>(token, `/-/${name}/branches`, reads);
1934
1934
  const branch = branches.state === 'ok' ? branches.data.branches.find((b) => b.name === viewing) : undefined;
1935
+ // comparison copies are unlabelled, expiring views at an instant; the door carries no purpose, so other copies
1936
+ // with those same facts are left out too. A URL may still name one, and its full row still supplies its sites.
1937
+ const choices = branches.state === 'ok' ? branches.data.branches.filter((b) => !(b.at?.instant && b.expiresAt && !b.at.label)) : [];
1935
1938
  // reads in the order they went out: an earlier one answering after a later one is not taken
1936
1939
  const sent = useRef(0); const taken = useRef(0);
1937
1940
  /** The World's board read again (its frames always, its boards when no save moved since the read went out). */
@@ -2249,8 +2252,8 @@ function CanvasSurface({ name, token, session, retry, snapshot, back, canWrite,
2249
2252
  <label className="compare-base board-viewing">Viewing
2250
2253
  <select value={viewing} disabled={pending.current > 0} onChange={(e) => view(e.target.value)}>
2251
2254
  <option value="">The World</option>
2252
- {viewing && !branch ? <option value={viewing}>{viewing} · branch</option> : null}
2253
- {(branches.state === 'ok' ? branches.data.branches : []).map((b) => <option key={b.name} value={b.name}>{b.name.split('/')[1]} · branch</option>)}
2255
+ {viewing && !choices.some((b) => b.name === viewing) ? <option value={viewing}>{viewing} · branch</option> : null}
2256
+ {choices.map((b) => <option key={b.name} value={b.name}>{b.name.split('/')[1]} · branch</option>)}
2254
2257
  </select>
2255
2258
  </label>
2256
2259
  {branches.state === 'error' && branches.status !== 404 ? <p className="mode" role="alert">Branches could not be read: {branches.error}</p> : null}