Skip to content

fix: redirect to home after creating first user#925

Merged
igboyes merged 2 commits intomainfrom
fixes
Apr 30, 2026
Merged

fix: redirect to home after creating first user#925
igboyes merged 2 commits intomainfrom
fixes

Conversation

@igboyes
Copy link
Copy Markdown
Member

@igboyes igboyes commented Apr 30, 2026

Summary

  • After creating the first user, the app now invalidates the root query cache and navigates to / using TanStack Router instead of reloading the page via window.location.reload()
  • The onSuccess handler was moved from the mutation definition in useCreateFirstUser to the call site in FirstUser.tsx so that navigation concerns stay in the component
  • Clarifies conventional commit type guidelines in AGENTS.md, noting that only feat and fix trigger semantic-release and describing when to use each type

Test plan

  • Updated test uses renderWithRouter and asserts router.state.location.pathname === "/" after form submission
  • Manually verify that submitting the first-user form redirects to the home page without a full page reload

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Git commit message guidelines in AGENTS.md and refactors the first-user creation process. The useCreateFirstUser hook's automatic page reload was replaced with programmatic navigation and query invalidation within the FirstUser component. Additionally, the associated test was updated to verify the redirect and reflect changes to the API endpoint method. I have no feedback to provide.

@igboyes igboyes merged commit 2b89a64 into main Apr 30, 2026
10 checks passed
@igboyes igboyes deleted the fixes branch April 30, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant