Skip to content

Separate cracktro’s reusable runtime from presentation code - #78566

Merged
pelikhan merged 2 commits into
mainfrom
copilot/refactor-cracktro-deckjs-runtime
Nov 17, 2026
Merged

pelikhan merged 2 commits into
mainfrom
copilot/refactor-cracktro-deckjs-runtime

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

The cracktro player was coupled to talk-specific slides and animations. This refactor introduces a reusable runtime without changing the presentation.

  • Runtime: Extract stage, navigation, band headers, search, slide map, and background into runtime.js, exposed through CracktroDeck.create(config).
  • Presentation: Keep slides, animations, styles, themes, prompts, and synth in deck.js; pass them explicitly to the runtime.
  • Portability: Preserve standalone classic-script loading; provide defaults for omitted themes, labels, and sound.
  • Coverage and guidance: Add independent-deck regression coverage and document the runtime boundary.
CracktroDeck.create({
  slides: mySlides,
  themes: myThemes,
  bands: myBands,
});

@pelikhan pelikhan changed the title Extract portable cracktro runtime from slide definitions and animations Separate cracktro’s reusable runtime from presentation code Nov 17, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 17, 2026 03:02
Copilot AI adaptive review requested due to automatic review settings November 17, 2026 03:02
@github-actions

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by Ponytail Reviewer for #78566 · codex · routed: gpt61 medium · ~8 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~10 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@pelikhan

Copy link
Copy Markdown
Collaborator Author

@copilot extract a runtime.d.ts file which is checked by typescript so that future agents are more efficient

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the current diff, focusing on changed lines. I found no actionable correctness, regression, performance, or maintainability issues that warrant an inline comment. Static review only; tests were not run per review instructions. The specialist pass was unavailable because its background agent could not be resolved, so this conclusion is based on the independent review.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~10 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-6c136966-18f5-4827-ba65-501d3e6fd104","parents":[],"payload":{"id":"ldg-588d8b6e-090e-4ea2-bba7-0a709db4eab7","operation":"append","value":{"finding_count":0,"head_sha":"b2d15ea36c3bac06f0a25de9e183535d02ddc9d5","outcome":"no_findings"}},"sha":"sha256:d261ae58732388c6a0941fb1fd44a6b3b6bcad3985588a8941aa66c699e79c29","timestamp":"2026-11-17T03:15:17.059Z","type":"ledger_append","version":1}
History

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Group-keyed configuration mistakes inherited properties for configured values, causing valid IDs such as constructor to crash decks that omit bands.

4 open issues
What changed in this PR

Separates the cracktro player into a reusable runtime and talk-specific presentation code, preserving standalone classic-script loading.

Changes:

  • Introduces CracktroDeck.create(config) for stage setup, navigation, band headers, search, slide map, and animated backgrounds.
  • Keeps presentation content, styles, themes, prompts, and synth in deck.js, with defaults for omitted runtime configuration.
  • Adds independent-deck regression coverage and documents the runtime boundary.
File Description
docs/​tests/​talk.spec.ts Adds runtime-only deck coverage and checks both script assets.
docs/​README.md Explains runtime reuse and standalone loading.
docs/​public/​cracktro/​runtime.js Implements the reusable deck runtime and configuration defaults.
docs/​public/​cracktro/​index.html Loads the runtime before the presentation.
docs/​public/​cracktro/​deck.js Delegates playback to the runtime while retaining presentation code.
.github/​skills/​cracktro/​SKILL.md Updates file ownership, API guidance, and validation instructions.
.github/​skills/​cracktro/​mechanics.md Documents the split between presentation and runtime mechanics.

Review effort: Max (adaptive)

Comment on lines +249 to +255
const { width: W = 1920, height: H = 1080, css = "", bands: BANDS = {}, solo: SOLO = {}, prototypes: PROTO = {}, last = null } = config;
const sfx = config.sound || SILENT;
const services = { h, letters, resetIndex, sound: sfx, current: () => slides[cur] };
const slides = typeof config.slides === "function" ? config.slides(services) : [...(config.slides || [])];
if (!slides.length) throw new Error("CracktroDeck.create: no slides");
const THEME = {};
for (const s of slides) THEME[s.group] ??= { ...DEFAULT_THEME, ...config.themes?.[s.group] };
| `---------- animated background ----------` | Canvas background and grid driven by the current band's `THEME`. |

