Skip to content

🎨 Palette: [UX improvement] 동적 파일 크기 μ œν•œ 검증 μΆ”κ°€ - #323

Closed
seonghobae wants to merge 1 commit into
mainfrom
palette-ux-dynamic-file-size-4520332721963242270
Closed

🎨 Palette: [UX improvement] 동적 파일 크기 μ œν•œ 검증 μΆ”κ°€#323
seonghobae wants to merge 1 commit into
mainfrom
palette-ux-dynamic-file-size-4520332721963242270

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

πŸ’‘ What:
파일 μ—…λ‘œλ“œ 크기 μ œν•œ 초과 μ‹œ λ°œμƒν•˜λŠ” μ—λŸ¬ λ©”μ‹œμ§€λ₯Ό ν•˜λ“œμ½”λ”©λœ κ°’(5 GiB) λŒ€μ‹  μ΅œλŒ€ μ„€μ •κ°’(MAX_UPLOAD_BYTES)을 λ™μ μœΌλ‘œ λ³€ν™˜ν•˜μ—¬ ν‘œμ‹œν•˜λ„λ‘ μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€.
λ˜ν•œ 일괄(batch) μ—…λ‘œλ“œ μ‹œμ—λ„ μ—…λ‘œλ“œλ˜λŠ” λͺ¨λ“  파일의 전체 크기 합이 μ œν•œμ„ λ„˜μ§€ μ•ŠλŠ”μ§€ 사전에 κ²€μ¦ν•˜μ—¬ 였λ₯˜ λ©”μ‹œμ§€λ₯Ό 좜λ ₯ν•˜λŠ” κΈ°λŠ₯을 μΆ”κ°€ν–ˆμŠ΅λ‹ˆλ‹€.

🎯 Why:
λ‚΄λΆ€ μ œν•œ 값이 변경될 경우 μ‚¬μš©μžμ—κ²Œ 잘λͺ»λœ 정보λ₯Ό 전달할 수 μžˆλŠ” 문제λ₯Ό μ˜ˆλ°©ν•˜λ©°, 배치 μ—…λ‘œλ“œμ˜ 경우 μ„œλ²„μΈ‘μœΌλ‘œ μ—…λ‘œλ“œκ°€ μ§„ν–‰λœ ν›„ κ±°μ ˆλ˜λŠ” 상황을 막기 μœ„ν•΄ ν΄λΌμ΄μ–ΈνŠΈ μΈ‘μ—μ„œ 즉각적인 ν”Όλ“œλ°±μ„ 주고자 ν•¨μž…λ‹ˆλ‹€.

πŸ“Έ Before/After:
Before: 파일 크기 μ΄ˆκ³Όμ‹œ 항상 "5 GiB"둜 ν‘œμ‹œ, 배치 μ—…λ‘œλ“œμ‹œ 총 μš©λŸ‰ 초과 μ œν•œ 미지원
After: ν˜„μž¬ MAX_UPLOAD_BYTES에 λ§žμΆ”μ–΄ μš©λŸ‰ μžλ™ κ³„μ‚°λ˜μ–΄ ν‘œμ‹œ, 배치 μ—…λ‘œλ“œ 총 μš©λŸ‰ μ œν•œ 초과 사전 κ²½κ³  ν‘œμ‹œ

β™Ώ Accessibility:
크기 μ œν•œ 초과 μ‹œ aria-invalid μƒνƒœκ°€ μ μ ˆν•˜κ²Œ 반영되고 μ¦‰μ‹œ μ‹œκ°μ μΈ 였λ₯˜ μ•ˆλ‚΄κ°€ κ°€λŠ₯ν•˜λ„λ‘ κ°œμ„ ν•˜μ—¬ 슀크린 리더 λ“± 보쑰 κΈ°κΈ°λ₯Ό μ‚¬μš©ν•˜λŠ” μœ μ €κ°€ λͺ…ν™•ν•˜κ²Œ 였λ₯˜ 상황을 인지할 수 μžˆλ„λ‘ ν•˜μ˜€μŠ΅λ‹ˆλ‹€.


PR created automatically by Jules for task 4520332721963242270 started by @seonghobae

