Forward-port OG text fix from dev to v1#1308
Conversation
Fixes #1302 Truncate long title and description strings in the `/api/og` route before passing them to `generateOGImage`, preventing text overlap in the fumadocs 1200×630 template. Short metadata is left unchanged. ## Test plan - [x] Unit tests for `formatOgTitle` / `formatOgDescription` (short, long title, long description, word boundaries) - [x] Route test for the `using-other-validators` page metadata - [x] `pnpm run typecheck`, `pnpm run test`, `pnpm run fix` pass Made with [Cursor](https://cursor.com) Co-authored-by: Cursor <cursoragent@cursor.com>
Prevents duplicate "cli" project name collision with packages/arkenv when running root vitest on v1. Co-authored-by: Cursor <cursoragent@cursor.com>
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — forward-port of the OG text-overflow fix and the legacy packages/cli vitest exclusion from dev to v1.
- Adds
apps/www/lib/og-text.tswithtruncateOgText,formatOgTitle, andformatOgDescription, enforcing 42/75-character limits with word-boundary-aware truncation. - Updates
apps/www/app/api/og/route.tsxto format query-param title/description through the new helpers. - Adds unit and route-level tests covering pass-through, truncation, and word-boundary behavior.
- Excludes the empty
packages/clistub from root vitest projects to avoid the duplicate project-name error onv1.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|

Summary
Forward-ports two clean fixes from
devtov1using cherry-pick (not a bulk merge):ba2111abpackages/clistub from root vitest projectsContext
devandv1are intentionally diverged (see CONTRIBUTING Use Case 4). The recent reconciliation (#1292) only covered v0 feature parity (#1281, #1282) — it did not eliminate the ~48 file conflicts that appear when bulk-merging the branches. Those conflicts are expected due to structural differences (packages/cli→packages/arkenv, removed/sharedexports, etc.).This PR uses the documented forward-porting workflow instead.
Test plan
pnpm test run lib/og-text.test.ts app/api/og/route.test.tsxpasses (7/7)Made with Cursor