The stage is a fixed 1920x1080 frame (`W`/`H`), scaled to fit the window.
| `---------- styles ----------` | Deck CSS string. Slide classes use prefixes (`atk-`, `mra-`, `eph-`, `bh-` band headers, ...); check a new prefix is unused. |
- **Band themes:** `THEME` (the `// ---------- band themes ----------` block, before bands) is the single source of each band's look and sound; slides never set `sound`, `palette` or `red`. An entry is `{ base, pal, grid: [r,g,b,minorA,majorA], ang, cell, accent, red?, light?, music, prog }`: background fill, four glow colours, grid colour and alphas, grid angle, minor cell size (major lines every 5 cells), header colours, the red security wash (`go()` covers entry with it), the `MUSIC` key played on entering every slide of the band, and per-step semitone shifts (`prog[step % length]`) so the band's music varies along it. Current bands: intro and platform share GitHub brand green 15°, security dark red wash 45°, mindset and trust are soft grey (#c8d1da) concept slides with no grid (`light: true` sets `body.light`, which darkens slide text and the nav chrome; `go()` stages any light/dark switch: the old slide fades out, the background swaps, then the new slide enters), process blueprint blue 0°, cost gold -45°, engineering purple 30°, enterprise metallic grey -30° (wide cells), cao (Central Agentic Ops, research prototype) deep teal 60°, data violet 0° (fine cells), finale neutral. Other bands use a distinct hue and orientation; the background, grid angle and cell size ease between bands. Keep body text #e6edf3 ≥ 7:1 and muted #8b949e ≥ 4:1 against the brightest glow overlap.
- **Transitions:** derived from `group`. Siblings in a band use a reveal-style horizontal push (`slide-in`/`slide-out`); `show()` sets `--dx` to `100%` going forward, `-100%` going back, and `0%` on first load. Crossing into another band slides up (`up-in`/`up-out`) going forward and down (`down-in`/`down-out`) going back. All use the same 0.8 s curve. Every slide needs a `group`; never add per-slide transition overrides. The old slide keeps the `.leaving` class until a timeout clears it.
- **Audio isolation:** `master` is a persistent gain that feeds the compressor and delay. `out` is a per-slide bus. `show()` calls `sfx.cut()`, which fades the current bus and replaces it, so long themes cannot leak into the next slide. Any new sound must connect to `out`, or to `master` if it must persist across slides (as techno does).
- **Audio isolation:** `sfx` methods: `slide, band, step, cut, techno, pop, key, compile, review, notify, omen, route, mr, toggle, unlock`. `master` is a persistent gain that feeds the compressor and delay. `out` is a per-slide bus. `show()` calls `sfx.cut()`, which fades the current bus and replaces it, so long themes cannot leak into the next slide. Any new sound must connect to `out`, or to `master` if it must persist across slides (as techno does).
.wash.on { opacity: 1; }
.wash::after { content: ""; position: absolute; inset: 0;
background: radial-gradient(ellipse 55% 60% at 50% 58%, transparent 30%, #1c0204b0 70%, #050000f0 100%); }
.wash.on::after { animation: omen 7s ease-in-out infinite; }

Copilot AI commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@copilot extract a runtime.d.ts file which is checked by typescript so that future agents are more efficient

Added the checked runtime declaration and consumer contract coverage in 324815c. The docs build runs the TypeScript check; Playwright could not run because the npm registry was unavailable.

@github-actions

Copy link
Copy Markdown
Contributor

Visual regression check: docs preview

Captured the built docs at `(localhost/redacted) inside the sandbox.

Page Viewport Capture Comparison
Home Mobile 375×812 captured unavailable
Home Tablet 768×1024 captured unavailable
Home Desktop 1440×900 captured unavailable

Comparison: no baseline is provisioned for this workflow, so no visual diff was performed. Status is unavailable, not unchanged.

Accessibility (partial)

  • Accessibility snapshots were captured for the home page.
  • The snapshot has an h1 and h2/h3 section headings, and named images in the How it works and Read. Propose. Check. Apply. sections.
  • Automated analysis of the snapshot was blocked by a tool permission. Unnamed links and buttons, contrast, and focus order were not checked.
  • No accessibility issues are confirmed. This is not a compliance claim.

Cleanup

Browser closed. Preview server stopped.

Generated by 👁️ Visual Regression Checker for #78566 · copilot · routed: haiku55 xhigh · ~3 AIC · ⌖ ~1 AIC · ⊞ 3.3K · ◷

@pelikhan
pelikhan merged commit 5d75b11 into main Nov 17, 2026
15 of 16 checks passed
@pelikhan
pelikhan deleted the copilot/refactor-cracktro-deckjs-runtime branch November 17, 2026 03:50
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.1

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