GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore(site): serve OG Studio link cards from the files bucket, add docs previews by iamdavidhill · Pull Request #63560 · anomalyco/opencode

Conversation

@iamdavidhill

@iamdavidhill iamdavidhill commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Follow-up to @adamdotdevin's review of #63401 / #63556 / #63459.

  • The cards move out of git (−28.4 MiB, 179 files). OG Studio's PNGs and MP4s now live in the files bucket at site/og/<name>, like the product videos (services/site/MEDIA.md). Only src/asset/og-studio/manifest.json stays in git. Names are content-hashed, so objects are immutable and a redesign only adds objects. It never adds bytes to the repo.
  • og:video no longer depends on the build's static files. Videos come from /files/site/og/…, so the og/ exception from fix(site): ship the link-card videos with the site's static assets #63459 no longer matters for OG Studio's cards. I kept inBucket as it is, because a version 1 manifest (no base, still supported) copies its videos into public/og/. The exception is harmless and the comment in src/lib/media.ts explains why it stays.
  • The docs get link previews. Every /docs and /v1/docs page now outputs the same Open Graph and X tags as the site's pages, with OG Studio's /docs card and video (English) and the page's own title and description.
flowchart LR
  S[OG Studio] -- "cf r2 objects put site/og/name" --> B[(opencode-*-files)]
  S -- manifest v2 --> M[src/asset/og-studio/manifest.json]
  M --> O[script/og.ts] --> J[src/lib/og-images.json]
  J --> SM[ShareMeta / shareTags] --> H["og:image = https://opencode.ai/files/site/og/home-98637499f6.png"]
  B --> F["/files route (services/files)"] --> H
Loading

Manifest v2

{
  "version": 2,
  "generator": "og-studio",
  "width": 1200,
  "height": 630,
  "base": "/files/site/og",
  "cards": {
    "/": {
      "image": "home-98637499f6.png",
      "alt": "…",
      "video": "home-ec8331a4d6.mp4",
      "locales": { "uk": { "image": "home-uk-7dbf00d466.png", "alt": "…" } }
    }
  }
}
  • script/og.ts: with base, it writes ${base}/<file> for src, video and each locale's src, and copies nothing. Without base (version 1), it behaves as before.
  • ShareMeta prefixes config.baseUrl (https://opencode.ai), so every stage links the production bucket:
    <meta property="og:image" content="https://opencode.ai/files/site/og/home-uk-7dbf00d466.png">
    <meta property="og:video" content="https://opencode.ai/files/site/og/home-ec8331a4d6.mp4">
  • The built Worker assets no longer contain any OG Studio PNG or MP4. public/og/ only has the 4 cards that og.ts still renders.

Docs

  • src/component/share-meta.tsx now builds its tag list in shareTags(). ShareMeta renders the list with <Meta>, and DocsLayout.tsx, which writes its own <head>, renders it with <meta>:
    <For each={shareTags({ title, description, image: ogImage("/docs"), locale: "en", englishOnly: true })}>
      {(tag) => <meta {...tag} />}
    </For>

Uploads

  • All 179 files are uploaded to opencode-production-files at site/og/. Each URL returns 200 with the correct Content-Type and size, and a range request on an MP4 returns 206.
  • opencode-dev-files (dev account d8e944f5…) still needs the same upload. My Cloudflare login can't write to that account (403). The cards themselves don't need it, because og:image and og:video always point at opencode.ai. Only /files on dev.opencode.ai (and vite dev's proxy to it) needs it. MEDIA.md → "Link cards" has the commands.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
iamdavidhill added 2 commits November 12, 2026 09:46
@iamdavidhill
chore(site): serve OG Studio's link cards from the files bucket
fa13c44
@iamdavidhill
feat(site): give docs pages a link preview with the /docs card
0f4f74e
@iamdavidhill
iamdavidhill requested a review from adamdotdevin November 12, 2026 15:48
@github-actions github-actions Bot added the contributor label Nov 12, 2026
adamdotdevin added 2 commits November 12, 2026 09:49
@adamdotdevin
Merge remote-tracking branch 'origin/dev' into og-cards-bucket
5c64151
@adamdotdevin
chore(site): move the Cyrillic link cards to the files bucket too
5ff74b6
opencodejr[bot]
opencodejr Bot reviewed Nov 12, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I found nothing that should block a merge.

How I checked it: I ran script/og.ts with the v2 manifest. It now writes /files/site/og/… paths and only renders 4 cards into public/og/. All 179 OG Studio URLs on https://opencode.ai/files/site/og/ return 200 with the right content type. In a docs build, the docs pages had the full Open Graph and X tags, with each page's own title and description plus the /docs card and video. The related site tests (29) and typecheck:tsc pass.

Public API: no change. The manifest format and the meta tags are internal to the site.

The only open item is the one you already noted: opencode-dev-files doesn't have the site/og/ objects yet (dev.opencode.ai/files/site/og/home-98637499f6.png returns 404). That only affects /files on dev.opencode.ai and the vite dev proxy. The link-preview URLs in the meta tags all point at opencode.ai.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adamdotdevin
adamdotdevin enabled auto-merge (squash) November 12, 2026 15:59
@adamdotdevin
adamdotdevin merged commit 33aefad into dev Nov 12, 2026
11 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@adamdotdevin
adamdotdevin deleted the og-cards-bucket branch November 12, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments
@adamdotdevin adamdotdevin Awaiting requested review from adamdotdevin

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@iamdavidhill @adamdotdevin
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.