Skip to content

fix: remove /preview/ prefix from frontend API calls#3924

Open
jangjohn wants to merge 3 commits intoAgenta-AI:mainfrom
jangjohn:fix/remove-preview-prefix
Open

fix: remove /preview/ prefix from frontend API calls#3924
jangjohn wants to merge 3 commits intoAgenta-AI:mainfrom
jangjohn:fix/remove-preview-prefix

Conversation

@jangjohn
Copy link

@jangjohn jangjohn commented Mar 5, 2026

fix: remove /preview/ prefix from frontend API calls

Closes #3831

Removes the /preview/ prefix from all frontend API calls across the web codebase, replacing them with canonical routes.

Changes

  • 61 files modified across web/oss/src/, web/packages/, and web/tests/
  • Only .ts and .tsx files changed
  • /preview/environments/ intentionally left unchanged (no canonical equivalent)

Notes


Open with Devin

@vercel
Copy link

vercel bot commented Mar 5, 2026

@jangjohn is attempting to deploy a commit to the agenta projects Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 5, 2026
@dosubot dosubot bot added the Frontend label Mar 5, 2026
@jangjohn
Copy link
Author

jangjohn commented Mar 5, 2026

Hi @mmabrouk, this is a clean re-do of #3873. Re-cloned with proper line ending config so the diff only contains the intended .ts/.tsx route changes (61 files, no CSS or line ending noise). Ready for review!

@vercel
Copy link

vercel bot commented Mar 5, 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 11, 2026 11:06am

Request Review

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 4 additional findings.

Open in Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Member

@mmabrouk mmabrouk left a comment

Choose a reason for hiding this comment

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

Thank you @jangjohn

Can you please fix linting for the CI to run correctly?

@jangjohn
Copy link
Author

jangjohn commented Mar 6, 2026

@mmabrouk I've also updated stale comments that still referenced /preview/ paths. Could you approve the workflows so CI can run? Thanks!

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 found 2 new potential issues.

View 5 additional findings in Devin Review.

Open in Devin Review

Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 invokeApplication still uses /preview/ prefix while invokeEvaluator was updated

The invokeEvaluator function at web/oss/src/services/workflows/invoke.ts:107 was correctly updated to remove the /preview/ prefix, but the adjacent invokeApplication function at line 149 was not updated and still uses ${getAgentaApiUrl()}/preview/workflows/invoke. Since the PR's intent is to remove the /preview/ prefix from all API routes, this is an incomplete transformation that will cause invokeApplication to call a different (old) endpoint than invokeEvaluator, leading to 404 errors or routing mismatches when the backend /preview/ routes are removed.

(Refers to line 149)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 Playwright testset test still intercepts old /api/preview/testsets/query route

In web/oss/tests/playwright/acceptance/testsset/index.ts:44, the page.waitForResponse still checks for /api/preview/testsets/query, but the actual API endpoint has been changed to /api/testsets/query (the fetchTestsetsWindow and fetchTestsetsList functions were updated). This means the test will time out waiting for a response that will never match the old URL pattern, causing test failures.

(Refers to line 44)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend: migrate endpoints to remove preview/ prefix

2 participants