Skip to content

feat(seo): seo_description length SSOT + editor counter/maxLength#1441

Merged
michaelassraf merged 3 commits into
mainfrom
claude/modal-ai-enrichment-overflow-17147f
Jul 14, 2026
Merged

feat(seo): seo_description length SSOT + editor counter/maxLength#1441
michaelassraf merged 3 commits into
mainfrom
claude/modal-ai-enrichment-overflow-17147f

Conversation

@michaelassraf

@michaelassraf michaelassraf commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What

SEO length SSOT + editor UX for the shared SEO editor, consumed by the hub's AI-SEO overflow fixes (paired PR: flamingo-stack/multi-platform-hub).

  • SEO_DESCRIPTION_MAX_LENGTH = 160 now lives in the lib (src/utils/seo-description.ts, exported from src/utils/index.ts), mirroring the existing SEO_TITLE_MAX_LENGTH. The hub re-exports it so there is one source of truth for the varchar(160) budget.
  • SEOEditorPreview: the seo_description textarea now has a live NNN/160 counter, a "too long" hint, and maxLength={160} — the same treatment seo_title already had. Reuses existing ODS tokens (text-ods-error, text-ods-text-secondary). The pre-existing em-dash in the seo_title hint was replaced with a colon (repo copy rule).

Why

The hub was overflowing varchar(160)/varchar(60) SEO columns on save. The hub fix rewrites over-budget AI text to fit and reports precise errors; this lib change gives the shared editor the length SSOT + a visible counter so a human editing the field sees the limit.

Rollout

Paired change: merge + release, then the hub bumps its @flamingo-stack/openframe-frontend-core pin to the new version.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Enforced a 160-character maximum for SEO descriptions.
    • Added live character counting (used/remaining) with a “Too long” warning in the SEO editor.
    • Prevents descriptions from exceeding the limit while editing, including remaining characters as you type (consistent with the save limit).
  • Bug Fixes
    • Updated the SEO title over-length warning message format for clarity.

… [preview:none]

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8ea0ca5a-100a-4841-8c26-08ef372e4ea9

📥 Commits

Reviewing files that changed from the base of the PR and between 5925451 and 76692eb.

📒 Files selected for processing (1)
  • openframe-frontend-core/src/components/features/seo-editor-preview.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • openframe-frontend-core/src/components/features/seo-editor-preview.tsx

📝 Walkthrough

Walkthrough

The SEO editor preview now uses a shared 160-character description limit, enforces it on the description textarea, and displays live length feedback with an over-limit warning. The SEO title warning wording is also updated.

Changes

SEO description length limit

Layer / File(s) Summary
Shared description length contract
openframe-frontend-core/src/utils/seo-description.ts, openframe-frontend-core/src/utils/index.ts
Defines SEO_DESCRIPTION_MAX_LENGTH as 160 and re-exports it through the utilities barrel.
SEO editor validation UI
openframe-frontend-core/src/components/features/seo-editor-preview.tsx
Uses the shared limit for textarea validation, derives description length state, shows warning and character-count feedback, and updates the SEO title warning wording.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: a shared SEO description length constant and editor counter/maxLength behavior.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/modal-ai-enrichment-overflow-17147f

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@openframe-frontend-core/src/components/features/seo-editor-preview.tsx`:
- Around line 215-219: Update the SEO description Textarea in the preview
component to pass invalid={seoDescriptionTooLong}, matching the existing
seoTitleTooLong handling on the SEO title Input and preserving all other
Textarea props.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6ee4aab6-6ea0-4d70-9e64-ccf7d334bac3

📥 Commits

Reviewing files that changed from the base of the PR and between a9347b8 and 5925451.

📒 Files selected for processing (3)
  • openframe-frontend-core/src/components/features/seo-editor-preview.tsx
  • openframe-frontend-core/src/utils/index.ts
  • openframe-frontend-core/src/utils/seo-description.ts

@michaelassraf michaelassraf merged commit 7a71e2e into main Jul 14, 2026
2 of 3 checks passed
@michaelassraf michaelassraf deleted the claude/modal-ai-enrichment-overflow-17147f branch July 14, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant