π¨ Palette: μ λ‘λ ν¬κΈ° μ νμ λν λμ κ²μ¦ λ©μμ§ λ° μΌκ΄ μ λ‘λ μ΄ μ©λ μ ν μΆκ° - #286
Conversation
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Pull request overview
This PR improves the FastAPI upload UIβs client-side validation by removing hardcoded β5 GiBβ strings and instead formatting the limit from the existing MAX_UPLOAD_BYTES constant, while also adding a combined-total-size validation path for batch uploads to better match the backend request-size envelope.
Changes:
- Updated single-file validation to build user-facing limit messages dynamically from
MAX_UPLOAD_BYTES. - Added batch upload total-size validation (sum of selected files) with a custom validity message and
aria-invalidupdates. - Updated UI snapshot-style tests and documented the change in the changelog and Palette learning log.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
saas_web.py |
Updates the embedded UI JavaScript to dynamically format size limits and validate batch total upload size. |
tests/test_saas_web.py |
Adjusts HTML assertions to match the new dynamic strings and new batch-total-size checks. |
CHANGELOG.md |
Documents the UI validation message improvements and new total-size validation. |
.jules/palette.md |
Records the learning/action note about avoiding hardcoded limits and validating batch totals client-side. |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const limitText = formatBinaryBytes(MAX_UPLOAD_BYTES); | ||
| input.setCustomValidity('Total file size exceeds ' + limitText + ' limit.'); | ||
| input.setAttribute('aria-invalid', 'true'); | ||
| preview.innerText = 'Selected ' + files.length + ' files (' + formatBinaryBytes(totalSize) + ', exceeds ' + limitText + ' total limit)'; |
|
Superseded by merged PR #354, which includes this dynamic size-limit feedback and aggregate batch-size prevalidation. Closing the duplicate to keep the reviewed implementation canonical. |
Understood. Acknowledging that this work is superseded and closing the task. |
What: λ¨μΌ μ λ‘λ λ° μΌκ΄ μ λ‘λ νΌμ λμ νμΌ ν¬κΈ° μ ν κ²μ¦ λ‘μ§ μΆκ°
Why: νλμ½λ©λ μ©λ νκΈ° μ€λ₯ λ°©μ§ λ° μΌκ΄ μ λ‘λ μ μ΄ μ©λ μ΄κ³Ό λ°©μ§
Before/After: 5 GiB νλμ½λ© -> λμ μμ κ³μ° μ μ©, μΌκ΄ μ λ‘λ μ μ΄ μ©λ κ²μ¦ μΆκ°
Accessibility: 컀μ€ν μλ¬ λ©μμ§ λ° aria-invalid μν μ λ°μ΄νΈ
PR created automatically by Jules for task 4272209532672658895 started by @seonghobae