Skip to content

feat(search): reject invalid GitHub usernames before searching - #188

Merged
hyuraku merged 2 commits into
masterfrom
hyuraku/username-validation
Aug 28, 2026
Merged

hyuraku merged 2 commits into
masterfrom
hyuraku/username-validation

Conversation

@hyuraku

@hyuraku hyuraku commented Aug 28, 2026

Copy link
Copy Markdown
Owner

概要

Add unit tests with vitest, and stop the app from sending a request when the typed name cannot be a GitHub username.

変更点

  • Add vitest, a test / test:watch script, and run yarn test in the Node.js CI workflow
  • Pin all vite copies to one range with a resolutions entry so vitest and vite do not install two versions
  • Add src/utils/validateUsername.ts with the GitHub username rules, covered by 20 unit tests
  • SearchBar shows an inline error instead of searching when the name is invalid. The error only appears on submit, and clears as soon as the name changes
  • The error is wired up for screen readers with aria-invalid, aria-describedby and role="alert"
  • Add a Cypress spec for the validation flow

🤖 Generated with Claude Code

hyuraku and others added 2 commits August 28, 2026 23:39
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@hyuraku
hyuraku merged commit af7efe0 into master Aug 28, 2026
3 checks passed
@hyuraku
hyuraku deleted the hyuraku/username-validation branch August 28, 2026 14:41
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