Repository navigation
0.27.0: Share on the timeline, and replays opened at a shared moment - #40
Merged
Merged
Conversation
Share, beside Play From Here, opens a popover over the map above it: From the start or From 6:42 (the time under the playhead, chosen when it is past the start, and following it while the popover is open), with a time Whoever opens it Watches or Plays as one of the players (the one watched through first), the link, and one gold button. The button is Copy link (Copied for a moment), Keep and copy link with "Sharing keeps this replay on your scmjs.dev account." when the account has not got it, or Sign in to share; with several ways to sign in it shows them, and after the sign-in the popover is still there with the link, copied where the browser allows. Esc and a press anywhere but the popover or the timeline close it; keys pressed in it are its own. The link is https://scmjs.dev/replay/<token>?t=6:42[&play=<slot>], the slot being the one Play From Here hands the play page. Aftermath never talks to the server: the scmjs.dev plugin's scmjs-dev.replays service (1.41.0) says where the replay stands and gives the link, signing in and keeping the replay as needed. Without that plugin there is no Share button; a replay opened from a link has its link and shares it with no sign-in. The aftermath.replays service takes a replay with where it came from: its link and the moment its ?t= says. It opens there, paused, at the first frame whose clock reads that time (a frame after round(s * 1000 / 42) at most), with "Opened at 6:42 from a shared link" under the timeline's row until the first play or seek. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VEdp4VUa2TKJmLTeeLr7vq
jeany55
marked this pull request as ready for review
November 15, 2026 15:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Share on the replay's timeline, and replays opened at a shared moment. Goes with scm-js/plugin-scmjs-dev's
share-moment(1.41.0), which gives the link.What changed
From the start/From 6:42(the time under the playhead; chosen when the playhead is past the first second; follows the playhead while open, and a press on the timeline moves it without closing the popover)Whoever opens it:WatchesorPlays as <name> (<race>), the player watched through listed firstCopy link(Copiedfor a moment),Keep and copy linkwith "Sharing keeps this replay on your scmjs.dev account.", orSign in to share(with several sign-in providers, the press showsSign in with …for each; after the sign-in the popover is still there with the link, copied where the browser allows)https://scmjs.dev/replay/<token>?t=6:42[&play=<slot>],playbeing the same slot Play From Here hands the play page.scmjs-dev.replaysservice (vendor/scmjs-dev.d.ts). No scmjs.dev plugin, no Share button. A replay opened from a link has its link and shares it with no sign-in and no upload.aftermath.replays(open(file, { link, at })), takes a replay with where it came from. The scmjs.dev plugin opens replay links through it: the replay opens at the link's moment, paused, with "Opened at 6:42 from a shared link" on its own line under the timeline's row until the first play or seek.share.ts(the popover and its pure parts), Korean for every new string, README (the timeline list and a Share section), 0.27.0.A choice the spec left open, and one place I departed from it
ceil(s * 1000 / 42), not the spec'sround(s * 1000 / 42): with round,t=6:42lands on frame 9,571, which the timeline (and the game) show as 6:41. The difference is at most one frame. The play page's agent should know.Checked
npm testand the typecheck pass (245 tests,tests/share.test.tsnew: the moment's frame, the link'st/play, the popover's state signed out / not kept / kept / kept without a link). This working copy'snode_modules(a symlink to the main checkout) has no@scm-js/mod, sonpm testandnpm run typecheckfail there before any change of mine (4 suites, the module not found); I ran both with@scm-js/mod1.2.x resolved from a scratch install. CI installs it./editor/; the same link withplay=1sent by the stand-in to/play/?replay=…&t=6%3A42&play=1; Play From Here still opens the play page with its menu; no Share without the scmjs.dev plugin; Korean.Not done
docs/guide.md, Play From Here and replay links) does not mention Share yet.🤖 Generated with Claude Code
https://claude.ai/code/session_01VEdp4VUa2TKJmLTeeLr7vq