-
Notifications
You must be signed in to change notification settings - Fork 82
feat(webui): Migrate to npm workspace; Update taskfile and the package scripts accordingly. #1119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 49 commits
9ca2d54
b501260
e27d62e
99095de
bdfe59d
bf9fae1
f4757af
7106e72
b3db4a8
1b50904
487376a
4b4834d
37687cc
01ef445
85c557c
50b9efc
f29b93c
b31bebc
dbcf7ff
71aab74
b502c30
9d0b7bb
7b5a8f1
d786687
6533417
3b9a852
b97cd7c
be9ebee
d8cb843
f28b6f7
8945f8a
6da8f5e
a476023
2550522
21041bb
be60997
e5b2888
73e87be
0ab3bdb
902f198
a3e36f4
51ccf03
0ca50ed
9741b66
97de7ea
817aab5
44451b7
9e81337
4026fe9
bb868d9
5873146
3fee734
171089d
fb79e16
3039ab1
5e148d1
68880a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -842,7 +842,7 @@ def start_webui( | |
get_clp_home() / "var" / "www" / "webui" / "client" / "settings.json" | ||
) | ||
server_settings_json_path = ( | ||
get_clp_home() / "var" / "www" / "webui" / "server" / "dist" / "server" / "settings.json" | ||
get_clp_home() / "var" / "www" / "webui" / "server" / "dist" / "settings.json" | ||
) | ||
|
||
validate_webui_config(clp_config, client_settings_json_path, server_settings_json_path) | ||
|
@@ -962,7 +962,7 @@ def start_webui( | |
|
||
node_cmd = [ | ||
str(CONTAINER_CLP_HOME / "bin" / "node-22"), | ||
str(container_webui_dir / "server" / "dist" / "server" / "src" / "main.js"), | ||
str(container_webui_dir / "server" / "dist" / "src" / "main.js"), | ||
] | ||
Comment on lines
965
to
968
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainEntrypoint path updated to dist/src/main.js; confirm server build emits this file Pointing node to server/dist/src/main.js matches the ESM layout change. Please ensure the server’s tsconfig/build scripts emit main.js under dist/src and that any Docker image or packaging step copies it (and its sourcemap if needed). If you have a local build, quickly sanity‑check: 🏁 Script executed: #!/bin/bash
# After building the server locally, confirm the entrypoint exists:
test -f components/webui/server/dist/src/main.js && echo "OK: main.js exists" || (echo "Missing dist/src/main.js"; exit 1) Length of output: 118 Server entrypoint missing: critical fix required The verification script indicates that Please address the issue by either:
Next steps:
🤖 Prompt for AI Agents
|
||
cmd = container_cmd + node_cmd | ||
subprocess.run(cmd, stdout=subprocess.DEVNULL, check=True) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Path correction to server settings.json looks right; verify dist packaging includes it
You removed the redundant "server" segment and now target .../webui/server/dist/settings.json. This aligns with the workspace/dist reshuffle. Please double‑check the server build produces and packages settings.json at dist root so this path won’t 404 at runtime.
Run:
🏁 Script executed:
Length of output: 2569
Ensure server build includes settings.json in dist
It looks like the server’s
package.json
defines the build step as just runningtsc
, with no provision to copy non-TS assets. Since TypeScript compilation alone won’t emit JSON files,settings.json
won’t end up underdist/
, causing a 404 at runtime whenstart_clp.py
points to…/server/dist/settings.json
.Please address this by:
components/webui/server/package.json
) to copysettings.json
intodist/
.Example:
…
}
In components/clp-package-utils/clp_package_utils/scripts/start_clp.py around
lines 845-846, the script expects server/dist/settings.json but the server build
only runs tsc and doesn't emit non-TS assets; update
components/webui/server/package.json build script to copy settings.json into
dist (or add a postbuild step or use a build tool to include JSON assets), or
configure tsconfig/build pipeline to include JSON files in the emitted output,
then run the build and verify components/webui/server/dist/settings.json exists
so start_clp.py will not 404.