Skip to content

feat(frontend): /m developer mode app pages at /w URLs - #8151

Merged
mmabrouk merged 4 commits into
release/v0.128.9from
feat/m-parity-app-urls
Nov 6, 2026
Merged

mmabrouk merged 4 commits into
release/v0.128.9from
feat/m-parity-app-urls

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Nov 6, 2026

Copy link
Copy Markdown
Member

Context

Inside an app, the /m app menu (#8143) still sent Registry, Evaluations and Observability to project pages with ?app=<id>. Those pages showed their own app picker and "Overview" button next to the app menu's switcher, the rail swapped back to the main rail on Evaluations and Observability, and the URLs did not match /w, so links between the two apps needed special cases.

Changes

In beta developer mode, every app page now lives at the /w URL and keeps the app menu:

Page Before After
Registry /variants?app=<id> /apps/<id>/variants
Deployments /variants?app=<id>&tab=deployments /apps/<id>/variants?tab=deployments
API endpoint /endpoints?app=<id> /apps/<id>/endpoints
Evaluations /evaluations?app=<id> /apps/<id>/evaluations
Observability /observability?app=<id> /apps/<id>/traces
  • The new routes render the existing screens. A small useRouteAppId reads the app from the path (else from ?app=). On a path route the page drops its own app picker and Overview button: the app menu has both.
  • The app menu rows and the app switcher link to these routes; switching keeps the page (and the Deployments tab).
  • The Registry row leaves the main rail, as in /w.
  • An old link to /variants?app=<id> or /endpoints?app=<id> (from the overview cards, the Deployments tab, a bookmark) moves to the app page in beta developer mode.
  • The project Observability page keeps its app filter. The project Evaluations page keeps its filter too.
  • The beta route maps in mobileGate (fix(frontend): send /w app and developer links to the matching /m page under beta #8133) now send /w app links to these routes (/apps/<id>/deployments lands on the Deployments tab), and map them back to /w.

Without beta developer mode nothing changes. The new routes show "not found" there (DeveloperViewGate betaOnly), even with the view forced on, and the redirect does not run.

One deviation from the plan: I did not delete the ?app= Variants and Endpoints pages or their "pick an app" state. A user without beta developer mode reaches them from the flat Developer section today (preview switch or a deployment that forces the views on), so deleting them would change /m outside developer mode. In beta developer mode they are unreachable: no rail row, and ?app= links move to the app page. They can go once the per-view switches are removed (PR 1.2).

Stacked on #8143 (base feat/m-parity-app-menu).

Tests

  • appRoutes.render.test.tsx: the ?app= page moves to the app page only in beta developer mode and keeps its other parameters; the app routes are "not found" without beta even with the view on (fails without the new gate).
  • variantsScreen.render.test.tsx: the app page takes the app from the path and has no picker or Overview link; the project page keeps its picker.
  • appNavScope.test.tsx, developerRail.test.ts, betaDeveloperLinks.test.ts updated for the new URLs and the removed Registry row.
  • /m, /w and @agenta/shared type checks, lint on changed files.
  • Quick look on the parity data at 1440 px: Registry, Deployments, API endpoint, Evaluations and Observability under /apps/<id>/, each with the app menu and the right row selected; switching apps from Registry stays on Registry; an old /variants?app=…&tab=deployments link lands on the app's Deployments tab. Without beta developer mode /apps/<id>/variants is "not found" and /variants?app=<id> keeps the old rail and page.

What to QA

  • Beta developer mode: open an app, click Registry, Evaluations, Observability. The URL is /apps/<id>/..., the app menu stays, and the page has no second app picker.
  • Registry, Deployments tab: switch apps in the app card. You stay on Deployments of the other app.
  • Open the app overview and click a deployment card. You land on /apps/<id>/variants?tab=deployments.
  • In /w, open an app's Registry with beta developer mode on. You land on the same page in /m.
  • Regression: without beta developer mode, Variants and Endpoints from the Developer section work as before.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Added app-specific routes for variants, endpoints, evaluations, and traces. App navigation and switching now keep users within the selected app, preserving the deployments tab where applicable.
    • Beta mode redirects supported project-level variants and endpoints links with an app selection to the corresponding app-specific page.
  • Updates
    • App-specific pages use the selected app without showing redundant app pickers or filters.
    • Registry no longer appears in the beta developer navigation.

The change adds app-scoped developer routes for variants, endpoints, evaluations, and traces. It updates navigation and shared route mapping, adds beta-only access gates and redirects from legacy app-query routes, and adapts screens to resolve app IDs from paths or queries.

Changes: App-scoped developer routes

Layer / File(s) Summary
App route mapping and navigation
web/mobile/src/features/nav/*, web/mobile/src/features/developer/developerNavItems.ts, web/mobile/src/features/developer/developerNavSlots.ts, web/packages/agenta-shared/src/utils/mobileGate/index.ts, web/mobile/tests/unit/appNavScope.test.tsx, web/mobile/tests/unit/developerRail.test.ts, web/packages/agenta-shared/tests/unit/betaDeveloperLinks.test.ts
Navigation and shared route mapping use app-scoped paths for developer sections. App switching preserves the deployments tab on variants routes. The beta developer rail no longer includes the Registry row.
Beta-gated app pages and legacy redirects
web/mobile/src/features/developer/DeveloperViewGate.tsx, web/mobile/src/features/developer/useAppPageRedirect.ts, web/mobile/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/*, web/mobile/src/pages/w/[workspace_id]/p/[project_id]/variants/index.tsx, web/mobile/src/pages/w/[workspace_id]/p/[project_id]/endpoints/index.tsx, web/mobile/tests/unit/appRoutes.render.test.tsx
New app-scoped pages validate route IDs and use beta-only developer-view gates. Legacy variants and endpoints routes redirect to app-scoped paths when beta mode is active and an app query is present.
App ID resolution and screen controls
web/mobile/src/features/developer/useRouteAppId.ts, web/mobile/src/features/endpoints/*, web/mobile/src/features/evaluations/list/*, web/mobile/src/features/observability/ObservabilityScreen.tsx, web/mobile/src/features/variants/VariantsScreen.tsx, web/mobile/tests/unit/variantsScreen.render.test.tsx
Screens obtain app IDs from the route path or the app query. App-scoped routes hide app pickers and overview links; project routes retain their app selection controls.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ProjectPage as Project variants or endpoints page
  participant RedirectHook as useAppPageRedirect
  participant Target as appPageTarget
  participant NextRouter
  participant AppPage as App-scoped page
  participant ViewGate as DeveloperViewGate
  ProjectPage->>RedirectHook: request target after router is ready
  RedirectHook->>Target: resolve beta-mode app route
  Target-->>RedirectHook: app-scoped path or null
  RedirectHook->>NextRouter: replace route when target exists
  NextRouter->>AppPage: open app-scoped route
  AppPage->>ViewGate: render beta-only view
Loading

Possibly related PRs

  • Agenta-AI/agenta#7985: Adds DeveloperViewGate, which this change extends with beta-only access for app routes.
  • Agenta-AI/agenta#8140: Adds the beta rail Registry row and route mappings that this change removes or updates.
  • Agenta-AI/agenta#8141: Changes beta developer-view access and Observability filtering behavior that this change applies to path-scoped app IDs.
Merge Risk: Minimal · previous review 64dbd

No route regression is established from the supplied evidence. The failing styling check still needs its ownership confirmed before merge.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title identifies the app-page routing change for developer mode.
Description check Passed The description matches the app-scoped routes, navigation changes, beta gating, redirects, and tests.
Docstring Coverage Passed Docstring coverage is 75.00% which is sufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentati…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 75.00% which is sufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 8 functions across 25 files.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between bcd24aa and 64dbd34.

Files selected for processing: 25

  • web/mobile/src/features/developer/DeveloperViewGate.tsx
  • web/mobile/src/features/developer/developerNavItems.ts
  • web/mobile/src/features/developer/useAppPageRedirect.ts
  • web/mobile/src/features/developer/useRouteAppId.ts
  • web/mobile/src/features/endpoints/EndpointsScreen.tsx
  • web/mobile/src/features/endpoints/EndpointsView.tsx
  • web/mobile/src/features/evaluations/list/EvaluationsScreen.tsx
  • web/mobile/src/features/evaluations/list/useEvaluationRunsFilters.ts
  • web/mobile/src/features/nav/AppSwitcher.tsx
  • web/mobile/src/features/nav/appNavScope.tsx
  • web/mobile/src/features/nav/developerNavSlots.ts
  • web/mobile/src/features/observability/ObservabilityScreen.tsx
  • web/mobile/src/features/variants/VariantsScreen.tsx
  • web/mobile/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/endpoints.tsx
  • web/mobile/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations.tsx
  • web/mobile/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/traces.tsx
  • web/mobile/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/variants.tsx
  • web/mobile/src/pages/w/[workspace_id]/p/[project_id]/endpoints/index.tsx
  • web/mobile/src/pages/w/[workspace_id]/p/[project_id]/variants/index.tsx
  • web/mobile/tests/unit/appNavScope.test.tsx
  • web/mobile/tests/unit/appRoutes.render.test.tsx
  • web/mobile/tests/unit/developerRail.test.ts
  • web/mobile/tests/unit/variantsScreen.render.test.tsx
  • web/packages/agenta-shared/src/utils/mobileGate/index.ts
  • web/packages/agenta-shared/tests/unit/betaDeveloperLinks.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

@mmabrouk

mmabrouk commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: @coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

@mmabrouk I’ll review the changes.

Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Website preview

Preview URL: https://pr-8151-agenta-website-preview.mahmoud-637.workers.dev

Built from 50339fd6e66bf1d1e1656dfa87fc72e1f2df0aa6. This comment updates in place on every push.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Item Value
Status stopped
Commit 00f37f6fdea08867c6a6e7443377ec6ced39d7d2
Manual expiry (UTC) Not granted
CI deadline (UTC) Not granted
Workflow https://github.com/Agenta-AI/agenta/actions/runs/42212047104

Preview use finished or expired. Environment absence verified; retained storage requires separate provider accounting.

Post /preview as a new comment to request a one-hour preview. Repeating it while active does not extend the hour.
Preview data is disposable. Expiry is enforced by the next successful cleanup sweep, not an exact timer.
Environment deletion stops its compute. Provider-retained storage and permanent services may still be billed.

@mmabrouk

mmabrouk commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: @coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

@mmabrouk I’ll request a review.

Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mmabrouk

mmabrouk commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: @coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

@mmabrouk I’ll request a full review of the PR.

Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 5 minutes.

@mmabrouk

mmabrouk commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: @coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

@mmabrouk I’ll request a review of the PR.

Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

# Conflicts:
#	web/mobile/src/features/nav/AppSwitcher.tsx
#	web/mobile/src/features/nav/appNavScope.tsx
# Conflicts:
#	web/mobile/src/features/nav/appNavScope.tsx
#	web/mobile/tests/unit/appNavScope.test.tsx
…rity-app-urls

# Conflicts:
#	web/mobile/src/features/observability/ObservabilityScreen.tsx
@mmabrouk
mmabrouk merged commit c9ed595 into release/v0.128.9 Nov 6, 2026
28 of 30 checks passed
@mmabrouk mmabrouk added the lgtm This PR has been approved by a maintainer label Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant