Skip to content

feat(frontend): sync compute connect dialog with onboarding and simplify others#5482

Open
abcxff wants to merge 1 commit into
stack/docs-use-rivet_pool-instead-of-the-unread-rivet_runner-env-var-kwlxqrqlfrom
stack/feat-frontend-sync-compute-connect-dialog-with-onboarding-and-simplify-others-vqrrwyux
Open

feat(frontend): sync compute connect dialog with onboarding and simplify others#5482
abcxff wants to merge 1 commit into
stack/docs-use-rivet_pool-instead-of-the-unread-rivet_runner-env-var-kwlxqrqlfrom
stack/feat-frontend-sync-compute-connect-dialog-with-onboarding-and-simplify-others-vqrrwyux

Conversation

@abcxff

@abcxff abcxff commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@abcxff

abcxff commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@claude

claude Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review: sync compute connect dialog with onboarding and simplify others

Overview: this PR extracts the shared "agent instructions" / "compute deploy" helpers out of getting-started.tsx into a new frontend/src/app/compute-deploy.tsx module, reuses them from connect-rivet-frame.tsx (replacing the always-visible prompt with a copy-to-clipboard AgentPromptBanner plus a manual "npx @rivetkit/cli deploy" command box), fixes connect-aws-frame.tsx / connect-hetzner-frame.tsx to import the serverful dialog content instead of the serverless one, adds a provider deploy-guide link and namespace guidance, and drops the "Beta" badge from the Rivet Compute dropdown item.

Bugs / correctness

  • Namespace note leaks into non-Compute provider prompts. useAgentInstructionsCode() in frontend/src/app/compute-deploy.tsx unconditionally sources namespace from useEngineCompatDataProvider().engineNamespace and passes it to getAgentInstructionsPrompt() regardless of provider. In frontend/src/content/agent-prompts.ts, whenever namespace is truthy, the prompt is prefixed with a note telling the agent to pass a namespace flag with the deploy command and not deploy to any other namespace. That instruction only makes sense for the Rivet Compute CLI deploy path, but it is now injected for every provider (AWS, Hetzner, Vercel, custom, etc.) whose deploy steps are just environment variables plus dashboard registration and have no such flag at all. This will confuse a coding agent following the generic instructions. Consider only passing namespace through when provider is "rivet" (or gating the note on serverless && provider === "rivet" inside getAgentInstructionsPrompt).

  • Double-slash / inconsistent domain in the new provider doc link. In connect-manual-serverless-frame.tsx Step2, the link is built by concatenating "https://www.rivet.dev/" with providerOptions?.href, falling back to "docs/getting-started". The deployOptions href values already start with a leading slash (e.g. "/docs/deploy/aws-ecs" in frontend/packages/shared-data/src/deploy.ts), so for any matched provider this produces a double slash such as "https://www.rivet.dev//docs/deploy/aws-ecs". It also uses the www subdomain instead of the plain rivet.dev convention used elsewhere in this same PR (useAgentInstructionsCode builds its doc URL as "https://rivet.dev" plus the href, no extra separator, no www). Per CLAUDE.md the canonical domain is rivet.dev. Recommend matching that existing pattern and keeping the leading slash only on the fallback. Note that connect-manual-serverful-frame.tsx, untouched by this PR, appears to have the identical pre-existing bug since this code was copied from it, so it's worth fixing both together.

  • The namespace fix is not applied consistently to the onboarding "deploy manually" flow. RivetDeploy in getting-started.tsx (the primary onboarding Deploy screen for Rivet Compute, separate from the connect-rivet-frame.tsx dialog touched by this PR) still builds its deploy command as "npx @rivetkit/cli deploy --token " with no namespace flag. This is the same class of bug the rest of this PR fixes: per the updated agent-prompts.ts copy, deploying without an explicit namespace flag targets the default "production" namespace rather than the onboarding namespace. Since RivetDeploy already has the namespace available from its data provider, this call site looks like it was missed.

Security note

  • The new manual-deploy CommandBox in connect-rivet-frame.tsx's AgentInstructions renders the literal "--token " as visible on-page text via CodePreview, unlike AgentPromptBanner, which keeps the secret behind a copy-to-clipboard action only. Since this is a live Cloud API token, rendering it in plaintext in the DOM increases exposure (screenshots, screen recording, session-replay/analytics tooling that captures DOM text, shoulder surfing). Worth considering masking it with a copy affordance instead of printing the raw secret, consistent with how the rest of this PR moves toward copy-only exposure for the agent prompt. Note RivetDeploy in getting-started.tsx has this same pre-existing pattern and is untouched by this PR.

Minor

  • The new external link in Step2 uses rel="noopener" without "noreferrer"; every other external link across this codebase (getting-started.tsx, feedback-button.tsx, top-bar-actions.tsx, help-button.tsx, connect.tsx, publishable-token-code-group.tsx, serverless-connection-check.tsx) uses both. Worth matching for consistency.
  • Dropping the "Beta" badge from the Rivet Compute dropdown item is unrelated to the rest of the diff (dialog/prompt refactor); reasonable if compute is graduating out of beta, but worth double-checking it's intentional for this change. The remaining "Beta" badges elsewhere in the dashboard are for agentOS, not Compute, so this doesn't leave an inconsistent Compute label anywhere else.

Positives

  • Good catch fixing the AWS/Hetzner dialogs to actually render the serverful content; previously they rendered the serverless form/copy, which was a real functional bug.
  • The compute-deploy.tsx extraction is a clean, low-risk dedup between getting-started.tsx and connect-rivet-frame.tsx; call sites were updated consistently for the useComputeInstructionsCode() return-shape change from a plain string to an object with code, cloudToken, and namespace.

No test coverage was added, but that's consistent with this codebase's existing conventions for this kind of frontend dialog/prompt-string change; there's no unit test framework for this content and Ladle stories are reserved for stateful UI components.

@abcxff
abcxff force-pushed the stack/feat-frontend-sync-compute-connect-dialog-with-onboarding-and-simplify-others-vqrrwyux branch from e6d4a5e to 8a5e179 Compare July 24, 2026 20:19
@abcxff
abcxff force-pushed the stack/docs-use-rivet_pool-instead-of-the-unread-rivet_runner-env-var-kwlxqrql branch from 1b3a64f to b99982c Compare July 24, 2026 20:19
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