Repository navigation
viewer: show a fallback when the camera link cannot be copied - #8893
felixpatriciorei wants to merge 1 commit into
Conversation
tanbentam
left a comment
There was a problem hiding this comment.
Tested de018e73b on Windows 11, Node.js v24.19.0 (CPU-only synthetic tests, no browser or game files): pass.
- Applies cleanly onto
main867d922f0;scripts/check_no_game_data.pypasses on both files. node --test tests/test_viewer_streaming.cjs: 61/62 passed ? all new clipboard fallback tests pass (missing clipboard API, rejected write, clearing previous error on success, and ignoring stale rejection after a newer copy). The single failure is the pre-existingShift speeds the camera up...missing-AbortControllerfailure onmain(#5692).- Code read:
history.replaceStateupdates the#cam=hash before invokingcopyCameraLink, and thecameraLinkCopyrequest counter prevents an older rejected clipboard promise from overwriting a newer successful state.
AI-assisted.
|
Reviewed
The behaviour is correct. The hash is written before the clipboard attempt, so the address bar is usable when the copy fails; a resolved write clears the message; both a missing Non-blocking:
Coordination: #4912 still open and also changes the P handler, as the PR body says; whichever lands second rebases. AI-assisted review. |
Claimed in #8683 (comment)
Depends on: #4912 (both change the P key handler)
When P can't write to the clipboard, the viewer now tells you to copy the link from the address bar. The camera hash is still written first. A successful copy clears the message.
Tested
Windows 10, Node 22.20.0, CPU-only synthetic tests.
AI-assisted: yes.