Skip to content

Commit 9717967

Browse files
Shawclaude
andcommitted
fix(cloud): build steward + declare @stwd/react dep + chat-sidebar bug
Three fixes for cloud-cf-deploy's Verify Frontend tsc check: 1. cloud/.github/actions/setup-test-env/action.yml + .github/workflows/cloud-cf-deploy.yml: add a "Build Steward" step after `bun install`. @stwd/react ships type declarations from dist/ (gitignored). Without dist/, tsc can't resolve "@stwd/react" types even though the workspace symlink exists. 2. cloud/apps/frontend/package.json + cloud/packages/ui/package.json: declare @stwd/react: workspace:* explicitly so bun creates the per-package node_modules symlinks. Required because lib/ (which imports @stwd/react in StewardProvider.tsx) has no package.json and relied on parent-dir resolution falling through. 3. cloud/packages/ui/src/components/layout/chat-sidebar.tsx: `!room.characterId === DEFAULT_AGENT_ID` was comparing boolean to string (always false). Changed to `!room.characterId || room.characterId === DEFAULT_AGENT_ID` to match the comment's intent ("Show rooms with no character assignment OR default Eliza ID"). Verified locally: bun run --cwd cloud/apps/frontend typecheck now passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2b0be49 commit 9717967

5 files changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/cloud-cf-deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ jobs:
7878
- name: Install dependencies
7979
run: bun install --frozen-lockfile
8080

81+
- name: Build Steward (@stwd/react dist for typecheck)
82+
run: bun run --cwd packages/steward/packages/react build
83+
8184
- name: Verify Worker
8285
run: bun run --cwd apps/api typecheck
8386

@@ -130,6 +133,9 @@ jobs:
130133
- name: Install dependencies
131134
run: bun install --frozen-lockfile
132135

136+
- name: Build Steward (@stwd/react dist for typecheck)
137+
run: bun run --cwd packages/steward/packages/react build
138+
133139
- name: Verify Frontend
134140
run: bun run --cwd apps/frontend typecheck
135141

cloud/.github/actions/setup-test-env/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ runs:
4848
4949
exit 1
5050
51+
# Steward packages are vendored without dist/ (gitignored). The frontend
52+
# typecheck pulls in @stwd/react via package.json's `types: dist/index.d.ts`
53+
# field, so dist/ must exist before any typecheck job runs. Cheap (~5s).
54+
- name: Build Steward packages
55+
shell: bash
56+
working-directory: cloud/packages/steward/packages/react
57+
run: bun run build
58+
5159
- name: Validate migration journal
5260
shell: bash
5361
working-directory: cloud

cloud/apps/frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"dependencies": {
2020
"@elizaos/cloud-ui": "workspace:*",
21+
"@stwd/react": "workspace:*",
2122
"@mdx-js/rollup": "^3.1.0",
2223
"@tailwindcss/vite": "^4.1.18",
2324
"@types/mdx": "^2.0.13",

cloud/packages/ui/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"description": "Shared React UI for Eliza Cloud. Browser bundles do not depend on @elizaos/core (use local types under src/types for protocol constants).",
66
"main": "src/index.ts",
77
"dependencies": {
8+
"@stwd/react": "workspace:*",
89
"@radix-ui/react-avatar": "^1.1.11",
910
"@radix-ui/react-dialog": "^1.1.15",
1011
"@radix-ui/react-label": "^2.1.8",

cloud/packages/ui/src/components/layout/chat-sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export function ChatSidebar({ className, isOpen = false, onToggle }: ChatSidebar
204204

205205
if (!selectedCharacterId) {
206206
// Show rooms with no character assignment OR default Eliza ID
207-
return rooms.filter((room) => !room.characterId === DEFAULT_AGENT_ID);
207+
return rooms.filter((room) => !room.characterId || room.characterId === DEFAULT_AGENT_ID);
208208
}
209209
return rooms.filter((room) => room.characterId === selectedCharacterId);
210210
}, [rooms, selectedCharacterId]);

0 commit comments

Comments
 (0)