Repository navigation
fix(web): require competitor during onboarding - #378
Merged
Merged
Conversation
gkhngyk
approved these changes
Jul 9, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
LGTM — this closes #377 cleanly.
- Primary CTA is now disabled when no competitor is present (
disabled={savingCompetitors || !hasSelectedCompetitors}) and the skippable "Skip & start tracking" affordance is gone, replaced by a clear "Add a competitor to continue". - The defensive guard in
handleFinish(early return on zero) is a nice belt-and-suspenders backup to the disabled button. - Verified the count covers both cases the issue asked for:
addManualCompetitorpushes manual entries intosuggestedCompetitorswithselected: true, sofilter(c => c.selected)includes suggested-selected and manually-added competitors.
Prettier-clean, single-concern. Nice work — welcome! 🎉
This was referenced Jul 9, 2026
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.
Summary
Requires users to select or manually add at least one competitor before
completing the onboarding Competitors step.
This removes the previous
Skip & start trackingpath, disables the primaryCTA when no competitors are selected, and adds a defensive client-side guard
in the finish handler so onboarding cannot complete with zero competitors.
Related issue
Closes #377
Type of change
fix— Bug fixChecklist
feature/,fix/,chore/,docs/) — see [CONTRIBUTING.md](https://github.com/ansvisor/ansvisor/blob/main/CONTRIBUTING.md)
www.conventionalcommits.org/)
yarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)