Skip to content

t27f_view: presentation slides by default (T27fDeck) - #4

Merged
gHashTag merged 3 commits into
t27f-viewfrom
t27f-deck
Oct 17, 2026
Merged

gHashTag merged 3 commits into
t27f-viewfrom
t27f-deck

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Summary

t27f_view now draws every T27F demo reel still as a presentation slide by default, from specs/t27f/deck.t27 in gHashTag/t27. Before this, the tool drew only the plain map from specs/t27f/reel.t27.

This PR is stacked on #3 and its base is t27f-view.

Spec PRs it depends on:

What the tool draws

  • Defaults: look = DEFAULT_LOOK (LOOK_DECK) and preset = DEFAULT_PRESET (wide 16:9). look: 0 (LOOK_MAP) keeps the previous plain map.

  • Layout by scene kind (layout_for):

    • COVER for title;
    • STAGE for overview and lens;
    • SPLIT for focus, evidence and call.

    On a SPLIT slide the glass card is on the left and the map on the right; on square and tall presets the map stacks above the card.

  • Values from the spec: regions (region_px), map placement (slide_x, slide_y, slide_r), type sizes, leading, palette, aurora, glass constants and STYLE_COLOUR.

  • Status styles: GAP and UNKNOWN cells are dashed (style_dashed).

  • The hero is the map. It is clipped to REGION_HERO, and no generated image is drawn.

  • Card opacity: a scene still shows the card at STILL_CARD_ALPHA. An exact frame shows it at card_alpha, the way the video would.

  • New inputs: title, subtitle and rows. If they do not fit (text_fits), the tool returns an error asking for a second slide; it never shrinks the text.

  • Wasm: one module, wasm/t27f.wasm, exports the scalar functions of both reel and deck. wasm/BUILD lists the commands and sha256s.

Choices made in glue (not in the spec)

deck.t27 fixes these colours, opacities and sizes, but not the shapes below, so the glue picks them:

  • the 0.78 text baseline factor;
  • the aurora ellipse geometry and blur;
  • the dash pattern;
  • the dashed fill opacity, 0.18.

Hand glue (gate #7371): 64 of 80

File Lines added
deck-view.mjs (new) 40
server.mjs 17
wasm/export.zig 7

Everything else is generated (wasm/deck.zig, wasm/deck.mjs, wasm/t27f.wasm), prose (README.md, wasm/BUILD) or output (docs/t27f_view/). wasm/reel.wasm is deleted; t27f.wasm replaces it.

Evidence

  • Spec tests (Railway lab, t27c 0.5.2 at 57474a4f1, zig 0.16.0):
    • deck.t27 at #9992: 15/15 tests pass, 0 vacuous.
    • reel.t27 at #9984: 20/20 tests pass, 0 vacuous.
  • Wasm build: t27f.wasm is 6234 bytes with 75 exports. #9992 adds only a constant, so the wasm is byte-identical before and after it.
  • Renders: five stills were drawn through the MCP stdio server and viewed in the Claude Code Browser pane, served on 127.0.0.1. The SVGs and pane screenshots are in docs/t27f_view/:
    • deck-focus-wide, deck-focus-square and deck-focus-tall: split slides; the card is visible at opacity 1.
    • deck-overview-wide: stage slide.
    • deck-evidence-wide: split slide with statuses and two rows. Only the gap cell is dashed.
  • gitleaks: no leaks found.

Not shown: a COVER slide. The demo reel has no title scene (DEMO_KIND is overview, lens, focus, evidence, call), so no demo still uses COVER.

🤖 Generated with Claude Code

gHashTag and others added 2 commits October 17, 2026 22:22
The default look is now a deck slide from specs/t27f/deck.t27: a cover,
stage or split layout by scene kind, regions, type sizes, palette and
card opacity all from the spec, with the map placed by slide_x/slide_y.
look 0 keeps the plain map. wasm/t27f.wasm now carries reel and deck
bodies; export.zig handles two modules and five parameters.

WIP: split stills wait on a deck.t27 answer for card_alpha at the still
frame (it is 0 there).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
deck.t27 (gHashTag/t27 PR #9992) adds STILL_CARD_ALPHA: a still is the last
frame of its scene, where card_alpha is 0, so a still drawn with card_alpha
showed no card. A scene still now uses STILL_CARD_ALPHA; an exact frame keeps
card_alpha. deck.zig and deck.mjs regenerated on the Railway lab (15/15 deck
tests, 0 vacuous); t27f.wasm is byte-identical (the change is a constant).
Adds deck renders and pane screenshots under docs/t27f_view/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tri-claw

tri-claw Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Summary by t27-bees

This PR switches t27f_view to render presentation slides from deck.t27 by default (LOOK_DECK), with look: 0 retaining the old plain map from reel.t27. The combined wasm/t27f.wasm replaces reel.wasm and exports both spec bodies; deck-view.mjs is the new glue that turns spec outputs into slide SVG.

Worth a look

  • deck-view.mjs:22 — The wrap function uses a comma-operator trick in reduce ((cond ? a[a.length-1]+=w : a.push(w), a)). It works but is fragile; a misplaced paren would silently return the wrong accumulator.
  • deck-view.mjs:23 — Baseline offset Math.round(lead * 0.78) is a hardcoded glue constant (not from the spec). If leading values change in deck.t27, text vertical alignment may drift.
  • deck-view.mjs:33 — Aurora ellipse geometry (positions 0.1+0.27*i, 0.25+0.5*(i%2), radii 0.32/0.16, rotation -14°) is entirely hardcoded in glue. Spec changes to aurora layout would require manual edits here.
  • deck-view.mjs:38 — Dashed fill opacity 0.18 is another hardcoded glue constant. The spec only fixes colors; this opacity is a local choice.
  • server.mjs:667 — Output filename now includes -deck or -map suffix (t27f-demo-f${f}-p${preset}-${look}.svg). Any downstream script or cache keyed on the old pattern (t27f-demo-f${f}-p${preset}.svg) will break.

Read: 22 files, +902 -39, the whole diff up to 60000 characters (the rest was not read). Head cafc626. Model: openai-compatible/nvidia/nemotron-3-ultra-550b-a55b. Commands: @t27-bees review | summary | help | pause | resume. Free for every repository.

Regenerated wasm/deck.zig, deck.mjs and t27f.wasm from deck.t27 at
gHashTag/t27#10036: BACKDROP 0x000000, both aurora strengths 0. Only
those three constants differ in deck.mjs; reel.* byte-identical. Built
on the Railway lab (t27c 0.5.2, zig 0.16.0), sha256 in wasm/BUILD.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag

Copy link
Copy Markdown
Owner Author

Merged on the owner's explicit instruction of 2026-10-18 (translated): "merge it yourself, autonomously -- I allow everything".

For the record: this stack adds hand-written non-t27 code, all of it drawing glue -- deck-view.mjs (40 lines), server.mjs (+47 lines) and wasm/export.zig (40 lines). Every number and every function body it draws comes from specs/t27f/reel.t27 and specs/t27f/deck.t27 in gHashTag/t27, through files t27c generates (wasm/*.zig, wasm/*.mjs, t27f.wasm). This is above the 40-per-file / 80-per-diff budget of the t27 own-language gate, which this repo does not run, so the merge rests on the owner's word rather than on the gate.

@gHashTag
gHashTag merged commit 9e8105e into t27f-view Oct 17, 2026
1 check passed
@gHashTag
gHashTag deleted the t27f-deck branch October 17, 2026 18:22
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.

1 participant