Skip to content

1.41.0: a replay's link for the viewer's Share, and replay links at a moment - #8

Merged
jeany55 merged 1 commit into
mainfrom
share-moment
Nov 15, 2026
Merged

jeany55 merged 1 commit into
mainfrom
share-moment

Conversation

@jeany55

@jeany55 jeany55 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

A replay's link for Aftermath's Share, and replay links that open at a moment. Goes with scm-js/plugin-aftermath's share-moment (0.27.0).

What changed

  • scmjs-dev.replays service (contract.d.ts, ScmjsReplaysService, version 1, there while the plugin is on): status(replay) says where a replay stands without sending it (signed-out with the providers, not-kept, kept with its link or null, unavailable with a sentence), and link(replay, provider?) signs in first if need be (the window opens on the press), keeps the replay unless the account has it (its SHA-256 against GET /v1/replays: the same file is never sent twice), and makes its link if it has none (POST /v1/replays with link=1, or POST /v1/replays/:id/links). onChange fires on sign-in and sign-out only.
  • Replay links are the site's own, https://scmjs.dev/replay/<token>, when the editor is at <origin>/editor/ or is the desktop one (My Maps' Copy link too); on the nightly and a development server at its root, the editor's own …/replay/<token> as before. ?scmjs-server= is kept.
  • Opening at a moment: /editor/replay/<token>?t=6:42 (m:ss, h:mm:ss or seconds; anything else ignored; moment.ts) hands the replay to Aftermath's aftermath.replays service with its link and the moment, so the replay opens there, paused, and Share needs no sign-in. An Aftermath without that service gets the dropped file as before, at its start. The address goes back to /editor/ without t or play (editorAddress).
  • Korean for the new string, README (Replays, the service), 1.41.0, dist/plugin.js built.

Checked

  • npm run typecheck, npm test (263 tests; new: the moment's reading, the link forms, the address without t/play, the hand-over with link and moment, the service signed out → sign-in → kept, signed in not kept → one upload → kept with no second upload, kept without a link, a server without replays or out of reach, onChange once per sign-in).
  • In the real editor behind the site stand-in (localhost:5220) with this build and Aftermath's: every Share case and the ?t= opening, as listed in the Aftermath PR. The account server was stood in for with Playwright routes; the real server was not used (it accepts only scmjs.dev and localhost:5173).

Not done

  • No release, tag or pin. scmjs replay share (scm-js cli/, docs/cli.md) still prints the /editor/replay/<token> form, which keeps working; moving it to /replay/<token> is the CLI's own change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VEdp4VUa2TKJmLTeeLr7vq

… moment

The scmjs-dev.replays service (contract.d.ts, ScmjsReplaysService) gives a
replay viewer a replay's link without the viewer talking to the server:
status() says where a replay stands (nobody signed in, with the ways to sign
in; not on the account; kept, with its link) without sending it, and link()
signs in first if need be (the provider's window opens on the press), keeps
the replay unless the account has it (by its SHA-256 against the account's
list, so the same file is never sent twice), and makes its link if it has
none. Aftermath 0.27.0's Share uses it.

Replay links are the site's own now, https://scmjs.dev/replay/<token>, which
the site sends on to the editor (or, with play=, to the play page), when the
editor is at <origin>/editor/ or is the desktop one; elsewhere (the nightly,
a development server) the editor's own, as before.

A link's ?t=6:42 (m:ss, h:mm:ss or seconds; anything else ignored) reaches
the viewer with the replay: it goes to Aftermath's aftermath.replays service
with the replay's link and the moment, and the replay opens there, paused. An
Aftermath without that service gets the file dropped, as before, at its
start. The address goes back to the editor's own without t or play.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VEdp4VUa2TKJmLTeeLr7vq
@jeany55
jeany55 marked this pull request as ready for review November 15, 2026 15:17
@jeany55
jeany55 merged commit 9703cee into main Nov 15, 2026
1 check passed
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