Title: fix(og): put the shared-file card on the brandbook cover template by waleedlatif1 · Pull Request #6907 · simstudioai/sim · GitHub
Open Graph Title: fix(og): put the shared-file card on the brandbook cover template by waleedlatif1 · Pull Request #6907 · simstudioai/sim
X Title: fix(og): put the shared-file card on the brandbook cover template by waleedlatif1 · Pull Request #6907 · simstudioai/sim
Description: Summary Shared-file links (/f/[token]) unfurled with the retired dark OG card — #121212 field, the old green square-icon logo, Geist. Every other generated card on the site (library post covers, docs pages) has been on the brandbook cover template for a while. Added lib/og/cover-image.tsx: the Node rendering of that template — #c1c1c1 field, #515151 ink, "sim" wordmark top-left, diagonal open arrow top-right, title set large at the bottom-left, Söhne Kräftig, 1200x675. Third rendering of one template, alongside the build-time one in scripts/generate-library-covers.tsx and the edge one in apps/docs/app/api/og/route.tsx. Pointed the shared-file card at it. Public shares show the file name + provenance; protected (password / email / SSO) and unknown shares stay generic so the filename never leaks pre-auth. Provenance renders as a muted caption under the title — the one addition to the reference template, since a shared file has a source worth naming. Vendored Soehne-Kraftig.ttf into apps/sim/public/brand/fonts/. Read off disk at module scope, not fetched: the card is force-dynamic, and public/ is already copied into the Docker runner so it needs no outputFileTracingIncludes entry. Titles here are file names and captions are workspace/owner names, so both are viewer-supplied and unbounded — the canvas is fixed, so the layout does the bounding: Type steps down a ladder (110/96/85) to the first size fitting three lines; anything still over is truncated with an ellipsis. The caption is measured and clipped to one line before the NBSP packing, so hard spaces can't strip the only break opportunity from a string that needed one. Widths come from the font's real advance widths (opentype.js) rather than an average-glyph estimate, which under-measures caps-heavy names and over-measures narrow ones. Same reason generate-library-covers.tsx measures this way; the docs route falls back to an estimate only because the edge runtime has no filesystem. This adds opentype.js to apps/sim — already in the lockfile as a root devDependency, so no new packages enter the graph. Not touched: the landing models and integrations cards are still on the old dark template, same problem. Type of Change Bug fix Testing Compared rendered output against a library cover, including the caption spacing at several margins. Layout tests parse the font independently of the renderer rather than sharing its measurement helper — reverting to the average-glyph estimate turns four of them red. bun run lint, bun run check:audits (32/32), check-block-registry, tsc --noEmit, and the 11 tests all pass. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary Shared-file links (/f/[token]) unfurled with the retired dark OG card — #121212 field, the old green square-icon logo, Geist. Every other generated card on the site (library post covers, d...
X Description: Summary Shared-file links (/f/[token]) unfurled with the retired dark OG card — #121212 field, the old green square-icon logo, Geist. Every other generated card on the site (library post covers, d...
Opengraph URL: https://github.com/simstudioai/sim/pull/6907
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3d8b0493-dc35-5729-c92a-0c41f0c1abd9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C456:1D33A1:F9FE36:156835F:6AFB6302 |
| html-safe-nonce | 81cd0494eb30e060535aa91273ebf2b7e99ea68b0ce3a80bcd611227719e05d2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDU2OjFEMzNBMTpGOUZFMzY6MTU2ODM1Rjo2QUZCNjMwMiIsInZpc2l0b3JfaWQiOiI0MTA3ODQ3NDY5NzY3NTQ5Njk4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7dd9975d2643ff5a3874ab664fe13dc6ca92451e2d9afd3350effa410e12bc1b |
| hovercard-subject-tag | pull_request:4327187780 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6907/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Shared-file links (/f/[token]) unfurled with the retired dark OG card — #121212 field, the old green square-icon logo, Geist. Every other generated card on the site (library post covers, d... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ef97164c52cf59bd10558ddec9c4f482763988 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width