@checkstack/dependency-frontend 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,89 @@
1
1
  # @checkstack/dependency-frontend
2
2
 
3
+ ## 0.5.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 56e7c75: Hide navigation, actions and links that the current user cannot use, so anonymous
8
+ and read-only users no longer see entries that lead to "Access Denied" or to
9
+ actions the server would reject.
10
+
11
+ - **Sidebar**: a nav entry can now declare a dynamic `nav.isVisible({ accessRules, isAuthenticated })` predicate (in addition to the static `accessRule`). A group whose every entry is filtered out is no longer rendered. The filtering/grouping logic is extracted to a pure, unit-tested helper.
12
+ - **Infrastructure**: its sidebar entry is shown only when the user can READ at least one contributed tab (queue, cache, …), instead of always (it previously had no static rule because tabs are contributed at runtime).
13
+ - **Notification Settings**: hidden from anonymous users - notifications are per-user, so an anonymous visitor can't have any.
14
+ - **Anomaly Mute / Suppress**: the "Mute" / "Mute all" controls (a per-user preference) are hidden from anonymous visitors; the "Suppress" control is gated on `anomalyAccess.feed.manage`. Both were previously always visible.
15
+ - **Dashboard**: the "Open Catalog" actions (which open the manage-only Catalog config page) are hidden from users without `catalogAccess.system.manage`, and the "View catalog" link is gated on `catalogAccess.system.read`.
16
+ - **Dashboard status signals**: the per-system status rows contributed by plugins (`SystemSignalsSlot`) now render as a LINK only when the user can open the target, and as plain text otherwise. `SystemSignal` gains an optional `accessRule`; the healthcheck, anomaly, and dependency fillers set it for their gated targets (check-history / assignments / dependency-map). Signals pointing at ungated pages (incident / maintenance / SLO detail) stay links.
17
+ - **Plugin Manager**: the "Install plugin" button (which opens the install-gated page) is hidden from users with only `plugin` view access.
18
+ - **Satellites**: the page is entirely manage-gated, but its route/sidebar entry was gated on `read`, so read-only users saw the nav item and hit "Access Denied" on click. The route and nav entry now require `satellite.manage`.
19
+
20
+ The `@checkstack/ai-backend` bump is only the regenerated bundled docs index
21
+ (the frontend routing guide gained the `nav.isVisible` section); no code change.
22
+
23
+ **BREAKING (`@checkstack/frontend-api`):** the `AccessApi` interface gains a
24
+ required `useIsAuthenticated()` method. Custom `AccessApi` implementations must
25
+ add it (it returns `{ loading, isAuthenticated }`). The built-in auth
26
+ implementation and the no-auth fallback already do. `NavEntry` also gains an
27
+ optional `isVisible` predicate (purely additive).
28
+
29
+ - Updated dependencies [460ffd6]
30
+ - Updated dependencies [56e7c75]
31
+ - Updated dependencies [56e7c75]
32
+ - @checkstack/dashboard-frontend@0.8.5
33
+ - @checkstack/frontend-api@0.9.0
34
+ - @checkstack/catalog-common@2.3.4
35
+ - @checkstack/ui@1.15.1
36
+ - @checkstack/common@0.15.0
37
+ - @checkstack/dependency-common@1.2.4
38
+ - @checkstack/gitops-common@0.6.3
39
+ - @checkstack/healthcheck-common@1.5.4
40
+ - @checkstack/gitops-frontend@0.5.5
41
+ - @checkstack/signal-frontend@0.2.4
42
+
43
+ ## 0.5.4
44
+
45
+ ### Patch Changes
46
+
47
+ - 50123c7: Fix the dependency map page's scrolling and make its header consistent with the
48
+ rest of the app. The page sized its canvas with a fixed `calc(100vh - 12rem)`,
49
+ which could overshoot the available space (double-scroll) depending on viewport
50
+ chrome, and it used a bespoke `<h1>` header with no icon. It now renders through
51
+ `PageLayout` (with the `GitBranch` nav icon and `fillHeight`), so the React Flow
52
+ canvas fills the app shell's bounded flex content area and only it scrolls/pans -
53
+ the page itself never scrolls.
54
+ - fb705df: Upgrade React 18 to React 19 across the platform.
55
+
56
+ **BREAKING (runtime frontend plugins):** React is shared as a Module Federation
57
+ singleton, so the host now provides **React 19** to every runtime plugin.
58
+ Frontend plugins built against React 18 must be rebuilt against React 19
59
+ (`react` / `react-dom` `^19`). The scaffold templates and the host/plugin MF
60
+ `requiredVersion` are updated to `^19`. `react` (and now `react-dom`) are pinned
61
+ to a single version across the workspace via syncpack so the singleton can never
62
+ skew (react and react-dom must match exactly).
63
+
64
+ The React 19 removed-API surface was audited - the codebase used only no-arg
65
+ `useRef()` (now `useRef<T | undefined>(undefined)`); no `ReactDOM.render`,
66
+ legacy context, string refs, or function-component `defaultProps`. This also
67
+ clears the `IMPORT_IS_UNDEFINED` build warnings for `React.use` /
68
+ `React.useOptimistic` (react-router 7 feature-detection), which React 19 exports.
69
+
70
+ The downstream `*-frontend` packages (and `@checkstack/infrastructure-common`)
71
+ receive only the mechanical `react` dependency bump (`patch`); the framework
72
+ packages carrying the shared-singleton change are bumped `minor`.
73
+
74
+ - Updated dependencies [9d8961c]
75
+ - Updated dependencies [fb705df]
76
+ - @checkstack/ui@1.15.0
77
+ - @checkstack/frontend-api@0.8.0
78
+ - @checkstack/dashboard-frontend@0.8.4
79
+ - @checkstack/gitops-frontend@0.5.4
80
+ - @checkstack/signal-frontend@0.2.3
81
+ - @checkstack/catalog-common@2.3.3
82
+ - @checkstack/dependency-common@1.2.3
83
+ - @checkstack/common@0.14.1
84
+ - @checkstack/gitops-common@0.6.2
85
+ - @checkstack/healthcheck-common@1.5.3
86
+
3
87
  ## 0.5.3
