Skip to content

feat(institute): serve the Ratstack Institute from the Effect UI Website - #378

Merged
shitratgit[bot] merged 10 commits into
mainfrom
desk/institute-effect-ui
Nov 28, 2026
Merged

shitratgit[bot] merged 10 commits into
mainfrom
desk/institute-effect-ui

Conversation

@shitratgit

@shitratgit shitratgit Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Serves the Ratstack Institute course from the Effect UI Website, behind two switches that both default to off.

What ships

  • Content: apps/web/src/institute/content decodes a digest-pinned Institute build (INSTITUTE_CONTENT_ARTIFACT) and stages only the six Ratstack chapters as hashed Website static assets: 71 files, 14.0 MB, with WebM narration plus an AAC fallback per section. No lesson bytes reach Worker JavaScript, and the fork runtime isn't staged. Kit Langton's two Effect chapters are credited links to Effect Institute.
  • Player: apps/web/src/institute/player ports the timed code-and-narration player to Effect UI, with an XState lifecycle. Against the original player on an aligned 24 s sample, narration drifted at most 17 ms from the on-screen words, and code steps at most 14 ms.
  • Controls: play, pause, seek, speed, replay, mute, focus-scoped shortcuts, section completion and resume. Three cues use native Web Audio, with no new dependency.
  • Routes: course home, chapter deep links (?section=) and credits. Chapter pages load the player after hydration; the home page loads no player code. The player picks WebM when canPlayType supports it, otherwise AAC. It follows the next-section link when narration ends.
  • Serving: hashed .webm and .m4a are served with byte ranges. If ASSETS answers a Range request with 200, the Website returns a single 206 range. The old Institute service binding still wins where it exists.

Switches

INSTITUTE_ENABLED INSTITUTE_PUBLIC Result
false (default) any /institute returns the normal not-found page, as it does today
true false (default) Served with noindex. Not in the sitemap, robots or site nav
true true Discoverable

This PR changes no deployed behaviour until INSTITUTE_ENABLED is set.

Checks

  • pnpm turbo run check test build --summarize: 106/106 tasks on the integrated tip, with commit hooks passing on every commit.
  • Website build at the pinned artifact (ad383c8, digest cdba4794…42ad): exactly six chapters staged, matching a per-file size receipt.
  • Chromium on the built Website, at 1600x900 and 390x844:
    • a real WebM section and a real AAC section (WebM forced off) each play to their natural end and advance;
    • the controls, persisted resume and focused hotkeys work;
    • no overflow and no console errors;
    • unlisted mode sends noindex and leaves discovery unchanged.
  • First-load JS gzip: 107,964 bytes for the home, 162,071 for a chapter.
  • Property and model tests cover the player lifecycle, controller interactions, content decoding and range responses. Each has a planted mutation that fails.

Not claimed here: real Cloudflare Range behaviour and native iPhone Safari. Both are checked on the unlisted deploy.

Credits

Built from Kit Langton's Effect Institute (MIT). The notice is kept on the course credits page. Narration voice: "Tom - Conversations & Books" from the ElevenLabs Voice Library.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 71eab810-9b60-4f93-8b95-a7d2f35f648b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@shitratgit
shitratgit Bot merged commit a7d7208 into main Nov 28, 2026
4 checks passed
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.

0 participants