fix: new project flow incorrect redirect by jog1t · Pull Request #4341 · rivet-dev/rivet

PR Review: fix: new project flow incorrect redirect

Summary

This PR fixes a navigation bug in the new project creation flow and includes minor UI improvements to the actor general info panel. The changes are focused and correct.


Navigation Fix

The core fix is correct. Using vars.organization (from mutation variables) instead of params.organization (from the route) is the right approach:

  • vars.organization reflects exactly what was submitted to the API and is guaranteed non-empty by the mutation type definition.
  • The old code had a silent failure path: the early-return guard would quietly bail after a successful project creation, leaving the user stranded on the creation screen. Removing it and always navigating is correct.
  • The old fallback in new/index.tsx would produce a broken URL with an empty organization segment. This is eliminated.

The organization prop is still passed to CreateProjectFrameContent to pre-populate the form default value — correct and unchanged. The fix only affects the navigation target after success, which is a clean separation of concerns.


UI Changes (actor-general.tsx)

  • The min-h-5 classes on the Flex wrapper enforce consistent minimum row height, preventing layout jitter when fields are empty.
  • h-auto on each DiscreteCopyButton prevents a fixed button height from clipping wrapped text content.

Safe, localized changes with no functional impact.


No Issues Found

Small, well-scoped fix for a real bug. No security concerns, no performance issues, no regressions. Type contracts across all three files are consistent.