Skip to content

fix(dashboard): remove 10k character limit on proposal description - #2101

Open
alextnetto wants to merge 1 commit into
mainfrom
proposal-description-limit-476c45
Open

fix(dashboard): remove 10k character limit on proposal description#2101
alextnetto wants to merge 1 commit into
mainfrom
proposal-description-limit-476c45

Conversation

@alextnetto

Copy link
Copy Markdown
Member

Summary

Hotfix: the create-proposal form blocked proposal descriptions over 10,000 characters, preventing long governance proposals from being published. The limit is removed — the description now has no client-side length cap.

Changes

  • schema.ts — dropped .max(10_000) from the body field validation
  • ProposalCreationForm.tsx — removed the <= 10_000 condition from the canPublish gate
  • BodyField.tsx — replaced the x / 10,000 limit counter (with warning/error colors) with a plain character count
  • constants.ts — removed the now-unused BODY_CHAR_LIMIT and BODY_WARNING_THRESHOLD
  • schema.test.ts — flipped the limit test to assert bodies over 10k are accepted

Note for reviewers

The user-api drafts endpoint still caps body at 100,000 characters (BODY_MAX in apps/user-api/src/mappers/drafts/index.ts) as a payload-size safeguard on the drafts store. That cap was left in place — it only affects saving drafts, not publishing, and removing a server-side abuse guard felt out of scope for this hotfix. Flag if it should go too.

Verification

  • pnpm dashboard typecheck
  • pnpm dashboard lint
  • pnpm dashboard test — 44 suites, 266 tests, all passing ✅

The create-proposal body field rejected descriptions over 10,000
characters at three layers: the zod schema, the canPublish gate, and
the editor's limit counter. Long governance proposals were blocked
from being published. The limit is removed; the editor footer now
shows a plain character count.
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
anticapture-storybook Ready Ready Preview Aug 1, 2026 6:22pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
anticapture Ignored Ignored Aug 1, 2026 6:22pm

