Draft
feat: Add 250-character limit validation for username input with comprehensive feedback#4
Conversation
Deploying git-vegas with
|
| Latest commit: |
834d0ea
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b6f6429f.git-vegas.pages.dev |
| Branch Preview URL: | https://copilot-fix-bf8b167e-52c6-45.git-vegas.pages.dev |
Co-authored-by: kertal <463851+kertal@users.noreply.github.com>
Co-authored-by: kertal <463851+kertal@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Enforce 250-character limit for usernames in link and input with feedback
feat: Add 250-character limit validation for username input with comprehensive feedback
Aug 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Users could enter or share links with excessively long username lists that could cause performance issues and API rate limiting. The application lacked validation to prevent username combinations exceeding reasonable character limits.
Solution
This PR implements a comprehensive 250-character limit validation system that works across all username input scenarios:
✅ Manual Entry Validation
When users manually type usernames that exceed 250 characters total, they receive immediate feedback:
✅ URL Restoration Validation
When users access shared links with excessive username parameters, validation errors are displayed and search operations are prevented:
✅ Search Operation Protection
The validation is integrated into the core search flow, ensuring that:
validateSearchParams()checks username character limits before API callsvalidateUsernameList()provides accurate character counts in error messagesTechnical Implementation
Core Validation (
src/utils.ts)validateUsernameList()to count total character length of all usernamesSearch Integration (
src/utils/githubSearch.ts)validateSearchParams()to use username validationURL Handling (
src/hooks/useGitHubFormState.ts)Testing
Added comprehensive test coverage including:
User Experience
This ensures better performance, prevents API abuse, and provides a consistent user experience across all username input methods.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/users/urlusernode (vitest 1)(http block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.