Skip to content

fix(web): stabilize Message Growth animation and fit chips on one line - #451

Open
cloud-of-equality wants to merge 1 commit into
shareAI-lab:mainfrom
cloud-of-equality:fix/message-growth-animation
Open

fix(web): stabilize Message Growth animation and fit chips on one line#451
cloud-of-equality wants to merge 1 commit into
shareAI-lab:mainfrom
cloud-of-equality:fix/message-growth-animation

Conversation

@cloud-of-equality

@cloud-of-equality cloud-of-equality commented Jul 5, 2026

Copy link
Copy Markdown

Closes #450.

Fixes three issues in the "Message Growth" visualization (web/src/components/architecture/message-flow.tsx). One component; no chapter code.py/README touched.

  1. Reset flicker (len=0/1). The setInterval queued duplicate resets that snapped count back mid-regrowth, and index-keyed chips in AnimatePresence got stuck (invisible) on reset. Fixed with a single self-scheduling setTimeout and by removing AnimatePresence/exit.
  2. Scrollbar (len=8). overflow-x-autoflex-wrap, plus tighter chips (px-2.5→px-2, gap-1.5→gap-1); all 8 now fit one line at the same width as the code block above.
  3. Inconsistent entrance. Dropped width:0→auto; chips now zoom in via scale+opacity with layout.

Verified in-browser (chip count tracks len, one line, no scroll); tsc --noEmit passes.

Disclosure: implemented with AI assistance (Claude Code); reviewed and verified.

Before before
After after

The "Message Growth" visualization (message-flow.tsx) had three issues:

1. Flicker at len=0/1. The setInterval kept firing while the array was
   full, queuing multiple setCount(0) resets that snapped the counter
   back mid-regrowth; and index-keyed chips inside AnimatePresence
   collided with still-exiting nodes on reset, leaving stuck invisible
   chips (len=1 rendered 8 chips at opacity 0). Replaced with a single
   self-scheduling setTimeout chain and removed AnimatePresence/exit so
   chips unmount cleanly on reset.

2. Horizontal scrollbar at len=8. Switched overflow-x-auto to flex-wrap
   and tightened chip padding/gap (px-2.5->px-2, gap-1.5->gap-1) so all
   8 chips fit on one line within the existing column width.

3. Inconsistent entrance animation. Dropped the width:0->auto slide in
   favor of a unified scale+opacity zoom with layout for smooth reflow.

Refs shareAI-lab#450
@cloud-of-equality
cloud-of-equality force-pushed the fix/message-growth-animation branch from 781e2db to 09a04e8 Compare July 5, 2026 22:32
@Bill-Billion
Bill-Billion force-pushed the main branch 2 times, most recently from 934b526 to 581241c Compare July 28, 2026 12:24
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.

Message Growth visualization: reset flicker, horizontal scrollbar, and inconsistent chip animation

1 participant