Skip to content

feat(fe): a calmer live view, and a lime beam on the composer while the Mind replies - #261

Merged
Lexirieru merged 7 commits into
mainfrom
feat/fe-composer-beam
Nov 11, 2026
Merged

Lexirieru merged 7 commits into
mainfrom
feat/fe-composer-beam

Conversation

@AncungAulia

Copy link
Copy Markdown
Contributor

@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 main d9c1621. This PR doesn't touch the line of sim.ts your #253 changes (the cap on the push between close bubbles), so the two should merge cleanly.

Live view (MindGraph.tsx, sim.ts, ChatScreen.tsx)

  • Entrance without jiggle. The first graph often holds only the Mind, before its skills and history arrive. The rest then piled in and bounced into place.
    • A graph that grows by three or more bubbles at once is settled before drawing.
    • One or two new bubbles only nudge it (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.
  • Camera.
    • Every chat page puts the camera back on automatic framing. Before, a zoom or a click on a bubble stuck, and every later chat opened zoomed into the Mind.
    • It never frames the Mind alone.
    • While automatic, it reframes (gliding) when the number of bubbles changes.
    • It snaps only while opening, so it doesn't jump mid-reply.
  • Entrance animation. Every chat page's graph comes in with a 700 ms ease-out zoom out over its kept layout. The layout stays put, so nothing jiggles. Reduced motion frames at once.
  • Performance. I measured settle in 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.
  • Not on phones. Below 1280 px the desktop panel was only hidden with CSS, yet it still fetched the history and laid out the graph on every chat page. It's now made only at 1280 px and up. Phones and tablets make the graph when the drawer or sheet opens.

Composer beam (Composer.tsx, globals.css)

  • border-beam 1.4.1 (pinned, MIT, the same maker as thinking-orbs).
  • size="line": a light travels along the box's bottom edge, only while the Mind replies (active={busy}).
  • Colour. The library has no custom colour, so its mono light 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 lint and bun run typecheck: pass.
  • bun run test: 266/266.
  • bun run build: pass.
  • Not run: integration and load tests (the FE has none).
  • Checked in Chrome, try-out Mind:
    • The graph opens framed and still after a reload and after switching chats.
    • After zooming into a bubble and switching chats, the whole graph is framed.
    • The beam was forced on to view it: lime along the bottom edge in the dark theme.
    • Ancung tried both on his Omaga.
  • Not checked: the beam in the light theme, and a real phone.

🤖 Generated with Claude Code

AncungAulia and others added 6 commits November 11, 2026 16:18
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>
@Lexirieru

Copy link
Copy Markdown
Contributor

@AncungAulia tested locally and it's good to go: with main merged in, typecheck, vitest 270/270 and next build pass, and border-beam 1.4.1 (MIT, pinned) installs from the lockfile. It now conflicts in apps/fe/CLAUDE.md only, since #259 and #262 landed first. Please merge main in and keep both sides' lines; I'll merge after CI.

🤖 Generated with Claude Code

@Lexirieru
Lexirieru merged commit fe4efcc into main Nov 11, 2026
1 check passed
@Lexirieru

Copy link
Copy Markdown
Contributor

Merged on Axel's go. @AncungAulia I resolved the apps/fe/CLAUDE.md conflict on your branch (0e7dd07, a plain merge of main, no force-push) and kept both sides' additions: your border-beam line and #262's drawer-padding line. No code changed. Before merging: lint, typecheck, vitest 270/270, next build; CI fe / build green.

🤖 Generated with Claude Code

@Lin1er

Lin1er commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Live on the hosted demo: main fe4efcc (automatic deploy after the merge).

  • Before: 50ca4d5, and the box matched git at that revision. CI: passed: build.
  • GET /v1/health → {"ok":true,"engine":true,"revision":"fe4efcc"}. No rollback.
  • Rollback target: 50ca4d5 (/opt/hellonear/release-old).

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.

3 participants