Skip to content

fix(frontend): onboarding prompts#5122

Open
abcxff wants to merge 1 commit into
06-01-fix_frontend_fix_compute_rivet_run_urlfrom
06-02-fix_frontend_onboarding_prompts
Open

fix(frontend): onboarding prompts#5122
abcxff wants to merge 1 commit into
06-01-fix_frontend_fix_compute_rivet_run_urlfrom
06-02-fix_frontend_onboarding_prompts

Conversation

@abcxff
Copy link
Copy Markdown
Contributor

@abcxff abcxff commented Jun 2, 2026

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

@railway-app
Copy link
Copy Markdown

railway-app Bot commented Jun 2, 2026

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

Service Status Web Updated (UTC)
kitchen-sink ❌ Build Failed (View Logs) Web Jun 2, 2026 at 7:39 pm
frontend-cloud 😴 Sleeping (View Logs) Web Jun 2, 2026 at 7:31 pm
website 😴 Sleeping (View Logs) Web Jun 2, 2026 at 7:27 pm
ladle ✅ Success (View Logs) Web Jun 2, 2026 at 7:19 pm
frontend-inspector ❌ Build Failed (View Logs) Web Jun 2, 2026 at 7:17 pm
mcp-hub ✅ Success (View Logs) Web Jun 2, 2026 at 7:17 pm

Copy link
Copy Markdown
Contributor Author

abcxff commented Jun 2, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Jun 2, 2026

Code Review: PR #5122 – fix(frontend): onboarding prompts

Summary

This PR extracts hardcoded onboarding/agent-instruction prompt strings from two components (getting-started.tsx, connect-rivet-frame.tsx) into a new shared module (frontend/src/content/agent-prompts.ts). The main changes are:

  • Extract getAgentInstructionsPrompt (generic provider setup flow) and getComputeAddendum (Rivet Compute-specific deployment addendum) into agent-prompts.ts.
  • Consolidate two diverged prompt-building code paths (buildRivetAgentInstructionsCode + useOtherAgentInstructionsCode) into a single useAgentInstructionsCode hook.
  • Remove the inline API token fetch from AgentInstructions inside connect-rivet-frame.tsx.
  • Bump rivet-dev/deploy-action from v1.1.1 to v1.1.2 in both the static YAML snippet and the generated compute addendum.
  • Rename managed-pool-config to compute-pool-config in the generated GitHub Actions YAML.

The refactor is directionally correct. Below are the issues found.


Issues

1. Stale Suspense wrapper motivation – connect-rivet-frame.tsx lines 111-119

After this PR, AgentInstructions no longer calls useSuspenseQuery directly, but the <Suspense> boundary wrapping it was kept. The component still suspends via useRivetDsnusePublishableToken/useAdminToken, so the boundary is still load-bearing — but for a different reason than before. Without a comment, a future reader may remove it thinking it is dead code.

Recommendation: Add a brief inline comment explaining the Suspense covers useAdminToken/usePublishableToken.

2. Behavioral change: containsSecret added to non-cloud flows – getting-started.tsx ~line 857

The new GenericCopyAgentInstructionsButton passes containsSecret unconditionally. The old OtherCopyAgentInstructionsButton did not pass containsSecret. Since the generated prompt now embeds RIVET_ENDPOINT (an admin token), containsSecret={true} is factually correct — but it is a behavioral change. The toast will now warn about a secret for Railway/AWS/etc. flows where it previously did not. Confirm this is intentional.

3. Redundant provider-docs list in the Rivet Compute flow – getting-started.tsx �line 764

When provider === "rivet", getAgentInstructionsPrompt renders a step saying "Review the docs for Rivet Compute (pick from all 13 providers...)" immediately followed by the computeAddendum which already provides precise Rivet-specific steps. The original buildRivetAgentInstructionsCode did not include the generic provider list. Consider passing providerStr: undefined when building the Rivet-specific variant, or suppressing the docs list when the provider is already known.

4. Missing cloud token in connect-rivet-frame.tsx dialog – ~line 167

The old connect-Rivet dialog prompt included the cloud token (RIVET_TOKEN. for GitHub Actions configuration. This token is now entirely absent from the dialog prompt. Confirm this omission is intentional — the cloud token was previously the main credential surfaced in that dialog.

5. Em dashes in prompt string content – agent-prompts.ts lines 142–143, 241

CLAUDE.md says "Do not use em dashes." These appear in the generated prompt strings. Replace with colons or periods unless the convention is explicitly exempted for user-facing string content.

6. Trailing slash inconsistency in doc URLs – agent-prompts.ts

The provider docs list uses https://rivet.dev/docs/connect/rivet-compute/ (with trailing slash) while getComputeAddendum links to https://rivet.dev/docs/connect/rivet-compute (no trailing slash). Make these consistent to avoid redirects.

7. Parenthesis-delimited URL list format – agent-prompts.ts lines 266–280, 330–344

The deploy-steps list wraps doc URLs with an opening parenthesis on the step line and a closing ) several lines later. This multiline paren structure may be misparsed by agents reading the generated prompt. A markdown list or colon-separated heading would be cleaner.


Positive observations

  • Extracting prompts into agent-prompts.ts eliminates the previous divergence where the Rivet-specific and "other provider" prompts had already drifted from each other.
  • The new Path A / Path B structure (new project vs. existing project) is substantially more useful for agents than the old linear step list.
  • runnerName is correctly excluded from the RIVET_POOL env var line when it equals "default".
  • The compute-pool-config rename from managed-pool-config and the v1.1.2 action bump are consistent across both the static YAML and the generated addendum.

@abcxff abcxff marked this pull request as ready for review June 2, 2026 19:33
@abcxff abcxff force-pushed the 06-01-fix_frontend_fix_compute_rivet_run_url branch from 454449c to ec63be2 Compare June 2, 2026 19:37
@abcxff abcxff force-pushed the 06-02-fix_frontend_onboarding_prompts branch from 49451ef to 310086b Compare June 2, 2026 19:37
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.

2 participants