Skip to content

fix(frontend): fix onboarding API key generation in SDK/tracing flows#3893

Merged
jp-agenta merged 1 commit intorelease/v0.90.3from
fix/api-key-onboarding
Mar 5, 2026
Merged

fix(frontend): fix onboarding API key generation in SDK/tracing flows#3893
jp-agenta merged 1 commit intorelease/v0.90.3from
fix/api-key-onboarding

Conversation

@mmabrouk
Copy link
Member

@mmabrouk mmabrouk commented Mar 3, 2026

Summary

  • Fix API key creation failures in onboarding SDK and tracing setup modals when workspace and project context are temporarily out of sync.
  • Resolve context via waitForWorkspaceContext and reconcile against project metadata before calling the keys API.
  • Prevent wrong-scope key creation by avoiding silent fallback to an unrelated project when a stale project id is detected.
  • Keep key creation gated on both workspace_id and project_id being available.

Validation

  • Ran corepack pnpm lint-fix in web/.
  • Performed subagent review focused on React/web best practices and AGENTS.md guidelines; addressed flagged risks before opening this PR.

What to QA

  • Onboarding -> Run evaluation from code -> click Generate API Key: key should be created successfully.
  • Onboarding -> Set up tracing modal -> click Generate API Key: key should be created successfully.
  • Settings -> API Keys page -> click Generate API Key: behavior remains unchanged.
  • Multi-workspace/project user: verify generated key belongs to the active project/workspace context.
  • Simulate stale context (e.g., quick workspace/project switching) and verify UI shows a clear refresh error instead of creating a key in the wrong scope.

Open with Devin

@vercel
Copy link

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Mar 3, 2026 0:36am

Request Review

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working Frontend labels Mar 3, 2026
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-03-05T00:49:55.900Z

@junaway
Copy link
Contributor

junaway commented Mar 3, 2026

@ardaerzin ☝️ -- organizations, workspaces, projects temporarily out of sync (RE: earlier today)

@junaway junaway requested a review from ardaerzin March 3, 2026 12:50
Copy link
Contributor

@ardaerzin ardaerzin left a comment

Choose a reason for hiding this comment

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

👍

@jp-agenta jp-agenta changed the base branch from main to release/v0.90.3 March 5, 2026 00:49
@jp-agenta jp-agenta merged commit f885c17 into release/v0.90.3 Mar 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Frontend size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants