You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(frontend): /m developer mode app menu inside an app - #8143
Inside an app, /w swaps the rail to an app menu: Back, an app switcher, then Overview, Playground, Registry, Evaluations and Observability. In /m developer mode the rail never changed. The app overview and playground lit up "Home", there was no way from the playground to the same app's overview or Registry, and the only app pickers were the per page ones on Variants and Endpoints.
Changes
With beta developer mode on, an app page shows the app menu:
Back returns to the last page the main rail showed (Prompts if there is none).
App switcher: the shared WorkflowPickerView with the project's prompt apps (name, "Prompt" tag, a check on the current app). Switching keeps the page: Overview stays Overview, Registry stays Registry (the revision is dropped, the tab is kept).
Overview, Playground, Registry, Evaluations, Observability with the /w labels and icons. Home is not in this menu, so it no longer lights up inside an app.
Collapsed rail: toggle, Back and the app icon stack like /w, then one icon per row.
Which pages get the menu: /apps/<id>/overview, /apps/<id>/playground, and Registry or Endpoints with ?app=<id>. useRailScope picks the scope for the docked rail and the drawer, the same way Settings passes its own scope.
The switcher is loaded with next/dynamic and reads only the current app until it is first opened; the app list loads on open. The scope itself is a few links.
Shared package fix (this changes /w in production): in WorkflowPickerView, a mouse or keyboard pick did nothing. The anchor's click handler called preventDefault, and Radix skips the item's onSelect when the event is already prevented. The view now makes the pick itself. This changes /w in production too: today, picking another app in the /w app switcher does nothing (checked on the parity stack, by mouse and by keyboard). With this PR it opens that app, on the same page. The /w type check passes.
Without beta developer mode nothing changes: the scope choice is gated on betaDeveloperModeActiveAtom, and every app page keeps the main rail.
What PR 1.5 must change
For now Registry, Evaluations and Observability link to the project pages with ?app=<id>. PR 1.5 should:
add /apps/<id>/variants (and ?tab=deployments), /apps/<id>/endpoints, /apps/<id>/evaluations and /apps/<id>/traces, and point the three menu rows at them (appNavItems in appNavScope.tsx);
replace APP_QUERY_ROUTE in appScopeAppId with those routes, and the ?app= branch of appSwitchHref;
drop the Registry matchLinks override and the Registry row at the end of the main rail (developerRailItems);
delete the ?app= Variants and Endpoints pages and their pick-app states.
Until then, Evaluations and Observability open the project pages and the rail switches back to the main rail there.
Not matched yet
The switcher lists prompt apps only. /w also lists LLM judge evaluators, but /m has no evaluator pages yet (PR 5.4).
The app icon uses the /m info colours (navy on light blue); /w uses the brighter antd blue.
Stacked on #8140 (base feat/m-parity-rail). That branch is based on main with #8133 and #8134 merged in.
Tests
appNavScope.test.tsx: which pages get the menu, its rows and links, Registry stays selected with a revision in the URL, switching keeps the page, and the gate (beta on: app menu; beta off: main rail on every app page).
workflowPickerView.render.test.tsx: a plain click picks the app and closes the menu (fails before the fix); a ctrl or cmd click does not pick in the current tab.
/m and /w type checks and lint on changed files pass.
Live check on the parity stack at 1440 px: app menu and collapsed rail side by side with /w; switching apps by mouse and keyboard; Back. Without developer mode the rail on the app overview and on Variants with an app is pixel identical to before.
What to QA
Beta developer mode on: open an app from Prompts. The rail shows Back, the app card, Overview, Playground, Registry, Evaluations, Observability, and Playground is selected.
Open the app card and pick another app: you land on the same page of the other app.
Click Registry: the Variants page for this app opens and the app menu stays.
Collapse the rail: toggle, Back, app icon, then one icon per row.
Click Back: you return to Prompts.
Regression: with beta developer mode off, the app overview, playground and Variants pages keep the main rail as before.
Added app-specific navigation in beta developer mode, with an app switcher that keeps the current page and supported tab selections when switching apps.
Added a back link to the last main navigation page and a project switcher within app navigation.
Bug Fixes
App-switcher selections now close the menu and navigate reliably; modified clicks retain standard link behavior.
The mobile navigation rail now supports an app-specific menu in beta developer mode. The menu includes app navigation and app switching. Rail selection and last main-rail path tracking are handled by shared hooks.
Changes: Mobile app navigation
Layer / File(s)
Summary
App switching and picker selection web/mobile/src/features/nav/AppSwitcher.tsx, web/packages/agenta-navigation-ui/src/WorkflowPickerView.tsx, web/mobile/tests/unit/appNavScope.test.tsx, web/mobile/tests/unit/workflowPickerView.render.test.tsx
The app switcher lists prompt apps and builds URLs that retain supported page and tab parameters. Selecting a different app navigates to its destination. Plain picker-link clicks call the selection callback with the entry key. Tests cover URL behavior and picker selection.
The app scope derives an app ID from supported routes and builds app navigation rows. It also provides a header with Back navigation and the app switcher, a footer, and a project switcher. Tests cover route matching and menu contents.
Rail selection and last-path tracking web/mobile/src/features/nav/railScope.ts, web/mobile/src/features/nav/AppShell.tsx, web/mobile/src/features/nav/NavDrawer.tsx, web/mobile/src/features/nav/NavRail.tsx, web/mobile/tests/unit/appNavScope.test.tsx
The rail resolver selects an explicit override, the app scope, or the main scope. AppShell records the last main-rail path, and NavDrawer and NavRail use the shared resolver. Tests cover rail selection with beta developer mode enabled and disabled.
sequenceDiagram
actor User
participant WorkflowPickerView
participant AppSwitcher
participant Router
User->>WorkflowPickerView: selects an app entry
WorkflowPickerView->>AppSwitcher: calls onSelect with the entry key
AppSwitcher->>Router: navigates when the selected app differs
Loading
Possibly related PRs
Agenta-AI/agenta#8003: Adds the /variants Registry route and app and tab query parameters used by app navigation and switching.
Agenta-AI/agenta#8120: Adds beta developer mode and developer views used to select the app-scoped rail and its enabled links.
Merge Risk: Low · previous review 56d14
Ctrl-clicking an app in the switcher may also navigate the current tab. The impact is small and recoverable, so the change is mergeable with a small follow-up fix.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title identifies the developer-mode app menu added to /m.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description matches the app-scoped rail, app switcher, shared picker fix, and tests in the changeset.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. 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 0 functions across 9 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.
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.
AppSwitcher.tsx defines two components: AppIdentity and AppSwitcher. The mobile conventions allow one component per file, named after the file. Extract AppIdentity to AppIdentity.tsx and import it.
As per coding guidelines: "One component per file, exported with a name matching the file name."
Replace the three legacy color classes with semantic tokens. Preserve the app icon’s info colors in both themes. If no suitable semantic role exists, add one through the token generator.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.
🤖 The AI agent says: On the two review body items: AppIdentity is now in its own file (AppIdentity.tsx), and its type label uses text-muted-foreground. The icon square keeps bg-colorInfoBg and text-colorInfo: those are generated theme tokens (no hex), and the semantic set has no info role. Adding one through the token generator for a single icon is more change than it is worth here; a comment in the file says so.
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.
🤖 The AI agent says: Batch review item fixed in 98bab16: the app switcher link and the app menu links now encode the app id (encodeURIComponent), with a test for an id with /, ? and #. Merged up into #8151, #8152, #8153 (no rebase).
🤖 The AI agent says: Batch items 2 and 3 fixed in e7b4f93 (merged up into #8151 to #8153 and the WS4 stack, no rebase):
Prettier line break in WorkflowPickerView.tsx. pnpm run lint passes for all packages and Prettier passes on every changed file.
The app menu code (appNavScope.tsx: menu rows, icons, header, switcher loader) now loads with a dynamic import() only when beta developer mode is on and the page is inside an app. Every page with a rail keeps only railScope.ts and the small route rule in appRoute.ts. speed:check after next build: app shell 884.8 KB to 884.1 KB; /agents 1049.3 to 1045.8 KB, /prompts 1042.3 to 1037.3 KB, /settings 1039.8 to 1035.6 KB. The shell is 0.5 KB above the 883.6 KB baseline: that is the scope choice and the Back-path tracker that every rail runs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Inside an app, /w swaps the rail to an app menu: Back, an app switcher, then Overview, Playground, Registry, Evaluations and Observability. In /m developer mode the rail never changed. The app overview and playground lit up "Home", there was no way from the playground to the same app's overview or Registry, and the only app pickers were the per page ones on Variants and Endpoints.
Changes
With beta developer mode on, an app page shows the app menu:
WorkflowPickerViewwith the project's prompt apps (name, "Prompt" tag, a check on the current app). Switching keeps the page: Overview stays Overview, Registry stays Registry (the revision is dropped, the tab is kept).Which pages get the menu:
/apps/<id>/overview,/apps/<id>/playground, and Registry or Endpoints with?app=<id>.useRailScopepicks the scope for the docked rail and the drawer, the same way Settings passes its own scope.The switcher is loaded with
next/dynamicand reads only the current app until it is first opened; the app list loads on open. The scope itself is a few links.Shared package fix (this changes /w in production): in
WorkflowPickerView, a mouse or keyboard pick did nothing. The anchor's click handler calledpreventDefault, and Radix skips the item'sonSelectwhen the event is already prevented. The view now makes the pick itself. This changes /w in production too: today, picking another app in the /w app switcher does nothing (checked on the parity stack, by mouse and by keyboard). With this PR it opens that app, on the same page. The /w type check passes.Without beta developer mode nothing changes: the scope choice is gated on
betaDeveloperModeActiveAtom, and every app page keeps the main rail.What PR 1.5 must change
For now Registry, Evaluations and Observability link to the project pages with
?app=<id>. PR 1.5 should:/apps/<id>/variants(and?tab=deployments),/apps/<id>/endpoints,/apps/<id>/evaluationsand/apps/<id>/traces, and point the three menu rows at them (appNavItemsinappNavScope.tsx);APP_QUERY_ROUTEinappScopeAppIdwith those routes, and the?app=branch ofappSwitchHref;matchLinksoverride and the Registry row at the end of the main rail (developerRailItems);?app=Variants and Endpoints pages and their pick-app states.Until then, Evaluations and Observability open the project pages and the rail switches back to the main rail there.
Not matched yet
Stacked on #8140 (base
feat/m-parity-rail). That branch is based onmainwith #8133 and #8134 merged in.Tests
appNavScope.test.tsx: which pages get the menu, its rows and links, Registry stays selected with a revision in the URL, switching keeps the page, and the gate (beta on: app menu; beta off: main rail on every app page).workflowPickerView.render.test.tsx: a plain click picks the app and closes the menu (fails before the fix); a ctrl or cmd click does not pick in the current tab.What to QA