4
88
 
5
89
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/dependency-frontend",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "main": "src/index.tsx",
@@ -13,25 +13,25 @@
13
13
  "lint:code": "eslint . --max-warnings 0"
14
14
  },
15
15
  "dependencies": {
16
- "@checkstack/catalog-common": "2.3.2",
17
- "@checkstack/common": "0.14.1",
18
- "@checkstack/dashboard-frontend": "0.8.3",
19
- "@checkstack/dependency-common": "1.2.2",
20
- "@checkstack/frontend-api": "0.7.2",
21
- "@checkstack/gitops-common": "0.6.2",
22
- "@checkstack/gitops-frontend": "0.5.3",
23
- "@checkstack/healthcheck-common": "1.5.2",
24
- "@checkstack/signal-frontend": "0.2.2",
25
- "@checkstack/ui": "1.14.0",
16
+ "@checkstack/catalog-common": "2.3.4",
17
+ "@checkstack/common": "0.15.0",
18
+ "@checkstack/dashboard-frontend": "0.8.5",
19
+ "@checkstack/dependency-common": "1.2.4",
20
+ "@checkstack/frontend-api": "0.9.0",
21
+ "@checkstack/gitops-common": "0.6.3",
22
+ "@checkstack/gitops-frontend": "0.5.5",
23
+ "@checkstack/healthcheck-common": "1.5.4",
24
+ "@checkstack/signal-frontend": "0.2.4",
25
+ "@checkstack/ui": "1.15.1",
26
26
  "@xyflow/react": "^12.11.0",
27
27
  "lucide-react": "^1.17.0",
28
- "react": "^18.3.1",
28
+ "react": "19.2.7",
29
29
  "react-router-dom": "^7.16.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "typescript": "^5.0.0",
33
- "@types/react": "^18.2.0",
33
+ "@types/react": "^19.0.0",
34
34
  "@checkstack/tsconfig": "0.0.7",
35
- "@checkstack/scripts": "0.5.0"
35
+ "@checkstack/scripts": "0.6.1"
36
36
  }
37
37
  }
@@ -26,11 +26,12 @@ import {
26
26
  Button,
27
27
  Badge,
28
28
  LoadingSpinner,
29
+ PageLayout,
29
30
  useToast,
30
31
  usePerformance,
31
32
  cn,
32
33
  } from "@checkstack/ui";
