Skip to content

add Cloudflare relay shorthand - #122

Merged
kixelated merged 1 commit into
mainfrom
agent/cloudflare-query
Aug 16, 2026
Merged

add Cloudflare relay shorthand#122
kixelated merged 1 commit into
mainfrom
agent/cloudflare-query

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Summary

  • add ?cloudflare=<subdomain> to the shared moq.pub and moq.watch relay parser
  • map ?cloudflare=draft-16 to https://draft-16.cloudflare.mediaoverquic.com
  • keep the Cloudflare relay token in the canonical first path segment
  • reject malformed Cloudflare labels and conflicting cloudflare plus relay selectors
  • document the shorthand and cover it with regression tests

Why

The moq.pro Cloudflare sync instructions need readable hosted-app examples without embedding the full Cloudflare relay URL.

For example:

https://moq.watch/<read-token>/room/camera.hang?cloudflare=draft-16

Validation

  • just test (5 tests)
  • just check
  • just build (moq.dev, moq.pub, and moq.watch)
  • git diff --check origin/main...HEAD

Rollout

Merge and deploy this before the dependent moq.pro dashboard PR so its generated links work when users click them.

@kixelated
kixelated marked this pull request as ready for review August 16, 2026 19:24
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b0a46c6-06e5-4147-87fa-ade80c6abadd

📥 Commits

Reviewing files that changed from the base of the PR and between 5c3a81c and 7bbf793.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • CLAUDE.md
  • README.md
  • package.json
  • sites/lib/broadcast.test.ts
  • sites/lib/broadcast.ts
  • sites/pub/src/main.ts
  • sites/watch/src/main.ts

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


Walkthrough

The relay resolver now supports cloudflare=<label> shorthand and constructs the corresponding Cloudflare relay URL. It rejects invalid labels and simultaneous relay and cloudflare parameters. Publisher and watcher setup display an error and stop when relay resolution fails. Documentation describes the new parameter and usage. Tests cover default, Cloudflare, invalid, conflicting, explicit relay, and JWT cases. @types/bun was added to development dependencies.

Merge Risk: ⚪ Minimal · up to 7bbf7

The PR adds a localized Cloudflare relay shorthand with validation, documentation, and regression coverage; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding Cloudflare relay shorthand support.
Description check ✅ Passed The description directly explains the Cloudflare shorthand, validation behavior, documentation, tests, and rollout plan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch agent/cloudflare-query

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

Comment @coderabbitai help to get the list of available commands.

@kixelated
kixelated merged commit 0271692 into main Aug 16, 2026
1 check passed
@kixelated
kixelated deleted the agent/cloudflare-query branch August 16, 2026 19:54
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