Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -497,3 +497,4 @@ docs/agents-working-space/*

# Docs triage working directory
docs/.triage/
.gstack/
4 changes: 4 additions & 0 deletions apps/aevatar-console-web/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ const config: ReturnType<typeof defineConfig> = defineConfig({
process.env.NYXID_REDIRECT_URI,
),
'process.env.NYXID_SCOPE': JSON.stringify(process.env.NYXID_SCOPE),
'process.env.ORNN_BASE_URL': JSON.stringify(process.env.ORNN_BASE_URL),
'process.env.AEVATAR_CONSOLE_TEAM_FIRST_ENABLED': JSON.stringify(
process.env.AEVATAR_CONSOLE_TEAM_FIRST_ENABLED,
),
'process.env.AEVATAR_CONSOLE_PUBLIC_PATH': JSON.stringify(
process.env.AEVATAR_CONSOLE_PUBLIC_PATH,
),
Expand Down
81 changes: 42 additions & 39 deletions apps/aevatar-console-web/config/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,82 +23,88 @@ export default [
},
{
path: "/overview",
redirect: "/scopes/overview",
redirect: "/teams",
hideInMenu: true,
},
{
path: "/teams",
name: "我的团队",
component: "./scopes/overview",
menuGroupKey: "teams",
},
{
path: "/teams/new",
name: "组建团队",
component: "./teams/new",
menuGroupKey: "teams",
},
{
path: "/teams/:scopeId",
name: "团队详情",
component: "./teams",
hideInMenu: true,
parentKeys: ["/teams"],
},
{
path: "/scopes/assets",
name: "Assets",
component: "./scopes/assets",
// postMenuData in app.tsx regroups flat routes into lifecycle menu sections.
menuGroupKey: "build",
menuBadgeKey: "build.assets",
hideInMenu: true,
},
{
path: "/studio",
name: "Studio",
component: "./studio",
menuGroupKey: "build",
hideInMenu: true,
},
{
path: "/runtime/workflows",
name: "Workflows",
component: "./workflows",
menuGroupKey: "build",
hideInMenu: true,
},
{
path: "/runtime/primitives",
name: "Capabilities",
name: "连接器",
component: "./primitives",
menuGroupKey: "build",
hideInMenu: true,
},
{
path: "/chat",
name: "Chat",
component: "./chat",
menuGroupKey: "chat",
hideInMenu: true,
},
{
path: "/scopes/invoke",
name: "Invoke Lab",
component: "./scopes/invoke",
menuGroupKey: "live",
menuBadgeKey: "live.invoke",
hideInMenu: true,
},
{
path: "/runtime/runs",
name: "Runs",
name: "事件流",
component: "./runs",
menuGroupKey: "live",
menuBadgeKey: "live.runs",
hideInMenu: true,
},
{
path: "/runtime/mission-control",
name: "Mission Control",
component: "./MissionControl",
hideInMenu: true,
menuGroupKey: "live",
menuBadgeKey: "live.attention",
},
{
path: "/runtime/explorer",
name: "Topology",
component: "./actors",
menuGroupKey: "live",
menuBadgeKey: "live.topology",
menuGroupKey: "platform",
},
{
path: "/runtime/gagents",
name: "GAgents",
name: "成员",
component: "./gagents",
menuGroupKey: "live",
hideInMenu: true,
},
{
path: "/services",
name: "Services",
component: "./services",
menuGroupKey: "governance",
menuBadgeKey: "governance.services",
menuGroupKey: "platform",
},
{
path: "/services/:serviceId",
Expand All @@ -110,15 +116,13 @@ export default [
path: "/deployments",
name: "Deployments",
component: "./Deployments",
menuGroupKey: "governance",
menuBadgeKey: "governance.deployments",
menuGroupKey: "platform",
},
{
path: "/governance",
name: "Governance",
component: "./governance",
menuGroupKey: "governance",
menuBadgeKey: "governance.audit",
menuGroupKey: "platform",
},
{
path: "/governance/policies",
Expand Down Expand Up @@ -146,29 +150,28 @@ export default [
},
{
path: "/scopes/overview",
name: "Projects",
component: "./scopes/overview",
menuGroupKey: "settings",
redirect: "/teams",
hideInMenu: true,
},
{
path: "/settings",
name: "Account",
name: "设置",
component: "./settings/account",
menuGroupKey: "settings",
},
{
path: "/scopes",
redirect: "/scopes/overview",
redirect: "/teams",
hideInMenu: true,
},
{
path: "/scopes/workflows",
component: "./scopes/workflows",
redirect: "/runtime/workflows",
hideInMenu: true,
},
{
path: "/scopes/scripts",
component: "./scopes/scripts",
redirect: "/studio?tab=scripts",
hideInMenu: true,
},
{
Expand Down Expand Up @@ -208,7 +211,7 @@ export default [
},
{
path: "/",
redirect: "/scopes/overview",
redirect: "/teams",
},
{
component: "404",
Expand Down
25 changes: 25 additions & 0 deletions apps/aevatar-console-web/src/app.navigation.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
describe("app navigation groups", () => {
function loadNavigationGroups(): ReturnType<typeof import("./shared/navigation/navigationGroups").getNavigationGroupOrder> {
let groups!: ReturnType<typeof import("./shared/navigation/navigationGroups").getNavigationGroupOrder>;
jest.isolateModules(() => {
groups = require("./shared/navigation/navigationGroups").getNavigationGroupOrder() as ReturnType<
typeof import("./shared/navigation/navigationGroups").getNavigationGroupOrder
>;
});
return groups;
}

beforeEach(() => {
jest.resetModules();
});

it("uses the Team-first group model by default", () => {
const groups = loadNavigationGroups();

expect(groups.map((group) => group.label)).toEqual([
"Teams",
"Platform",
"Settings",
]);
});
});
22 changes: 5 additions & 17 deletions apps/aevatar-console-web/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import {
DashboardOutlined,
DownOutlined,
LogoutOutlined,
MessageOutlined,
SafetyCertificateOutlined,
SettingOutlined,
UserOutlined,
} from "@ant-design/icons";
Expand Down Expand Up @@ -126,26 +124,16 @@ const LIVE_OPS_ATTENTION_REFRESH_MS = 30_000;
const NAVIGATION_GROUP_ORDER: readonly NavigationGroup[] = [
{
icon: <AppstoreOutlined />,
key: "build",
label: "Build / Studio",
},
{
flattenSingleItem: true,
icon: <MessageOutlined />,
key: "chat",
label: "Chat",
key: "teams",
label: "Teams",
},
{
icon: <DashboardOutlined />,
key: "live",
label: "Live Ops",
},
{
icon: <SafetyCertificateOutlined />,
key: "governance",
label: "Governance",
key: "platform",
label: "Platform",
},
{
flattenSingleItem: true,
icon: <SettingOutlined />,
key: "settings",
label: "Settings",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,14 @@ public sealed class DraftBehavior : ScriptBehavior<AppScriptReadModel, AppScript

expect(
await screen.findByText(
'Review the active binding, revision rollout, and saved script assets from the scope views.',
'Review the active binding, revision rollout, and saved script assets from the team views.',
),
).toBeTruthy();

fireEvent.click(screen.getByRole('button', { name: 'Open Scope Scripts' }));
fireEvent.click(screen.getByRole('button', { name: 'Open Team Assets' }));

expect(mockedHistory.push).toHaveBeenCalledWith(
'/scopes/scripts?scopeId=scope-1&scriptId=script-1',
'/scopes/assets?scopeId=scope-1&tab=scripts&scriptId=script-1',
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
import type { MenuProps } from 'antd';
import React from 'react';
import { history } from '@/shared/navigation/history';
import { buildTeamWorkspaceRoute } from '@/shared/navigation/scopeRoutes';
import type { StudioAppContext } from '@/shared/studio/models';
import {
addPackageFile,
Expand Down Expand Up @@ -1646,17 +1647,18 @@ const ScriptsWorkbenchPage: React.FC<ScriptsWorkbenchPageProps> = ({
type: 'success',
message: `Updated scope ${result.scopeId} to serve script ${result.targetName} on revision ${result.revisionId}.`,
description:
'Review the active binding, revision rollout, and saved script assets from the scope views.',
'Review the active binding, revision rollout, and saved script assets from the team views.',
actions: [
{
label: 'Open Scope Scripts',
href: buildScopePageHref('/scopes/scripts', resolvedScopeId, {
label: 'Open Team Assets',
href: buildScopePageHref('/scopes/assets', resolvedScopeId, {
tab: 'scripts',
scriptId,
}),
},
{
label: 'Open Scope Overview',
href: buildScopePageHref('/scopes/overview', resolvedScopeId),
label: 'Open Team Workspace',
href: buildTeamWorkspaceRoute(resolvedScopeId),
},
],
});
Expand Down
21 changes: 21 additions & 0 deletions apps/aevatar-console-web/src/pages/actors/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jest.mock('@/shared/graphs/GraphCanvas', () => ({
describe('ActorsPage', () => {
beforeEach(() => {
window.localStorage.clear();
window.history.replaceState({}, '', '/runtime/explorer');
});

it('renders the runtime explorer shell and navigation actions', async () => {
Expand Down Expand Up @@ -111,4 +112,24 @@ describe('ActorsPage', () => {
'Completed successfully.',
);
});

it('preserves playback explorer context from the incoming route', async () => {
window.history.replaceState(
{},
'',
'/runtime/explorer?actorId=actor-route-a&runId=run-current&scopeId=scope-route-a&serviceId=default',
);

renderWithQueryClient(React.createElement(ActorsPage));

await waitFor(() => {
expect(window.location.pathname).toBe('/runtime/explorer');
});

const params = new URLSearchParams(window.location.search);
expect(params.get('actorId')).toBe('actor-route-a');
expect(params.get('runId')).toBe('run-current');
expect(params.get('scopeId')).toBe('scope-route-a');
expect(params.get('serviceId')).toBe('default');
});
});
Loading
Loading