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
11 changes: 8 additions & 3 deletions client/src/features/workspace/components/WorkspaceShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useAuthUser } from "@/features/auth/auth.store";
import { useLogout } from "@/features/auth/auth.api";
import { useBootstrapSession } from "@/features/auth/use-bootstrap-session";
import { Button } from "@/components/ui/button";
import { BackgroundLayer } from "@/components/effects/BackgroundLayer";
import { ProjectSwitcher } from "./ProjectSwitcher";

type Props = {
Expand Down Expand Up @@ -43,8 +44,12 @@ export function WorkspaceShell({ children }: Props) {
}

return (
<div className="flex min-h-screen flex-col bg-[var(--color-background)]">
<header className="flex h-14 shrink-0 items-center justify-between border-b border-[var(--color-border)] px-6">
<div className="relative flex min-h-screen flex-col bg-[var(--color-background)]">
{/* Same shared effect as the Hero/login/register (FE-012 lineage). Kept subtle here: the
* header gets a frosted backdrop and page content keeps its own solid surfaces (project
* cards, the graph canvas card) so the animation reads as ambient texture, not clutter. */}
<BackgroundLayer />
<header className="relative z-10 flex h-14 shrink-0 items-center justify-between border-b border-[var(--color-border)] bg-[var(--color-background)]/70 px-6 backdrop-blur-sm">
<div className="flex items-center gap-6">
<Link href="/app" className="flex items-center gap-2 text-sm font-semibold tracking-tight text-[var(--color-foreground)]">
<Radar size={20} strokeWidth={2} className="text-[var(--color-accent-strong)]" />
Expand All @@ -61,7 +66,7 @@ export function WorkspaceShell({ children }: Props) {
</Button>
</div>
</header>
<main className="flex flex-1 flex-col">{children}</main>
<main className="relative z-10 flex flex-1 flex-col">{children}</main>
</div>
);
}
9 changes: 7 additions & 2 deletions client/src/features/workspace/graph/WorkspaceGraphView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ export function WorkspaceGraphView({ projectId }: Props) {

return (
<div className="flex flex-1 flex-col">
<div className="border-b border-[var(--color-border)] px-6 py-4">
<div className="border-b border-[var(--color-border)] bg-[var(--color-background)]/70 px-6 py-4 backdrop-blur-sm">
<h1 className="text-lg font-semibold text-[var(--color-foreground)]">{project.data?.name}</h1>
</div>
<div className="relative flex-1">
{/*
* Same frosted-card treatment as the Hero's GraphStage: the particle background now mounted
* behind the whole workspace (WorkspaceShell) would otherwise bleed straight through React
* Flow's transparent dot grid and compete with node/edge legibility.
*/}
<div className="relative flex-1 bg-[var(--color-background-elevated)]/60 backdrop-blur-sm">
{/*
* `h-full` on GraphEngine's own wrapper can resolve to 0 here: this ancestor's height
* comes purely from flex-grow (no explicit CSS height anywhere in the chain up to
Expand Down
15 changes: 15 additions & 0 deletions client/vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
import "@testing-library/jest-dom/vitest";

// jsdom doesn't implement matchMedia. Anything using useReducedMotion (BackgroundLayer and its
// consumers: the Hero, /login, /register, WorkspaceShell) needs this to render in tests at all.
if (!window.matchMedia) {
window.matchMedia = (query: string) => ({
matches: false,
media: query,
onchange: null,
addListener: () => {},
removeListener: () => {},
addEventListener: () => {},
removeEventListener: () => {},
dispatchEvent: () => false,
}) as unknown as MediaQueryList;
}
Loading