Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
9ca2d54
latest
Jul 15, 2025
b501260
latest
Jul 16, 2025
e27d62e
fix lint
Jul 17, 2025
99095de
Merge branch 'main' into sqlbox
davemarco Jul 17, 2025
bdfe59d
latest
Jul 18, 2025
bf9fae1
latest
Jul 18, 2025
f4757af
latest
Jul 18, 2025
7106e72
saving
Jul 18, 2025
b3db4a8
latest
Jul 18, 2025
1b50904
latest
Jul 18, 2025
487376a
latest
Jul 21, 2025
4b4834d
latest
Jul 21, 2025
37687cc
latest
Jul 21, 2025
01ef445
latest
Jul 21, 2025
85c557c
latest
Jul 21, 2025
50b9efc
latest
Jul 30, 2025
f29b93c
latest
Jul 31, 2025
b31bebc
latest
Aug 4, 2025
dbcf7ff
latest
Aug 4, 2025
71aab74
latest
Aug 11, 2025
b502c30
latest
Aug 11, 2025
9d0b7bb
latest
Aug 11, 2025
7b5a8f1
latest
Aug 11, 2025
d786687
tsconfig changes
Aug 14, 2025
6533417
Update components/webui/common/tsconfig.json
davemarco Aug 19, 2025
3b9a852
Update components/webui/server/tsconfig.json
davemarco Aug 19, 2025
b97cd7c
Update components/webui/server/package.json
davemarco Aug 19, 2025
be9ebee
Update components/webui/client/package.json
davemarco Aug 19, 2025
d8cb843
Update components/webui/client/package.json
davemarco Aug 19, 2025
f28b6f7
Update components/webui/server/package.json
davemarco Aug 19, 2025
8945f8a
latest
Aug 19, 2025
6da8f5e
Merge branch 'workspace' of https://github.com/davemarco/clp into wor…
Aug 19, 2025
a476023
Update components/webui/client/package.json
davemarco Aug 21, 2025
2550522
Update components/webui/client/package.json
davemarco Aug 21, 2025
21041bb
Update components/webui/common/package.json
davemarco Aug 21, 2025
be60997
latest
Aug 21, 2025
e5b2888
latest
Aug 21, 2025
73e87be
latest
Aug 21, 2025
0ab3bdb
latest
Aug 26, 2025
902f198
latest
Aug 26, 2025
a3e36f4
latest
Aug 26, 2025
51ccf03
latest
Aug 26, 2025
0ca50ed
fix lint
Aug 26, 2025
9741b66
latest
Aug 27, 2025
97de7ea
Update components/webui/client/package.json
davemarco Aug 28, 2025
817aab5
Update components/webui/client/tsconfig/tsconfig.app.json
davemarco Aug 28, 2025
44451b7
Update components/webui/package.json
davemarco Aug 28, 2025
9e81337
latest
Aug 28, 2025
4026fe9
Merge branch 'workspace' of https://github.com/davemarco/clp into wor…
Aug 28, 2025
bb868d9
latest
Aug 28, 2025
5873146
latest
Aug 28, 2025
3fee734
latest
Aug 28, 2025
171089d
merge main
Aug 28, 2025
fb79e16
lint
Aug 28, 2025
3039ab1
Merge branch 'main' into workspace
junhaoliao Sep 2, 2025
5e148d1
Merge branch 'main' into workspace
davemarco Sep 3, 2025
68880a7
Merge branch 'main' into workspace
davemarco Sep 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,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"
)
Comment on lines +846 to 847

Copy link
Copy Markdown
Contributor

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:

#!/bin/bash
# Verify references to the new dist paths exist in the server sources/config.
rg -nC2 -e 'dist/settings\.json' -e 'dist/src/main\.js' components/webui/server || true

# Optionally, confirm the server package metadata aligns (main/exports/scripts) if present:
if [ -f components/webui/server/package.json ]; then
  cat components/webui/server/package.json
fi

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 running tsc, with no provision to copy non-TS assets. Since TypeScript compilation alone won’t emit JSON files, settings.json won’t end up under dist/, causing a 404 at runtime when start_clp.py points to …/server/dist/settings.json.

Please address this by:

  • Updating the server’s build script (in components/webui/server/package.json) to copy settings.json into dist/.
    Example:
     "scripts": {
  • "build": "tsc",
  • "build": "tsc && cp src/settings.json dist/settings.json",
    …
    }
