@checkstack/ui 1.14.0 → 1.15.0

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,47 @@
1
1
  # @checkstack/ui
2
2
 
3
+ ## 1.15.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fb705df: Upgrade React 18 to React 19 across the platform.
8
+
9
+ **BREAKING (runtime frontend plugins):** React is shared as a Module Federation
10
+ singleton, so the host now provides **React 19** to every runtime plugin.
11
+ Frontend plugins built against React 18 must be rebuilt against React 19
12
+ (`react` / `react-dom` `^19`). The scaffold templates and the host/plugin MF
13
+ `requiredVersion` are updated to `^19`. `react` (and now `react-dom`) are pinned
14
+ to a single version across the workspace via syncpack so the singleton can never
15
+ skew (react and react-dom must match exactly).
16
+
17
+ The React 19 removed-API surface was audited - the codebase used only no-arg
18
+ `useRef()` (now `useRef<T | undefined>(undefined)`); no `ReactDOM.render`,
19
+ legacy context, string refs, or function-component `defaultProps`. This also
20
+ clears the `IMPORT_IS_UNDEFINED` build warnings for `React.use` /
21
+ `React.useOptimistic` (react-router 7 feature-detection), which React 19 exports.
22
+
23
+ The downstream `*-frontend` packages (and `@checkstack/infrastructure-common`)
24
+ receive only the mechanical `react` dependency bump (`patch`); the framework
25
+ packages carrying the shared-singleton change are bumped `minor`.
26
+
27
+ ### Patch Changes
28
+
29
+ - 9d8961c: Fix the double-scrolling on the AI chat page (`/ai/chat`). The page sized its
30
+ layout with a fixed `calc(100vh - 220px)` height, which overshot the available
31
+ space when the page subtitle wrapped to two lines - so the whole page scrolled
32
+ on top of the message list's own scroll.
33
+
34
+ `PageLayout` gains an opt-in `fillHeight` prop that fills the viewport via a
35
+ bounded flex height chain (established in the app shell) instead of viewport
36
+ math; the chat page uses it so only the message list scrolls and the page itself
37
+ never does. Normal document-flow pages are unaffected (they still scroll the
38
+ main area as before).
39
+
40
+ - Updated dependencies [fb705df]
41
+ - @checkstack/frontend-api@0.8.0
42
+ - @checkstack/common@0.14.1
43
+ - @checkstack/template-engine@0.4.2
44
+
3
45
  ## 1.14.0
4
46
 
5
47
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/ui",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@checkstack/common": "0.14.1",
17
- "@checkstack/frontend-api": "0.7.2",
17
+ "@checkstack/frontend-api": "0.8.0",
18
18
  "@checkstack/template-engine": "0.4.2",
19
19
  "@codingame/monaco-vscode-editor-api": "25.1.2",
20
20
  "@codingame/monaco-vscode-languages-service-override": "25.1.2",
@@ -37,9 +37,9 @@
37
37
  "jsonc-parser": "^3.3.1",
38
38
  "lucide-react": "^1.17.0",
39
39
  "monaco-languageclient": "10.7.0",
40
- "react": "^18.3.1",
40
+ "react": "19.2.7",
41
41
  "react-day-picker": "^9.13.0",
42
- "react-dom": "^18.2.0",
42
+ "react-dom": "19.2.7",
43
43
  "react-markdown": "^10.1.0",
44
44
  "react-router-dom": "^7.16.0",
45
45
  "recharts": "^3.6.0",
@@ -51,8 +51,8 @@
51
51
  "zod": "^4.2.1"
52
52
  },
53
53
  "devDependencies": {
54
- "@checkstack/scripts": "0.5.0",
55
- "@checkstack/test-utils-frontend": "0.1.0",
54
+ "@checkstack/scripts": "0.6.0",
55
+ "@checkstack/test-utils-frontend": "0.1.1",
56
56
  "@checkstack/tsconfig": "0.0.7",
57
57
  "@storybook/addon-a11y": "^10.4.1",
58
58
  "@storybook/addon-docs": "^10.4.1",
@@ -62,8 +62,8 @@
62
62
  "@testing-library/react": "^16.0.0",
63
63
  "@types/bun": "^1.3.14",
64
64
  "@types/node": "^20.19.27",
65
- "@types/react": "^18.2.0",
66
- "@types/react-dom": "^18.2.0",
65
+ "@types/react": "^19.0.0",
66
+ "@types/react-dom": "^19.0.0",
67
67
  "@vitejs/plugin-react": "^6.0.2",
68
68
  "bun-types": "^1.3.14",
69
69
  "autoprefixer": "^10.4.18",
@@ -7,6 +7,7 @@ import {
7
7
  LoadingSpinner,
8
8
  AccessDenied,
9
9
  } from "..";
10
+ import { cn } from "../utils";
10
11
 
11
12
  interface PageLayoutProps {
12
13
  title: string;
@@ -16,6 +17,15 @@ interface PageLayoutProps {
16
17
  loading?: boolean;
17
18
  allowed?: boolean;
18
19
  children: React.ReactNode;
20
+ /**
21
+ * Make the content area fill the viewport height instead of growing with its
22
+ * content. The page's own children then own their scrolling (e.g. a chat
23
+ * message list), so the page itself never scrolls. Use for full-height app
24
+ * surfaces (chat, canvases); leave off for normal document-flow pages, which
25
+ * scroll the main area as usual. Relies on the bounded height chain in
26
+ * core/frontend's App shell.
27
+ */
28
+ fillHeight?: boolean;
19
29
  maxWidth?:
20
30
  | "sm"
21
31
  | "md"
@@ -38,6 +48,7 @@ export const PageLayout: React.FC<PageLayoutProps> = ({
38
48
  loading,
39
49
  allowed,
40
50
  children,
51
+ fillHeight = false,
41
52
  maxWidth = "7xl",
42
53
  }) => {
43
54
  // If loading is explicitly true, show loading state
@@ -82,18 +93,23 @@ export const PageLayout: React.FC<PageLayoutProps> = ({
82
93
  }
83
94
 
84
95
  return (
85
- <Page>
96
+ <Page className={fillHeight ? "min-h-0" : undefined}>
86
97
  <PageHeader
87
98
  title={title}
88
99
  subtitle={subtitle}
89
100
  icon={icon}
90
101
  actions={actions}
91
102
  />
92
- <PageContent>
103
+ <PageContent
104
+ className={fillHeight ? "flex min-h-0 flex-col" : undefined}
105
+ >
93
106
  <div
94
- className={
95
- maxWidth === "full" ? "space-y-6" : `max-w-${maxWidth} space-y-6`
96
- }
107
+ className={cn(
108
+ maxWidth === "full" ? undefined : `max-w-${maxWidth}`,
109
+ // fillHeight: fill the bounded content area and let children scroll.
110
+ // Otherwise: normal document flow with vertical rhythm.
111
+ fillHeight ? "flex min-h-0 flex-1 flex-col" : "space-y-6",
112
+ )}
97
113
  >
98
114
  {children}
99
115
  </div>
@@ -14,8 +14,8 @@ export function useAnimatedNumber(
14
14
  decimals = 2,
15
15
  ): string {
16
16
  const [displayValue, setDisplayValue] = useState(targetValue);
17
- const animationRef = useRef<number>();
18
- const startTimeRef = useRef<number>();
17
+ const animationRef = useRef<number | undefined>(undefined);
18
+ const startTimeRef = useRef<number | undefined>(undefined);
19
19
  const startValueRef = useRef<number | undefined>(undefined);
20
20
 
21
21
  useEffect(() => {