Skip to content

Give /file its own OG card and page metadata - #45

Merged
willwashburn merged 1 commit into
mainfrom
claude/agentrelay-file-metadata-tbhry2
Aug 5, 2026
Merged

Give /file its own OG card and page metadata#45
willwashburn merged 1 commit into
mainfrom
claude/agentrelay-file-metadata-tbhry2

Conversation

@willwashburn

@willwashburn willwashburn commented Aug 4, 2026

Copy link
Copy Markdown
Member

Problem

/file (the Relayfile landing page) carried only a title and description. With no openGraph block at all it fell back to the site-wide "Headless Slack for Agents" default card — while its own docs pages under /docs/file/* already had Relayfile-branded cards.

It was also missing a canonical, Twitter tags, keywords, and structured data, and it was absent from the sitemap entirely. The rendered title double-piped: Relayfile | Integration filesystem for AI agents | Agent Relay.

Changes

  • New OG card — added a RelayfileVariant to lib/og/template.tsx and served it from app/file/og.png. Same composition as the homepage and Pear cards (left copy column, a panel bled off the right + bottom edges). The copy is the page's own badge, headline, and subtitle; the panel is the "relayfile workspace" window from the hero, with the provider paths and the WATCH/WRITE/READ labels the hero's activity rail uses. force-static, so it prerenders at build like the other cards.
  • Page metadatalib/relayfile-meta.ts builds canonical, keywords, and full openGraph/twitter blocks, with copy mirroring the live hero. A page-level openGraph replaces the layout's rather than merging, so siteName and locale are restated to survive.
  • Structured dataSoftwareApplication JSON-LD, following the pattern already on /enterprise and /openclaw.
  • Sitemap — added /file at priority 0.9, alongside the other product pages.

Title now renders Relayfile — Integration filesystem for AI agents | Agent Relay.

Verification

  • tsc --noEmit clean
  • vitest run — 22 passing
  • next build --webpack succeeds; /file/og.png prerenders static (1200×630 PNG confirmed from .next/server/app/file/og.png.body), and the built sitemap emits <loc>https://agentrelay.com/file</loc>
  • Meta tags spot-checked against a running dev server on both the card route and the page head

Notes for follow-up (not in this PR)

  • app/relayfile/page.tsx re-exports /file's component but is unreachable — next.config.mjs permanently redirects /relayfile/primitives#file. Dead code, but removing it is a separate call.
  • Every page that sets its own openGraph drops the layout's og:site_name and og:locale, since Next replaces rather than merges. Restated here for /file; /pear, /enterprise, and the homepage are all still missing them.

Generated by Claude Code


Summary by cubic

Adds a Relayfile-branded Open Graph card and full page metadata to /file so shares look right and the page indexes properly. Also adds JSON-LD and a sitemap entry.

  • New Features
    • New OG card: RelayfileVariant served at /file/og.png and prerendered (force-static); mirrors the hero with badge, headline, subtitle, and the workspace panel with WATCH/WRITE/READ.
    • Page metadata: centralized in lib/relayfile-meta.ts with canonical, keywords, and full openGraph/twitter tags; restates siteName and locale; title now renders “Relayfile — Integration filesystem for AI agents | Agent Relay”.
    • Structured data: adds SoftwareApplication JSON-LD.
    • Sitemap: includes /file at priority 0.9.

Written for commit 01e5b5e. Summary will update on new commits.

Review in cubic

The Relayfile landing page fell back to the site-wide default card and
carried only a title and description, so shares showed a generic "Headless
Slack for Agents" image with no canonical, no social tags, and no entry in
the sitemap — while its own docs pages already had Relayfile-branded cards.

- Add a RelayfileVariant to the shared OG template: the /file hero's badge,
  headline, and subtitle beside the "relayfile workspace" tree, with the
  provider paths and WATCH/WRITE/READ labels from the hero animation. Same
  composition as the landing and Pear cards.
- Serve it from app/file/og.png, prerendered at build like the other cards.
- Build the page metadata in lib/relayfile-meta.ts: canonical, keywords, and
  full openGraph/twitter tags whose copy mirrors the live hero. The page-level
  openGraph replaces the layout's, so siteName and locale are restated.
- Add SoftwareApplication structured data, matching the enterprise page.
- Add /file to the sitemap, which was missing it entirely.

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

coderabbitai Bot commented Aug 4, 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: 7e45fee5-a64a-4caf-90ae-809baefc863b

📥 Commits

Reviewing files that changed from the base of the PR and between d02e9cd and 01e5b5e.

📒 Files selected for processing (5)
  • web/app/file/og.png/route.tsx
  • web/app/file/page.tsx
  • web/app/sitemap.ts
  • web/lib/og/template.tsx
  • web/lib/relayfile-meta.ts

📝 Walkthrough

Walkthrough

The PR adds shared Relayfile metadata and structured data, includes /file in the sitemap, and creates a static Relayfile Open Graph image route with a branded workspace composition.

Changes

Relayfile landing page

Layer / File(s) Summary
Relayfile metadata and page discovery
web/lib/relayfile-meta.ts, web/app/file/page.tsx, web/app/sitemap.ts
Shared metadata defines Relayfile routes, canonical URLs, Open Graph data, and Twitter card data. The page adds SoftwareApplication JSON-LD. The sitemap includes /file.
Relayfile Open Graph composition
web/lib/og/template.tsx
The OG template renders Relayfile branding, descriptive copy, and a deterministic workspace panel with provider directories, files, and activity states.
Static Open Graph route
web/app/file/og.png/route.tsx
The route loads brand fonts and returns a statically rendered Relayfile ImageResponse with standard OG dimensions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GET
  participant BrandFonts
  participant RelayfileVariant
  participant ImageResponse
  GET->>BrandFonts: Load brand fonts
  GET->>RelayfileVariant: Render Relayfile OG composition
  RelayfileVariant->>ImageResponse: Provide image content
  GET->>ImageResponse: Return 1200x630 response
Loading

Possibly related PRs

Poem

A rabbit hops through files so bright,
Relayfile blooms in Open Graph light.
Fonts load softly, panels grow,
Metadata points where pages go.
The sitemap marks the path with care—
A tidy card now waits up there.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: dedicated OG card and page metadata for /file.
Description check ✅ Passed The description directly explains the OG card, metadata, structured data, sitemap, title, and verification changes.
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
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/agentrelay-file-metadata-tbhry2

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.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Preview deployed!

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

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

@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.

2 issues found across 5 files

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="web/app/file/page.tsx">

<violation number="1" location="web/app/file/page.tsx:9">
P3: The openGraph.title for /file won't carry the '| Agent Relay' brand suffix, while the browser <title> does (via the layout's '%s | Agent Relay' template, which doesn't apply to openGraph). Social/OG shares will show the un-branded title 'Relayfile — Integration filesystem for AI agents', diverging from the stated PR title and from /enterprise, whose openGraph.title includes the brand. Consider appending the brand to openGraph.title in relayfile-meta rather than relying on the template.</violation>
</file>

<file name="web/lib/relayfile-meta.ts">

<violation number="1" location="web/lib/relayfile-meta.ts:36">
P3: The new module's doc comment and its `path` parameter describe an alias strategy that can't actually work. `/relayfile` is 301-redirected to `/primitives#file` (web/next.config.mjs), and `app/relayfile/page.tsx` only re-exports the default component (`export { default } from '../file/page'`), which does not carry the `metadata` named export — so if that route were reachable it would silently fall back to the root layout's default title/OG card, not `relayfileMetadata`. The `path: string = RELAYFILE_PATH` parameter and the "both routes point their canonical at /file" comment are effectively dead/misleading given this. Since the alias page is slated for removal, consider fixing the comment to reflect reality (or re-exporting `metadata` from the alias if it's ever meant to be reachable) so the documented intent matches the code.</violation>
</file>

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

Re-trigger cubic

Comment thread web/app/file/page.tsx
description:
'Mount SaaS integrations as files so agents can read, write, watch, and coordinate through one realtime workspace.',
};
export const metadata: Metadata = relayfileMetadata(RELAYFILE_PATH);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The openGraph.title for /file won't carry the '| Agent Relay' brand suffix, while the browser <title> does (via the layout's '%s | Agent Relay' template, which doesn't apply to openGraph). Social/OG shares will show the un-branded title 'Relayfile — Integration filesystem for AI agents', diverging from the stated PR title and from /enterprise, whose openGraph.title includes the brand. Consider appending the brand to openGraph.title in relayfile-meta rather than relying on the template.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At web/app/file/page.tsx, line 9:

<comment>The openGraph.title for /file won't carry the '| Agent Relay' brand suffix, while the browser <title> does (via the layout's '%s | Agent Relay' template, which doesn't apply to openGraph). Social/OG shares will show the un-branded title 'Relayfile — Integration filesystem for AI agents', diverging from the stated PR title and from /enterprise, whose openGraph.title includes the brand. Consider appending the brand to openGraph.title in relayfile-meta rather than relying on the template.</comment>

<file context>
@@ -1,15 +1,34 @@
-  description:
-    'Mount SaaS integrations as files so agents can read, write, watch, and coordinate through one realtime workspace.',
-};
+export const metadata: Metadata = relayfileMetadata(RELAYFILE_PATH);
 
 export default function FilePage() {
</file context>

Comment thread web/lib/relayfile-meta.ts
* canonical; the alias passes its own path so `openGraph.url` stays truthful
* while the canonical still points at `/file`.
*/
export function relayfileMetadata(path: string = RELAYFILE_PATH): Metadata {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The new module's doc comment and its path parameter describe an alias strategy that can't actually work. /relayfile is 301-redirected to /primitives#file (web/next.config.mjs), and app/relayfile/page.tsx only re-exports the default component (export { default } from '../file/page'), which does not carry the metadata named export — so if that route were reachable it would silently fall back to the root layout's default title/OG card, not relayfileMetadata. The path: string = RELAYFILE_PATH parameter and the "both routes point their canonical at /file" comment are effectively dead/misleading given this. Since the alias page is slated for removal, consider fixing the comment to reflect reality (or re-exporting metadata from the alias if it's ever meant to be reachable) so the documented intent matches the code.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At web/lib/relayfile-meta.ts, line 36:

<comment>The new module's doc comment and its `path` parameter describe an alias strategy that can't actually work. `/relayfile` is 301-redirected to `/primitives#file` (web/next.config.mjs), and `app/relayfile/page.tsx` only re-exports the default component (`export { default } from '../file/page'`), which does not carry the `metadata` named export — so if that route were reachable it would silently fall back to the root layout's default title/OG card, not `relayfileMetadata`. The `path: string = RELAYFILE_PATH` parameter and the "both routes point their canonical at /file" comment are effectively dead/misleading given this. Since the alias page is slated for removal, consider fixing the comment to reflect reality (or re-exporting `metadata` from the alias if it's ever meant to be reachable) so the documented intent matches the code.</comment>

<file context>
@@ -0,0 +1,77 @@
+ * canonical; the alias passes its own path so `openGraph.url` stays truthful
+ * while the canonical still points at `/file`.
+ */
+export function relayfileMetadata(path: string = RELAYFILE_PATH): Metadata {
+  return {
+    title: TITLE,
</file context>

@willwashburn
willwashburn merged commit bb94ca3 into main Aug 5, 2026
3 checks passed
@willwashburn
willwashburn deleted the claude/agentrelay-file-metadata-tbhry2 branch August 5, 2026 14:49
@coderabbitai coderabbitai Bot mentioned this pull request Aug 5, 2026
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