Repository navigation
feat(fe): a calmer live view, and a lime beam on the composer while the Mind replies - #261
Conversation
Ancung, 11 Nov: when the live view appeared, its bubbles jiggled and bounced into place, too much. The first graph is settled before drawing only when it has more than one bubble, and it often holds only the Mind: the skills and history arrive a moment later, all at once, were placed in a pile near their parents and left to bounce apart. Now: - A graph that grows by three or more bubbles at once is settled before drawing too, like the first one, so they appear in place. - One or two new bubbles only nudge the layout (heat 0.25, was 0.5). - Settling on its own uses more friction (0.74); dragging keeps 0.86, so a released bubble still sways back like Obsidian's. Doesn't overlap #253 (its cap on the push between near bubbles is another line of sim.ts). Tests: typecheck, lint, vitest 266/266 (graph.test's layout checks still pass). Checked in Chrome: two screenshots taken one after the other after loading the chat show the same, settled graph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rwards Ancung, 11 Nov, right after the calmer entrance: the graph zoomed by itself. The previous commit framed the camera at once whenever three or more bubbles joined, which is right while the graph opens but, during a reply that used several new tools, made the view jump. Now it snaps only while opening (nothing but the Mind before); later it glides to the new frame, and only if the owner hasn't moved the camera. Cause inferred from the code and the screenshot (a reply was running), not reproduced. Tests: typecheck, lint, vitest 266/266. Checked in Chrome: on load the whole graph is framed and still. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ancung, 11 Nov: switching to earlier chats, the live view's graph always opened zoomed into the Mind. The camera is kept per Mind across chat pages (`KEPT`) so the graph doesn't replay its settling, and it kept whatever the owner had last done: a zoom, a pan, or a click on a bubble (which zooms to it) turned automatic framing off for good. And a page that opened while the graph held only the Mind framed that one bubble, then never reframed when the others came back a few at a time. Now: - A new page keeps the layout but puts the camera back on automatic framing, framed at once. - The camera never frames the Mind alone; a pending frame waits for the other bubbles. - While automatic, a change in the number of bubbles reframes it, gliding. Tests: typecheck, lint, vitest 266/266. Checked in Chrome: zoomed into a bubble, opened New chat, came back: the whole graph was framed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ancung, 11 Nov: the graph should come in zooming out, easing to a stop. The first real frame of a Mind's graph on a page now starts at 1.35 times the frame's zoom, scaled about the panel's middle, and eases out to the frame over 700 ms (quart). It runs once per page: switching chats finds the layout kept and frames it at once, so it doesn't replay (he didn't want replays on every chat). It waits for more than the Mind, so a graph that opens with only the Mind gets it when the others arrive. Reduced motion frames at once. Tests: typecheck, lint, vitest 266/266. In Chrome the end frame is right; the 700 ms itself is too quick to catch in a screenshot, so the feel is for Ancung to judge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y chat, and isn't made on phones Ancung, 11 Nov: the zoom-out entrance on every chat is fine, as long as nothing lags, and phones shouldn't animate what they don't show. - Measured `settle` (one go, this laptop): 35 bubbles 23 to 58 ms, 60 bubbles 73 to 87 ms, so a phone would freeze for a few hundred. The draw loop now settles a new layout in slices of at most 6 ms a frame and draws it once still; then the entrance plays. A graph off screen doesn't draw, so it doesn't settle or animate either. - The entrance (a 700 ms ease-out zoom out over the kept layout) plays on every chat page; the layout itself stays put, so nothing jiggles. - The desktop panel's graph is only made on screens of 1280 px and up. Below, the panel was only hidden with CSS and still fetched the history and laid out the graph on every chat page. Phones and tablets make it only when the drawer or sheet opens. Tests: typecheck, lint, vitest 266/266. Checked in Chrome: after a reload and after switching chats, the graph is framed and still. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ancung, 11 Nov: border-beam (libraries.dev, the same maker as thinking-orbs) on the prompt bar,
in our lime. `border-beam` 1.4.1, pinned, MIT. `size="line"` sends a light along the box's
bottom edge, and only while the Mind replies (`active={busy}`), like "Thinking...": nothing moves
while the owner types, and the animation doesn't run the rest of the time.
The library has no custom colour (only colorful, mono, ocean, sunset), so `mono` is tinted to the
brand lime in globals.css, on the beam's own layers (::before, ::after and the bloom, which keeps
its 6 px blur), so the composer's text keeps its colour. Strength 1, brightness 1.8: at the
defaults the lime barely showed on the dark theme. The theme follows next-themes.
Tests: typecheck, lint, vitest 266/266. Checked in Chrome, dark theme, with the beam forced on:
the lime light travels along the bottom edge. Not checked: the light theme, a phone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@AncungAulia tested locally and it's good to go: with 🤖 Generated with Claude Code |
# Conflicts: # apps/fe/CLAUDE.md
|
Merged on Axel's go. @AncungAulia I resolved the 🤖 Generated with Claude Code |
|
Live on the hosted demo:
|
@Lexirieru Two FE pieces from Ancung's 11 Nov testing: a calmer live view, and a beam on the composer while the Mind replies. Up to date with
maind9c1621. This PR doesn't touch the line ofsim.tsyour #253 changes (the cap on the push between close bubbles), so the two should merge cleanly.Live view (
MindGraph.tsx,sim.ts,ChatScreen.tsx)settlein one go: 23–58 ms for 35 bubbles and 73–87 ms for 60 on a laptop, so a phone would freeze. The draw loop now settles in slices of at most 6 ms a frame. A graph off screen doesn't draw, so it doesn't settle or animate either.Composer beam (
Composer.tsx,globals.css)border-beam1.4.1 (pinned, MIT, the same maker asthinking-orbs).size="line": a light travels along the box's bottom edge, only while the Mind replies (active={busy}).monolight is tinted to the brand lime in CSS, on the beam's own layers only. The bloom keeps its 6 px blur and the text keeps its colour.Tests (local)
bun run lintandbun run typecheck: pass.bun run test: 266/266.bun run build: pass.🤖 Generated with Claude Code