Share LoggingScreen fixture with InspectorView story; tune transition timing
- Extract `mixedEntries` (50 mixed-level log entries) into `LoggingScreen.fixtures.ts` so both `LoggingScreen.stories` and `InspectorView.stories` can consume it. The InspectorView Default story now shows a populated, scrollable Logs tab. - InspectorView screen transitions: separate enter (350ms) and exit (250ms) durations via Mantine Transition's `exitDuration` prop, so screens leave faster than they enter. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d3c2645e38
commit
1785a5281c
2 changed files with 146 additions and 178 deletions
|
|
@ -13,7 +13,7 @@ import type { Meta, StoryObj } from "@storybook/react-vite";
|
|||
import { fn } from "storybook/test";
|
||||
import { InspectorView } from "./InspectorView";
|
||||
import type { ServerEntry } from "../../screens/ServerListScreen/ServerListScreen";
|
||||
import type { LogEntryData } from "../../elements/LogEntry/LogEntry";
|
||||
import { mixedEntries as demoLogs } from "../../screens/LoggingScreen/LoggingScreen.fixtures";
|
||||
import type { TaskProgress } from "../../groups/TaskCard/TaskCard";
|
||||
|
||||
const demoServers: ServerEntry[] = [
|
||||
|
|
@ -122,45 +122,6 @@ const demoSubscriptions: InspectorResourceSubscription[] = [
|
|||
},
|
||||
];
|
||||
|
||||
const demoLogs: LogEntryData[] = [
|
||||
{
|
||||
receivedAt: new Date("2026-03-17T10:00:00Z"),
|
||||
params: { level: "info", data: "Server started on port 3000" },
|
||||
},
|
||||
{
|
||||
receivedAt: new Date("2026-03-17T10:00:01Z"),
|
||||
params: {
|
||||
level: "debug",
|
||||
logger: "config",
|
||||
data: "Loading configuration from /etc/mcp/config.json",
|
||||
},
|
||||
},
|
||||
{
|
||||
receivedAt: new Date("2026-03-17T10:00:02Z"),
|
||||
params: {
|
||||
level: "warning",
|
||||
logger: "http",
|
||||
data: "Deprecated API endpoint called: /v1/tools",
|
||||
},
|
||||
},
|
||||
{
|
||||
receivedAt: new Date("2026-03-17T10:00:03Z"),
|
||||
params: {
|
||||
level: "error",
|
||||
logger: "resources",
|
||||
data: "Failed to read resource: file not found at /data/missing.txt",
|
||||
},
|
||||
},
|
||||
{
|
||||
receivedAt: new Date("2026-03-17T10:00:04Z"),
|
||||
params: {
|
||||
level: "info",
|
||||
logger: "tools",
|
||||
data: "Tool execution completed: search_files (245ms)",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const demoTasks: Task[] = [
|
||||
{
|
||||
taskId: "d0b22eba71fa36229ce5c4dfadeaa7de",
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ const ALL_TABS: string[] = [
|
|||
"History",
|
||||
];
|
||||
|
||||
const SCREEN_TRANSITION_MS = 350;
|
||||
const SCREEN_ENTER_MS = 350;
|
||||
const SCREEN_EXIT_MS = 250;
|
||||
|
||||
const ScreenStageContainer = Stack.withProps({
|
||||
pos: "relative",
|
||||
|
|
@ -60,7 +61,8 @@ function ScreenStage({
|
|||
<Transition
|
||||
mounted={active}
|
||||
transition="fade-up"
|
||||
duration={SCREEN_TRANSITION_MS}
|
||||
duration={SCREEN_ENTER_MS}
|
||||
exitDuration={SCREEN_EXIT_MS}
|
||||
timingFunction="ease"
|
||||
>
|
||||
{(styles) => (
|
||||
|
|
|
|||
Loading…
Reference in a new issue