Skip to content

Forward-port OG text fix from dev to v1#1308

Merged
yamcodes merged 2 commits into
v1from
forward-port/og-text-from-dev
Jul 12, 2026
Merged

Forward-port OG text fix from dev to v1#1308
yamcodes merged 2 commits into
v1from
forward-port/og-text-from-dev

Conversation

@yamcodes

Copy link
Copy Markdown
Owner

Summary

Forward-ports two clean fixes from dev to v1 using cherry-pick (not a bulk merge):

Context

dev and v1 are 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/clipackages/arkenv, removed /shared exports, 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.tsx passes (7/7)
  • Root vitest starts without duplicate project name error

Made with Cursor

yamcodes and others added 2 commits July 12, 2026 20:03
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>
@changeset-bot

changeset-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4d51550

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added www Improvements or additions to arkenv.js.org tests This issue or PR is about adding, removing or changing tests labels Jul 12, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ 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.ts with truncateOgText, formatOgTitle, and formatOgDescription, enforcing 42/75-character limits with word-boundary-aware truncation.
  • Updates apps/www/app/api/og/route.tsx to 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/cli stub from root vitest projects to avoid the duplicate project-name error on v1.

Pullfrog  | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@arkenv-bot

arkenv-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (Asia/Almaty)
arkenv Ready Ready Preview, Comment Jul 12 2026, 11:07 PM (Asia/Almaty)

@yamcodes yamcodes merged commit e613917 into v1 Jul 12, 2026
18 checks passed
@yamcodes yamcodes deleted the forward-port/og-text-from-dev branch July 12, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests This issue or PR is about adding, removing or changing tests www Improvements or additions to arkenv.js.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant