Skip to content

fix: new project flow incorrect redirect#4341

Open
jog1t wants to merge 3 commits intomainfrom
fix-new-project-incorrect
Open

fix: new project flow incorrect redirect#4341
jog1t wants to merge 3 commits intomainfrom
fix-new-project-incorrect

Conversation

@jog1t
Copy link
Contributor

@jog1t jog1t commented Mar 3, 2026

Fixes RVT-6045

This pull request introduces several improvements and minor fixes across the frontend, focusing on better parameter handling in project creation navigation and small UI enhancements to the actor general information display.

Navigation and parameter handling improvements:

  • Refactored the CreateProjectFrameContent component to use the organization parameter from mutation variables (vars.organization) instead of relying on route parameters, ensuring more robust and consistent navigation after project creation. [1] [2] [3]
  • Updated the usage of the onSuccess callback in the organization project creation route to align with the new parameter handling, passing vars.organization for navigation instead of directly reading from route params.

UI and styling enhancements:

  • Improved the layout and consistency of the ActorGeneral component by adding minimum height styles to definition list elements and adjusting the DiscreteCopyButton classes for better alignment and appearance. [1] [2] [3] [4] [5] [6] [7]

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@jog1t
Copy link
Contributor Author

jog1t commented Mar 3, 2026

@railway-app
Copy link

railway-app bot commented Mar 3, 2026

🚅 Deployed to the rivet-pr-4341 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-inspector 😴 Sleeping (View Logs) Web Mar 11, 2026 at 9:05 pm
frontend-cloud 😴 Sleeping (View Logs) Web Mar 11, 2026 at 9:02 pm
ladle ❌ Build Failed (View Logs) Web Mar 11, 2026 at 1:42 pm
website 😴 Sleeping (View Logs) Web Mar 3, 2026 at 8:11 pm
mcp-hub ✅ Success (View Logs) Web Mar 3, 2026 at 8:05 pm

@jog1t jog1t self-assigned this Mar 3, 2026
@linear
Copy link

linear bot commented Mar 3, 2026

@claude
Copy link

claude bot commented Mar 3, 2026

PR Review: fix: new project flow incorrect redirect

Summary: This PR fixes a bug where project creation could succeed but navigation would silently fail (or navigate incorrectly), by using vars.organization from mutation variables instead of relying on route params.

Navigation Fix (create-project-frame.tsx)

The core change is correct and addresses a real bug.

Before, the onSuccess handler had an early return when params.organization was missing. If the component was used outside a route that included organization in its params, the mutation would succeed but navigation would never happen (silent failure). It also relied on ambient route state rather than the data actually submitted.

After, vars.organization is used, which always comes from the form submission. This makes the component self-contained and correct regardless of route context.

Route File (orgs.$organization/new/index.tsx)

The onSuccess signature update from (data) to (data, vars) is consistent with the updated component interface. Switching from params.organization to vars.organization is equivalent behavior (the form was initialized with params.organization) but more robust.

UI Changes (actor-general.tsx)

  • Adding min-h-5 to dt/dd elements prevents layout collapse for short/empty content.
  • Adding h-auto to DiscreteCopyButton prevents a fixed height from overriding the button's natural layout.

Minor Observations

  1. Empty string edge case: If both the organization prop and defaultOrg are undefined, the form defaults organization to an empty string, so vars.organization could be empty on navigation. The old code had the same fallback, so this is not a regression, but worth verifying that CreateProjectForm.Organization enforces non-empty selection.

  2. There is an existing FIXME comment at line 27 of create-project-frame.tsx that predates this PR and is unrelated to these changes.

Verdict

The fix is correct, well-scoped, and addresses the root cause cleanly. No issues blocking merge.

@jog1t jog1t mentioned this pull request Mar 3, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 3, 2026

More templates

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4341

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4341

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4341

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4341

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4341

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4341

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4341

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4341

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4341

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4341

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4341

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4341

commit: bd50f65

@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4341 March 11, 2026 21:44 Destroyed
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.

1 participant