Summary by CodeRabbit

  • κ°œμ„  사항
    • 파일 μ—…λ‘œλ“œ μš©λŸ‰ μ œν•œ λ©”μ‹œμ§€κ°€ μ‹€μ œ 섀정값을 κΈ°μ€€μœΌλ‘œ λ™μ μœΌλ‘œ ν‘œμ‹œλ©λ‹ˆλ‹€.
    • μ—¬λŸ¬ νŒŒμΌμ„ ν•œ λ²ˆμ— 선택할 λ•Œ κ°œλ³„ 파일 수뿐 μ•„λ‹ˆλΌ 전체 μš©λŸ‰λ„ μ¦‰μ‹œ κ²€μ¦ν•©λ‹ˆλ‹€.
    • μ œν•œ 초과 μ‹œ μ—…λ‘œλ“œ 전에 λͺ…ν™•ν•œ 였λ₯˜ λ©”μ‹œμ§€μ™€ μ ‘κ·Όμ„± ν”Όλ“œλ°±μ„ μ œκ³΅ν•©λ‹ˆλ‹€.
  • λ¬Έμ„œ
    • 파일 및 배치 μ—…λ‘œλ“œ μš©λŸ‰ 검증 λ³€κ²½ 사항을 릴리슀 λ¬Έμ„œμ— λ°˜μ˜ν–ˆμŠ΅λ‹ˆλ‹€.

@google-labs-jules

Copy link
Copy Markdown

πŸ‘‹ 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

πŸ“ Walkthrough

Walkthrough

μ—…λ‘œλ“œ μš©λŸ‰ μ œν•œ λ©”μ‹œμ§€κ°€ MAX_UPLOAD_BYTES 기반의 동적 ν‘œμ‹œκ°’μ„ μ‚¬μš©ν•˜λ„λ‘ λ³€κ²½λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 배치 μ—…λ‘œλ“œλŠ” μ„œλ²„ 전솑 전에 전체 파일 크기λ₯Ό κ²€μ¦ν•˜λ©°, 초과 μ‹œ μ»€μŠ€ν…€ μœ νš¨μ„± 및 aria-invalid μƒνƒœλ₯Ό κ°±μ‹ ν•©λ‹ˆλ‹€.

Changes

μ—…λ‘œλ“œ μš©λŸ‰ 검증

Layer / File(s) Summary
동적 μ œν•œ λ©”μ‹œμ§€
saas_web.py
단일 파일 μš©λŸ‰ 초과 λ©”μ‹œμ§€κ°€ ν•˜λ“œμ½”λ”©λœ μ œν•œκ°’ λŒ€μ‹  formatBinaryBytes(MAX_UPLOAD_BYTES) κ²°κ³Όλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€.
배치 ν•©μ‚° μš©λŸ‰ 검증
saas_web.py, tests/test_saas_web.py, .jules/palette.md, CHANGELOG.md
배치 파일의 ν•©μ‚° 크기λ₯Ό κ²€μ¦ν•˜κ³ , 초과 μ‹œ 였λ₯˜ λ©”μ‹œμ§€μ™€ setCustomValidity, aria-invalidλ₯Ό κ°±μ‹ ν•˜λ„λ‘ κ΅¬ν˜„Β·ν…ŒμŠ€νŠΈΒ·λ¬Έμ„œν™”ν–ˆμŠ΅λ‹ˆλ‹€.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • ContextualWisdomLab/codec-carver#301: μ—…λ‘œλ“œ κ²€μ¦μ—μ„œ μ»€μŠ€ν…€ μœ νš¨μ„±κ³Ό aria-invalid μƒνƒœλ₯Ό μ΄ˆκΈ°ν™”ν•˜λŠ” κ΄€λ ¨ λ‘œμ§μ„ μˆ˜μ •ν•©λ‹ˆλ‹€.
πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed 제λͺ©μ΄ 파일 크기 μ œν•œμ„ λ™μ μœΌλ‘œ κ²€μ¦ν•˜λ„λ‘ λ°”κΎΈλŠ” 핡심 λ³€κ²½κ³Ό 잘 μΌμΉ˜ν•©λ‹ˆλ‹€.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette-ux-dynamic-file-size-4520332721963242270

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/test_saas_web.py (1)

53-56: πŸ“ Maintainability & Code Quality | πŸ”΅ Trivial | ⚑ Quick win

ν…ŒμŠ€νŠΈκ°€ μ‹€μ œ μ œν•œκ°’ 동기화λ₯Ό 검증해야 ν•©λ‹ˆλ‹€.

ν˜„μž¬ κ²€μ‚¬λŠ” limitText λ¬Έμžμ—΄μ˜ 쑴재만 ν™•μΈν•˜λ―€λ‘œ, JavaScript μ œν•œκ°’μ΄ μ„œλ²„μ˜ saas_web.MAX_UPLOAD_BYTES와 달라도 ν†΅κ³Όν•©λ‹ˆλ‹€. λ Œλ”λ§λœ HTML에 μ‹€μ œ 섀정값이 μ£Όμž…λ˜μ—ˆλŠ”μ§€ ν™•μΈν•˜κ³ , λ‹¨μΌΒ·λ°°μΉ˜ 였λ₯˜ 경둜의 aria-invalid μ²˜λ¦¬λ„ 검증해 μ£Όμ„Έμš”.

πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_saas_web.py` around lines 53 - 56, Update the assertions in the
relevant test to verify the rendered JavaScript limit uses the actual
saas_web.MAX_UPLOAD_BYTES value, rather than only checking limitText strings.
Also assert aria-invalid behavior for both single-file and batch upload error
paths, covering the rendered HTML output.
πŸ€– Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@saas_web.py`:
- Around line 233-236: Connect the browser upload limit to the server’s
MAX_UPLOAD_BYTES instead of a separately hardcoded value: update saas_web.py
lines 233-236 to inject and use that setting for single-file validation and
messaging, and lines 329-336 to use the same injected limit for batch-total
validation. Update tests/test_saas_web.py lines 53-56 to inject the actual
configured limit and verify aria-invalid behavior.

---

Nitpick comments:
In `@tests/test_saas_web.py`:
- Around line 53-56: Update the assertions in the relevant test to verify the
rendered JavaScript limit uses the actual saas_web.MAX_UPLOAD_BYTES value,
rather than only checking limitText strings. Also assert aria-invalid behavior
for both single-file and batch upload error paths, covering the rendered HTML
output.
πŸͺ„ Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
βš™οΈ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d6c6b1a6-dd59-4b1a-b128-0db21db6f7fb

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 5a92586 and 4b101e1.

πŸ“’ Files selected for processing (4)
  • .jules/palette.md
  • CHANGELOG.md
  • saas_web.py
  • tests/test_saas_web.py

Comment thread saas_web.py
Comment on lines +233 to +236
const limitText = formatBinaryBytes(MAX_UPLOAD_BYTES);
input.setCustomValidity('File exceeds ' + limitText + ' limit.');
input.setAttribute('aria-invalid', 'true');
preview.innerText = 'Selected file size: ' + text + ' (exceeds 5 GiB limit)';
preview.innerText = 'Selected file size: ' + text + ' (exceeds ' + limitText + ' limit)';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ—„οΈ Data Integrity & Integration | 🟠 Major | ⚑ Quick win

ν΄λΌμ΄μ–ΈνŠΈ μ—…λ‘œλ“œ μ œν•œκ³Ό ν…ŒμŠ€νŠΈλ₯Ό μ„œλ²„ 섀정에 μ—°κ²°ν•΄μ•Ό ν•©λ‹ˆλ‹€.

λΈŒλΌμš°μ €μ˜ μ œν•œκ°’μ΄ μ„œλ²„ μ„€μ •κ³Ό λ³„λ„λ‘œ ν•˜λ“œμ½”λ”©λ˜μ–΄ μžˆμ–΄, μ„€μ • λ³€κ²½ μ‹œ μ‚¬μš©μž λ©”μ‹œμ§€Β·κ²€μ¦Β·μ‹€μ œ μ„œλ²„ λ™μž‘μ΄ λΆˆμΌμΉ˜ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

  • saas_web.py#L233-L236: 단일 파일 였λ₯˜ λ©”μ‹œμ§€κ°€ μ„œλ²„μ˜ MAX_UPLOAD_BYTESλ₯Ό μ‚¬μš©ν•˜λ„λ‘ 값을 μ£Όμž…ν•©λ‹ˆλ‹€.
  • saas_web.py#L329-L336: 배치 ν•©μ‚° 검증도 λ™μΌν•˜κ²Œ μ£Όμž…λœ μ œν•œκ°’μ„ μ‚¬μš©ν•©λ‹ˆλ‹€.
  • tests/test_saas_web.py#L53-L56: μ‹€μ œ μ„€μ •κ°’ μ£Όμž…κ³Ό aria-invalid λ™μž‘μ„ κ²€μ¦ν•˜λ„λ‘ ν…ŒμŠ€νŠΈλ₯Ό λ³΄κ°•ν•©λ‹ˆλ‹€.
πŸ“ Affects 2 files
  • saas_web.py#L233-L236 (this comment)
  • saas_web.py#L329-L336
  • tests/test_saas_web.py#L53-L56
πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@saas_web.py` around lines 233 - 236, Connect the browser upload limit to the
server’s MAX_UPLOAD_BYTES instead of a separately hardcoded value: update
saas_web.py lines 233-236 to inject and use that setting for single-file
validation and messaging, and lines 329-336 to use the same injected limit for
batch-total validation. Update tests/test_saas_web.py lines 53-56 to inject the
actual configured limit and verify aria-invalid behavior.

Copy link
Copy Markdown
Contributor Author

Superseded by merged PR #354, which provides the same dynamic limit rendering and aggregate batch-size guard with current-head tests. Closing this duplicate to keep one canonical implementation.

@seonghobae seonghobae closed this Aug 7, 2026
@google-labs-jules

Copy link
Copy Markdown

Superseded by merged PR #354, which provides the same dynamic limit rendering and aggregate batch-size guard with current-head tests. Closing this duplicate to keep one canonical implementation.

Understood. Acknowledging that this PR has been superseded by #354 and is now closed. Stopping work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant