Skip to content

feat: real lanyard physics, the badge turns over to sign in, every badge on a lanyard (#172–#176) - #178

Merged
renderghost merged 5 commits into
mainfrom
claude/lanyards-rebuild-attendee-ux-vcl1sb
Nov 21, 2026
Merged

renderghost merged 5 commits into
mainfrom
claude/lanyards-rebuild-attendee-ux-vcl1sb

Conversation

@renderghost

Copy link
Copy Markdown
Owner

Summary

Signing out goes to the homepage (#172)

Settings → Sign out used to land on the sign-in page: Settings saw nobody signed in and asked you to sign in again. Now it goes home.

  • signOut(leave) runs leave once the session has ended, but before anyone is shown as signed out. Meanwhile the status is loading, so nothing redirects.

A person's badge hangs from their lanyard (#173)

  • Where: the badge at the top of a lanyard, on the public page and in the customiser.
  • What: a lanyard printed with the handle, the clasp through the slot, and the laminate sleeve.
  • No sway: the badge holds buttons.
  • Light and dark:
    • the lanyard takes the person's accent with a hairline edge (LanyardRibbon tone="accent");
    • the sleeve is edged in the page's own ink (BadgeSleeve ground="page").
  • Loading: the loading skeleton hangs the same way, so nothing jumps.
  • Straps: they run up to the header with a clean cut.
  • Customiser: its title is for screen readers only.
  • Loading budget:
    • the page sleeve has no inset highlight, which cost about 0.1 s of paint in software rendering;
    • the cover, lanyard and sleeve load as one file (a badge chunk group), not three. Over HTTP/1.1 each extra file in the route's burst can cost a round trip.

Real lanyard physics; the Share lanyard sways too (#174)

lanyardPhysics replaces the single damped spring with two coupled bodies:

  • The tab: a strap pendulum, held back by the chest and rubbing on clothes. It sways a little and never trades swings with the badge.
  • The badge: a flat card swinging on its clasp. Its pace comes from its size, with gravity real at a pixel's nominal size (0.26 mm).
  • The push: a passing mouse pushes at its own height, with the square of its speed, as a hand pushes air.
  • Coming to rest: air drag and clasp friction settle it in about 5–6 s, each swing about ¾ of the last.

Where it applies:

  • Share screen: sways the same way, under a mouse only, so a phone's code stays still to be scanned. It doesn't swing in as it opens.
  • Homepage:
    • hangs straight (no 1.5° tilt);
    • drops in under the same physics on wide screens with motion allowed, replacing the scripted CSS swing;
    • sits higher, centred in its blue.
  • useLanyardSway replaces usePointerSway:
    • it takes elements held by callback refs, so it also starts in the Share dialog, whose portal draws its content a render later. That was a real bug, caught in the browser and covered by a test;
    • it moves the lanyard's drawing itself, so pages that never sway don't load that code.

Signing in turns the homepage badge over (#175)

  • One page: / and /sign-in share a pathless _home layout route, so the badge stays mounted and turns over on its clasp between them.
  • Two faces: the welcome on the front, the sign-in form on the back. Both share one grid cell, so they're always the same size.
  • Out of reach:
    • the turned-away face is inert and aria-hidden;
    • the title follows the face;
    • focus after navigating now skips headings out of reach, so it lands on the face that turned up.
  • Motion: with reduced motion it turns at once; it never sways while it shows the form.
  • Unchanged: direct visits to /sign-in, returnTo, /?returnTo= and sending signed-in people on.
  • SignInPage becomes SignInFace, the content on the back.

Handle suggestions no longer cut off (#176)

  • The back clips nothing; only its cover rounds its own corners.
  • The homepage's stage clips only sideways.

Testing

  • npm run lint, npm run typecheck, npm run i18n:check
  • npm test: 1,349 passed. New tests cover:
    • sign-out ordering;
    • the physics: direction, brisk and slow pushes, push height, pace by size, caps, rest within 6 s, frame-rate independence;
    • the sway hook: touch, reduced motion, arrival, late-mounting elements, display: contents;
    • the ribbon tone and sleeve ground;
    • the two faces;
    • focus skipping inert headings.
  • npm run e2e: 98 passed, perf included. New specs:
    • sign-out lands home (failed before the fix);
    • the Share screen sways and settles;
    • the badge turns over at the same size and back, with focus following;
    • reduced motion turns at once;
    • nothing clips the suggestions list (fails if the badge clips).
  • npm run size: 199.2 KB of the 200 KB budget for /<handle>. Headroom is thin, and the LCP sits near its 2.5 s budget; a separate task is suggested.
  • Screenshots: the homepage at rest and mid-swing (1920×1080), Share mid-swing, the lanyard page light and dark, the customiser, the turn mid-way, and phone sign-in with suggestions.

Closes #172
Closes #173
Closes #174
Closes #175
Closes #176


Generated by Claude Code

renderghost and others added 5 commits November 21, 2026 14:17
Signing out of Settings sent you to the sign-in page, because Settings
saw nobody signed in and asked you to sign in again. Now signOut takes a
leave callback, which runs once the session has ended and before anyone
is shown as signed out; meanwhile the status is loading. Settings goes
home there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PSPB1cH898qV61BH1NiFKL
…ve (#173)

The badge at the top of a lanyard, on the public page and in the
customiser, now hangs as on the Share screen: a lanyard printed with
the handle, the clasp through the sleeve's slot, and the laminate
sleeve. It never sways, since it holds buttons.

On the app's light or dark page the lanyard wears the person's accent,
edged with a hairline, and the sleeve is edged in the page's own ink.
Both shared pieces gain those options: LanyardRibbon tone="accent" and
BadgeSleeve ground="page". The loading skeleton hangs the same way, so
nothing jumps. The straps run up to the header, and the customiser's
title is for screen readers only.

Keeping the 2.5 s loading budget: the page sleeve has no inset
highlight, which cost 0.1 s of paint, and the cover, lanyard and sleeve
load as one file, not three.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PSPB1cH898qV61BH1NiFKL
…'s (#174)

The badge and its lanyard now move as real ones do:
- The lanyard's tab is a pendulum of strap held back by the chest, and
  rubbing on clothes. It sways a little, never trading swings with the
  badge.
- The badge is a flat card swinging on its clasp, its pace set by its
  size, with gravity real at a pixel's nominal size.
- The two are coupled, so the straps follow the badge.
- A mouse brushing past pushes at its own height, with the square of
  the speed it passes at, as a hand pushes air. Low on the badge it
  turns it; on the straps it moves the lanyard.
- Air drag and the clasp's friction settle it within about six seconds,
  each swing about three quarters of the last.

The Share screen's badge sways the same way, under a mouse only, so a
phone's code stays still to be scanned; it doesn't swing in as it
opens. The homepage's badge hangs straight, drops in under the same
physics on wide screens with motion allowed (replacing the scripted
CSS swing and the 1.5° tilt), and sits higher, centred in its blue.

useLanyardSway replaces usePointerSway. It takes elements, held by
callback refs, so it starts when a dialog's portal draws them a render
later. It moves the lanyard's drawing itself, so pages whose lanyard
never sways don't load that code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PSPB1cH898qV61BH1NiFKL
#175, #176)

/ and /sign-in are now one page under a pathless _home layout route, so
its badge stays mounted and turns over on its clasp between them: the
welcome on the front, the sign-in form on the back. Visiting /sign-in
directly shows it already turned; returnTo, the /?returnTo= redirect and
sending signed-in people on all work as before.

Both faces share one grid cell, so they are always the same size. The
face turned away is inert and aria-hidden, the title follows the face,
and the app's focus after navigating now skips headings out of reach,
so it lands on the face that turned up. With reduced motion it turns at
once, and the badge never sways while it shows the form.

The handle's suggestions are no longer cut off (#176): the back clips
nothing (only its cover rounds its own corners), and the homepage's
stage clips only sideways. An e2e test checks nothing the list sits in
clips it.

SignInPage becomes SignInFace, the content on the badge's back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PSPB1cH898qV61BH1NiFKL
@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
lanyards Ready Ready Preview Nov 21, 2026 3:28pm UTC

@renderghost
renderghost merged commit 40da857 into main Nov 21, 2026
3 checks passed
@renderghost
renderghost deleted the claude/lanyards-rebuild-attendee-ux-vcl1sb branch November 21, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment