Skip to content

fix(web): reset empty target-size validation state - #353

Merged
seonghobae merged 4 commits into
mainfrom
palette-ux-empty-string-validation-7220895853454961955
Aug 7, 2026
Merged

fix(web): reset empty target-size validation state#353
seonghobae merged 4 commits into
mainfrom
palette-ux-empty-string-validation-7220895853454961955

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Purpose

When either required target-size input is cleared, remove stale custom validity and aria-invalid state so the browser and assistive technology report the current empty-required state instead of the previous numeric error.

Change

  • handle the empty string before numeric validation in the single-file and batch target-size listeners;
  • clear preview text, custom validity, and aria-invalid, then return;
  • add focused tests that isolate both listener bodies, prove ordering before the numeric-error branch, and prove exactly two target-size empty branches exist;
  • preserve dynamic upload-limit wording, combined batch-size validation, current authentication tests, and all protected-main history;
  • update the Palette learning and Unreleased changelog without a one-shot workflow.

Acceptance boundary

Merge only after exact-current-head CI, fuzz, security, SAST, review, zero unresolved actionable threads, and repository protection succeed. No unrelated security, credential, dependency, or governance change is included.

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 Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0bcb04f1-1f78-456f-8784-3e5901f2f1b1

📥 Commits

Reviewing files that changed from the base of the PR and between 1da7eb3 and 52f465f.

📒 Files selected for processing (1)
  • tests/test_empty_target_validation.py
📝 Walkthrough

Walkthrough

단일 및 배치 크기 입력이 비어 있을 때 미리보기와 유효성 상태를 초기화합니다. 숫자 검사는 건너뜁니다. 이 동작을 검증하는 소스 계약 테스트와 처리 지침 및 변경 이력을 추가합니다.

Changes

빈 크기 입력 검증

Layer / File(s) Summary
빈 입력 초기화와 UI 검증
saas_web.py, tests/test_empty_target_validation.py, .jules/palette.md, CHANGELOG.md
단일 및 배치 입력이 비어 있으면 미리보기, 사용자 지정 유효성 오류, aria-invalid 상태를 초기화하고 즉시 반환합니다. 테스트는 두 입력 분기의 순서와 상태 초기화를 검증합니다. 처리 지침과 변경 이력도 갱신합니다.

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

Possibly related PRs

🚥 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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 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-empty-string-validation-7220895853454961955

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.

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

294-300: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

두 입력 필드의 회귀를 모두 검증하도록 테스트를 확장하세요.

현재 assertion은 일반적인 if (this.value === '') { 문자열 하나만 확인합니다. batch_target_bytes 분기가 없어도 테스트가 통과할 수 있습니다.

두 핸들러의 빈 문자열 분기와 setCustomValidity(''), removeAttribute('aria-invalid') 호출을 각각 검증하세요. 가능하면 브라우저 테스트에서 두 입력에 이벤트를 발생시키고 미리보기, validationMessage, aria-invalid 상태를 확인하세요.

간단한 정적 검증 보강 예시
         self.assertIn("if (this.value === '') {", html)
+        self.assertEqual(html.count("if (this.value === '') {"), 2)
+        self.assertIn(
+            "document.getElementById('batch_target_bytes').addEventListener('input'",
+            html,
+        )
🤖 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 294 - 300, Expand
test_get_ui_includes_target_bytes_validation_feedback to independently verify
both input handlers, including each empty-string branch, setCustomValidity(''),
and removeAttribute('aria-invalid') calls; avoid relying on the shared if
(this.value === '') assertion. Prefer exercising both inputs with browser events
and asserting their preview output, validationMessage, and aria-invalid state.
🤖 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.

Nitpick comments:
In `@tests/test_saas_web.py`:
- Around line 294-300: Expand
test_get_ui_includes_target_bytes_validation_feedback to independently verify
both input handlers, including each empty-string branch, setCustomValidity(''),
and removeAttribute('aria-invalid') calls; avoid relying on the shared if
(this.value === '') assertion. Prefer exercising both inputs with browser events
and asserting their preview output, validationMessage, and aria-invalid state.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 97392f4e-3f51-4da1-a79a-74d980471165

📥 Commits

Reviewing files that changed from the base of the PR and between 963291f and c700380.

📒 Files selected for processing (3)
  • .jules/palette.md
  • saas_web.py
  • tests/test_saas_web.py

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review

Rebuild this draft from exact protected main head d169ce24db8cd812d97734a054f21b7394f5bfaf. Preserve the dynamic upload-limit wording, combined batch-size validation, current CHANGELOG entries, and all current .jules history. Remove .github/workflows/repair-pr-353-v2.yml and every unrelated security/governance change. The final diff must contain only: (1) an empty-string branch in both target-size input handlers that clears preview text, custom validity, and aria-invalid; (2) focused tests that isolate both handler bodies; (3) one scoped Palette learning; and (4) one Unreleased changelog bullet. Run hash-pinned installation, focused and complete tests, compilation, docstring gate, git diff --check, then publish a normal source commit. Do not merge, approve, release, alter protections, or preserve the one-shot writer workflow.

@google-labs-jules

Copy link
Copy Markdown

@opencode-agent @cwl-noema-review

Rebuild this draft from exact protected main head d169ce24db8cd812d97734a054f21b7394f5bfaf. Preserve the dynamic upload-limit wording, combined batch-size validation, current CHANGELOG entries, and all current .jules history. Remove .github/workflows/repair-pr-353-v2.yml and every unrelated security/governance change. The final diff must contain only: (1) an empty-string branch in both target-size input handlers that clears preview text, custom validity, and aria-invalid; (2) focused tests that isolate both handler bodies; (3) one scoped Palette learning; and (4) one Unreleased changelog bullet. Run hash-pinned installation, focused and complete tests, compilation, docstring gate, git diff --check, then publish a normal source commit. Do not merge, approve, release, alter protections, or preserve the one-shot writer workflow.

Acknowledged. I have rebuilt the patch from d169ce24db8cd812d97734a054f21b7394f5bfaf, removing the unrelated security fixes. The patch now strictly contains the empty-string validation UX improvement, focused unit tests, and corresponding Palette journal & changelog entries as requested. I've also verified compilation, testing, and ran git diff --check before submitting.

Rebuild the focused accessibility fix from protected current main, preserve dynamic upload-limit behavior, add isolated handler tests, and remove unrelated security/test changes.
@seonghobae
seonghobae force-pushed the palette-ux-empty-string-validation-7220895853454961955 branch from 3cc86ff to 84f7110 Compare August 7, 2026 09:03
@seonghobae seonghobae changed the title 🎨 Palette: 숫자 입력 필드 빈 문자열 초기화 UX 개선 fix(web): reset empty target-size validation state Aug 7, 2026
@seonghobae
seonghobae marked this pull request as ready for review August 7, 2026 09:05
@seonghobae
seonghobae merged commit b2bc83a into main Aug 7, 2026
34 checks passed
@seonghobae
seonghobae deleted the palette-ux-empty-string-validation-7220895853454961955 branch August 7, 2026 09:24
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