Give /file its own OG card and page metadata - #45
Conversation
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
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR adds shared Relayfile metadata and structured data, includes ChangesRelayfile landing page
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
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
Preview deployed!
This is a Cloudflare Workers preview version of this PR's build. |
There was a problem hiding this comment.
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
| 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); |
There was a problem hiding this comment.
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>
| * 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 { |
There was a problem hiding this comment.
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>
Problem
/file(the Relayfile landing page) carried only atitleanddescription. With noopenGraphblock 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
RelayfileVarianttolib/og/template.tsxand served it fromapp/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 theWATCH/WRITE/READlabels the hero's activity rail uses.force-static, so it prerenders at build like the other cards.lib/relayfile-meta.tsbuilds canonical, keywords, and fullopenGraph/twitterblocks, with copy mirroring the live hero. A page-levelopenGraphreplaces the layout's rather than merging, sositeNameandlocaleare restated to survive.SoftwareApplicationJSON-LD, following the pattern already on/enterpriseand/openclaw./fileat priority 0.9, alongside the other product pages.Title now renders
Relayfile — Integration filesystem for AI agents | Agent Relay.Verification
tsc --noEmitcleanvitest run— 22 passingnext build --webpacksucceeds;/file/og.pngprerenders static (1200×630 PNG confirmed from.next/server/app/file/og.png.body), and the built sitemap emits<loc>https://agentrelay.com/file</loc>Notes for follow-up (not in this PR)
app/relayfile/page.tsxre-exports/file's component but is unreachable —next.config.mjspermanently redirects/relayfile→/primitives#file. Dead code, but removing it is a separate call.openGraphdrops the layout'sog:site_nameandog: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
/fileso shares look right and the page indexes properly. Also adds JSON-LD and a sitemap entry.RelayfileVariantserved at/file/og.pngand prerendered (force-static); mirrors the hero with badge, headline, subtitle, and the workspace panel with WATCH/WRITE/READ.lib/relayfile-meta.tswith canonical, keywords, and fullopenGraph/twittertags; restatessiteNameandlocale; title now renders “Relayfile — Integration filesystem for AI agents | Agent Relay”.SoftwareApplicationJSON-LD./fileat priority 0.9.Written for commit 01e5b5e. Summary will update on new commits.