fix: raise free print cap to 1000 and surface count + upgrade path#2477
Merged
Conversation
The "too large" failure on /print used to swallow the server's specific "This deck has N cards. PDF export supports up to M cards." message and replace it with a vague one-liner, with no upgrade link. First-time free users hit the 500-card cap with no idea what went wrong. - Bump MAX_CARDS 500 -> 1000 (covers semester-sized decks; 2x cap) - Let the server's specific count/cap message render verbatim on /print - Append an inline "Upgrade for unlimited" link (-> /pricing) on the card-limit error only - /upload: when a user drops an existing .apkg, the error now points them to Print Decks instead of a dead end - Docs: update print-export and common-problems to match the new cap and the new in-product link Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for notion2anki ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
MAX_CARDSinExportApkgToPdfUseCase.ts)<Link to="/pricing">Upgrade for unlimited</Link>on the card-limit error only..apkg, the error now nudges them inline to Print Decks (/print) instead of a dead end.print-export.mdandcommon-problems.mdto match the new cap and the new in-product link.Why
A free user (thankyouprofessor21@gmail.com, 9/100 conv cards used) tried
/printfor the first time, hit the 500-cap, and saw "This deck is too large to print right now. Try a deck with fewer cards." — no count, no cap, no upgrade hook. Felt broken. Trio (pm/designer/engineer) agreed:.apkgTest plan
pnpm test src/usecases/apkg/ExportApkgToPdfUseCase.test.ts— boundary moved from 501 to 1001 cardspnpm --filter 2anki-web test:run— newPrintForm.test.tsxcovers (a) card-limit response renders server message verbatim + Upgrade link, (b) corrupted-file response renders the friendly corrupted message and no upgrade linkpnpm --filter 2anki-web typecheckcleanpnpm --filter 2anki-web lintcleannpx tsc --noEmitclean.apkgon /upload, confirm "Try Print Decks" link appears🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need.