Files
loki/scripts/test/widget-brand-mark.ts
CatoandClaude Opus 5.5 be5752994c feat(widget): one integrated panel — watch says what it sees, in Loki's own spiral (#1111)
* feat(widget): watch says what it sees, in Loki's own spiral

From the owner's phone on heidi.orangecat.ch (2026-10-09): "It's not clear
what it thinks when it watches", and the logo is barely used.

- What Loki sees: one row under the panel header ("Watching · 2 pages,
  1 tap · nothing wrong so far") that opens into the trail worded as notes
  — pages opened, taps, what the page sent, what it noticed. Each settled
  page now records a `look` step even when clean, so "looked, all fine"
  is visible instead of silent. widget/thoughts.ts (pure) +
  thoughts-view.ts.
- The status light is the logo's spiral, generated from
  src/config/brand-mark.ts into widget/brand-mark.generated.ts (the widget
  may not import src/). It turns slowly while watching, spins while Loki
  thinks (header and the pending answer), and goes still and grey when
  paused — in the launcher, the panel header and the walkthrough card.
- Loki's answers render paragraphs, bullets, headings and bold
  (widget/rich-text.ts) from text nodes — "* The headline …" no longer
  shows its asterisks.
- Tests: widget-thoughts, widget-rich-text, widget-brand-mark (drift);
  watch/embed/host-avoid browser suites pass locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011L2dmcydDLYAiNQwK4XcF4

* feat(widget): one surface, not a stack of boxes and buttons

"No Frankenstein elements. Integrated experience. Not a bunch of big
unaligned buttons" (owner, 2026-10-09). The panel had grown one bordered
control at a time; this is a layout pass over all of it, with one rule:
at most one filled accent button per region, every other action is
quiet text aligned in its row.

- Header: who and where, and ✕. Review and Stop watching are gone from
  it — Review is the conversation's first suggestion, and watching is
  shown AND paused from the notes row (Pause / Resume), status and its
  control together. A visitor keeps one quiet "Watch".
- Notes and Your changes are hairline strips, not nested cards.
- Thread: Loki's words are prose on the panel; yours are a pill.
  Noticed/sent remarks carry a left rule instead of a box.
- Suggested changes: a hairline list, "Build this →" as accent text at
  each row's end (was five filled buttons down the right edge). "Fix
  this →" and "Why does it matter?" sit on one baseline.
- Composer: ONE card — About tabs (underlined when chosen), the words,
  screenshots, then tools left and Build it / Ask Loki right, compact.
- Starters and links share one pill style; buttons are compact; the
  ghost button has no frame.
- Tests follow the moved controls (watch-browser: Review via the
  starter, Pause/Resume via the notes row; theme test checks the new
  rules). watch/embed/host-avoid browser suites pass locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011L2dmcydDLYAiNQwK4XcF4

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-09 04:49:19 -07:00

20 lines
726 B
TypeScript

/**
* The widget's spiral is the logo's spiral: generated from
* src/config/brand-mark.ts, never redrawn. Fails when the brand mark changed
* and widget/brand-mark.generated.ts was not regenerated.
*
* Run: npx tsx scripts/test/widget-brand-mark.ts
*/
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { join } from "node:path";
import { generate } from "../generate-widget-brand-mark";
const committed = readFileSync(join(process.cwd(), "widget/brand-mark.generated.ts"), "utf8");
assert.equal(
committed,
generate(),
"widget/brand-mark.generated.ts is stale — npx tsx scripts/generate-widget-brand-mark.ts",
);
console.log("✓ widget brand mark matches the logo SSOT");