Request Review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db75781b4c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
}, "Must be a valid URL"),
body: z.string().min(1, "Required").max(10_000, "10,000 character limit"),
body: z.string().min(1, "Required"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Align body validation with the draft storage limit

When a description exceeds 100,000 characters, this schema now accepts it and the form enables Save Draft and Share, but both operations send the body to the User API, whose CreateDraftBodySchema and UpdateDraftBodySchema still enforce BODY_MAX = 100_000 (apps/user-api/src/mappers/drafts/index.ts:51,59,68). Those users receive only the generic “Could not save draft” error and cannot share their otherwise-valid proposal; retain the service ceiling in the form or update the persistence contract alongside this change.

Useful? React with 👍 / 👎.

@railway-app

railway-app Bot commented Aug 1, 2026

Copy link
Copy Markdown

🚅 Deployed to the anticapture-pr-2101 environment in anticapture-infra

Service Status Web Updated (UTC)
shutter-indexer-offchain ✅ Success (View Logs) Aug 2, 2026 at 4:37 pm
compound-indexer-offchain ✅ Success (View Logs) Aug 2, 2026 at 4:37 pm
gitcoin-indexer-offchain ✅ Success (View Logs) Aug 2, 2026 at 4:37 pm
ens-indexer-offchain ✅ Success (View Logs) Aug 2, 2026 at 4:37 pm
uniswap-indexer-offchain ✅ Success (View Logs) Aug 2, 2026 at 4:37 pm
prometheus ✅ Success (View Logs) Aug 1, 2026 at 7:28 pm
grafana ✅ Success (View Logs) Web Aug 1, 2026 at 7:27 pm
mcp ✅ Success (View Logs) Web Aug 1, 2026 at 6:28 pm
docs ✅ Success (View Logs) Web Aug 1, 2026 at 6:28 pm
gateful ✅ Success (View Logs) Web Aug 1, 2026 at 6:28 pm
aave-api ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
obol-api ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
scroll-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
gitcoin-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
compound-api ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
nouns-api ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
gitcoin-api ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
fluid-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
lil-nouns-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
uniswap-api ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
tornado-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
shutter-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
uniswap-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
nouns-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
lil-nouns-api ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
address-enrichment ✅ Success (View Logs) Web Aug 1, 2026 at 6:28 pm
shutter-api ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
fluid-api ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
obol-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
ens-api ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
tornado-api ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
aave-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
compound-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
ens-indexer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
otelcol ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
ens-relayer ✅ Success (View Logs) Aug 1, 2026 at 6:28 pm
erpc ✅ Success (View Logs) Web Aug 1, 2026 at 6:28 pm
nodeful ✅ Success (View Logs) Aug 1, 2026 at 6:27 pm
tempo ✅ Success (View Logs) Aug 1, 2026 at 6:27 pm
alertmanager ✅ Success (View Logs) Web Aug 1, 2026 at 6:26 pm
scroll-api ✅ Success (View Logs) Aug 1, 2026 at 6:26 pm
user-api ✅ Success (View Logs) Web Aug 1, 2026 at 6:26 pm
loki ✅ Success (View Logs) Aug 1, 2026 at 6:26 pm
authful ✅ Success (View Logs) Web Aug 1, 2026 at 6:25 pm

Copy link
Copy Markdown
Collaborator

🎨 UI Review

Automated review · Figma: link found (mUgy2KpQ3gJ07yZaUaXu8l, node 1965:70112) but the Figma MCP in this environment only sees a locally-open "Cover" page — target nodes return "not found," so this is a configuration error, not a missing reference · Spec: 📬 Create proposal (ClickUp, released)
⚠️ Figma link found but Figma MCP unreachable — visual validation skipped, configuration error reported. Grounded in the linked ClickUp spec (a strong, explicit text source) + diff review + UX-expert evaluation.
ℹ️ No live preview either: the anticapture dashboard Vercel deployment for this PR shows as Ignored (only the unrelated anticapture-storybook project builds) — consistent with other recent PRs in this repo, not specific to this change. Findings below are [ClickUp-confirmed] or [Code-only].


Create Proposal form — Body field

Question for author — this hotfix reverts a documented, acceptance-criteria-level product decision[ClickUp-confirmed]
The linked spec (ClickUp 📬 Create proposal, status "released") is explicit and specific:

Form Fields table: "Body | Rich text editor | Required; 10,000 character limit; live counter '0 / 10,000'"
Acceptance Criteria: "The Body field enforces a 10,000-character limit with a live counter; publish is blocked at the limit"

This PR removes exactly that: the .max(10_000) schema validation, the canPublish gate condition, and the color-coded limit counter (X / 10,000, warning past 9,500, error past 10,000) — replacing it with a plain, unlimited X characters count (BodyField.tsx:154-161, schema.ts:73, ProposalCreationForm.tsx:263-268). The PR description frames this purely as a bug fix ("blocked...long governance proposals from being published"), but the spec treats the 10k cap as an intentional, shipped decision, not a bug. Before merging: has product/design signed off on lifting the cap entirely, or should there be a new, higher limit rather than none? If the cap is being intentionally retired, the ClickUp spec should be updated so it doesn't misrepresent the shipped behavior to the next reader.

Nice-to-have — the counter now gives zero feedback at any length[Code-only]
Even if the hard cap is being retired, this change also deleted all conditional styling (counterColor: text-secondarytext-warningtext-error), not just the block. The counter is now a flat, uncolored X characters string (BodyField.tsx:157-159) with no signal at any length. Meanwhile user-api's drafts endpoint still caps stored bodies at 100,000 chars (per the PR's own note), and the on-chain publish path has no documented size ceiling at all now. A user who writes a 50,000+ character proposal gets no visual cue they're in unusual territory until something fails downstream (a revert, an oversized calldata payload, a slow render) — worse UX than the removed cap, which at least gave upfront, actionable feedback. Consider keeping a soft warning threshold (e.g. re-introduce text-warning past some size) even without a hard block.


Mobile

No layout or responsive-relevant code in this diff (only a validation rule and a counter's color logic changed) — nothing new to verify here.


Design-system adherence

No issues — the diff only removes conditional Tailwind classes on an existing <p>; no hand-rolled primitives introduced.

Scope note

This is a UI-only review (copy/product-fidelity vs. the linked spec, DS adherence, UX) — architecture, validation-layer design, and other code-quality concerns are left to the code reviewer.


Generated by Claude Code

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

🔍 Vercel preview: https://anticapture-3r6fw6c3i-ful.vercel.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants