Skip to content

bluesky-firehose: fix dead endpoint, upgrade to Jetstream v2, mobile-friendly UI - #308

Merged
simonw merged 4 commits into
mainfrom
claude/bluesky-firehose-debug-0457g3
Aug 14, 2026
Merged

bluesky-firehose: fix dead endpoint, upgrade to Jetstream v2, mobile-friendly UI#308
simonw merged 4 commits into
mainfrom
claude/bluesky-firehose-debug-0457g3

Conversation

@simonw

@simonw simonw commented Aug 14, 2026

Copy link
Copy Markdown
Owner

https://tools.simonwillison.net/bluesky-firehose doesn’t work, figure out why not. Did they change the API it uses?

https://atproto.com/blog/introducing-bluesky-protocol-services says there’s a new version

Stop the v1 fallbacks then - and update the UI to link to docs for v2 - also make the UI a bit more responsive on mobile

Make it a tiny bit prettier

Fable 5 PR

Why the tool was broken

The page was hardcoded to wss://jetstream2.us-east.bsky.network, which currently accepts WebSocket connections but never sends any events — the handshake completes (101 Switching Protocols) and then the stream sits silent forever. Protocol-level testing showed the other public Jetstream instances streaming data within seconds while this one delivered 0 bytes. The Jetstream API itself had not changed.

Changes

  • Endpoint fallback logic: connect() now walks a list of Jetstream instances, moving to the next one when a connection errors, closes before any data arrives, or opens but delivers no message within 5 seconds (the exact silent-failure mode that broke the tool). The log shows which instance is in use. Also fixed the Connect button passing its click event into connect().
  • Jetstream v2: Bluesky's Protocol Services launch introduced consolidated v2 endpoints at jetstream.us-east.bsky.network and jetstream.us-west.bsky.network. Verified they are drop-in compatible: same /subscribe query parameters, same unauthenticated access, same event JSON, and options_update subscriber messages still work (tested by switching a live v2 connection from posts to likes). The endpoint list now contains only the two v2 instances; legacy v1 instances were dropped.
  • Docs links: The page now links to the Jetstream v2 docs and the Protocol Services announcement.
  • Mobile-friendly layout: wrapping flexbox controls with full-width buttons on small screens, box-sizing: border-box on textareas so they don't overflow the viewport, 16px textarea font to prevent iOS Safari zoom-on-focus, horizontal scrolling for the example code block, and tighter spacing plus a 50vh log output under 600px.

Testing

  • Raw WebSocket tests through a proxy confirmed v2 endpoints stream immediately and options_update filtering works.
  • Headless Chromium checks at 390px and 1024px widths: no horizontal page overflow, controls and log render correctly; fallback logic observed advancing cleanly through instances with sensible log output.

🤖 Generated with Claude Code

https://claude.ai/code/session_014acKDTPNLLk3iknch2Dsp5

https://claude.ai/code/session_014acKDTPNLLk3iknch2Dsp5

claude added 3 commits August 14, 2026 01:44
The tool was hardcoded to jetstream2.us-east.bsky.network, which
currently accepts WebSocket connections but never sends any events,
so the page connected and then sat silent. The Jetstream API itself
is unchanged - the other three public instances stream fine.

Connect now tries each public Jetstream instance in turn, moving on
when a connection errors, closes without data, or goes 5 seconds
after opening without a first message.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014acKDTPNLLk3iknch2Dsp5
Bluesky's new Protocol Services launch introduced Jetstream v2 at
jetstream.us-east.bsky.network and jetstream.us-west.bsky.network.
The live /subscribe stream is unchanged: same query parameters, same
unauthenticated access, same event JSON, and options_update messages
still work (verified by switching a live v2 connection from posts to
likes). Put the v2 hosts first in the fallback list and keep the
legacy v1 instances as backup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014acKDTPNLLk3iknch2Dsp5
Drop the legacy v1 Jetstream instances from the fallback list now
that the two v2 endpoints are confirmed working. Link to the
Jetstream v2 docs and the Protocol Services announcement from the
page. Make the layout work better on small screens: wrapping
flexbox controls with full-width buttons, border-box textareas,
16px textarea font to avoid iOS focus zoom, horizontal scrolling
for the example code block, and tighter spacing under 600px.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014acKDTPNLLk3iknch2Dsp5
@claude

claude Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploying tools with  Cloudflare Pages  Cloudflare Pages

Latest commit: 335a045
Status: ✅  Deploy successful!
Preview URL: https://35d5766f.tools-b1q.pages.dev
Branch Preview URL: https://claude-bluesky-firehose-debu.tools-b1q.pages.dev

View logs

Bluesky-blue accents on the heading, links, and primary buttons,
softer bordered panels with rounded corners for the textareas and
example code block, hover and focus states, and a subtle off-white
page background.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014acKDTPNLLk3iknch2Dsp5
@claude

claude Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

@simonw
simonw merged commit a55581c into main Aug 14, 2026
1 of 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.

2 participants