Skip to content

Present slides in five layouts and fit brand-colored diagrams to the stage - #54

Merged
a-Fig merged 1 commit into
mainfrom
slides-diagrams
Nov 13, 2026
Merged

a-Fig merged 1 commit into
mainfrom
slides-diagrams

Conversation

@DhruvaKanna07

@DhruvaKanna07 DhruvaKanna07 commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #46

Why

Slides and diagrams are what the room looks at most after research, and they read like a debug view. A slide could only be a title and bullets, so a number, a before/after or a quote all came out as a list. A wide flowchart shrank until its labels were about 14px in a Meet tile. A timeline used Mermaid's own palette. When Mermaid couldn't parse the model's source, the old screen stayed up with nothing said, and the model never learned it failed.

Change

  • show_slide gets five fixed layouts: bullets (up to 6), stat (one big number with a lime highlighter mark), two_columns (before/after, pros/cons), quote, section (title card for a new topic). Each has typed fields (layout, title, subtitle, bullets, big_text, columns), all clipped to lengths that read at 720p. A layout missing its field falls back to bullets. It's still text nodes only, never model HTML (How do we keep what Cue shows right, and safe for a room? #14).
  • Diagrams: the Mermaid theme reads the --cue-* tokens at runtime (no hex copies), including timeline/mindmap section colors. The SVG is sized to the box (up to 1.5×), and a flowchart flips LR↔TD when that reads at least 10% bigger. A source that won't parse gets one repair (quoting labels with punctuation, the most common model error). If that fails too, the labels show as a plain row of chips, and recentActions gets "diagram failed to draw (…)" so the next tick can fix it.
  • Grows in place: show_diagram with the same title as the diagram on screen re-renders without a view switch and flashes the new nodes in lime.
  • Modules: public/views/slide.js / diagram.js (+ CSS) on Show running notes and a comparison table #35's mount.js. app.js keeps two dispatch lines, and the slide/diagram blocks leave index.html and style.css (OK'd by eminent-stencil for cuddly-lobster).
  • agent.js: the two tool schemas, the show_slide/show_diagram prompt lines (agreed with elastic-granola), and "at most 6 bullets of about 8 words" in place of "5 short bullets". evals/replay.mjs keeps the whole slide input as screen state.

Rebased onto main after #35 (mount.js) and #53 merged: one commit, 65c99f2.

Screenshots

1280×720, ?test=1 with /api/think mocked in Playwright, identical inputs before and after where the schema allows.

Before After
"42% retention" as bullets stat
— two_columns
— quote
— section
Mermaid palette, title twice
A[Events (web, app)] fails to parse; the previous diagram stays repaired and drawn
— beyond repair: labels as chips
— same title, two more steps: grows in place, new nodes flash

Verified

  • npm run check passes locally.
  • Every screenshot above came from this branch in Chrome through Playwright, with no page errors in the console.
  • Not checked: a real Claude run choosing layouts. elastic-granola is rerunning the replay on this branch (Sonnet 5.5 medium); I'll add the score here. Also not checked: a real Recall call.
  • Known limit: an 8-node LR flowchart with a branch still renders at about 0.8× (~18px labels), because neither direction fits bigger.

Review

Touches agent.js (tool schemas and prompt lines), so it needs an Opus review: asked eminent-stencil, to cover 87ba24d, rebased unchanged as 65c99f2. The only conflict was the slide-length rule next to #38's new safety rules; both are kept.

🤖 Generated with Claude Code

DhruvaKanna07 added a commit that referenced this pull request Nov 13, 2026
@DhruvaKanna07
DhruvaKanna07 marked this pull request as ready for review November 13, 2026 21:43
…stage, for #46

A slide was always a title and bullets, so a single number, a before/after or a quote came out
as a bullet list. show_slide now takes a layout (bullets, stat, two_columns, quote, section),
each with typed fields that the page builds from text nodes, never model HTML (#14).

Diagrams used Mermaid's default sizing, so a wide flowchart shrank until its labels were
unreadable in a Meet tile, and a source that didn't parse left the old screen up with no sign.
diagram.js reads its theme from the --cue-* tokens, sizes the SVG to the box (flipping a
flowchart's direction when that reads bigger), quotes unquoted punctuated labels before giving
up, and otherwise shows the labels as plain chips and tells the next tick it failed. The same
title grows the diagram in place and flashes the new nodes, so a plan built up over a few
minutes stays one picture.

Both renderers move out of app.js into public/views/ on #35's mount.js, leaving dispatch lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@a-Fig
a-Fig merged commit d8052ae into main Nov 13, 2026
1 check passed
@a-Fig
a-Fig deleted the slides-diagrams branch November 13, 2026 21:50
@DhruvaKanna07

Copy link
Copy Markdown
Collaborator Author

#10 replay against this PR's prompt (fbd1c5b)

elastic-granola (#10), claude-sonnet-5-5 at medium effort.

First run, with this branch's own evals/replay.mjs: −10 / 38. Ignore this score. That copy of the replay never sends screen.notes, so the model can't see the notes and re-adds the same items on almost every tick ("Leo: check error logs" six times). The real page sends the notes on every request (#35), so this is a flaw in the test, not the prompt.

Second run, with the notes-aware replay from #58 (REPLAY_AGENT=…/cue-slides/agent.js): 46 / 55 (helpful 27, right-quiet 25, annoying 3, missed 0). The three annoying ticks are all add_notes:

  • Empty add_notes on "Anyway, back to the budget". The page ignores it since Show running notes and a comparison table #35's fix (8edf172), so it's harmless on main. The replay doesn't model that check yet.
  • "Vote on onboarding ideas async" recorded as a decision. A fair call.
  • "What was decided about the pricing tiers last week?" as an open question. That's a memory lapse, not an open question, so it's weak.

The slide and diagram changes didn't cost anything. plan-forming and slide-churn both scored full marks. Action items went to notes, the brainstorm got a slide, and the flow got a diagram. The run started just before #58's rebase, so a couple of answer-key changes may not have applied.

My read: no prompt regression from #46.

DhruvaKanna07 added a commit that referenced this pull request Nov 13, 2026
After #54 added a "stat" slide layout, the replay showed this prompt putting
researched numbers (Japan's population, Stripe's fee) on a stat slide, which
drops the source the vision says research must show. Looked-up facts now go
on show_research; a stat slide is for a number said in the meeting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Make slides and diagrams look presented, not raw

2 participants