@checkstack/ai-frontend 0.1.2 → 0.1.4
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 +55 -0
- package/package.json +6 -6
- package/src/lib/use-chat-turn.ts +1 -1
- package/src/pages/ChatPage.tsx +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# @checkstack/ai-frontend
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9d8961c: Fix the double-scrolling on the AI chat page (`/ai/chat`). The page sized its
|
|
8
|
+
layout with a fixed `calc(100vh - 220px)` height, which overshot the available
|
|
9
|
+
space when the page subtitle wrapped to two lines - so the whole page scrolled
|
|
10
|
+
on top of the message list's own scroll.
|
|
11
|
+
|
|
12
|
+
`PageLayout` gains an opt-in `fillHeight` prop that fills the viewport via a
|
|
13
|
+
bounded flex height chain (established in the app shell) instead of viewport
|
|
14
|
+
math; the chat page uses it so only the message list scrolls and the page itself
|
|
15
|
+
never does. Normal document-flow pages are unaffected (they still scroll the
|
|
16
|
+
main area as before).
|
|
17
|
+
|
|
18
|
+
- fb705df: Upgrade React 18 to React 19 across the platform.
|
|
19
|
+
|
|
20
|
+
**BREAKING (runtime frontend plugins):** React is shared as a Module Federation
|
|
21
|
+
singleton, so the host now provides **React 19** to every runtime plugin.
|
|
22
|
+
Frontend plugins built against React 18 must be rebuilt against React 19
|
|
23
|
+
(`react` / `react-dom` `^19`). The scaffold templates and the host/plugin MF
|
|
24
|
+
`requiredVersion` are updated to `^19`. `react` (and now `react-dom`) are pinned
|
|
25
|
+
to a single version across the workspace via syncpack so the singleton can never
|
|
26
|
+
skew (react and react-dom must match exactly).
|
|
27
|
+
|
|
28
|
+
The React 19 removed-API surface was audited - the codebase used only no-arg
|
|
29
|
+
`useRef()` (now `useRef<T | undefined>(undefined)`); no `ReactDOM.render`,
|
|
30
|
+
legacy context, string refs, or function-component `defaultProps`. This also
|
|
31
|
+
clears the `IMPORT_IS_UNDEFINED` build warnings for `React.use` /
|
|
32
|
+
`React.useOptimistic` (react-router 7 feature-detection), which React 19 exports.
|
|
33
|
+
|
|
34
|
+
The downstream `*-frontend` packages (and `@checkstack/infrastructure-common`)
|
|
35
|
+
receive only the mechanical `react` dependency bump (`patch`); the framework
|
|
36
|
+
packages carrying the shared-singleton change are bumped `minor`.
|
|
37
|
+
|
|
38
|
+
- Updated dependencies [9d8961c]
|
|
39
|
+
- Updated dependencies [fb705df]
|
|
40
|
+
- @checkstack/ui@1.15.0
|
|
41
|
+
- @checkstack/frontend-api@0.8.0
|
|
42
|
+
- @checkstack/ai-common@0.1.2
|
|
43
|
+
- @checkstack/common@0.14.1
|
|
44
|
+
- @checkstack/integration-common@0.7.2
|
|
45
|
+
|
|
46
|
+
## 0.1.3
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [ed251b6]
|
|
51
|
+
- Updated dependencies [968c12f]
|
|
52
|
+
- @checkstack/ui@1.14.0
|
|
53
|
+
- @checkstack/ai-common@0.1.2
|
|
54
|
+
- @checkstack/common@0.14.1
|
|
55
|
+
- @checkstack/frontend-api@0.7.2
|
|
56
|
+
- @checkstack/integration-common@0.7.2
|
|
57
|
+
|
|
3
58
|
## 0.1.2
|
|
4
59
|
|
|
5
60
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/ai-frontend",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.tsx",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@checkstack/ai-common": "0.1.2",
|
|
18
18
|
"@checkstack/common": "0.14.1",
|
|
19
|
-
"@checkstack/frontend-api": "0.
|
|
19
|
+
"@checkstack/frontend-api": "0.8.0",
|
|
20
20
|
"@checkstack/integration-common": "0.7.2",
|
|
21
|
-
"@checkstack/ui": "1.
|
|
21
|
+
"@checkstack/ui": "1.15.0",
|
|
22
22
|
"lucide-react": "^1.17.0",
|
|
23
|
-
"react": "
|
|
23
|
+
"react": "19.2.7",
|
|
24
24
|
"react-router-dom": "^7.16.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typescript": "^5.0.0",
|
|
28
|
-
"@types/react": "^
|
|
28
|
+
"@types/react": "^19.0.0",
|
|
29
29
|
"@checkstack/tsconfig": "0.0.7",
|
|
30
|
-
"@checkstack/scripts": "0.
|
|
30
|
+
"@checkstack/scripts": "0.6.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/lib/use-chat-turn.ts
CHANGED
|
@@ -34,7 +34,7 @@ export function useChatTurn({
|
|
|
34
34
|
const [messages, setMessages] = useState<ChatMessage[]>(initialMessages);
|
|
35
35
|
const [streaming, setStreaming] = useState(false);
|
|
36
36
|
const [error, setError] = useState<string | undefined>();
|
|
37
|
-
const aborter = useRef<AbortController | undefined>();
|
|
37
|
+
const aborter = useRef<AbortController | undefined>(undefined);
|
|
38
38
|
|
|
39
39
|
// Shared streaming driver: POST `body` to /chat, start a fresh assistant
|
|
40
40
|
// message (optionally appending a user message first), and fold the SSE
|
package/src/pages/ChatPage.tsx
CHANGED
|
@@ -445,8 +445,12 @@ export function ChatPage() {
|
|
|
445
445
|
title="AI assistant"
|
|
446
446
|
subtitle="Chat with Checkstack's built-in assistant. It can read incidents, health checks, and anomalies, and propose automations for you to confirm."
|
|
447
447
|
icon={Sparkles}
|
|
448
|
+
fillHeight
|
|
448
449
|
>
|
|
449
|
-
|
|
450
|
+
{/* `flex-1 min-h-0` fills the fillHeight content area (no viewport math),
|
|
451
|
+
so only the message list scrolls - the page itself never does, even
|
|
452
|
+
when the subtitle wraps. */}
|
|
453
|
+
<div className="grid grid-cols-1 md:grid-cols-[260px_1fr] gap-4 flex-1 min-h-0">
|
|
450
454
|
{/* Conversation sidebar */}
|
|
451
455
|
<Card className="overflow-hidden flex flex-col">
|
|
452
456
|
<CardContent className="p-2 flex flex-col gap-2 overflow-y-auto">
|