feat(FN-3406): add shell context hook plumbing for dashboard

Adds a new `useShellContext` hook with tests to the dashboard, integrated into `App.tsx` and `Header.tsx` to provide shell context plumbing throughout the UI.

Fusion-Task-Id: FN-3406
This commit is contained in:
Fusion
2026-05-07 22:00:41 -07:00
committed by gsxdsm
parent 954ae1078d
commit a6c4ee2b8c
23 changed files with 785 additions and 23 deletions

View File

@@ -15,6 +15,7 @@ import type { TaskView } from "../hooks/useViewState";
import type { PluginDashboardViewEntry } from "../api";
import { buildPluginTaskViewId, isPluginViewId } from "../plugins/pluginViewRegistry";
import { getPluginNavIcon } from "./pluginNavIcon";
import type { ShellContext as LaunchShellContext } from "../shell-context";
export { useViewportMode };
@@ -239,6 +240,7 @@ export interface HeaderProps {
experimentalFeatures?: { insights?: boolean; roadmap?: boolean; memoryView?: boolean; devServer?: boolean; devServerView?: boolean; researchView?: boolean };
pluginDashboardViews?: PluginDashboardViewEntry[];
shellConnectionControl?: ReactNode;
shellContext?: LaunchShellContext | null;
}
export function Header({
@@ -296,6 +298,7 @@ export function Header({
experimentalFeatures,
pluginDashboardViews = [],
shellConnectionControl,
shellContext,
}: HeaderProps) {
const mode: ViewportMode = useViewportMode();
const isMobile = mode === "mobile";
@@ -846,7 +849,7 @@ export function Header({
return (
<div className="header-wrapper">
<header className="header">
<header className="header" data-shell-kind={shellContext?.shellKind ?? "web"}>
<div className="header-left">
<div className="header-brand">
<svg