- Alternatively, configure your build pipeline (or `tsconfig.json`) to include JSON assets so they’re emitted into `dist/`.
- After making this change, confirm that `components/webui/server/dist/settings.json` exists and that your CLP start-up script no longer 404s.



> Committable suggestion skipped: line range outside the PR's diff.

<details>
<summary>🤖 Prompt for AI Agents</summary>

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.


</details>

<!-- fingerprinting:phantom:poseidon:chinchilla -->

<!-- This is an auto-generated comment by CodeRabbit -->


validate_webui_config(clp_config, client_settings_json_path, server_settings_json_path)
Expand Down Expand Up @@ -978,7 +978,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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Entrypoint 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 components/webui/server/dist/src/main.js does not exist after building the server. Without this file, the CLP startup will fail at runtime.

Please address the issue by either:

  • Updating the server’s build configuration (e.g. tsconfig.json, build scripts) so that main.js is emitted under dist/src/.
  • Or, if the file is output elsewhere, adjusting the entrypoint path in components/clp-package-utils/clp_package_utils/scripts/start_clp.py to match the actual location.

Next steps:

  • Inspect components/webui/server/tsconfig.json and build scripts to confirm the "outDir" and entry file settings.
  • Re-run the build locally and verify with:
    test -f components/webui/server/dist/src/main.js \
      && echo "OK: main.js exists" \
      || (echo "Missing dist/src/main.js"; exit 1)
  • Update start_clp.py once the correct path is determined.
🤖 Prompt for AI Agents
In components/clp-package-utils/clp_package_utils/scripts/start_clp.py around
lines 963-966, the node_cmd entrypoint points to
components/webui/server/dist/src/main.js which the build does not produce;
inspect components/webui/server/tsconfig.json and the server build scripts to
confirm the configured outDir and emitted entry file (or run a local build),
then either update the build config so main.js is emitted to dist/src/ or change
the node_cmd path to the actual built file location (e.g., dist/main.js or
dist/server/main.js as determined); after adjusting, rebuild and verify
existence with the provided test command before committing the path change.

cmd = container_cmd + node_cmd
subprocess.run(cmd, stdout=subprocess.DEVNULL, check=True)
Expand Down
1 change: 1 addition & 0 deletions components/webui/client/package.json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we update the "name" to be @webui/client?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this change hasn't been pushed?

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@sinclair/typebox": "^0.34.25",
Comment thread
davemarco marked this conversation as resolved.
Resolved
"@tanstack/react-query": "^5.81.5",
"@tanstack/react-query-devtools": "^5.81.5",
"@webui/common": "^0.1.0",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
Comment thread
davemarco marked this conversation as resolved.
Resolved
"antd": "^5.24.5",
"axios": "^1.7.9",
"chart.js": "^4.4.9",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
ClientToServerEvents,
ServerToClientEvents,
} from "@common/index.js";
} from "@webui/common";
Comment thread
davemarco marked this conversation as resolved.
Resolved
import {Socket} from "socket.io-client";

import {MongoSocketCursor} from "./MongoSocketCursor.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
QueryId,
Response,
ServerToClientEvents,
} from "@common/index.js";
} from "@webui/common";
import {Socket} from "socket.io-client";

import {Nullable} from "../../typings/common";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
ClientToServerEvents,
ServerToClientEvents,
} from "@common/index.js";
} from "@webui/common";
import {
io,
Socket,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
SETTINGS_STORAGE_ENGINE,
} from "../../../../../config";
import {computeTimelineConfig} from "../../../SearchResults/SearchResultsTimeline/utils";
import useSearchStore, {SEARCH_STATE_DEFAULT} from "../../../SearchState/index";
import useSearchStore from "../../../SearchState/index";
import {SEARCH_UI_STATE} from "../../../SearchState/typings";
import {handleQuerySubmit} from "../../search-requests";
import styles from "./index.module.css";
Expand Down Expand Up @@ -63,7 +63,7 @@ const SubmitButton = () => {
selectDataset,
updateCachedDataset]);

const isQueryStringEmpty = queryString === SEARCH_STATE_DEFAULT.queryString;
const isQueryStringEmpty = "" === queryString;

// Submit button must be disabled if there are no datasets since clp-s requires dataset option
// for queries.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {SearchResultsMetadataDocument} from "@common/index.js";
import {SearchResultsMetadataDocument} from "@webui/common";

import MongoSocketCollection from "../../../api/socket/MongoSocketCollection";
import {useCursor} from "../../../api/socket/useCursor";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {useEffect} from "react";

