Skip to content

fix(web): require competitor during onboarding - #378

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/require-onboarding-competitor
Jul 9, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/require-onboarding-competitor

Conversation

@d180

@d180 d180 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Requires users to select or manually add at least one competitor before
completing the onboarding Competitors step.

This removes the previous Skip & start tracking path, disables the primary
CTA 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 fix

Checklist

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: addManualCompetitor pushes manual entries into suggestedCompetitors with selected: true, so filter(c => c.selected) includes suggested-selected and manually-added competitors.

Prettier-clean, single-concern. Nice work — welcome! 🎉

@gkhngyk
gkhngyk merged commit bfa9c08 into ansvisor:main Jul 9, 2026
4 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.

Onboarding: require at least one competitor before finishing the competitors step

2 participants