[AUTO-001] Guard against Discord's 2000-char content limit #1
Labels
No labels
forge-sync
priority:critical
priority:high
priority:low
priority:medium
status:blocked
status:done
status:skipped
status:todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frank/discord-share-extension#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task ID: AUTO-001
Priority: P1
Status: TODO
Priority: P1
Status: TODO
Goal: Prevent silent Discord 400 rejections when a text-selection send exceeds Discord's 2000-character
contentlimit.Why it matters:
Formatter.textSelection(formatter.js:7-20) wraps the raw selection with no length check. The popup preview truncates to 200 chars for display only (popup.js:134), so a long selection currently fails with a 400 the user has to decode from raw response text, with no warning beforehand. Flagged in docs/notes/2026-07-10-code-health-pass.md iteration 1.Scope: Add a length check before send (either truncate with a visible marker, or block send and warn the user) and fix the related bug where a selection containing a triple-backtick sequence breaks out of the wrapping code block early.
Expected files or areas: formatter.js, popup.js, background.js (wherever the send path enforces the check).
Acceptance criteria: A selection over ~2000 chars after formatting is caught before the webhook POST, with a clear user-facing message; a selection containing ``` no longer garbles the sent message.
Validation: Manual test in a loaded extension — send a long selection and a selection containing a code fence, confirm no raw 400 leaks to the user and formatting stays intact.
Risks or assumptions: Assumes truncation (vs. hard block) is acceptable UX; confirm preferred behavior isn't already decided elsewhere.
Notes: None.
Synced from
.ai/AUTONOMOUS_PLAN.mdbyforge sync.Closed by
forge sync— task status changed to DONE.