Skip to content
Merged
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
15 changes: 1 addition & 14 deletions apps/aevatar-console-web/config/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ export default [
path: "/actors",
redirect: "/runtime/explorer",
},
{
path: "/observability",
redirect: "/runtime/observability",
},
{
name: "Runtime",
icon: "deploymentUnit",
Expand Down Expand Up @@ -132,22 +128,13 @@ export default [
name: "Explorer",
component: "./actors",
},
{
path: "observability",
name: "Observability",
component: "./observability",
},
],
},
{
path: "/settings",
name: "Settings",
icon: "setting",
redirect: "/settings/console",
},
{
path: "/settings/console",
component: "./settings/console",
component: "./settings/account",
},
{
path: "/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
```text
+-----------------------------------------------------------------------------------------------------------+
| Runtime Run Console |
| Start run | Open workflows | Open actor | Open observability |
| Start run | Open workflows | Open actor | Open settings |
+-----------------------------------------------------------------------------------------------------------+
| STATUS STRIP |
| [Running] [RunId: xxx] [Elapsed: 02:14] [Workflow: human_input_manual_triage] [WS] [Pending Interaction] |
Expand Down
4 changes: 1 addition & 3 deletions apps/aevatar-console-web/src/pages/actors/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ describe('ActorsPage', () => {
expect(
screen.getByRole('button', { name: 'Open Runtime Workflows' }),
).toBeTruthy();
expect(
screen.getByRole('button', { name: 'Open observability' }),
).toBeTruthy();
expect(screen.queryByRole('button', { name: 'Open observability' })).toBeNull();
expect(container.textContent).toContain('Runtime actor query');
expect(container.textContent).toContain('No recent runs yet');
expect(container.textContent).toContain(
Expand Down
52 changes: 22 additions & 30 deletions apps/aevatar-console-web/src/pages/actors/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
import { useQuery } from "@tanstack/react-query";
import { history } from "@/shared/navigation/history";
import {
buildRuntimeObservabilityHref,
buildRuntimeRunsHref,
buildRuntimeWorkflowsHref,
} from "@/shared/navigation/runtimeRoutes";
Expand All @@ -30,7 +29,10 @@ import {
Typography,
} from "antd";
import React, { useEffect, useMemo, useRef, useState } from "react";
import { runtimeActorsApi } from "@/shared/api/runtimeActorsApi";
import {
runtimeActorsApi,
type ActorGraphDirection,
} from "@/shared/api/runtimeActorsApi";
import type {
WorkflowActorGraphEdge,
WorkflowActorGraphNode,
Expand All @@ -40,10 +42,6 @@ import type {
import { formatDateTime } from "@/shared/datetime/dateTime";
import { buildActorGraphElements } from "@/shared/graphs/buildGraphElements";
import GraphCanvas from "@/shared/graphs/GraphCanvas";
import {
type ActorGraphDirection,
loadConsolePreferences,
} from "@/shared/preferences/consolePreferences";
import { loadRecentRuns } from "@/shared/runs/recentRuns";
import {
codeBlockStyle,
Expand All @@ -62,6 +60,7 @@ import {
summaryMetricValueStyle,
stretchColumnStyle,
} from "@/shared/ui/proComponents";
import { describeError } from "@/shared/ui/errorText";
import {
type ActorTimelineFilters,
type ActorTimelineRow,
Expand Down Expand Up @@ -113,6 +112,11 @@ type GraphControlValues = {
graphViewMode: ActorGraphViewMode;
};

const defaultActorTimelineTake = 50;
const defaultActorGraphDepth = 3;
const defaultActorGraphTake = 100;
const defaultActorGraphDirection: ActorGraphDirection = "Both";

type SummaryFieldProps = {
copyable?: boolean;
label: string;
Expand Down Expand Up @@ -373,14 +377,13 @@ function parseGraphViewMode(value: string | null): ActorGraphViewMode {
}

function readStateFromUrl(): ActorPageState {
const preferences = loadConsolePreferences();
if (typeof window === "undefined") {
return {
actorId: "",
timelineTake: preferences.actorTimelineTake,
graphDepth: preferences.actorGraphDepth,
graphTake: preferences.actorGraphTake,
graphDirection: preferences.actorGraphDirection,
timelineTake: defaultActorTimelineTake,
graphDepth: defaultActorGraphDepth,
graphTake: defaultActorGraphTake,
graphDirection: defaultActorGraphDirection,
edgeTypes: [],
};
}
Expand All @@ -390,19 +393,19 @@ function readStateFromUrl(): ActorPageState {
actorId: params.get("actorId") ?? "",
timelineTake: parsePositiveInt(
params.get("timelineTake"),
preferences.actorTimelineTake
defaultActorTimelineTake
),
graphDepth: parsePositiveInt(
params.get("graphDepth"),
preferences.actorGraphDepth
defaultActorGraphDepth
),
graphTake: parsePositiveInt(
params.get("graphTake"),
preferences.actorGraphTake
defaultActorGraphTake
),
graphDirection: parseDirection(
params.get("graphDirection"),
preferences.actorGraphDirection
defaultActorGraphDirection
),
edgeTypes: params
.getAll("edgeTypes")
Expand Down Expand Up @@ -848,17 +851,6 @@ const ActorsPage: React.FC = () => {
<Button onClick={() => history.push(buildRuntimeWorkflowsHref())}>
Open Runtime Workflows
</Button>
<Button
onClick={() =>
history.push(
buildRuntimeObservabilityHref({
actorId: filters.actorId,
})
)
}
>
Open observability
</Button>
</Space>
}
>
Expand Down Expand Up @@ -1149,7 +1141,7 @@ const ActorsPage: React.FC = () => {
showIcon
type="error"
title="Failed to load timeline"
description={String(timelineQuery.error)}
description={describeError(timelineQuery.error)}
/>
) : null}

Expand Down Expand Up @@ -1274,7 +1266,7 @@ const ActorsPage: React.FC = () => {
showIcon
type="error"
title="Failed to load graph topology"
description={String(currentGraphError)}
description={describeError(currentGraphError)}
/>
) : currentGraph && currentGraph.nodes.length > 0 ? (
<div style={graphCanvasShellStyle}>
Expand Down Expand Up @@ -1337,7 +1329,7 @@ const ActorsPage: React.FC = () => {
showIcon
type="error"
title="Failed to load actor"
description={String(snapshotQuery.error)}
description={describeError(snapshotQuery.error)}
/>
) : snapshotRecord ? (
<>
Expand Down Expand Up @@ -1561,7 +1553,7 @@ const ActorsPage: React.FC = () => {
showIcon
type="error"
title="Failed to load graph view"
description={String(currentGraphError)}
description={describeError(currentGraphError)}
/>
) : graphSummary ? (
<>
Expand Down
3 changes: 2 additions & 1 deletion apps/aevatar-console-web/src/pages/auth/callback/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React, { useEffect, useMemo, useState } from 'react';
import { NyxIDAuthClient } from '@/shared/auth/client';
import { getNyxIDRuntimeConfig } from '@/shared/auth/config';
import { loadStoredAuthSession } from '@/shared/auth/session';
import { describeError } from '@/shared/ui/errorText';

const CallbackPage: React.FC = () => {
const [errorText, setErrorText] = useState<string | undefined>(undefined);
Expand All @@ -26,7 +27,7 @@ const CallbackPage: React.FC = () => {
return;
}

setErrorText(error instanceof Error ? error.message : String(error));
setErrorText(describeError(error));
}
};

Expand Down
3 changes: 2 additions & 1 deletion apps/aevatar-console-web/src/pages/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { getNyxIDRuntimeConfig } from '@/shared/auth/config';
import {
sanitizeReturnTo,
} from '@/shared/auth/session';
import { describeError } from '@/shared/ui/errorText';

const pageStyle: React.CSSProperties = {
minHeight: '100vh',
Expand Down Expand Up @@ -79,7 +80,7 @@ const LoginPage: React.FC = () => {
});
} catch (error) {
setPending(false);
setErrorText(error instanceof Error ? error.message : String(error));
setErrorText(describeError(error));
}
};

Expand Down
34 changes: 0 additions & 34 deletions apps/aevatar-console-web/src/pages/observability/index.test.tsx

This file was deleted.

Loading
Loading