import {SEARCH_SIGNAL} from "@common/index.js";
import {SEARCH_SIGNAL} from "@webui/common";

import useSearchStore from "./index";
import {SEARCH_UI_STATE} from "./typings";
Expand Down
4 changes: 0 additions & 4 deletions components/webui/client/tsconfig/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "./tsconfig.base.json",
"include": [
"../src",
Comment thread
davemarco marked this conversation as resolved.
Resolved
"../common/**/*"
],

"compilerOptions": {
Expand All @@ -17,9 +16,6 @@
"tsBuildInfoFile": "../node_modules/.tmp/tsconfig.app.tsbuildinfo",
"useDefineForClassFields": true,
"baseUrl": "../",
"paths": {
"@common/*": ["../common/*"], // Map imports from "@common/*" to the shared folder
},

/* Bundler mode */
"isolatedModules": true,
Expand Down
11 changes: 0 additions & 11 deletions components/webui/client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import path from "node:path";

import react from "@vitejs/plugin-react";
import {defineConfig} from "vite";

Expand All @@ -14,11 +12,6 @@ export default defineConfig({
react(),
],
publicDir: "public",
resolve: {
alias: {
"@common": path.resolve(__dirname, "../common"),
},
},
server: {
port: 8080,
proxy: {
Expand All @@ -34,9 +27,5 @@ export default defineConfig({
ws: true,
},
},
fs: {
// allow serving files from one level up (common folder)
allow: [".."],
},
},
});
40 changes: 40 additions & 0 deletions components/webui/common/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import CommonConfig from "eslint-config-yscope/CommonConfig.mjs";
import StylisticConfigArray from "eslint-config-yscope/StylisticConfigArray.mjs";
import TsConfigArray from "eslint-config-yscope/TsConfigArray.mjs";


const EslintConfig = [
{
ignores: [
"dist/",
"node_modules/",
],
},
CommonConfig,
...TsConfigArray,
...StylisticConfigArray,
{
rules: {
"new-cap": [
"error",
{
// TypeBox imports
capIsNewExceptions: [
"Type.Any",
"Type.Enum",
"Type.Integer",
"Type.Literal",
"Type.Null",
"Type.Required",
"Type.Union",
"Value.Errors",
"Value.Parse",
],
},
],
},
},
];


export default EslintConfig;
17 changes: 16 additions & 1 deletion components/webui/common/package.json
Comment thread
davemarco marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
{
"type": "module"
"name": "@webui/common",
"version": "0.1.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": "./dist/index.js",

(NOTE: we also need to update the common build's output path in taskfile.yaml as sugguested)

otherwise the "main" field isn't respected in production (any imports would instead read ./index.js). this is found because some deprecation warnings were shown in the webui container:

(node:1) [DEP0151] DeprecationWarning: Package /opt/clp/var/www/webui/node_modules/@webui/common/ has a "main" field set to "dist/index.js", excluding the full filename and extension to the resolved file at "index.js", imported from /opt/clp/var/www/webui/server/dist/src/routes/api/search/index.js. Automatic extension resolution of the "main" field is deprecated for ES modules.
(node:1) [DEP0151] DeprecationWarning: Package /opt/clp/var/www/webui/node_modules/@webui/common/ has a "main" field set to "dist/index.js", excluding the full filename and extension to the resolved file at "index.js", imported from /opt/clp/var/www/webui/server/dist/src/routes/api/search/utils.js.

"scripts": {
"build": "tsc",
"lint:check": "eslint . --max-warnings 0",
"lint:fix": "npm run lint:check -- --fix"
},
"devDependencies": {
"eslint-config-yscope": "latest",
"typescript": "~5.6.2"
Comment thread
davemarco marked this conversation as resolved.
Resolved
},
"dependencies": {
"@sinclair/typebox": "^0.31.3"
}
Comment on lines +2 to +25

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Harden the package for workspace consumption: add exports/files/sideEffects and auto-build

To avoid accidental source leakage and ensure consumers always have dist artifacts, add an exports map, limit published files, mark as side-effect-free for tree-shaking, and add a prepare script so dist is built on install. If this package is not meant to be published externally, consider marking it private: true.

Proposed changes:

 {
   "name": "@webui/common",
   "version": "0.1.0",
   "type": "module",
   "main": "dist/index.js",
   "types": "dist/index.d.ts",
+  "exports": {
+    ".": {
+      "types": "./dist/index.d.ts",
+      "default": "./dist/index.js"
+    }
+  },
+  "files": [
+    "dist/**/*"
+  ],
   "scripts": {
-    "build": "tsc",
+    "build": "tsc",
+    "prepare": "npm run build",
+    "clean": "rimraf dist",
     "lint:check": "eslint . --max-warnings 0",
     "lint:fix": "npm run lint:check -- --fix"
   },
   "devDependencies": {
     "eslint-config-yscope": "^1.1.1",
     "typescript": "~5.6.2"
   },
   "dependencies": {
     "@sinclair/typebox": "^0.34.38"
-  }
+  },
+  "sideEffects": false
 }

To verify TS build config generates the expected dist artifacts/types, run:


🏁 Script executed:

#!/bin/bash
# Ensure declaration output and outDir are configured
echo "Checking tsconfig for declaration and outDir..."
fd tsconfig.json components/webui/common -x cat {} | rg -n '("outDir"\s*:\s*"dist"|\"declaration\"\s*:\s*true)'

echo "Checking that dist exists and contains index.js and index.d.ts..."
test -f components/webui/common/dist/index.js && echo "dist/index.js present" || echo "dist/index.js missing"
test -f components/webui/common/dist/index.d.ts && echo "dist/index.d.ts present" || echo "dist/index.d.ts missing"

Length of output: 709


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Looking for tsconfig files under components/webui/common (depth 4)..."
if command -v fd >/dev/null 2>&1; then
  tsfiles=$(fd -d 4 tsconfig*.json components/webui/common || true)
else
  tsfiles=$(find components/webui/common -maxdepth 4 -type f -name 'tsconfig*.json' 2>/dev/null || true)
fi

if [ -z "$tsfiles" ]; then
  echo "No tsconfig files found under components/webui/common."
else
  echo "Found tsconfig files:"
  echo "$tsfiles"
  for f in $tsfiles; do
    echo "---- $f ----"
    sed -n '1,240p' "$f"
  done
fi

echo
echo "Searching for 'declaration' and 'outDir' in all tsconfig*.json in repo..."
if command -v rg >/dev/null 2>&1; then
  rg -n '"declaration"\s*:\s*(true|false)|"outDir"\s*:\s*".*"' --hidden --glob '!node_modules' tsconfig*.json || true
else
  echo "rg not available; skipping repo-wide search."
fi

echo
echo "Showing components/webui/common/package.json (first 240 lines):"
sed -n '1,240p' components/webui/common/package.json || true

echo
echo "Checking for dist artifacts:"
for p in components/webui/common/dist/index.js components/webui/common/dist/index.d.ts; do
  if [ -f "$p" ]; then echo "$p present"; else echo "$p missing"; fi
done

Length of output: 3004


Harden @webui/common for workspace consumption — add exports/files/sideEffects and auto-build

tsconfig.json already sets "declaration": true and "outDir": "dist", but the repo currently has no built artifacts (components/webui/common/dist/*.). Apply the changes below so consumers get only the dist output and dist is produced on install/build.

Files to update

  • components/webui/common/package.json — add exports, files, prepare, sideEffects (and clean)
  • components/webui/common/tsconfig.json — already has declaration/outDir (no change)
  • components/webui/common/dist — currently missing: dist/index.js and dist/index.d.ts

Proposed package.json changes:

 {
   "name": "@webui/common",
   "version": "0.1.0",
   "type": "module",
   "main": "dist/index.js",
   "types": "dist/index.d.ts",
+  "exports": {
+    ".": {
+      "types": "./dist/index.d.ts",
+      "default": "./dist/index.js"
+    }
+  },
+  "files": [
+    "dist"
+  ],
   "scripts": {
     "build": "tsc",
+    "prepare": "npm run build",
+    "clean": "rm -rf dist",
     "lint:check": "eslint . --max-warnings 0",
     "lint:fix": "npm run lint:check -- --fix"
   },
   "devDependencies": {
     "eslint-config-yscope": "^1.1.1",
     "typescript": "~5.6.2"
   },
   "dependencies": {
     "@sinclair/typebox": "^0.34.38"
   },
+  "sideEffects": false
 }

Notes

  • If you need a cross-platform clean script, add rimraf to devDependencies and use "clean": "rimraf dist".
  • If the package is internal and not to be published, consider adding "private": true instead of publishing.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"name": "@webui/common",
"version": "0.1.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"lint:check": "eslint . --max-warnings 0",
"lint:fix": "npm run lint:check -- --fix"
},
"devDependencies": {
"eslint-config-yscope": "^1.1.1",
"typescript": "~5.6.2"
},
"dependencies": {
"@sinclair/typebox": "^0.34.38"
}
{
"name": "@webui/common",
"version": "0.1.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsc",
"prepare": "npm run build",
"clean": "rm -rf dist",
"lint:check": "eslint . --max-warnings 0",
"lint:fix": "npm run lint:check -- --fix"
},
"devDependencies": {
"eslint-config-yscope": "^1.1.1",
"typescript": "~5.6.2"
},
"dependencies": {
"@sinclair/typebox": "^0.34.38"
},
"sideEffects": false
}
🤖 Prompt for AI Agents
In components/webui/common/package.json around lines 2 to 18, the package lacks
explicit exports/files/sideEffects and a build step to produce dist/* for
workspace consumers; update package.json to (1) add a "files" array that only
includes "dist", (2) add an "exports" map pointing "." to "./dist/index.js" and
"./package.json" if needed, (3) set "sideEffects": false, (4) add a "prepare"
script that runs the build (e.g., "npm run build") so dist is produced on
install, (5) add a "clean" script and, if cross‑platform removal is needed, add
rimraf to devDependencies and use it in "clean", and (6) consider adding
"private": true if this package should not be published; run tsc (existing build
script) to generate dist/index.js and dist/index.d.ts as part of the
prepare/build step.

}
40 changes: 40 additions & 0 deletions components/webui/common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* Reference:
* https://github.com/tsconfig/bases/blob/2604892973bcb1822c204e2aa2add10a8b0d1c8c/bases/node22.json
*/
{
"compilerOptions": {
"esModuleInterop": true,
"lib": [
"es2023"
],
Comment thread
davemarco marked this conversation as resolved.
Resolved
"module": "nodenext",
"moduleResolution": "node16",
"outDir": "dist",
"removeComments": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"target": "es2022",
"declaration": true,
"declarationMap": true,
"alwaysStrict": true,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"useUnknownInCatchVariables": true,
"strict": true
},
"include": [
"src/**/*"
]
}
Comment on lines +1 to +34

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Enable project references; set rootDir for cleaner builds

If this package participates in tsc -b with workspace project references, add composite and rootDir.

   "compilerOptions": {
     "esModuleInterop": true,
     "lib": [
       "es2023", "dom"
     ],
     "module": "esnext",
     "moduleResolution": "bundler",
     "declaration": true,
     "declarationMap": true,
+    "composite": true,
+    "rootDir": "src",
     "outDir": "dist",
     "allowUnreachableCode": false,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"compilerOptions": {
"esModuleInterop": true,
"lib": [
"es2023", "dom"
],
"module": "esnext",
"moduleResolution": "bundler",
"declaration": true,
"declarationMap": true,
"outDir": "dist",
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"alwaysStrict": true,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUncheckedSideEffectImports": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"useUnknownInCatchVariables": true,
},
"include": [
"src/**/*"
]
}
{
"compilerOptions": {
"esModuleInterop": true,
"lib": [
"es2023", "dom"
],
"module": "esnext",
"moduleResolution": "bundler",
"declaration": true,
"declarationMap": true,
"composite": true,
"rootDir": "src",
"outDir": "dist",
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"alwaysStrict": true,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUncheckedSideEffectImports": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"useUnknownInCatchVariables": true,
},
"include": [
"src/**/*"
]
}
🤖 Prompt for AI Agents
In components/webui/common/tsconfig.json around lines 1 to 32, this config lacks
project-reference support needed for tsc -b; add "composite": true and set
"rootDir": "src" under "compilerOptions" (optionally also add "incremental":
true if you want faster incremental builds) so the package can be used in
workspace project references and tsc -b builds cleanly.

Comment on lines +30 to +34

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Exclude build artefacts to avoid accidental re-compilation

Keep TypeScript from traversing generated output or dependencies.

   "include": [
     "src/**/*"
-  ]
+  ],
+  "exclude": ["dist", "node_modules"]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
},
"include": [
"src/**/*"
]
}
},
"include": [
"src/**/*"
],
"exclude": ["dist", "node_modules"]
}
🤖 Prompt for AI Agents
In components/webui/common/tsconfig.json around lines 29 to 33, the config only
specifies "include" and does not exclude build artifacts or dependency folders;
add an "exclude" array to prevent TypeScript from traversing generated output
and dependencies (e.g. node_modules, dist, build, .next, out, and other
build/test artifacts) so the compiler only processes source files and avoids
accidental re-compilation or slowdowns.

Loading