Conversation
…ebsite runs type='url' triggers HTML5 browser validation before handleSubmit, so entries like 'example.com' are rejected before the normalizeWebsite helper can prefix 'https://'. Switching to type='text' with inputMode='url' (preserves the URL keyboard on mobile) lets the existing normalization reach every submission. Co-Authored-By: AgenticDiego <noreply@carvallo.io>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
This branch had an error being deployed
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.
Daily Product Improvement
📝 TLDR
Fix dead normalization path in vendor form website field —
type='url'blocked thenormalizeWebsitehelper from ever running.📝 Description
During daily product review, the vendor add/edit form website input was identified as having a latent UX bug: the field used
type='url', which triggers browser-native URL validation beforehandleSubmitis called. This meant a user enteringexample.com(withouthttps://) would see a browser error ("Please enter a URL") and never reach thenormalizeWebsitehelper that was specifically written to prefixhttps://in that case. The normalization code was effectively dead.This Change
Inputfromtype='url'totype='text'so browser-native URL validation no longer blocks submission.inputMode='url'to preserve the URL-optimized keyboard on mobile devices.https://...tohttps://example.comfor clarity.normalizeWebsitehelper now runs as intended, prefixinghttps://when the user enters a bare domain.🧪 Testing
biome lint— no issuestsc --noEmit— no type errors🧪 How to test as a user
floristjane.com(no protocol).https://floristjane.com.📚 Documentation
No documentation changes needed.
🎨 Style and code quality
biome linton changed file — clean📦 Dependencies
No new dependencies.
Recommendations Reviewed
vendor-form.tsxtype='url'blocksnormalizeWebsitehelper; bare domains likeexample.comfail browser validation beforehandleSubmitrunstype='text'+inputMode='url'so normalization can executevendor-card.tsxpriceDisplay()is called twice in JSX — once to guard and once to renderconst price = priceDisplay()variablevendor-card.tsxhidden/blockCSS toggle — no click-outside-to-closePopovercomponentbudget/category-form.tsx,expense-form.tsxisPending(unlike vendor form which shows "Saving…")self-invite-link-manager.tsxSelected Improvement
Vendor form website field:
type='url'→type='text'withinputMode='url'.Why This Was Selected
This is the only item that renders existing code unreachable. The
normalizeWebsitehelper was written with good intent but could never execute because browser-native URL validation ontype='url'fires first. It is a single-line fix with clear, testable behavior, zero risk to unrelated surfaces, and no design input needed.Files Changed
src/components/vendor/vendor-form.tsxFuture Recommendations
hidden/blocktoggle with aPopoverso click-outside closes itpriceDisplay()call invendor-card.tsxGitHub Issues Created or Proposed
None. All unimplemented recommendations are minor polish or small cleanups that do not meet the threshold for separate issue tracking.
Generated by Claude Code