Skip to content

Add edge redirects for meeting links#23

Merged
willwashburn merged 2 commits into
mainfrom
codex/meeting-redirects
Jul 15, 2026
Merged

Add edge redirects for meeting links#23
willwashburn merged 2 commits into
mainfrom
codex/meeting-redirects

Conversation

@willwashburn

@willwashburn willwashburn commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

  • add Cloudflare Worker redirects for /meet-with-will, /meet-with-khaliq, and /virtual-office
  • support optional trailing slashes while keeping the redirects scoped to agentrelay.com
  • document the vanity routes and add regression coverage

Why

These short, memorable Agent Relay URLs should resolve at the edge without involving the Next.js application. The redirects use temporary 302 responses so their external meeting destinations can be changed without persistent browser caching.

Validation

  • npm test in router — 68 tests passed
  • npm run typecheck in router
  • git diff --check

Summary by cubic

Add edge redirects for /meet-with-will, /meet-with-khaliq, and /virtual-office in the router Cloudflare Worker. Uses 302s and bypasses the Cloud app so these links resolve fast and remain easy to change.

  • New Features
    • Scoped to agentrelay.com, accepts trailing slashes, is case-insensitive, and ignores nested paths.
    • Preserves query params on redirect; added regression tests and updated router/README.md.

Written for commit e88fb75. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@willwashburn, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 280e99e1-f0e9-479d-8974-717e6f6ec417

📥 Commits

Reviewing files that changed from the base of the PR and between 6f1d77d and e88fb75.

📒 Files selected for processing (3)
  • router/README.md
  • router/index.ts
  • router/test/vanity-redirects.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/meeting-redirects

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.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces vanity redirects at the edge for specific meeting paths (/meet-with-will, /meet-with-khaliq, and /virtual-office) to their respective external destinations, along with corresponding unit tests and documentation. The review feedback suggests enhancing this feature by making the path lookup case-insensitive to handle manual typing variations, preserving incoming query parameters (such as UTM tracking codes) during the redirect, and updating the test suite to cover these case-insensitivity and query parameter preservation behaviors.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread router/index.ts Outdated
Comment thread router/index.ts
Comment on lines +19 to +33
it.each(redirects)("redirects %s at the edge", async (path, destination) => {
const cloudWebWorker = { fetch: vi.fn() };
const response = await worker.fetch(
new Request(`https://agentrelay.com${path}?utm_source=test`),
{
CLOUD_APP_ORIGIN: "https://origin.test.invalid",
CLOUD_WEB_WORKER: cloudWebWorker,
},
buildCtx(),
);

expect(response.status).toBe(302);
expect(response.headers.get("location")).toBe(destination);
expect(cloudWebWorker.fetch).not.toHaveBeenCalled();
});

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.

medium

Update the test to assert that query parameters (such as utm_source) are preserved during the redirect, matching the updated redirect behavior.

  it.each(redirects)("redirects %s at the edge", async (path, destination) => {
    const cloudWebWorker = { fetch: vi.fn() };
    const response = await worker.fetch(
      new Request("https://agentrelay.com" + path + "?utm_source=test"),
      {
        CLOUD_APP_ORIGIN: "https://origin.test.invalid",
        CLOUD_WEB_WORKER: cloudWebWorker,
      },
      buildCtx(),
    );

    expect(response.status).toBe(302);
    const expectedUrl = new URL(destination);
    expectedUrl.searchParams.set("utm_source", "test");
    expect(response.headers.get("location")).toBe(expectedUrl.toString());
    expect(cloudWebWorker.fetch).not.toHaveBeenCalled();
  });

Comment on lines +35 to +37
it.each(redirects)("accepts a trailing slash for %s", (path, destination) => {
expect(getVanityRedirect("agentrelay.com", `${path}/`)).toBe(destination);
});

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.

medium

Add test coverage for case-insensitivity to ensure that mixed-case or uppercase vanity URLs are correctly matched and redirected.

Suggested change
it.each(redirects)("accepts a trailing slash for %s", (path, destination) => {
expect(getVanityRedirect("agentrelay.com", `${path}/`)).toBe(destination);
});
it.each(redirects)("accepts a trailing slash and mixed case for %s", (path, destination) => {
expect(getVanityRedirect("agentrelay.com", path + "/")).toBe(destination);
expect(getVanityRedirect("agentrelay.com", path.toUpperCase())).toBe(destination);
});

@willwashburn
willwashburn marked this pull request as ready for review July 15, 2026 10:43
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Preview deployed!

Environment URL
Web https://a62794a8-agentrelay-web.agent-workforce.workers.dev

This is a Cloudflare Workers preview version of this PR's build.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="router/index.ts">

<violation number="1" location="router/index.ts:92">
P2: `.toLowerCase()` was added to enable case-insensitive vanity-route matching, but there doesn't appear to be a test exercising mixed-case or uppercase paths (e.g. `/Meet-With-Will`). Adding a case-variant test case would prevent regressions if the normalization logic changes.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread router/index.ts

const normalizedPathname = (pathname.length > 1
? pathname.replace(/\/$/, "")
: pathname).toLowerCase();

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: .toLowerCase() was added to enable case-insensitive vanity-route matching, but there doesn't appear to be a test exercising mixed-case or uppercase paths (e.g. /Meet-With-Will). Adding a case-variant test case would prevent regressions if the normalization logic changes.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At router/index.ts, line 92:

<comment>`.toLowerCase()` was added to enable case-insensitive vanity-route matching, but there doesn't appear to be a test exercising mixed-case or uppercase paths (e.g. `/Meet-With-Will`). Adding a case-variant test case would prevent regressions if the normalization logic changes.</comment>

<file context>
@@ -87,9 +87,9 @@ export function getVanityRedirect(hostname: string, pathname: string): string |
+  const normalizedPathname = (pathname.length > 1
     ? pathname.replace(/\/$/, "")
-    : pathname;
+    : pathname).toLowerCase();
   return VANITY_REDIRECTS.get(normalizedPathname);
 }
</file context>

@willwashburn
willwashburn merged commit b12639b into main Jul 15, 2026
3 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.

1 participant