Skip to content

polish(scratchnode): handoff cascade + room-code copy flash#456

Closed
HomenShum wants to merge 1 commit into
mainfrom
polish/scratchnode-private-handoff
Closed

polish(scratchnode): handoff cascade + room-code copy flash#456
HomenShum wants to merge 1 commit into
mainfrom
polish/scratchnode-private-handoff

Conversation

@HomenShum
Copy link
Copy Markdown
Owner

What

Additive follow-up on top of the shipped motion pass (0ec4c9d3). Adds the two micro-interactions the prior pass did not cover, on public/proto/home-v5.html:

  1. Room-code copy flash — clicking the room-code chip now flashes a green ✓ Copied confirmation (paired with the existing toast — text + colour, not colour alone), then restores the code.
  2. Handoff cascade — the NodeBench handoff overlay sections cascade up (nbSectionIn) after the panel slides in, so the "Now in NodeBench" moment feels composed instead of a hard cut.

Both reuse the existing --motion-fast/med/slow + --ease-out token system added in 0ec4c9d3 — no new token system, no overlap with the existing feedRowIn/answerReveal/laCardIn/snNotePop/composerSheen/privateSeal motion.

Why these two only

A parallel pass (0ec4c9d3) already shipped composer focus glow (--glow-accent/composerSheen), private-mode differentiation + lock pulse (--glow-private/privateSeal), message/answer reveals, Live Assist stagger, and Memory Wall pop. These two were the remaining gaps.

Safety

  • No change to the public/private behaviour contract or the live send/render path.
  • prefers-reduced-motion guard on the cascade.

Verification

  • 7/7 e2e on chromium: home-v5-output-contract (runs the 13-phase demo + 17 QA invariants + Live Assist counts) and all 6 scratchnode-live-route-honesty guarantees (no mock chat on config-fail, composer stays disabled, no local rows on send failure).
  • All 4 inline <script> blocks parse clean.
  • Behavioral: room-code chip → is-copied + ✓ Copied + green; handoff sections → nbSectionIn with staggered delays 0.1s / 0.18s / 0.26s; reduced-motion → animationName: none; mobile 375px → no horizontal overflow.

Live-DOM verification (fetch scratchnode.live + grep raw HTML) should be run post-merge/deploy per .claude/rules/live_dom_verification.md — not done here since this PR is not yet deployed.

🤖 Generated with Claude Code

Additive follow-up to the motion pass (0ec4c9d). Two micro-interactions
it did not cover, both on public/proto/home-v5.html and reusing the existing
--motion-*/--ease-out tokens:

- Room-code chip flashes a green "Copied" confirmation on copy, paired with
  the existing toast (text + colour, not colour alone).
- NodeBench handoff overlay sections cascade up (nbSectionIn) after the panel
  slides in, with a prefers-reduced-motion guard.

Leaves the public/private behaviour contract untouched.
Verified: 7/7 e2e (output-contract + live-route-honesty), reduced-motion
suppression, no horizontal overflow at 375px.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodebench-ai Ready Ready Preview, Comment Jun 2, 2026 1:22am

Request Review

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Jun 2, 2026

🤖 Augment PR Summary

Summary: This PR adds two micro-interactions to the ScratchNode demo page to make the room feel more polished.

Changes:

  • Room-code chip now flashes a green “✓ Copied” state after a successful copy (in addition to the existing toast).
  • NodeBench handoff overlay sections now cascade in via a staggered nbSectionIn animation after the panel becomes visible.
  • Respects prefers-reduced-motion by disabling the new cascade animation.
  • Updates the prototype changelog entry to document these additions and verification notes.

Technical Notes: Reuses the existing --motion-* and --ease-out token system; no changes to public/private behavior contracts are introduced.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread public/proto/home-v5.html
}
if (navigator.clipboard) {
navigator.clipboard.writeText(text).then(function(){ toast('Copied join link', EVENT_ROOM_CODE + ' · paste in any chat.'); });
navigator.clipboard.writeText(text).then(function(){ toast('Copied join link', EVENT_ROOM_CODE + ' · paste in any chat.'); flashRoomCode(); });
Copy link
Copy Markdown

@augmentcode augmentcode Bot Jun 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

navigator.clipboard.writeText(...) can reject (permissions/HTTP/non-secure contexts), and this path currently doesn’t surface any fallback toast/error when that happens, so the user may get no confirmation at all. Consider handling the rejection case explicitly so copy failures don’t silently do nothing.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread public/proto/home-v5.html
function flashRoomCode() {
var btn = document.getElementById('sn-room-code-btn');
if (!btn || btn.dataset.flashing === '1') return;
var original = btn.textContent;
Copy link
Copy Markdown

@augmentcode augmentcode Bot Jun 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flashRoomCode() captures original from btn.textContent and restores it later; since the room-code button is also updated programmatically (e.g., after event fetch), a late update during the 1.3s window could be overwritten by the restore and leave a stale code showing. Consider restoring from the canonical room-code state instead of the previous rendered text.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@HomenShum HomenShum closed this Jun 3, 2026
@HomenShum HomenShum deleted the polish/scratchnode-private-handoff branch June 3, 2026 22:32
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.

2 participants