fix: show correct max file size in CSV import dialog#2955
Conversation
The file picker was showing a hardcoded "10MB" limit which didn't reflect the actual upload limit. Now reads the plan-based fileSize limit on cloud and displays it dynamically using humanFileSize(). On self-hosted the size hint is hidden since the limit depends on server configuration.
Greptile SummaryThis PR replaces the hardcoded
Confidence Score: 5/5Safe to merge — the core logic change is correct and consistent with existing billing helpers; the only open item is a minor UX consideration on self-hosted. All remaining findings are P2. The dynamic size computation matches the established pattern in updateMaxFileSize.svelte. No data loss, security, or runtime-error risk. src/lib/components/filePicker.svelte — only file with logic changes; all others are copy-only edits. Important Files Changed
Reviews (2): Last reviewed commit: "fix: consistent dropzone text across all..." | Re-trigger Greptile |
| >Max file size: {readableMaxSize.value + | ||
| readableMaxSize.unit}</Typography.Caption> |
There was a problem hiding this comment.
Missing space between value and unit
readableMaxSize.value + readableMaxSize.unit produces "50MB" or "5GB" with no space. The existing usage in updateMaxFileSize.svelte does the same thing (line 51: {Math.floor(parseInt(size.value))}{size.unit}), so this is consistent with the codebase convention. That said, the humanFileSize helper returns a space-separated pair from prettyBytes precisely to allow callers to format them separately — displaying "5 GB" is more readable and closer to the format prettyBytes produces internally. Consider adding a space:
| >Max file size: {readableMaxSize.value + | |
| readableMaxSize.unit}</Typography.Caption> | |
| >Max file size: {readableMaxSize.value + ' ' + | |
| readableMaxSize.unit}</Typography.Caption> |
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!
There was a problem hiding this comment.
consistent with the existing convention
Summary
fileSizelimit on cloud and displays it usinghumanFileSize()(e.g. 50MB for Starter, 5GB for Pro/Scale)Test plan
Starter Plan:

Pro Plan:
