fsanyoto commited on
Commit
09f45d8
·
verified ·
1 Parent(s): b4ba7ab

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
RELEASES.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
- "current": "c5b190baa",
3
  "releases": []
4
  }
 
1
  {
2
+ "current": "3ec5f41072",
3
  "releases": []
4
  }
VERSION CHANGED
@@ -1 +1 @@
1
- c5b190baa
 
1
+ 3ec5f41072
web/public/AIOS_DEPLOY_RECEIPT CHANGED
@@ -1 +1 @@
1
- 833e0216456b671a3b0bb4a3a7034aee1d11bc452981f3d620e12bf2efab8975
 
1
+ e7366377d8b5a433064bb5bac1ca360154e1031ec518a938a60840001a147f3f
web/src/apps/AppRail.tsx ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect, useRef, useState } from "react";
2
+ import { API_V1, CREDENTIALS, UNAUTHORIZED_EVENT, checkTenant, currentTenant, signal } from "../apiContract";
3
+ import { appPathHash } from "../customer-grid/dataPath";
4
+ import { fetchWithDeadline } from "../net/deadline";
5
+ import PanelToggleIcon from "../shell/PanelToggleIcon";
6
+ import { useNarrowRailFold } from "../shell/railHeader";
7
+ import { AppMark } from "./templateMarks";
8
+ import "../styles/sdlc81/app-rail.css";
9
+
10
+ interface RailApplication {
11
+ id: string;
12
+ name: string;
13
+ deepLink?: string;
14
+ templateKind?: string;
15
+ templateConnector?: string;
16
+ openTarget?: { database?: string };
17
+ compatibleDatabases?: string[];
18
+ capabilities?: Record<string, boolean>;
19
+ }
20
+
21
+ const RAIL_KEY = "aios-app-rail";
22
+
23
+ function railApplications(body: unknown): RailApplication[] {
24
+ if (!body || typeof body !== "object" || !("applications" in body)
25
+ || !Array.isArray(body.applications)) throw new Error("application_list_invalid");
26
+ const seen = new Set<string>();
27
+ return body.applications.filter((row): row is RailApplication => {
28
+ if (!row || typeof row !== "object" || typeof row.id !== "string" || !row.id
29
+ || typeof row.name !== "string" || !row.name.trim() || seen.has(row.id)
30
+ || row.capabilities?.read === false) return false;
31
+ seen.add(row.id);
32
+ return true;
33
+ }).sort((a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: "base" }) || a.id.localeCompare(b.id));
34
+ }
35
+
36
+ /** The same href as the App home tile. */
37
+ function railHref(app: RailApplication): string {
38
+ const database = app.openTarget?.database ?? app.compatibleDatabases?.[0] ?? "";
39
+ return app.deepLink ? `#${app.deepLink}` : database
40
+ ? appPathHash({ database, application: app.id })
41
+ : `#/app?application=${encodeURIComponent(app.id)}`;
42
+ }
43
+
44
+ /** The left rail inside an App: every App the grant-filtered nav returns, the current one selected. */
45
+ export function AppRail({ appId }: { appId: string }) {
46
+ const tenant = currentTenant();
47
+ const [revision, setRevision] = useState(0);
48
+ const scope = JSON.stringify([tenant, appId, revision]);
49
+ const wanted = useRef(scope);
50
+ wanted.current = scope;
51
+ const [result, setResult] = useState<{ scope: string; applications: RailApplication[] } | null>(null);
52
+ const [railShut, setRailShut] = useState<boolean>(() => {
53
+ try {
54
+ return localStorage.getItem(RAIL_KEY) === "1";
55
+ } catch {
56
+ return false;
57
+ }
58
+ });
59
+ const toggleRail = () => setRailShut(value => {
60
+ const next = !value;
61
+ try {
62
+ localStorage.setItem(RAIL_KEY, next ? "1" : "0");
63
+ } catch {
64
+ // Blocked storage still folds for this visit.
65
+ }
66
+ return next;
67
+ });
68
+ const narrow = useNarrowRailFold();
69
+ const [narrowOpen, setNarrowOpen] = useState(false);
70
+ useEffect(() => {
71
+ if (!narrow) setNarrowOpen(false);
72
+ }, [narrow]);
73
+ const folded = narrow ? !narrowOpen : railShut;
74
+
75
+ useEffect(() => {
76
+ const controller = new AbortController();
77
+ const isCurrent = () => !controller.signal.aborted && wanted.current === scope
78
+ && currentTenant() === tenant;
79
+ const clear = () => {
80
+ controller.abort();
81
+ setResult(null);
82
+ };
83
+ const refresh = () => {
84
+ clear();
85
+ setRevision(value => value + 1);
86
+ };
87
+ setResult(null);
88
+ window.addEventListener(UNAUTHORIZED_EVENT, clear);
89
+ window.addEventListener("aios:signed-out", clear);
90
+ window.addEventListener("aios:applications-changed", refresh);
91
+ if (appId) void fetchWithDeadline(`${API_V1}/nav/applications`, {
92
+ method: "GET", credentials: CREDENTIALS, signal: controller.signal, cache: "no-store",
93
+ }, async response => {
94
+ if (!isCurrent()) throw new Error("application_list_stale");
95
+ if (checkTenant(response)) throw new Error("application_list_scope_changed");
96
+ if (tenant === null && currentTenant() !== null) {
97
+ setRevision(value => value + 1);
98
+ throw new Error("application_list_scope_bound");
99
+ }
100
+ if (response.status === 401) signal(UNAUTHORIZED_EVENT);
101
+ if (!response.ok) throw new Error("application_list_failed");
102
+ return railApplications(await response.json());
103
+ }).then(({ body }) => {
104
+ if (isCurrent()) setResult({ scope, applications: body });
105
+ }).catch(() => {
106
+ if (isCurrent()) setResult(null);
107
+ });
108
+ return () => {
109
+ controller.abort();
110
+ window.removeEventListener(UNAUTHORIZED_EVENT, clear);
111
+ window.removeEventListener("aios:signed-out", clear);
112
+ window.removeEventListener("aios:applications-changed", refresh);
113
+ };
114
+ }, [scope, appId, tenant]);
115
+
116
+ const applications = result?.scope === scope ? result.applications : [];
117
+ const toggleLabel = folded ? "Expand Apps" : "Minimize Apps";
118
+ return <nav className={"app-rail" + (folded ? " is-collapsed" : "") + (narrow && narrowOpen ? " is-narrow-open" : "")}
119
+ aria-label="Apps" data-app-rail={appId}>
120
+ <div className="app-rail-top">
121
+ <span className="app-rail-title">Apps</span>
122
+ <button type="button" className="cg-rail-toggle" aria-label={toggleLabel} title={toggleLabel}
123
+ aria-expanded={!folded} onClick={narrow ? () => setNarrowOpen(open => !open) : toggleRail}>
124
+ <PanelToggleIcon open={!folded} />
125
+ </button>
126
+ </div>
127
+ <ul className="app-rail-list">
128
+ {applications.map(app => <li key={app.id}>
129
+ <a className="app-rail-item" href={railHref(app)} title={app.name}
130
+ aria-current={app.id === appId ? "page" : undefined}>
131
+ <AppMark mark={app.templateKind} connector={app.templateConnector} size={16} />
132
+ <span className="app-rail-name">{app.name}</span>
133
+ </a>
134
+ </li>)}
135
+ </ul>
136
+ </nav>;
137
+ }
web/src/apps/amazon-profit/AppView.tsx CHANGED
@@ -16,7 +16,7 @@ export default function CommandCenterView(_props: AppViewProps) {
16
  return <CommandCenterTableContext.Provider value={setTable}>
17
  <OverlayProvider>
18
  <Suspense fallback={<LogoLoader data-app-reason="loading" />}>
19
- <CustomerGrid key={table} address={{ database: table }} />
20
  </Suspense>
21
  </OverlayProvider>
22
  </CommandCenterTableContext.Provider>;
 
16
  return <CommandCenterTableContext.Provider value={setTable}>
17
  <OverlayProvider>
18
  <Suspense fallback={<LogoLoader data-app-reason="loading" />}>
19
+ <CustomerGrid key={table} address={{ database: table }} hideViewRail />
20
  </Suspense>
21
  </OverlayProvider>
22
  </CommandCenterTableContext.Provider>;
web/src/apps/competitor-watch/CompetitorWatchView.tsx CHANGED
@@ -3,7 +3,7 @@ import type { FormEvent } from "react";
3
  import { API_V1, CREDENTIALS } from "../../apiContract";
4
  import { AppFrame } from "../../customer-grid/AppFrame";
5
  import { AppTabs } from "../AppTabs";
6
- import { AmazonAppStrip } from "../AmazonAppStrip";
7
  import { AppFrameMarks } from "../templateMarks";
8
  import { LineChart } from "../../viz/kit";
9
  import Dashboard from "./Dashboard";
@@ -565,7 +565,7 @@ function AlertsView({ appId, canEditApp }: { appId: string; canEditApp: boolean
565
 
566
  export default function CompetitorWatchView({ application }: { application: CompetitorWatchApplication }) {
567
  return <div className="cg-app-frame-catalog" data-app-view="competitor-watch">
568
- <AppFrame appName={application.name} strip={<AmazonAppStrip appId={application.id} />}
569
  actions={<AppFrameMarks mark={application.templateMark} connector={application.templateConnector} />}>
570
  <CompetitorWatchBody key={application.id} application={application} />
571
  </AppFrame>
 
3
  import { API_V1, CREDENTIALS } from "../../apiContract";
4
  import { AppFrame } from "../../customer-grid/AppFrame";
5
  import { AppTabs } from "../AppTabs";
6
+ import { AppRail } from "../AppRail";
7
  import { AppFrameMarks } from "../templateMarks";
8
  import { LineChart } from "../../viz/kit";
9
  import Dashboard from "./Dashboard";
 
565
 
566
  export default function CompetitorWatchView({ application }: { application: CompetitorWatchApplication }) {
567
  return <div className="cg-app-frame-catalog" data-app-view="competitor-watch">
568
+ <AppFrame appName={application.name} rail={<AppRail appId={application.id} />}
569
  actions={<AppFrameMarks mark={application.templateMark} connector={application.templateConnector} />}>
570
  <CompetitorWatchBody key={application.id} application={application} />
571
  </AppFrame>
web/src/customer-grid/AppFrame.tsx CHANGED
@@ -4,20 +4,20 @@ import "../styles/sdlc76/app-frame.css";
4
  interface AppFrameProps {
5
  appName: string;
6
  actions?: ReactNode;
7
- strip?: ReactNode;
8
  children?: ReactNode;
9
  }
10
 
11
- export function AppFrame({ appName, actions, strip, children }: AppFrameProps) {
12
- return <>
13
- {strip}
14
- <header className="cg-map-bar cg-app-frame-header">
15
- <a className="cg-app-frame-back" href="#/app">Back to Apps</a>
16
- <span className="cg-app-map-name cg-app-frame-name" title={appName} aria-label="App name">
17
- <strong>{appName}</strong>
18
- </span>
19
- {actions}
20
- </header>
21
- {children}
22
- </>;
23
  }
 
4
  interface AppFrameProps {
5
  appName: string;
6
  actions?: ReactNode;
7
+ rail?: ReactNode;
8
  children?: ReactNode;
9
  }
10
 
11
+ export function AppFrame({ appName, actions, rail, children }: AppFrameProps) {
12
+ const header = <header className="cg-map-bar cg-app-frame-header">
13
+ <a className="cg-app-frame-back" href="#/app">Back to Apps</a>
14
+ <span className="cg-app-map-name cg-app-frame-name" title={appName} aria-label="App name">
15
+ <strong>{appName}</strong>
16
+ </span>
17
+ {actions}
18
+ </header>;
19
+ // With a rail, the header and body share one column beside it.
20
+ return rail
21
+ ? <>{rail}<div className="cg-app-frame-main">{header}{children}</div></>
22
+ : <>{header}{children}</>;
23
  }
web/src/customer-grid/CustomerGrid.tsx CHANGED
@@ -2210,6 +2210,8 @@ interface CustomerGridProps {
2210
  */
2211
  relatedViewId?: string;
2212
  onRelatedViewChange?: (viewId: string) => void;
 
 
2213
  }
2214
 
2215
  /** Exact client mirror of core.user_tables.is_linkable_target. */
@@ -2678,6 +2680,7 @@ function CustomerGridSurface({
2678
  onOpenRecord,
2679
  relatedViewId,
2680
  onRelatedViewChange,
 
2681
  }: CustomerGridProps = {}) {
2682
  // S72-T63 / C3: `address` is the hosted mode. Its location lives in this instance, not in
2683
  // the hash, and the legacy read-only meaning of `embedded` does not apply to it (R113).
@@ -3632,7 +3635,7 @@ function CustomerGridSurface({
3632
  * which in this gate SKIPS all 72 compiled-artifact controls with it — one ticket's
3633
  * convenience blinding a whole battery [[a-relabel-ruling-is-a-repo-wide-gate-grep]].
3634
  */
3635
- const wanted = related && relatedViewId ? relatedViewId : requested;
3636
  const active = initialViews.find((view) => view.id === wanted) ?? initialViews[0];
3637
  /**
3638
  * ⭐ W36-T03 — seed the bound's two refs from what we just RESOLVED, and stamp nothing here.
@@ -3700,7 +3703,7 @@ function CustomerGridSurface({
3700
  }
3701
  }, [payload, payloadFields, storageKey, hostWorkspace, scope, isQueryPreview, queryBinding, isApplicationSurface,
3702
  cellView, cellFilterKey, cellFieldsKey, personalLayout.ready, personalLayout.layout, emitHostEvent, workspaceError,
3703
- legacyRowsEnabled, addressedDefinition]);
3704
 
3705
  // Initialization runs once per scope. Keep the columns current after a cell filter settles,
3706
  // retaining hidden keys in the order so the reader can show them again.
@@ -4452,7 +4455,7 @@ function CustomerGridSurface({
4452
  // Owner items 4+6 — the Cohort page's grid renders without the Views sidebar.
4453
  // D-710 (R3): an addressed App opens on its own, with no views panel beside it.
4454
  const hideViews = (!hostWorkspace && !related) || payload?.workspace?.hideViews === true ||
4455
- isApplicationSurface;
4456
  // S70-T12 / R16: card modes on a mirror ask for server groups/ranges. Embedded and query
4457
  // surfaces retain their original mode withholding; unsupported saved modes say why.
4458
  const displaySpec = resolvedDisplaySpec;
@@ -11453,7 +11456,7 @@ function CustomerGridSurface({
11453
  onRelational={setPivotVia}
11454
  onRelationalWindow={setPivotWindow}
11455
  sourceLabel={topic.nouns}
11456
- onViewActions={embedded ? undefined : setViewActionsAnchor}
11457
  fullscreen={appFullscreen}
11458
  onFullscreen={toggleFullscreen}
11459
  />
 
2210
  */
2211
  relatedViewId?: string;
2212
  onRelatedViewChange?: (viewId: string) => void;
2213
+ /** An App hosts this grid: no view rail, no view actions, the table's default view. */
2214
+ hideViewRail?: boolean;
2215
  }
2216
 
2217
  /** Exact client mirror of core.user_tables.is_linkable_target. */
 
2680
  onOpenRecord,
2681
  relatedViewId,
2682
  onRelatedViewChange,
2683
+ hideViewRail,
2684
  }: CustomerGridProps = {}) {
2685
  // S72-T63 / C3: `address` is the hosted mode. Its location lives in this instance, not in
2686
  // the hash, and the legacy read-only meaning of `embedded` does not apply to it (R113).
 
3635
  * which in this gate SKIPS all 72 compiled-artifact controls with it — one ticket's
3636
  * convenience blinding a whole battery [[a-relabel-ruling-is-a-repo-wide-gate-grep]].
3637
  */
3638
+ const wanted = hideViewRail ? ALL_VIEW_ID : related && relatedViewId ? relatedViewId : requested;
3639
  const active = initialViews.find((view) => view.id === wanted) ?? initialViews[0];
3640
  /**
3641
  * ⭐ W36-T03 — seed the bound's two refs from what we just RESOLVED, and stamp nothing here.
 
3703
  }
3704
  }, [payload, payloadFields, storageKey, hostWorkspace, scope, isQueryPreview, queryBinding, isApplicationSurface,
3705
  cellView, cellFilterKey, cellFieldsKey, personalLayout.ready, personalLayout.layout, emitHostEvent, workspaceError,
3706
+ legacyRowsEnabled, addressedDefinition, hideViewRail]);
3707
 
3708
  // Initialization runs once per scope. Keep the columns current after a cell filter settles,
3709
  // retaining hidden keys in the order so the reader can show them again.
 
4455
  // Owner items 4+6 — the Cohort page's grid renders without the Views sidebar.
4456
  // D-710 (R3): an addressed App opens on its own, with no views panel beside it.
4457
  const hideViews = (!hostWorkspace && !related) || payload?.workspace?.hideViews === true ||
4458
+ isApplicationSurface || hideViewRail === true;
4459
  // S70-T12 / R16: card modes on a mirror ask for server groups/ranges. Embedded and query
4460
  // surfaces retain their original mode withholding; unsupported saved modes say why.
4461
  const displaySpec = resolvedDisplaySpec;
 
11456
  onRelational={setPivotVia}
11457
  onRelationalWindow={setPivotWindow}
11458
  sourceLabel={topic.nouns}
11459
+ onViewActions={embedded || hideViewRail ? undefined : setViewActionsAnchor}
11460
  fullscreen={appFullscreen}
11461
  onFullscreen={toggleFullscreen}
11462
  />
web/src/customer-grid/viewModes.tsx CHANGED
@@ -31,7 +31,7 @@ import { lazy, memo, Suspense, useEffect, useMemo, useRef, useState } from "reac
31
  import type { ComponentType, CSSProperties, DragEvent, LazyExoticComponent, ReactNode } from "react";
32
  import { AppFrame } from "./AppFrame";
33
  import { LogoLoader } from "../ui/LogoLoader";
34
- import { AmazonAppStrip } from "../apps/AmazonAppStrip";
35
  // C2: the App mark and the connector mark come from one module, shared with MapView's frames.
36
  import { AppFrameMarks } from "../apps/templateMarks";
37
  import { AppReason, AppViewErrorBoundary, boundedAppChunk, useAppAvailability, useAppOpening } from "../apps/AppReason";
@@ -107,11 +107,11 @@ export function appViewAvailable(view: unknown): view is string {
107
  return typeof view === "string" && /^[a-z0-9-]+$/.test(view) && appViewPath(view) in APP_VIEWS;
108
  }
109
 
110
- /** C2: the one frame around every App screen: Back to Apps, the App mark, its name, the connector mark. */
111
  export function AppViewFrame({ application, children }: { application: TemplateApplication; children?: ReactNode }) {
112
  return <div className="cg-app-frame-catalog" data-app-view={application.templateView}>
113
  <AppFrame appName={application.name}
114
- strip={<AmazonAppStrip application={application} />}
115
  actions={<AppFrameMarks mark={application.templateMark} connector={application.templateConnector} />}>
116
  {children}
117
  </AppFrame>
 
31
  import type { ComponentType, CSSProperties, DragEvent, LazyExoticComponent, ReactNode } from "react";
32
  import { AppFrame } from "./AppFrame";
33
  import { LogoLoader } from "../ui/LogoLoader";
34
+ import { AppRail } from "../apps/AppRail";
35
  // C2: the App mark and the connector mark come from one module, shared with MapView's frames.
36
  import { AppFrameMarks } from "../apps/templateMarks";
37
  import { AppReason, AppViewErrorBoundary, boundedAppChunk, useAppAvailability, useAppOpening } from "../apps/AppReason";
 
107
  return typeof view === "string" && /^[a-z0-9-]+$/.test(view) && appViewPath(view) in APP_VIEWS;
108
  }
109
 
110
+ /** C2: the one frame around every App screen: the App rail, Back to Apps, its name, the connector mark. */
111
  export function AppViewFrame({ application, children }: { application: TemplateApplication; children?: ReactNode }) {
112
  return <div className="cg-app-frame-catalog" data-app-view={application.templateView}>
113
  <AppFrame appName={application.name}
114
+ rail={<AppRail appId={application.id} />}
115
  actions={<AppFrameMarks mark={application.templateMark} connector={application.templateConnector} />}>
116
  {children}
117
  </AppFrame>
web/src/styles/sdlc81/app-rail.css ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* H1 (sdlc81): the left App rail inside an App. Width, fold and narrow open mirror `.cg-views`. */
2
+ .app-rail {
3
+ flex: 0 0 var(--lp-rail-w);
4
+ width: var(--lp-rail-w);
5
+ min-width: var(--lp-rail-w);
6
+ height: 100%;
7
+ box-sizing: border-box;
8
+ padding: 0 var(--lp-rail-inset) 10px;
9
+ border-right: var(--lp-hairline-width) solid var(--lp-line);
10
+ background: var(--lp-surface);
11
+ color: var(--lp-ink);
12
+ display: flex;
13
+ flex-direction: column;
14
+ overflow: hidden;
15
+ transition:
16
+ width var(--lp-fold-t) var(--lp-fold-e),
17
+ flex-basis var(--lp-fold-t) var(--lp-fold-e),
18
+ min-width var(--lp-fold-t) var(--lp-fold-e),
19
+ padding var(--lp-fold-t) var(--lp-fold-e);
20
+ }
21
+ .app-rail > * {
22
+ width: calc(var(--lp-rail-w) - var(--lp-rail-inset) * 2 - var(--lp-hairline-width));
23
+ opacity: 1;
24
+ visibility: visible;
25
+ transition: opacity var(--lp-fold-t) var(--lp-fold-e), visibility 0s;
26
+ }
27
+ .app-rail > .app-rail-top {
28
+ width: calc(var(--lp-rail-w) - var(--lp-hairline-width));
29
+ }
30
+ .app-rail.is-narrow-open { --lp-rail-w: 240px; }
31
+ .app-rail.is-collapsed {
32
+ flex-basis: var(--lp-rail-min);
33
+ width: var(--lp-rail-min);
34
+ min-width: var(--lp-rail-min);
35
+ padding: 0 6px 10px;
36
+ }
37
+ .app-rail.is-collapsed > :not(.app-rail-top) {
38
+ opacity: 0;
39
+ visibility: hidden;
40
+ pointer-events: none;
41
+ transition-delay: 0s, var(--lp-fold-t);
42
+ }
43
+ @media (prefers-reduced-motion: reduce) {
44
+ .app-rail,
45
+ .app-rail > * {
46
+ transition: none !important;
47
+ }
48
+ }
49
+
50
+ /* The header row matches the view rail's band: title left, toggle right. */
51
+ .app-rail-top {
52
+ flex: 0 0 var(--lp-rail-head-h);
53
+ height: var(--lp-rail-head-h);
54
+ box-sizing: border-box;
55
+ display: flex;
56
+ flex-wrap: nowrap;
57
+ align-items: center;
58
+ gap: calc(var(--lp-rail-inset) / 2);
59
+ margin: 0 calc(-1 * var(--lp-rail-inset));
60
+ padding: 0 var(--lp-rail-inset);
61
+ border-bottom: var(--lp-hairline-width) solid var(--lp-line);
62
+ }
63
+ .app-rail-title {
64
+ flex: 0 1 auto;
65
+ min-width: 0;
66
+ padding: 0 6px;
67
+ overflow: hidden;
68
+ color: var(--lp-ink);
69
+ font-size: var(--lp-fs-sm);
70
+ font-weight: var(--lp-fw-semibold);
71
+ text-overflow: ellipsis;
72
+ white-space: nowrap;
73
+ }
74
+ .app-rail-top > .cg-rail-toggle {
75
+ flex: 0 0 auto;
76
+ margin-left: auto;
77
+ }
78
+ /* The 48 px strip holds only the toggle. */
79
+ .app-rail.is-collapsed > .app-rail-top > :not(.cg-rail-toggle) { display: none; }
80
+ .app-rail.is-collapsed > .app-rail-top > .cg-rail-toggle { margin-left: 0; }
81
+
82
+ .app-rail-list {
83
+ flex: 1 1 0;
84
+ min-height: 0;
85
+ margin: 0;
86
+ padding: 8px 0 0;
87
+ list-style: none;
88
+ overflow-y: auto;
89
+ overflow-x: hidden;
90
+ }
91
+
92
+ /* Rows mirror `.shell-nav-item`. */
93
+ .app-rail-item {
94
+ display: flex;
95
+ align-items: center;
96
+ gap: 8px;
97
+ min-height: 34px;
98
+ box-sizing: border-box;
99
+ padding: 7px 8px;
100
+ border-radius: var(--lp-r-sm);
101
+ color: var(--lp-ink);
102
+ font-size: var(--lp-fs-xs);
103
+ font-weight: 500;
104
+ text-decoration: none;
105
+ cursor: pointer;
106
+ }
107
+ .app-rail-item:hover { background: var(--lp-surface-2); }
108
+ .app-rail-item[aria-current="page"],
109
+ .app-rail-item[aria-current="page"]:hover {
110
+ background: var(--lp-blue-tint);
111
+ font-weight: 600;
112
+ }
113
+ .app-rail-item:focus-visible {
114
+ outline: 2px solid var(--lp-blue-deep);
115
+ outline-offset: -2px;
116
+ }
117
+ .app-rail-item > :first-child { flex: 0 0 auto; }
118
+ .app-rail-name {
119
+ flex: 1 1 auto;
120
+ min-width: 0;
121
+ overflow: hidden;
122
+ text-overflow: ellipsis;
123
+ white-space: nowrap;
124
+ }
125
+
126
+ /* The flex-hosted frame: rail left, header and body in their own column. */
127
+ .cg-app-frame-catalog:has(> .app-rail) {
128
+ flex-direction: row;
129
+ padding: 0;
130
+ }
131
+ .cg-app-frame-catalog > .cg-app-frame-main {
132
+ display: flex;
133
+ flex-direction: column;
134
+ flex: 1 1 0;
135
+ min-width: 0;
136
+ min-height: 0;
137
+ padding: 10px 12px;
138
+ box-sizing: border-box;
139
+ }
140
+
141
+ /* The grid-hosted frame: the rail takes column 1 across every row. */
142
+ .cg-main:has(> .cg-grid-box > .cg-app-frame-catalog > .app-rail) {
143
+ grid-template-columns: auto minmax(0, 1fr) auto;
144
+ padding-left: 0;
145
+ }
146
+ .cg-main > .cg-grid-box > .cg-app-frame-catalog:has(> .app-rail) > .app-rail {
147
+ grid-area: 1 / 1 / -1 / 2;
148
+ height: auto;
149
+ margin: -10px 0;
150
+ }
151
+ .cg-main > .cg-grid-box > .cg-app-frame-catalog:has(> .app-rail) > .cg-app-frame-main {
152
+ display: contents;
153
+ }
154
+ .cg-main > .cg-grid-box > .cg-app-frame-catalog:has(> .app-rail) > .cg-app-frame-main > .cg-app-frame-header {
155
+ grid-area: 1 / 2;
156
+ margin-bottom: 0;
157
+ }
158
+ .cg-main:has(> .cg-grid-box > .cg-app-frame-catalog > .app-rail) > .cg-relpin-bar > .cg-toolbar {
159
+ grid-area: 1 / 3;
160
+ }
161
+ .cg-main > .cg-grid-box > .cg-app-frame-catalog:has(> .app-rail) > .cg-app-frame-main > :not(.cg-app-frame-header) {
162
+ grid-area: 2 / 2 / 3 / -1;
163
+ min-height: 0;
164
+ }
165
+ .cg-main:has(> .cg-grid-box > .cg-app-frame-catalog > .app-rail) > .cg-grid-footer {
166
+ grid-area: 3 / 2 / 4 / -1;
167
+ }
168
+
169
+ @media (max-width: 760px) {
170
+ .cg-main:has(> .cg-grid-box > .cg-app-frame-catalog > .app-rail) {
171
+ grid-template-columns: auto minmax(0, 1fr);
172
+ grid-template-rows: auto auto minmax(0, 1fr) auto;
173
+ }
174
+ .cg-main:has(> .cg-grid-box > .cg-app-frame-catalog > .app-rail) > .cg-relpin-bar > .cg-toolbar {
175
+ grid-area: 2 / 2;
176
+ }
177
+ .cg-main > .cg-grid-box > .cg-app-frame-catalog:has(> .app-rail) > .cg-app-frame-main > :not(.cg-app-frame-header) {
178
+ grid-area: 3 / 2 / 4 / -1;
179
+ }
180
+ .cg-main:has(> .cg-grid-box > .cg-app-frame-catalog > .app-rail) > .cg-grid-footer {
181
+ grid-area: 4 / 2 / 5 / -1;
182
+ }
183
+ }
web/src/styles/sdlc81/command-center-app.css CHANGED
@@ -1,5 +1,5 @@
1
  /* The hosted grid shares the App frame column with the header, so it takes the rest, not 100%. */
2
- .cg-app-frame-catalog[data-app-view="amazon-profit"] > .cg-shell {
3
  flex: 1 1 0;
4
  min-height: 0;
5
  height: auto;
 
1
  /* The hosted grid shares the App frame column with the header, so it takes the rest, not 100%. */
2
+ .cg-app-frame-catalog[data-app-view="amazon-profit"] > .cg-app-frame-main > .cg-shell {
3
  flex: 1 1 0;
4
  min-height: 0;
5
  height: auto;
web/wiring_rows/s81_l.py CHANGED
@@ -1,8 +1,8 @@
1
  """Shared Amazon frame and Dashboard mounts."""
2
 
3
  ROWS = [
4
- ("S81-T80 Amazon App strip is mounted by the shared frame", "apps/AmazonAppStrip.tsx",
5
- r"export function AmazonAppStrip\(", "customer-grid/viewModes.tsx", r"<AmazonAppStrip application=\{application\}"),
6
  ("S81-T81 shared KPI is mounted", "viz/kit/Kpi.tsx", r"export function Kpi\(",
7
  "apps/AppDashboard.tsx", r"<Kpi label="),
8
  ("S81-T81 shared KPI strip is mounted", "viz/kit/Kpi.tsx", r"export function KpiStrip\(",
 
1
  """Shared Amazon frame and Dashboard mounts."""
2
 
3
  ROWS = [
4
+ ("S81-T80 App rail is mounted by the shared frame", "apps/AppRail.tsx",
5
+ r"export function AppRail\(", "customer-grid/viewModes.tsx", r"rail=\{<AppRail appId=\{application\.id\}"),
6
  ("S81-T81 shared KPI is mounted", "viz/kit/Kpi.tsx", r"export function Kpi\(",
7
  "apps/AppDashboard.tsx", r"<Kpi label="),
8
  ("S81-T81 shared KPI strip is mounted", "viz/kit/Kpi.tsx", r"export function KpiStrip\(",