Skip to content

New demo site, docs page, OG image; switch to oxlint/oxfmt - #30

Merged
switz merged 8 commits into
masterfrom
demo-site-and-docs
Oct 22, 2026
Merged

switz merged 8 commits into
masterfrom
demo-site-and-docs

Conversation

@switz

@switz switz commented Oct 22, 2026

Copy link
Copy Markdown
Member

Summary

Demo site (demo/)

  • Replaces the Vite demo with a static timber app: a plain <audio> vs gapless.js comparison, a full concert player, a quick start, and a new /docs page
  • Code blocks are highlighted at build time with sugar-high; no highlighting JS ships to the client
  • Shared site header, new icon, and an OG image (takumi) inherited by every page, with metadataBase so og:image is absolute
  • Bumps @timber-js/app to 0.2.0-alpha.220, which keeps the dev client out of static mode, so timber.config.ts no longer switches between server and static output

Repo

  • README: new icon, and the box-of-rain graph regenerated to show HTML5 → Web Audio on the first track and Web Audio after (lib/graph.sh)
  • Swaps ESLint for oxlint + oxfmt; CI now runs pnpm lint and pnpm fmt:check
  • Library and test updates in src/ and tests/

The docs page is AI generated and says so in a callout at the top.

Testing

  • pnpm lint, pnpm fmt:check, pnpm test (349 passing), pnpm build
  • Demo: tsc --noEmit and timber build; timber dev serves /, /docs, the OG image and RSC payloads

🤖 Generated with Claude Code

switz and others added 3 commits October 22, 2026 16:50
- Replace the Vite demo with a static timber app: plain <audio> vs
  gapless.js comparison, full concert player, quick start and a /docs page
  with server-rendered syntax highlighting (sugar-high)
- Shared site header, new icon, README icon and regenerated graph
  (HTML5 -> Web Audio on track one, Web Audio after)
- Swap ESLint for oxlint + oxfmt and run lint/format checks in CI
- Library and test updates

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- opengraph-image.tsx at the app root (takumi), inherited by every page;
  metadataBase makes og:image absolute, plus a large Twitter card
- alpha.220 keeps the dev client off static mode, so drop the
  server/static switch in timber.config.ts

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T21:08:33.702285Z 84aaad5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Deploying gapless with  Cloudflare Pages  Cloudflare Pages

Latest commit: 84aaad5
Status: ✅  Deploy successful!
Preview URL: https://eee0ed64.gapless-e1l.pages.dev
Branch Preview URL: https://demo-site-and-docs.gapless-e1l.pages.dev

View logs

switz and others added 2 commits October 22, 2026 16:57
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22ac29b19c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread demo/app/_components/native-demo.tsx Outdated
Comment on lines +82 to +83
const ctx = new AudioContext();
this.ctx = ctx;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Defer the native AudioContext creation until interaction

When the demo is opened in a browser that enforces autoplay restrictions, connect() runs from a mount effect and constructs this AudioContext before any user gesture. Chrome consequently suspends it and emits the same automatic-start warning the library is designed to avoid; this also needlessly consumes a context for visitors who never use the comparison player. Create it lazily from toggle()/seek() on the first interaction, then install the worklet and connect the elements.

Useful? React with 👍 / 👎.

Addresses Codex review: the context was created on mount, before any
user gesture, which tripped Chrome's autoplay warning.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e487ca9d99

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread demo/app/page.tsx
<p className="font-semibold text-zinc-600 dark:text-zinc-100 flex gap-2">
A complete gapless.js concert
</p>
<FullShow />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Rebind media controls when the active player changes

In browsers with Media Session controls, mounting both <GaplessDemo /> and <FullShow /> creates two Queue instances, while each constructor overwrites the same global handlers in setupMediaSession() (src/Queue.ts:233-241). Whichever queue mounts last therefore receives every pause, seek, and track action even when the other demo is playing; for example, pausing the sample from a lock screen operates on the idle full-show queue and leaves the sample playing. Route these handlers through the player selected by claimPlayback, or re-register them whenever ownership changes.

Useful? React with 👍 / 👎.

Media Session action handlers are page-global, and each Queue registered
them only in its constructor, so with several queues on one page the
last one constructed received every lock-screen and media-key action.
Re-register the handlers and metadata whenever a queue starts playing.

Addresses Codex review on #30.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84aaad5e54

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (!q) return;
this.lastProgress.clear();
claimPlayback(this.id);
q.resumeAudioContext().then(() => fn(q));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Revalidate playback ownership after AudioContext resume

When the shared AudioContext is suspended, playback starts asynchronously after ownership is claimed. If the user starts this player and then starts the native or other gapless player before resumeAudioContext() settles, the second player takes ownership and begins playing, but this stale callback subsequently invokes fn(q) without checking ownership and starts the first player too. Cancel superseded callbacks or reclaim ownership immediately before starting playback so rapid player switches cannot leave multiple demos playing.

Useful? React with 👍 / 👎.

@switz
switz merged commit e253d9c into master Oct 22, 2026
2 checks passed
@switz
switz deleted the demo-site-and-docs branch October 22, 2026 21:10
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