feat(tables): raise per-plan table limits#5135
Conversation
…max 1k/500k) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@greptile review |
PR SummaryMedium Risk Overview Per-plan limits move from 3 / 1k rows (free), 25 / 5k (pro), and 100 / 10k (team/max) to 5 / 50k, 100 / 100k, and 1,000 / 500k in Landing pricing tier feature strings are updated to match. A comment on Reviewed by Cursor Bugbot for commit 3436fdc. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR raises per-plan table limits across free, pro, and team tiers and updates the pricing UI and env-var doc comments to match. All three surfaces (constants, env docs, pricing cards) are updated consistently.
Confidence Score: 4/5Safe to merge; changes are contained to configuration constants, doc comments, and marketing copy with no new logic paths. All three files change in sync and the numbers match across constants, env docs, and the pricing UI. The one non-obvious side effect — async export now triggering for all plans with >10k rows — appears intentional given the comment update, but is worth confirming before the limits go live. apps/sim/lib/table/constants.ts — both the EXPORT_ASYNC_THRESHOLD_ROWS interaction and the now-stale TABLE_LIMITS hard constants are worth a second look. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User Action on Table] --> B{Row Count > 10k?}
B -- No --> C[Synchronous Stream Export]
B -- Yes --> D[Async Background Export Job]
subgraph "New Plan Row Caps"
E[Free: 50,000 rows]
F[Pro: 100,000 rows]
G[Team: 500,000 rows]
H[Enterprise: 1,000,000 rows]
end
B -. "EXPORT_ASYNC_THRESHOLD_ROWS = 10,000 (unchanged)" .- B
style C fill:#22c55e,color:#fff
style D fill:#f59e0b,color:#fff
style E fill:#3b82f6,color:#fff
style F fill:#3b82f6,color:#fff
style G fill:#3b82f6,color:#fff
style H fill:#3b82f6,color:#fff
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[User Action on Table] --> B{Row Count > 10k?}
B -- No --> C[Synchronous Stream Export]
B -- Yes --> D[Async Background Export Job]
subgraph "New Plan Row Caps"
E[Free: 50,000 rows]
F[Pro: 100,000 rows]
G[Team: 500,000 rows]
H[Enterprise: 1,000,000 rows]
end
B -. "EXPORT_ASYNC_THRESHOLD_ROWS = 10,000 (unchanged)" .- B
style C fill:#22c55e,color:#fff
style D fill:#f59e0b,color:#fff
style E fill:#3b82f6,color:#fff
style F fill:#3b82f6,color:#fff
style G fill:#3b82f6,color:#fff
style H fill:#3b82f6,color:#fff
|
| /** Row count above which an export runs as a background job instead of a synchronous stream. | ||
| * Matches the default per-table row cap, so non-enterprise tables keep instant downloads. */ | ||
| * Tables at or under this stream instantly; larger ones fall back to an async export job. */ | ||
| EXPORT_ASYNC_THRESHOLD_ROWS: 10000, |
There was a problem hiding this comment.
EXPORT_ASYNC_THRESHOLD_ROWS now triggers async export for most tables on every plan
EXPORT_ASYNC_THRESHOLD_ROWS is kept at 10,000 while the minimum plan row cap has jumped to 50,000 (free). Any table that fills even 20% of its free-tier quota will silently switch from instant streaming to an async background job. The old comment explicitly noted this threshold was aligned with the per-plan row cap to preserve synchronous downloads for non-enterprise users — that guarantee no longer holds. This is likely intentional given the server-load implications of streaming large tables synchronously, but it's worth confirming the async export UX is ready to be the default experience for all plan tiers rather than an enterprise-only path.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Greptile SummaryThis PR raises per-plan table caps in
Confidence Score: 4/5Safe to merge — the limit increases are correctly wired through the existing billing enforcement stack with no gaps in the call chain. All six createTable call sites (API routes + copilot tool) explicitly fetch getWorkspaceTableLimits and pass maxTables, so the new limits are enforced end-to-end. The two legacy constants (TABLE_LIMITS.MAX_ROWS_PER_TABLE, MAX_TABLES_PER_WORKSPACE) stay stale but are vestigial fallbacks that current call sites bypass. The main side-effect is that EXPORT_ASYNC_THRESHOLD_ROWS (10k) is now well below even the free-tier row cap (50k), meaning more users will encounter async exports — a real UX shift that is documented in the updated comment but not mitigated in the UI. apps/sim/lib/table/constants.ts — the top-level TABLE_LIMITS fallback constants and EXPORT_ASYNC_THRESHOLD_ROWS deserve a second look. Important Files Changed
|
| /** Row count above which an export runs as a background job instead of a synchronous stream. | ||
| * Matches the default per-table row cap, so non-enterprise tables keep instant downloads. */ | ||
| * Tables at or under this stream instantly; larger ones fall back to an async export job. */ | ||
| EXPORT_ASYNC_THRESHOLD_ROWS: 10000, |
There was a problem hiding this comment.
Async-export threshold now triggers for nearly all real tables
EXPORT_ASYNC_THRESHOLD_ROWS stays at 10,000 while the smallest plan (free) now caps at 50,000 rows. Any free user who fills their table past 10k rows — and most pro users who would have been safely under 5k rows before — will now land on the async-export path instead of an instant download. The updated comment correctly documents the new reality, but since this is the first time regular (non-enterprise) users will routinely hit the async path, it may be worth a brief mention in release notes or in the UI (e.g., surfacing an "export started" notification proactively). No code change is strictly required, but wanted to flag the UX shift.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
DEFAULT_TABLE_PLAN_LIMITS: free 5 tables / 50k rows, pro 100 / 100k, max (team) 1,000 / 500k; enterprise stays the custom backstopenv.tsoverride doc comments and landing pricing cards to match; enterprise card now reads "Custom tables & rows"assertRowCapacity), so this applies to existing tables immediately — no backfillType of Change
Testing
Tested manually.
bun run lintclean,bun run check:api-validation:strictpassed.Checklist