33
- import { Maximize2, Save, RefreshCw, Trash2 } from "lucide-react";
34
+ import { Maximize2, Save, RefreshCw, Trash2, GitBranch } from "lucide-react";
34
35
  import type { ImpactType } from "@checkstack/dependency-common";
35
36
  import { DependencyEdgeForm } from "./DependencyEdgeForm";
36
37
  import { useProvenanceLocks } from "@checkstack/gitops-frontend";
@@ -96,7 +97,9 @@ function DependencyMapContent() {
96
97
  const [nodes, setNodes, onNodesChange] = useNodesState<SystemNode>([]);
97
98
  const [edges, setEdges, onEdgesChange] = useEdgesState<DependencyEdge>([]);
98
99
  const [hasUnsaved, setHasUnsaved] = useState(false);
99
- const saveTimeoutRef = useRef<ReturnType<typeof setTimeout>>();
100
+ const saveTimeoutRef = useRef<ReturnType<typeof setTimeout> | undefined>(
101
+ undefined,
102
+ );
100
103
 
101
104
  // Edge editor state
102
105
  const [selectedEdge, setSelectedEdge] = useState<
@@ -409,14 +412,14 @@ function DependencyMapContent() {
409
412
 
410
413
  if (loading) {
411
414
  return (
412
- <div className="h-[calc(100vh-12rem)] flex items-center justify-center">
415
+ <div className="flex-1 min-h-0 flex items-center justify-center">
413
416
  <LoadingSpinner />
414
417
  </div>
415
418
  );
416
419
  }
417
420
 
418
421
  return (
419
- <div className="h-[calc(100vh-12rem)] rounded-xl border border-border overflow-hidden bg-background/50">
422
+ <div className="flex-1 min-h-0 rounded-xl border border-border overflow-hidden bg-background/50">
420
423
  <ReactFlow<SystemNode, DependencyEdge>
421
424
  nodes={nodes}
422
425
  edges={edges}
@@ -699,24 +702,22 @@ function DependencyMapContent() {
699
702
  }
700
703
 
701
704
  /**
702
- * Dependency Map page — wrapped in ReactFlowProvider and Suspense.
705
+ * Dependency Map page — standard PageLayout header (matching the GitBranch nav
706
+ * icon), full-height so the canvas fills the viewport. Wrapped in
707
+ * ReactFlowProvider and Suspense.
703
708
  */
704
709
  const DependencyMapPageContent = () => {
705
710
  return (
706
- <div className="space-y-4">
707
- <div className="flex items-center justify-between">
708
- <div>
709
- <h1 className="text-2xl font-bold text-foreground">Dependency Map</h1>
710
- <p className="text-sm text-muted-foreground mt-1">
711
- Interactive topology view of system dependencies. Drag nodes to
712
- rearrange — positions auto-save.
713
- </p>
714
- </div>
715
- </div>
711
+ <PageLayout
712
+ title="Dependency Map"
713
+ subtitle="Interactive topology view of system dependencies. Drag nodes to rearrange; positions auto-save."
714
+ icon={GitBranch}
715
+ fillHeight
716
+ >
716
717
  <ReactFlowProvider>
717
718
  <DependencyMapContent />
718
719
  </ReactFlowProvider>
719
- </div>
720
+ </PageLayout>
720
721
  );
721
722
  };
722
723
 
@@ -9,6 +9,7 @@ import {
9
9
  import {
10
10
  DependencyApi,
11
11
  dependencyRoutes,
12
+ dependencyAccess,
12
13
  type DerivedState,
13
14
  } from "@checkstack/dependency-common";
14
15
 
@@ -63,6 +64,8 @@ export const DependencySignalsFiller: React.FC<Props> = ({
63
64
  ? `${upstreamCount} upstream ${upstreamCount === 1 ? "system" : "systems"} affected`
64
65
  : undefined,
65
66
  href: resolveRoute(dependencyRoutes.routes.map),
67
+ // The dependency map is gated; render as text for users without access.
68
+ accessRule: dependencyAccess.dependency.read,
66
69
  iconName: "GitBranch",
67
70
  };
68
71
  result[systemId] = [signal];