Skip to content

feat: add clear button to URL input field - #22

Merged
toy-crane merged 10 commits into
mainfrom
fix-ui
Apr 8, 2026
Merged

feat: add clear button to URL input field#22
toy-crane merged 10 commits into
mainfrom
fix-ui

Conversation

@toy-crane

Copy link
Copy Markdown
Owner

Summary

  • URL 입력창에 텍스트가 있을 때 X(clear) 버튼을 표시하여 빠르게 URL을 지울 수 있도록 함
  • Clear 버튼 클릭 시 URL만 비우고, 이미 불러온 결과(프리뷰)와 프롬프트는 유지
  • 로딩 중에는 clear 버튼 숨김, 에러 상태에서는 에러 메시지도 함께 제거

Test plan

  • URL 입력 시 X 버튼 표시 확인
  • X 클릭 시 URL만 비워지고 프리뷰 유지 확인
  • 로딩 중 X 버튼 숨김 확인
  • 에러 상태에서 X 클릭 시 에러도 사라지는지 확인
  • bun run test 전체 통과

🤖 Generated with Claude Code

toy-crane and others added 10 commits April 8, 2026 09:54
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Red phase: 4 scenarios for URL input clear button — visibility rules,
preview persistence on clear, hidden during loading, and error clearing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
URL 입력창에 텍스트가 있고 로딩 중이 아닐 때 X(clear) 버튼을 표시한다.
클릭 시 onUrlChange("") 와 onErrorClear()를 호출하여 URL과 에러를 초기화한다.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract repeated onUrlChange("") + onErrorClear() pair into handleClear
- Simplify url.length > 0 to truthy url check
- Remove afterEach(vi.restoreAllMocks) — no spyOn in this test file
- Remove inline comments that narrate what assertions already express

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on feature

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…er alignment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lanced spacing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
feedme Building Building Preview, Comment Apr 8, 2026 1:38am

@toy-crane
toy-crane merged commit 7b4e2b9 into main Apr 8, 2026
2 of 3 checks passed
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