LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
[P0-P4] Remove Ant Design from the OSS frontend (shadcn/ui + Midnight Bloom) (#2212)
Hari John Kuriakosec49968e3e04c
diff --git a/.gitignore b/.gitignoreindex 494dec71a..e5dbd27a5 100644--- a/.gitignore+++ b/.gitignore@@ -40,6 +40,9 @@ eggs/.eggs/lib/lib64/+# The Python `lib/` rule above also matches the frontend's shadcn/ui helper+# directory (`@/lib/utils` per components.json). Keep that tracked.+!frontend/src/lib/parts/sdist/var/diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex 7e0004b29..c709dded3 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -6,7 +6,6 @@ default_stages:ci:skip:- hadolint-docker # Fails in pre-commit CI- - biome-check # Uses local npm/npx, not available in pre-commit CIrepos:- repo: https://github.com/pre-commit/pre-commit-hooksrev: v5.0.0@@ -23,7 +22,9 @@ repos:- id: check-docstring-first- id: check-ast- id: check-json- exclude: ".vscode/launch.json"+ # Both files are JSONC — their tooling (VS Code, tsc) allows comments,+ # but this hook parses with strict `json.loads`, which does not.+ exclude: "(\\.vscode/launch\\.json|frontend/tsconfig\\.json)$"- id: check-executables-have-shebangs- id: check-shebang-scripts-are-executable- id: check-toml@@ -81,8 +82,18 @@ repos:hooks:- id: biome-checkname: biome check- entry: bash -c 'cd frontend && bunx @biomejs/biome check --write --files-ignore-unknown=true --no-errors-on-unmatched "${@#frontend/}"' --- language: system+ # `language: node` lets pre-commit provision Biome itself, so this runs+ # in pre-commit CI too instead of needing a local bun/npx.+ #+ # Not the upstream biomejs/pre-commit hook: that one runs from the repo+ # root, but Biome's project root here is `frontend/` (where biome.json+ # lives). Running from the root resolves the wrong package.json, which+ # changes both `organizeImports` grouping and CSS formatting. Hence the+ # `cd frontend` plus stripping the prefix off the paths pre-commit+ # passes, which are relative to the repo root.+ entry: bash -c 'cd frontend && biome check --write --files-ignore-unknown=true --no-errors-on-unmatched "${@#frontend/}"' --+ language: node+ additional_dependencies: ["@biomejs/[email protected]"]files: ^frontend/src/types_or: [javascript, jsx, ts, tsx, json]diff --git a/frontend/biome.json b/frontend/biome.jsonindex 207deb424..98f2ba8c3 100644--- a/frontend/biome.json+++ b/frontend/biome.json@@ -4,6 +4,11 @@"files": {"ignoreUnknown": false},+ "css": {+ "parser": {+ "tailwindDirectives": true+ }+ },"formatter": {"enabled": true,"indentStyle": "space",diff --git a/frontend/bun.lock b/frontend/bun.lockindex 53b71ad79..5e81a89a5 100644--- a/frontend/bun.lock+++ b/frontend/bun.lock@@ -1,30 +1,34 @@{"lockfileVersion": 1,- "configVersion": 1,+ "configVersion": 0,"workspaces": {"": {"name": "frontend","dependencies": {- "@ant-design/icons": "^5.1.4",+ "@fontsource/geist-mono": "^5.3.0",+ "@fontsource/geist-sans": "^5.3.0",+ "@fontsource/inter": "^5.3.0",+ "@hookform/resolvers": "^5.5.7","@monaco-editor/react": "^4.7.0",- "@react-awesome-query-builder/antd": "^6.6.10",+ "@react-awesome-query-builder/ui": "^6.7.0-alpha.0","@react-pdf-viewer/core": "^3.12.0","@react-pdf-viewer/default-layout": "^3.12.0","@react-pdf-viewer/highlight": "^3.12.0","@react-pdf-viewer/page-navigation": "^3.12.0",- "@rjsf/antd": "^5.16.1","@rjsf/core": "^5.8.1","@rjsf/utils": "^5.8.1","@rjsf/validator-ajv8": "^5.8.1","@stripe/stripe-js": "^4.2.0",- "@testing-library/jest-dom": "^5.16.5",- "@testing-library/react": "^13.4.0",- "@testing-library/user-event": "^13.5.0",- "antd": "^5.5.1",+ "@tanstack/react-table": "^8.21.3",+ "@testing-library/jest-dom": "^6",+ "@testing-library/react": "^16",+ "@testing-library/user-event": "^14","axios": "1.16.0",+ "class-variance-authority": "^0.7.1","cron-validator": "^1.3.1","cronstrue": "^2.48.0","date-fns": "^4.1.0",+ "dayjs": "1.11.19","emoji-picker-react": "^4.8.0","emoji-regex": "^10.3.0","file-saver": "^2.0.5",@@ -34,37 +38,54 @@"js-cookie": "^3.0.8","js-yaml": "^4.1.0","json-2-csv": "^5.5.1",+ "lucide-react": "^1.27.0","moment": "^2.29.4","moment-timezone": "^0.5.45",+ "next-themes": "^0.4.6","pdfjs-dist": "^3.4.120","posthog-js": "^1.116.5","prismjs": "^1.29.0",- "react": "^18.2.0",- "react-diff-viewer-continued": "^3.4.0",+ "radix-ui": "^1.6.7",+ "react": "^19",+ "react-day-picker": "^10.0.1",+ "react-diff-viewer-continued": "^4.4.0","react-dnd": "^16.0.1","react-dnd-html5-backend": "^16.0.1",- "react-dom": "^18.2.0",+ "react-dom": "^19","react-google-recaptcha": "^3.1.0","react-gtm-module": "^2.0.11",- "react-helmet-async": "^2.0.5",- "react-js-cron": "^5.0.1",+ "react-helmet-async": "^3.0.0",+ "react-hook-form": "^7.83.0","react-markdown": "^8.0.7","react-product-fruits": "^2.2.6","react-router-dom": "^6.11.2",- "react-social-login-buttons": "^3.9.1",+ "react-social-login-buttons": "^4.1.1","react-syntax-highlighter": "^15.6.1","recharts": "^3.5.1","remark-gfm": "^3.0.1","socket.io-client": "^4.7.2",+ "sonner": "^2.0.7",+ "tailwind-merge": "^3.6.0",+ "tailwindcss-animate": "^1.0.7","uuid": "^9.0.1",+ "zod": "^4.4.3","zustand": "^4.3.8",},"devDependencies": {"@biomejs/biome": "^2.3.13",+ "@tailwindcss/postcss": "^4",+ "@tailwindcss/typography": "^0.5.20",+ "@tailwindcss/vite": "^4",+ "@testing-library/dom": "^10",+ "@types/react": "^19",+ "@types/react-dom": "^19","@vitejs/plugin-react": "^4.4.0",+ "autoprefixer": "^10.5.4","baseline-browser-mapping": "^2.9.19","happy-dom": "^20.10.2","jsdom": "^27.0.1",+ "tailwindcss": "^4",+ "typescript": "^7.0.2","vite": "^7.3.5","vite-plugin-svgr": "^4.5.0","vitest": "^3.2.6",@@ -83,19 +104,7 @@"@adobe/css-tools": ["@adobe/[email protected]", "", {}, "sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg=="],- "@ant-design/colors": ["@ant-design/[email protected]", "", { "dependencies": { "@ant-design/fast-color": "^2.0.6" } }, "sha512-lCHDcEzieu4GA3n8ELeZ5VQ8pKQAWcGGLRTQ50aQM2iqPpq2evTxER84jfdPvsPAtEcZ7m44NI45edFMo8oOYQ=="],-- "@ant-design/cssinjs": ["@ant-design/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.11.1", "@emotion/hash": "^0.8.0", "@emotion/unitless": "^0.7.5", "classnames": "^2.3.1", "csstype": "^3.1.3", "rc-util": "^5.35.0", "stylis": "^4.3.4" }, "peerDependencies": { "react": ">=16.0.0", "react-dom": ">=16.0.0" } }, "sha512-K4cYrJBsgvL+IoozUXYjbT6LHHNt+19a9zkvpBPxLjFHas1UpPM2A5MlhROb0BT8N8WoavM5VsP9MeSeNK/3mg=="],-- "@ant-design/cssinjs-utils": ["@ant-design/[email protected]", "", { "dependencies": { "@ant-design/cssinjs": "^1.21.0", "@babel/runtime": "^7.23.2", "rc-util": "^5.38.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-nOoQMLW1l+xR1Co8NFVYiP8pZp3VjIIzqV6D6ShYF2ljtdwWJn5WSsH+7kvCktXL/yhEtWURKOfH5Xz/gzlwsg=="],-- "@ant-design/fast-color": ["@ant-design/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.24.7" } }, "sha512-y2217gk4NqL35giHl72o6Zzqji9O7vHh9YmhUVkPtAOpoTCH4uWxo/pr4VE8t0+ChEPs0qo4eJRC5Q1eXWo3vA=="],-- "@ant-design/icons": ["@ant-design/[email protected]", "", { "dependencies": { "@ant-design/colors": "^7.0.0", "@ant-design/icons-svg": "^4.4.0", "@babel/runtime": "^7.24.8", "classnames": "^2.2.6", "rc-util": "^5.31.1" }, "peerDependencies": { "react": ">=16.0.0", "react-dom": ">=16.0.0" } }, "sha512-0/xS39c91WjPAZOWsvi1//zjx6kAp4kxWwctR6kuU6p133w8RU0D2dSCvZC19uQyharg/sAvYxGYWl01BbZZfg=="],-- "@ant-design/icons-svg": ["@ant-design/[email protected]", "", {}, "sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA=="],-- "@ant-design/react-slick": ["@ant-design/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.4", "classnames": "^2.2.5", "json2mq": "^0.2.0", "resize-observer-polyfill": "^1.5.1", "throttle-debounce": "^5.0.0" }, "peerDependencies": { "react": ">=16.9.0" } }, "sha512-EzlvzE6xQUBrZuuhSAFTdsr4P2bBBHGZwKFemEfq8gIGyIQCxalYfZW/T2ORbtQx5rU69o+WycP3exY/7T1hGA=="],+ "@alloc/quick-lru": ["@alloc/[email protected]", "", {}, "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw=="],"@asamuzakjp/css-color": ["@asamuzakjp/[email protected]", "", { "dependencies": { "@csstools/css-calc": "^3.0.0", "@csstools/css-color-parser": "^4.0.1", "@csstools/css-parser-algorithms": "^4.0.0", "@csstools/css-tokenizer": "^4.0.0", "lru-cache": "^11.2.5" } }, "sha512-NfBUvBaYgKIuq6E/RBLY1m0IohzNHAYyaJGuTK79Z23uNwmz2jl1mPsC5ZxCCxylinKhT1Amn5oNTlx1wN8cQg=="],@@ -173,21 +182,27 @@"@csstools/css-tokenizer": ["@csstools/[email protected]", "", {}, "sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA=="],+ "@date-fns/tz": ["@date-fns/[email protected]", "", {}, "sha512-lwYN/vDPeNRULcepoE/LO2Pgx+7/RV+S9ARfbc9lr2DtGkOD7pAiruHvbR1RX3Qyf6ja47EWJDMsNK5vK08DJg=="],+"@emotion/babel-plugin": ["@emotion/[email protected]", "", { "dependencies": { "@babel/helper-module-imports": "^7.16.7", "@babel/runtime": "^7.18.3", "@emotion/hash": "^0.9.2", "@emotion/memoize": "^0.9.0", "@emotion/serialize": "^1.3.3", "babel-plugin-macros": "^3.1.0", "convert-source-map": "^1.5.0", "escape-string-regexp": "^4.0.0", "find-root": "^1.1.0", "source-map": "^0.5.7", "stylis": "4.2.0" } }, "sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ=="],"@emotion/cache": ["@emotion/[email protected]", "", { "dependencies": { "@emotion/memoize": "^0.9.0", "@emotion/sheet": "^1.4.0", "@emotion/utils": "^1.4.2", "@emotion/weak-memoize": "^0.4.0", "stylis": "4.2.0" } }, "sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA=="],"@emotion/css": ["@emotion/[email protected]", "", { "dependencies": { "@emotion/babel-plugin": "^11.13.5", "@emotion/cache": "^11.13.5", "@emotion/serialize": "^1.3.3", "@emotion/sheet": "^1.4.0", "@emotion/utils": "^1.4.2" } }, "sha512-wQdD0Xhkn3Qy2VNcIzbLP9MR8TafI0MJb7BEAXKp+w4+XqErksWR4OXomuDzPsN4InLdGhVe6EYcn2ZIUCpB8w=="],- "@emotion/hash": ["@emotion/[email protected]", "", {}, "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow=="],+ "@emotion/hash": ["@emotion/[email protected]", "", {}, "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g=="],"@emotion/memoize": ["@emotion/[email protected]", "", {}, "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ=="],+ "@emotion/react": ["@emotion/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", "@emotion/cache": "^11.14.0", "@emotion/serialize": "^1.3.3", "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", "@emotion/utils": "^1.4.2", "@emotion/weak-memoize": "^0.4.0", "hoist-non-react-statics": "^3.3.1" }, "peerDependencies": { "@types/react": "*", "react": ">=16.8.0" }, "optionalPeers": ["@types/react"] }, "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA=="],+"@emotion/serialize": ["@emotion/[email protected]", "", { "dependencies": { "@emotion/hash": "^0.9.2", "@emotion/memoize": "^0.9.0", "@emotion/unitless": "^0.10.0", "@emotion/utils": "^1.4.2", "csstype": "^3.0.2" } }, "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA=="],"@emotion/sheet": ["@emotion/[email protected]", "", {}, "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg=="],- "@emotion/unitless": ["@emotion/[email protected]", "", {}, "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="],+ "@emotion/unitless": ["@emotion/[email protected]", "", {}, "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg=="],++ "@emotion/use-insertion-effect-with-fallbacks": ["@emotion/[email protected]", "", { "peerDependencies": { "react": ">=16.8.0" } }, "sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg=="],"@emotion/utils": ["@emotion/[email protected]", "", {}, "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA=="],@@ -247,17 +262,21 @@"@exodus/bytes": ["@exodus/[email protected]", "", { "peerDependencies": { "@noble/hashes": "^1.8.0 || ^2.0.0" }, "optionalPeers": ["@noble/hashes"] }, "sha512-UY0nlA+feH81UGSHv92sLEPLCeZFjXOuHhrIo0HQydScuQc8s0A7kL/UdgwgDq8g8ilksmuoF35YVTNphV2aBQ=="],- "@jest/diff-sequences": ["@jest/[email protected]", "", {}, "sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw=="],+ "@floating-ui/core": ["@floating-ui/[email protected]", "", { "dependencies": { "@floating-ui/utils": "^0.2.12" } }, "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ=="],- "@jest/expect-utils": ["@jest/[email protected]", "", { "dependencies": { "@jest/get-type": "30.1.0" } }, "sha512-1JnRfhqpD8HGpOmQp180Fo9Zt69zNtC+9lR+kT7NVL05tNXIi+QC8Csz7lfidMoVLPD3FnOtcmp0CEFnxExGEA=="],+ "@floating-ui/dom": ["@floating-ui/[email protected]", "", { "dependencies": { "@floating-ui/core": "^1.8.0", "@floating-ui/utils": "^0.2.12" } }, "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg=="],- "@jest/get-type": ["@jest/[email protected]", "", {}, "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA=="],+ "@floating-ui/react-dom": ["@floating-ui/[email protected]", "", { "dependencies": { "@floating-ui/dom": "^1.8.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-JDjEFGCpImxDCA7JJKviA0M9+RtmJdj0m/NVU5IMgBK+AmZouAQQ7/+2GLH0GXXY0YMw9oXPB8hKdbPYg5QLYg=="],- "@jest/pattern": ["@jest/[email protected]", "", { "dependencies": { "@types/node": "*", "jest-regex-util": "30.0.1" } }, "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA=="],+ "@floating-ui/utils": ["@floating-ui/[email protected]", "", {}, "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww=="],- "@jest/schemas": ["@jest/[email protected]", "", { "dependencies": { "@sinclair/typebox": "^0.34.0" } }, "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA=="],+ "@fontsource/geist-mono": ["@fontsource/[email protected]", "", {}, "sha512-UtJ1BBBCVpMYdIcW7nEB45UAoAw5M53ZXs2t0ciPW+IokuAAIc56M8+kW5tXbRJCTpDw4XTtU7proT6NdQAHTg=="],- "@jest/types": ["@jest/[email protected]", "", { "dependencies": { "@jest/pattern": "30.0.1", "@jest/schemas": "30.0.5", "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-reports": "^3.0.4", "@types/node": "*", "@types/yargs": "^17.0.33", "chalk": "^4.1.2" } }, "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg=="],+ "@fontsource/geist-sans": ["@fontsource/[email protected]", "", {}, "sha512-AmG7cE1AvE4NHROPaOl1sN+a02cB5xy6pA/ZV76HXqWTCsJTV2SCBc9DTFHfJqnVOODm7HhXIYtUIb75NP5QXQ=="],++ "@fontsource/inter": ["@fontsource/[email protected]", "", {}, "sha512-RofMylZmjlJEfELXeNHFWBRcSs75rGU/6bV2S2jfnvv/3rPXPGe0LgUJTklcHZ9lM4OZmAVFhcJPnACfb91A3g=="],++ "@hookform/resolvers": ["@hookform/[email protected]", "", { "dependencies": { "@standard-schema/utils": "^0.3.0" }, "peerDependencies": { "@sinclair/typebox": ">=0.25.24", "@standard-schema/spec": "^1.0.0", "@typeschema/main": ">=0.13.7", "@vinejs/vine": "^2.0.0 || ^3.0.0", "ajv": "^8.12.0", "ajv-errors": "^3.0.0", "ajv-formats": "^2.1.1", "arktype": "^2.0.0", "ata-validator": "^0.7.0", "class-transformer": ">=0.4.0", "class-validator": ">=0.12.0", "computed-types": "^1.0.0", "effect": "^3.10.3", "fluentvalidation-ts": "^3.0.0", "fp-ts": "^2.7.0", "io-ts": "^2.0.0", "joi": "^17.0.0", "nope-validator": ">=0.12.0", "react-hook-form": "^7.55.0", "superstruct": ">=0.12.0", "typanion": "^3.3.2", "valibot": ">=0.31.0 || ^1.0.0-beta.4 || ^1.0.0-rc", "vest": ">=3.0.0", "yup": "^1.0.0", "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["@sinclair/typebox", "@standard-schema/spec", "@typeschema/main", "@vinejs/vine", "ajv", "ajv-errors", "ajv-formats", "arktype", "ata-validator", "class-transformer", "class-validator", "computed-types", "effect", "fluentvalidation-ts", "fp-ts", "io-ts", "joi", "nope-validator", "superstruct", "typanion", "valibot", "vest", "yup", "zod"] }, "sha512-CyPCYV8/KlXfEXLWj8HHHhVsR/IZ6Ckm3b/a4fWtO/lRnRK1huqncb8LlAWrmpPRsse5glF5aVuDRMHEr3UGag=="],"@jridgewell/gen-mapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],@@ -321,29 +340,129 @@"@protobufjs/utf8": ["@protobufjs/[email protected]", "", {}, "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="],- "@rc-component/async-validator": ["@rc-component/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.24.4" } }, "sha512-n4HcR5siNUXRX23nDizbZBQPO0ZM/5oTtmKZ6/eqL0L2bo747cklFdZGRN2f+c9qWGICwDzrhW0H7tE9PptdcA=="],+ "@radix-ui/number": ["@radix-ui/[email protected]", "", {}, "sha512-Road2bidD0uu/1BGDOWNdPI06g0lIRy6IF9GZcIrDK2KGItfor8IQwQa+yM2ERgHM1MmHxaxpTzk0/Jp42lNfA=="],++ "@radix-ui/primitive": ["@radix-ui/[email protected]", "", {}, "sha512-rqWnm76nYT8HoNNqEjpgJ7Pw/DrBj5iBTrmEPo6HTX5+VJyBNOqTdv4g89G63HuR5g0AaENoAcH7Is5fF2kZ8Q=="],++ "@radix-ui/react-accessible-icon": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-visually-hidden": "1.2.11" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-WTQwcAvQf5sOcuUyi90lKPbhwcvQ+j55cjrSmeaN+L2vKU3DooOvlKw2MDeiJ5IkV5N905KW0/fGojKOBhD11A=="],++ "@radix-ui/react-accordion": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-collapsible": "1.1.20", "@radix-ui/react-collection": "1.1.15", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-controllable-state": "1.2.6" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-jDhG9FvAEnlhnjrsINbNXcUa4G+L1KqSkJSunkbKEzFRcAb52jvM0PjPxPRvhe1HNc5F5yc0yzzWeeqlH4yBIg=="],++ "@radix-ui/react-alert-dialog": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-dialog": "1.1.23", "@radix-ui/react-primitive": "2.1.10" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-VAYOiQRqj3GPpYJE0I9J+X8Ip05cyVlNdKOFeiGS2Ou1HHGfpl0BxOyZm6nmVDyU+W+NF3/XLzmjHmVGydhwgA=="],++ "@radix-ui/react-arrow": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.10" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-v4zggRcjadnI+ClKDuijlQEW4tw3NoaeHc/PwpKnLoLLKNUG4InLegkstooLcRIUWCs+8L22dGURCVuFfOKfnA=="],++ "@radix-ui/react-aspect-ratio": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.10" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-fy+dyVR+90nelK8rqIznFlxzx7uPcGbhxH8Nfr2bHb4UfSe+e3hklOC0luK0hDwVwnRX7xTRySpsrQVeW+/oNQ=="],++ "@radix-ui/react-avatar": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-callback-ref": "1.1.4", "@radix-ui/react-use-is-hydrated": "0.1.3", "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-4ULOTJ/mqy2hT9GlWa/MFHxHSvH3nJzHnZM1waNsc5Bonv7i70aNenghXmD97S6OJ81ekXONGGt4nT1r0PfEdA=="],++ "@radix-ui/react-checkbox": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-size": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Gnptr9pDDQxD3hgq2dtPbtrp/c2qH1mBwIzw3X/ivrMb2e1t0jMTi606fVEqFPaQR1ggXIVQWKj3P2WW9v7zGQ=="],++ "@radix-ui/react-collapsible": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-mcGesGplBnzN2sbvJETzpCNfSMyPnb29q1GRLU+Ib7bJrpIG2ywmRoh2V5VbA2uNvKikKUlVbAPks7JDjz4A8Q=="],++ "@radix-ui/react-collection": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-slot": "1.3.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-9W+B9NPF0NaaPh/1NJd3+KqsnlLqU9H7T2rvww+fp+T/evVXdNAyYcnfRQZFOjkR1ajQp3yORlqnI8soawLvNA=="],++ "@radix-ui/react-compose-refs": ["@radix-ui/[email protected]", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA=="],++ "@radix-ui/react-context": ["@radix-ui/[email protected]", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-RHCUGwKHDr0hDGg4X7ma4JG4/+12qxw8rkh5QKdDldlCvtja6nUx1Ef/8HVrJze81lEsgLQlqjzjGNHantgnQA=="],++ "@radix-ui/react-context-menu": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-menu": "2.1.24", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-controllable-state": "1.2.6" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-CtXP35dxaB5T3zXSd+E3uHe/QpXcpYnZmxp6OaIbfthtfW4wyb77M23BG+bwIJDtsMwEP/YssdsmNyZu7jhWew=="],++ "@radix-ui/react-dialog": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-dismissable-layer": "1.1.19", "@radix-ui/react-focus-guards": "1.1.6", "@radix-ui/react-focus-scope": "1.1.16", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-portal": "1.1.17", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-slot": "1.3.3", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-layout-effect": "1.1.4", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.7.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Ksw4WeROkO4rC9k/onilX/Ao2Cr1ku1unMNH+XSCcP4jSXYu7HDsg9n4ojMjVb22XpYjAQ9qfrFlVbru1vXDUA=="],++ "@radix-ui/react-direction": ["@radix-ui/[email protected]", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-5pzg4FGQNpExhnhT2zlrP1wZFaYCd1K0nYWoFAdcYoYK868IEigqMX3B3f8yIoRlAhAeDWciLI6ZdCKHF9P4Vg=="],++ "@radix-ui/react-dismissable-layer": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-callback-ref": "1.1.4", "@radix-ui/react-use-effect-event": "0.0.5" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-8g4pfOL9HoKKLWGiypT+dphVqjFfmcXO5GBnhsG6zI+lxAx/8feQpr+1LSN8Re3hiZ+XkLNS4O9ztK11/LzQ6w=="],++ "@radix-ui/react-dropdown-menu": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-menu": "2.1.24", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-controllable-state": "1.2.6" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-geq8l2rJkxvkXsT9RMgtUE3P8pITFpTsvYpbySi1IH4fZEABD/Gp85myayFgxk0ktljGMJnCbeFkyTusvSvv7g=="],++ "@radix-ui/react-focus-guards": ["@radix-ui/[email protected]", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-RNOJjfZMTyBM6xYmV3IVGXkPjIhcBAuv48POevAXwrGJhkWZ9p1rFoIS1JFooPuT193AZmRsCPhpoVJxx6OPoQ=="],++ "@radix-ui/react-focus-scope": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-callback-ref": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-wmRZ2WWLvmt6KHy2rNPOdPUjwq5xOHY02+m+udwJTn0aNIox/rkskAvJTyTLGhPK6KgrUjlJUJpgmx/+wFiFIQ=="],++ "@radix-ui/react-form": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-label": "2.1.15", "@radix-ui/react-primitive": "2.1.10" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Q4TLEn2A7TAypxwmd6R9EwrlXDvkfYSDMrq9/887AXAGh+G1rH+kYJKSTv+Si9Y0JPKTwKYv6PviAJosysNimA=="],++ "@radix-ui/react-hover-card": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-dismissable-layer": "1.1.19", "@radix-ui/react-popper": "1.3.7", "@radix-ui/react-portal": "1.1.17", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-controllable-state": "1.2.6" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-H8qONfZd3ltrU3+jHCIgITbWo6e1iTKvP9DHdrvYbX48ooRM5FjEDTn16AMwdfuOGkWdZEhpl3PLL/Wk/AnHDQ=="],++ "@radix-ui/react-id": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-TMQp2llA+RYn7JcjnrMnz7wN4pcVttPZnRZo52PLQsoLVKzNlVwUeHmfePgTgRluXFvlD3GD5g5MOVVTJCO0qA=="],++ "@radix-ui/react-label": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.10" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-o/rdYEwZTTo5tjknnPeyQFU45kUC4i/XyeDPP+HGyi6XqpOP6Zf5Ya5vh/Yfe9Id5JiuWnnAx2XqIeD3UYZt0g=="],++ "@radix-ui/react-menu": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-collection": "1.1.15", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-dismissable-layer": "1.1.19", "@radix-ui/react-focus-guards": "1.1.6", "@radix-ui/react-focus-scope": "1.1.16", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-popper": "1.3.7", "@radix-ui/react-portal": "1.1.17", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-roving-focus": "1.1.19", "@radix-ui/react-slot": "1.3.3", "@radix-ui/react-use-callback-ref": "1.1.4", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.7.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-uW7RVuU6Lp/ZtfeY4b3kL32zccgEWvPv1+cf17ubYzHa9cL8AHokmk36cG/XEiH/smbQvumnieXX9j/e9RqJWA=="],- "@rc-component/color-picker": ["@rc-component/[email protected]", "", { "dependencies": { "@ant-design/fast-color": "^2.0.6", "@babel/runtime": "^7.23.6", "classnames": "^2.2.6", "rc-util": "^5.38.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-WcZYwAThV/b2GISQ8F+7650r5ZZJ043E57aVBFkQ+kSY4C6wdofXgB0hBx+GPGpIU0Z81eETNoDUJMr7oy/P8Q=="],+ "@radix-ui/react-menubar": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-collection": "1.1.15", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-menu": "2.1.24", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-roving-focus": "1.1.19", "@radix-ui/react-use-controllable-state": "1.2.6" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-eeVs0vf7cuqXaM0qLQCPcufImiJNVBXdJDLu7ZGYl2732UH23Qat/foNGrr6vYV3/DdTsBqASoggUFgH14OcZA=="],- "@rc-component/context": ["@rc-component/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "rc-util": "^5.27.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-kFcNxg9oLRMoL3qki0OMxK+7g5mypjgaaJp/pkOis/6rVxma9nJBF/8kCIuTYHUQNr0ii7MxqE33wirPZLJQ2w=="],+ "@radix-ui/react-navigation-menu": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-collection": "1.1.15", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-dismissable-layer": "1.1.19", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-callback-ref": "1.1.4", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-layout-effect": "1.1.4", "@radix-ui/react-use-previous": "1.1.4", "@radix-ui/react-visually-hidden": "1.2.11" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-ou7iLEJ+yrhQndkkA4U21XIdS/CS45F4iXIkTZcb6/Ne9EMsOuDudVmCwmDnfFZZ+y1FZqXRNSIgBy+YMvZVZg=="],- "@rc-component/mini-decimal": ["@rc-component/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.18.0" } }, "sha512-jS4E7T9Li2GuYwI6PyiVXmxTiM6b07rlD9Ge8uGZSCz3WlzcG5ZK7g5bbuKNeZ9pgUuPK/5guV781ujdVpm4HQ=="],+ "@radix-ui/react-one-time-password-field": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/number": "1.1.3", "@radix-ui/primitive": "1.1.7", "@radix-ui/react-collection": "1.1.15", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-roving-focus": "1.1.19", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-effect-event": "0.0.5", "@radix-ui/react-use-is-hydrated": "0.1.3", "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Tj9P6ntAJEw52oq/F0AGknXR4XncxEt7XU47O3xJQOiWfLzEy3d9gtgKfvjSzGxzHkfL+VzvxGu2KTFsloJqXw=="],- "@rc-component/mutate-observer": ["@rc-component/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.18.0", "classnames": "^2.3.2", "rc-util": "^5.24.4" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-QjrOsDXQusNwGZPf4/qRQasg7UFEj06XiCJ8iuiq/Io7CrHrgVi6Uuetw60WAMG1799v+aM8kyc+1L/GBbHSlw=="],+ "@radix-ui/react-password-toggle-field": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-effect-event": "0.0.5", "@radix-ui/react-use-is-hydrated": "0.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-4gvFnmDXu3dgj21CqsufzIameRvlRd4SBqaWhcrlrNhRo0Y5i/49AmRJYe1fdAM3G2VNBbmin4b0D6cdQocwgw=="],- "@rc-component/portal": ["@rc-component/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.18.0", "classnames": "^2.3.2", "rc-util": "^5.24.4" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-6f813C0IsasTZms08kfA8kPAGxbbkYToa8ALaiDIGGECU4i9hj8Plgbx0sNJDrey3EtHO30hmdaxtT0138xZcg=="],+ "@radix-ui/react-popover": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-dismissable-layer": "1.1.19", "@radix-ui/react-focus-guards": "1.1.6", "@radix-ui/react-focus-scope": "1.1.16", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-popper": "1.3.7", "@radix-ui/react-portal": "1.1.17", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-slot": "1.3.3", "@radix-ui/react-use-controllable-state": "1.2.6", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.7.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-mw58MrBlyHWFisTOYignD0vf/3gdcgAR+9of1s9G/38CbFiUwH1nCDkc0AUM9IrXFgN5Ue8n45j9WCgyM1sbiQ=="],- "@rc-component/qrcode": ["@rc-component/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.24.7" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-LfLGNymzKdUPjXUbRP+xOhIWY4jQ+YMj5MmWAcgcAq1Ij8XP7tRmAXqyuv96XvLUBE/5cA8hLFl9eO1JQMujrA=="],+ "@radix-ui/react-popper": ["@radix-ui/[email protected]", "", { "dependencies": { "@floating-ui/react-dom": "^2.0.0", "@radix-ui/react-arrow": "1.1.15", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-callback-ref": "1.1.4", "@radix-ui/react-use-layout-effect": "1.1.4", "@radix-ui/react-use-rect": "1.1.4", "@radix-ui/react-use-size": "1.1.4", "@radix-ui/rect": "1.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-UsJrrd7w4wuKKTdvd/DNERVlwSlUcyXzjhyDwBk+3aPOsCjOY6ZSbxuw8E6lZTjjfP8Cpd0J8VVkrYUWyGYXyg=="],- "@rc-component/tour": ["@rc-component/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.18.0", "@rc-component/portal": "^1.0.0-9", "@rc-component/trigger": "^2.0.0", "classnames": "^2.3.2", "rc-util": "^5.24.4" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-Tr2t7J1DKZUpfJuDZWHxyxWpfmj8EZrqSgyMZ+BCdvKZ6r1UDsfU46M/iWAAFBy961Ssfom2kv5f3UcjIL2CmQ=="],+ "@radix-ui/react-portal": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-vKQLcWypUnwZVvfV7UkGahH2g6ySe8M8R+zYBwPrv5byZ9QAW6cQVvNKo7GgmD+p8aYb6D9JBuvy8/WhOno2wQ=="],- "@rc-component/trigger": ["@rc-component/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.23.2", "@rc-component/portal": "^1.1.0", "classnames": "^2.3.2", "rc-motion": "^2.0.0", "rc-resize-observer": "^1.3.1", "rc-util": "^5.44.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-ORENF39PeXTzM+gQEshuk460Z8N4+6DkjpxlpE7Q3gYy1iBpLrx0FOJz3h62ryrJZ/3zCAUIkT1Pb/8hHWpb3A=="],+ "@radix-ui/react-presence": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-3wyzCQ6+ubRA+D4uv9m95JYLXxmOHp05qjrkjeA7uKHHtjpPggQzc6DAb0URl7j67oR0K2foO4ip27TiX037Bw=="],- "@react-awesome-query-builder/antd": ["@react-awesome-query-builder/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.27.0", "@react-awesome-query-builder/ui": "^6.6.15", "lodash": "^4.17.21", "prop-types": "^15.8.1", "rc-picker": "^4.5.0" }, "peerDependencies": { "@ant-design/icons": "^4.0.0 || ^5.0.0", "antd": "^4.17.0 || ^5.0.0", "react": "^16.8.4 || ^17.0.1 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.4 || ^17.0.1 || ^18.0.0 || ^19.0.0" } }, "sha512-WyAG1aSsOE29Q5TtK3bvg49zE4sci4TMTZqt0Ggaq7QoUnDhGX0EQ94EPzyl5mu0Eo22AmnVQAOOE6TM5TCozA=="],+ "@radix-ui/react-primitive": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-slot": "1.3.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-MucOnzh6hR5mid6VpkbglRAMYMjKLqRnGBbjXkzjK52fuQDd1qbkx78a5P40mkcnVXJdEVxm26E9OPAiUq7nBg=="],- "@react-awesome-query-builder/core": ["@react-awesome-query-builder/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.27.0", "clone": "^2.1.2", "i18next": "^23.11.5", "immutable": "^4.3.6", "json-logic-js": "^2.0.2", "lodash": "^4.17.21", "moment": "^2.30.1", "spel2js": "^0.2.8", "sqlstring": "^2.3.3" } }, "sha512-vAAEvuoAXRgpX2oN6Uovs5cblvMUePjxweCEa6j9t5QQ4qtn9X7lxaX+5RoMVSiVU5z4Ca2XwxtutEeuY+j6zg=="],+ "@radix-ui/react-progress": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-context": "1.2.2", "@radix-ui/react-primitive": "2.1.10" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-5XnomAsoZZCY+KNTxbIghpGqPruZvKFNlvcAljVAOdDRDsH4/OZQxhtwo5wdtoDM5R6MhJBb2sPnDuRFep3lzg=="],- "@react-awesome-query-builder/ui": ["@react-awesome-query-builder/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.27.0", "@react-awesome-query-builder/core": "^6.6.15", "classnames": "^2.5.1", "lodash": "^4.17.21", "prop-types": "^15.8.1", "react-redux": "^8.1.3", "redux": "^4.2.1" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.1 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.4 || ^17.0.1 || ^18.0.0 || ^19.0.0" } }, "sha512-7mkyz+fnVWz1VFvmlYPa9CV2fQhayM8PkcYzymoRTGKiY11WWaAnE49PhCENZV3+48CvnF1z1Dv86Npatl5Lpw=="],+ "@radix-ui/react-radio-group": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-roving-focus": "1.1.19", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-size": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-cgYFEkntCxppHZgtSZ+7vh0wbZQ+IC7PPMw8DSnRG27B6kDd32/Zw0OJt7dGDigCoprMuWHjg2PvUn3PYvPFoQ=="],++ "@radix-ui/react-roving-focus": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-collection": "1.1.15", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-callback-ref": "1.1.4", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-is-hydrated": "0.1.3", "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-V9jI6hDjT7l3jsCQD9bLNvDLM3tH/gdbOTp7Tefp3hbbgCGQoK7tUvrWiRlcoBHIZ809ElXwNQwVo0B98LuTXQ=="],++ "@radix-ui/react-scroll-area": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/number": "1.1.3", "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-callback-ref": "1.1.4", "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Zn5Cd171wxsO3Dfg8HaW6RifTb9CYTKQJHs/G4+LN1GfmJpaQMZQyQxMprVPHpaz7QY4l9BxK2JwQuzHsXC8nA=="],++ "@radix-ui/react-select": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/number": "1.1.3", "@radix-ui/primitive": "1.1.7", "@radix-ui/react-collection": "1.1.15", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-dismissable-layer": "1.1.19", "@radix-ui/react-focus-guards": "1.1.6", "@radix-ui/react-focus-scope": "1.1.16", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-popper": "1.3.7", "@radix-ui/react-portal": "1.1.17", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-slot": "1.3.3", "@radix-ui/react-use-callback-ref": "1.1.4", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-layout-effect": "1.1.4", "@radix-ui/react-use-previous": "1.1.4", "@radix-ui/react-visually-hidden": "1.2.11", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.7.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-WFGImkmbzcfxeIwq/+4HvRN0pizBwbwQUED4I13ezQsDdfl38ZntN6TmR8XaSzPBqoCToe8rF75j6NPNDSzhbg=="],++ "@radix-ui/react-separator": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.10" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-jOLO4lssEzWpoDu7G+Ze4VjwMRUBt291pnZD0gmalREZipnTX3wadQo7Fy48GCTfe14/YRN6rw/rOJqrE85Wxw=="],++ "@radix-ui/react-slider": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/number": "1.1.3", "@radix-ui/primitive": "1.1.7", "@radix-ui/react-collection": "1.1.15", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-layout-effect": "1.1.4", "@radix-ui/react-use-previous": "1.1.4", "@radix-ui/react-use-size": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-mTSLf1GC/C0moWjTbvCM6Qn/gBjvlFt1azuWF2v7MN5C3Zq2U2J2lN3ZEYkpujuOU5Ro7A28wkviSxaKnG0BYg=="],++ "@radix-ui/react-slot": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.5" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-qx7oqnYbxnK9kYI9m317qmFmEgo6ywqWvbTogdj7cL9p3/yx4M48p7Rnw5z3H890cL/ow/EeWJsuTykeZVXP5Q=="],++ "@radix-ui/react-switch": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-size": "1.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-48tB/4dn2UVLBCYhTu9AuR63IHl73l/qLbLgxd86noTUor4/K4LFDAcYjK+isP5313qxaFpjPVogE7+Y0/V3Kw=="],++ "@radix-ui/react-tabs": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-roving-focus": "1.1.19", "@radix-ui/react-use-controllable-state": "1.2.6" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-UKxJlZid7FVtsk/WTxj4i4uSEgj2Au+KBbS7SQyTlzMhhn+86Cz3tISZdTa87bfEfcuvZezf2ZsxD4xuEKtkog=="],++ "@radix-ui/react-toast": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-collection": "1.1.15", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-dismissable-layer": "1.1.19", "@radix-ui/react-portal": "1.1.17", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-callback-ref": "1.1.4", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-layout-effect": "1.1.4", "@radix-ui/react-visually-hidden": "1.2.11" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-ofhyAsYaocRGOs/n0XWdUOSVzEAG6BfrMVM8z0c0kLEWY38w/0WuMFPTJP/HVaZPYkMvHZoKIIhNcjbTCBILPg=="],++ "@radix-ui/react-toggle": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-use-controllable-state": "1.2.6" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-7lonPlKfSacd20GlOBx2ltuVKz9oqWYZz+oMQyOltw6t1y2nyftj2ZmwwUHYn49kqfDWcp8dNZm5NgV+5Z+mug=="],++ "@radix-ui/react-toggle-group": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-roving-focus": "1.1.19", "@radix-ui/react-toggle": "1.1.18", "@radix-ui/react-use-controllable-state": "1.2.6" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-OtnwuSVjd1Ofi+AdnvhsjQdyuhCDwYs1w9RyB5BN/OavXOVQo42SYqQjwUnbPnaiPFBpQ9aX70dWeee+v2oBLA=="],++ "@radix-ui/react-toolbar": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-roving-focus": "1.1.19", "@radix-ui/react-separator": "1.1.15", "@radix-ui/react-toggle-group": "1.1.19" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Ph0IvtYw4VB12ZnZg+YtrGs8yJQsnizwo/zu0R4Y/nWugtJzA7Pg1eWeuDR9+LSqn+xjamss+UOSOJJJ4gx8jw=="],++ "@radix-ui/react-tooltip": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-dismissable-layer": "1.1.19", "@radix-ui/react-id": "1.1.4", "@radix-ui/react-popper": "1.3.7", "@radix-ui/react-portal": "1.1.17", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-slot": "1.3.3", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-layout-effect": "1.1.4", "@radix-ui/react-visually-hidden": "1.2.11" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-6EamKFRRnlpdadndbZ6LMwycfwkwPte1B42hs6QA0gYhjaOKqW4PZ4pjaW9UrlDX5eVt/OjncE7BFTPL5nmZhg=="],++ "@radix-ui/react-use-callback-ref": ["@radix-ui/[email protected]", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-R6OUY2e2fA6Yn6s+VSx5KBV6Nx8LQEhu+cz7LCej18rQ1HLyg9PSC9jP/ZNx0o6FAIK9c0F1kHylzSxKsdlkrQ=="],++ "@radix-ui/react-use-controllable-state": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-use-effect-event": "0.0.5", "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-uEQJGT97ZA/TgP/Hydw47lHu+/vQj6z/0jA+WeTbK1o9Rx45GImjpD0tc3W5ad3D6XTSR6e1yEO0FvGq6WQfVQ=="],++ "@radix-ui/react-use-effect-event": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg=="],++ "@radix-ui/react-use-escape-keydown": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-use-callback-ref": "1.1.4" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-ge3ipobwSXTj4JyVtswQ7qZj0ZHdtbGuOno/LrgAAeSxtsJ6Vs4Gz5IkPH2bmqpjcLUFoqGhA/mueuIf63UXlA=="],++ "@radix-ui/react-use-is-hydrated": ["@radix-ui/[email protected]", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-umO/aJ+82CpOnhDZUTbILCQf7kU/g0iv+oGs/Q8jw7IkhWBzaEP4sA268PhFAJTFetbwp3ICc6ktpI4TqtxcIw=="],++ "@radix-ui/react-use-layout-effect": ["@radix-ui/[email protected]", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw=="],++ "@radix-ui/react-use-previous": ["@radix-ui/[email protected]", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-XoSLhbRbqxFtgJoi2fNHA3C6pDlY34x508vUpUGoFZfvePfHXHbE1lC4FYFMnJWgiCRroSTw6fOsXQoVS9RwZg=="],++ "@radix-ui/react-use-rect": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/rect": "1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-cSOCh6JlkmfjLyNcLiu2nB4v+nm+dkZ+Q5KHWk/soo4U7ZLiEQFKHK9/YmtBHjfCEaU43IBKQOc4/uJmCaiCTQ=="],++ "@radix-ui/react-use-size": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-D3anSY15EJoxrihpsXI6SMrmmonnQtR2ni7arO+Lfdg3O95b9hNXxONk8jA5C8ANdF/h5HMAxejgs8PWJ6rlhw=="],++ "@radix-ui/react-visually-hidden": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.10" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-NFS86RYYZb4/exihaESBGOpMJFz8MGLAfu3mOBSGByVnVPC9JPASfYubxd/8KbkQK0sYAv8lVQDEQukDX/qXvQ=="],++ "@radix-ui/rect": ["@radix-ui/[email protected]", "", {}, "sha512-JtyZR+mqgBibTo8xea3B6ZRmzZiM/YeVBtUkas6zMuXjAlfIFIW2FgqeM9eLyvEaYX66vr6DJMK+4U6LV0KhNw=="],++ "@react-awesome-query-builder/core": ["@react-awesome-query-builder/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.27.0", "clone": "^2.1.2", "i18next": "^23.11.5", "immutable": "^4.3.6", "json-logic-js": "^2.0.2", "lodash": "^4.17.21", "moment": "^2.30.1", "spel2js": "^0.2.8", "sqlstring": "^2.3.3" } }, "sha512-Y41zzKc5QJrtkIa72K7HMKbkRas328GL6NsYFeG7wzVgb7sX8tV74Fbeg2tUVz15R4f/I0WRu/V67Vc3yIAN9A=="],++ "@react-awesome-query-builder/ui": ["@react-awesome-query-builder/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.27.0", "@react-awesome-query-builder/core": "^6.7.0-alpha.0", "chroma-js": "^3.1.2", "classnames": "^2.5.1", "lodash": "^4.17.21", "prop-types": "^15.8.1", "react-number-format": "^5.0.0", "react-redux": "^8.1.3", "redux": "^4.2.1" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.1 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.4 || ^17.0.1 || ^18.0.0 || ^19.0.0" } }, "sha512-GfmBkISC32AdT6DvBQg3FSQ0SGqDf1qzoEAJg7qW4g7l2n/EebcQM5Wa+9Vx+qrQlKn6ZRe61HVQjN98DQdiWg=="],"@react-dnd/asap": ["@react-dnd/[email protected]", "", {}, "sha512-WLyfoHvxhs0V9U+GTsGilGgf2QsPl6ZZ44fnv0/b8T3nQyvzxidxsg/ZltbWssbsRDlYW8UKSQMTGotuTotZ6A=="],@@ -393,8 +512,6 @@"@remix-run/router": ["@remix-run/[email protected]", "", {}, "sha512-Ic6m2U/rMjTkhERIa/0ZtXJP17QUi2CbWE7cqx4J58M8aA3QTfW+2UlQ4psvTX9IO1RfNVhK3pcpdjej7L+t2w=="],- "@rjsf/antd": ["@rjsf/[email protected]", "", { "dependencies": { "classnames": "^2.5.1", "lodash": "^4.17.21", "lodash-es": "^4.17.21", "rc-picker": "2.7.6" }, "peerDependencies": { "@ant-design/icons": "^4.0.0 || ^5.0.0", "@rjsf/core": "^5.24.x", "@rjsf/utils": "^5.24.x", "antd": "^4.24.0 || ^5.8.5", "dayjs": "^1.8.0", "react": "^16.14.0 || >=17" } }, "sha512-UiWE8xoBxxCoe/SEkdQEmL5E6z3I1pw0+y0dTyGt8SHfAxxFc4/OWn7tKOAiNsKCXgf83t0JKn6CHWLD01sAdQ=="],-"@rjsf/core": ["@rjsf/[email protected]", "", { "dependencies": { "lodash": "^4.17.21", "lodash-es": "^4.17.21", "markdown-to-jsx": "^7.4.1", "prop-types": "^15.8.1" }, "peerDependencies": { "@rjsf/utils": "^5.24.x", "react": "^16.14.0 || >=17" } }, "sha512-ONTr14s7LFIjx2VRFLuOpagL76sM/HPy6/OhdBfq6UukINmTIs6+aFN0GgcR0aXQHFDXQ7f/fel0o/SO05Htdg=="],"@rjsf/utils": ["@rjsf/[email protected]", "", { "dependencies": { "json-schema-merge-allof": "^0.8.1", "jsonpointer": "^5.0.1", "lodash": "^4.17.21", "lodash-es": "^4.17.21", "react-is": "^18.2.0" }, "peerDependencies": { "react": "^16.14.0 || >=17" } }, "sha512-rNF8tDxIwTtXzz5O/U23QU73nlhgQNYJ+Sv5BAwQOIyhIE2Z3S5tUiSVMwZHt0julkv/Ryfwi+qsD4FiE5rOuw=="],@@ -489,13 +606,51 @@"@svgr/plugin-jsx": ["@svgr/[email protected]", "", { "dependencies": { "@babel/core": "^7.21.3", "@svgr/babel-preset": "8.1.0", "@svgr/hast-util-to-babel-ast": "8.0.0", "svg-parser": "^2.0.4" }, "peerDependencies": { "@svgr/core": "*" } }, "sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA=="],- "@testing-library/dom": ["@testing-library/[email protected]", "", { "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", "@types/aria-query": "^5.0.1", "aria-query": "5.1.3", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", "lz-string": "^1.5.0", "pretty-format": "^27.0.2" } }, "sha512-/DiOQ5xBxgdYRC8LNk7U+RWat0S3qRLeIw3ZIkMQ9kkVlRmwD/Eg8k8CqIpD6GW7u20JIUOfMKbxtiLutpjQ4g=="],+ "@tailwindcss/node": ["@tailwindcss/[email protected]", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "enhanced-resolve": "^5.24.1", "jiti": "^2.7.0", "lightningcss": "1.32.0", "magic-string": "^0.30.21", "source-map-js": "^1.2.1", "tailwindcss": "4.3.3" } }, "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg=="],++ "@tailwindcss/oxide": ["@tailwindcss/[email protected]", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.3.3", "@tailwindcss/oxide-darwin-arm64": "4.3.3", "@tailwindcss/oxide-darwin-x64": "4.3.3", "@tailwindcss/oxide-freebsd-x64": "4.3.3", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", "@tailwindcss/oxide-linux-x64-musl": "4.3.3", "@tailwindcss/oxide-wasm32-wasi": "4.3.3", "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" } }, "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA=="],++ "@tailwindcss/oxide-android-arm64": ["@tailwindcss/[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw=="],++ "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw=="],++ "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw=="],++ "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw=="],++ "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ=="],++ "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w=="],- "@testing-library/jest-dom": ["@testing-library/[email protected]", "", { "dependencies": { "@adobe/css-tools": "^4.0.1", "@babel/runtime": "^7.9.2", "@types/testing-library__jest-dom": "^5.9.1", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", "dom-accessibility-api": "^0.5.6", "lodash": "^4.17.15", "redent": "^3.0.0" } }, "sha512-ynmNeT7asXyH3aSVv4vvX4Rb+0qjOhdNHnO/3vuZNqPmhDpV/+rCSGwQ7bLcmU2cJ4dvoheIO85LQj0IbJHEtg=="],+ "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA=="],- "@testing-library/react": ["@testing-library/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.12.5", "@testing-library/dom": "^8.5.0", "@types/react-dom": "^18.0.0" }, "peerDependencies": { "react": "^18.0.0", "react-dom": "^18.0.0" } }, "sha512-sXOGON+WNTh3MLE9rve97ftaZukN3oNf2KjDy7YTx6hcTO2uuLHuCGynMDhFwGw/jYf4OJ2Qk0i4i79qMNNkyw=="],+ "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w=="],- "@testing-library/user-event": ["@testing-library/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.12.5" }, "peerDependencies": { "@testing-library/dom": ">=7.21.4" } }, "sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg=="],+ "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img=="],++ "@tailwindcss/oxide-wasm32-wasi": ["@tailwindcss/[email protected]", "", { "dependencies": { "@emnapi/core": "^1.11.1", "@emnapi/runtime": "^1.11.1", "@emnapi/wasi-threads": "^1.2.2", "@napi-rs/wasm-runtime": "^1.1.4", "@tybys/wasm-util": "^0.10.2", "tslib": "^2.8.1" }, "cpu": "none" }, "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ=="],++ "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ=="],++ "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw=="],++ "@tailwindcss/postcss": ["@tailwindcss/[email protected]", "", { "dependencies": { "@alloc/quick-lru": "^5.2.0", "@tailwindcss/node": "4.3.3", "@tailwindcss/oxide": "4.3.3", "postcss": "^8.5.16", "tailwindcss": "4.3.3" } }, "sha512-JTSZZGQi1AyKirbLN3azmjVzef92tcX7h+iSqPdaeStyFpGpDlKvvpxeOE8njhbUanbRwr3z8DyzhICWnMtQeg=="],++ "@tailwindcss/typography": ["@tailwindcss/[email protected]", "", { "dependencies": { "postcss-selector-parser": "6.0.10" }, "peerDependencies": { "tailwindcss": ">=3.0.0 || >=4.0.0 || insiders" } }, "sha512-hwbzQuNUfcPvbegQFatVPl/MY/tcM9KLl963hQ5laJKPh81TEZ1+dNG9PirGvcaDBkp+BCshExAyKVPW91dozw=="],++ "@tailwindcss/vite": ["@tailwindcss/[email protected]", "", { "dependencies": { "@tailwindcss/node": "4.3.3", "@tailwindcss/oxide": "4.3.3", "tailwindcss": "4.3.3" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw=="],++ "@tanstack/react-table": ["@tanstack/[email protected]", "", { "dependencies": { "@tanstack/table-core": "8.21.3" }, "peerDependencies": { "react": ">=16.8", "react-dom": ">=16.8" } }, "sha512-5nNMTSETP4ykGegmVkhjcS8tTLW6Vl4axfEGQN3v0zdHYbK4UfoqfPChclTrJ4EoK9QynqAu9oUf8VEmrpZ5Ww=="],++ "@tanstack/table-core": ["@tanstack/[email protected]", "", {}, "sha512-ldZXEhOBb8Is7xLs01fR3YEc3DERiz5silj8tnGkFZytt1abEvl/GhUmCE0PMLaMPTa3Jk4HbKmRlHmu+gCftg=="],++ "@testing-library/dom": ["@testing-library/[email protected]", "", { "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", "@types/aria-query": "^5.0.1", "aria-query": "5.3.0", "dom-accessibility-api": "^0.5.9", "lz-string": "^1.5.0", "picocolors": "1.1.1", "pretty-format": "^27.0.2" } }, "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg=="],++ "@testing-library/jest-dom": ["@testing-library/[email protected]", "", { "dependencies": { "@adobe/css-tools": "^4.4.0", "aria-query": "^5.0.0", "css.escape": "^1.5.1", "dom-accessibility-api": "^0.6.3", "picocolors": "^1.1.1", "redent": "^3.0.0" }, "peerDependencies": { "@testing-library/dom": ">=10 <11" } }, "sha512-HQwu0KaB2zyT0iLzBL+8CLyZDL3KlZlZJ+2iyc9uCUnlJVskJU/UlPuVCyIPhtukjPQdT2QNoR5nCP5FqTmmDQ=="],++ "@testing-library/react": ["@testing-library/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.12.5" }, "peerDependencies": { "@testing-library/dom": "^10.0.0", "@types/react": "^18.0.0 || ^19.0.0", "@types/react-dom": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-XU5/SytQM+ykqMnAnvB2umaJNIOsLF3PVv//1Ew4CTcpz0/BRyy/af40qqrt7SjKpDdT1saBMc42CUok5gaw+g=="],++ "@testing-library/user-event": ["@testing-library/[email protected]", "", { "peerDependencies": { "@testing-library/dom": ">=7.21.4" } }, "sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw=="],"@types/aria-query": ["@types/[email protected]", "", {}, "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw=="],@@ -539,14 +694,6 @@"@types/http-proxy": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-ED6LB+Z1AVylNTu7hdzuBqOgMnvG/ld6wGCG8wFnAzKX5uyW2K3WD52v0gnLCTK/VLpXtKckgWuyScYK6cSPaw=="],- "@types/istanbul-lib-coverage": ["@types/[email protected]", "", {}, "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w=="],-- "@types/istanbul-lib-report": ["@types/[email protected]", "", { "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA=="],-- "@types/istanbul-reports": ["@types/[email protected]", "", { "dependencies": { "@types/istanbul-lib-report": "*" } }, "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ=="],-- "@types/jest": ["@types/[email protected]", "", { "dependencies": { "expect": "^30.0.0", "pretty-format": "^30.0.0" } }, "sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA=="],-"@types/mdast": ["@types/[email protected]", "", { "dependencies": { "@types/unist": "^2" } }, "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ=="],"@types/ms": ["@types/[email protected]", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],@@ -555,30 +702,24 @@"@types/parse-json": ["@types/[email protected]", "", {}, "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw=="],+ "@types/prismjs": ["@types/[email protected]", "", {}, "sha512-vqlvI7qlMvcCBbVe0AKAb4f97//Hy0EBTaiW8AalRnG/xAN5zOiWWyrNqNXeq8+KAuvRewjCVY1+IPxk4RdNYw=="],+"@types/prop-types": ["@types/[email protected]", "", {}, "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw=="],"@types/react": ["@types/[email protected]", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-WPigyYuGhgZ/cTPRXB2EwUw+XvsRA3GqHlsP4qteqrnnjDrApbS7MxcGr/hke5iUoeB7E/gQtrs9I37zAJ0Vjw=="],- "@types/react-dom": ["@types/[email protected]", "", { "peerDependencies": { "@types/react": "^18.0.0" } }, "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ=="],-- "@types/stack-utils": ["@types/[email protected]", "", {}, "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw=="],-- "@types/testing-library__jest-dom": ["@types/[email protected]", "", { "dependencies": { "@types/jest": "*" } }, "sha512-FSYhIjFlfOpGSRyVoMBMuS3ws5ehFQODymf3vlI7U1K8c7PHwWwFY7VREfmsuzHSOnoKs/9/Y983ayOs7eRzqw=="],+ "@types/react-dom": ["@types/[email protected]", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ=="],"@types/trusted-types": ["@types/[email protected]", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="],"@types/unist": ["@types/[email protected]", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],- "@types/use-sync-external-store": ["@types/[email protected]", "", {}, "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg=="],+ "@types/use-sync-external-store": ["@types/[email protected]", "", {}, "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA=="],"@types/whatwg-mimetype": ["@types/[email protected]", "", {}, "sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA=="],"@types/ws": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],- "@types/yargs": ["@types/[email protected]", "", { "dependencies": { "@types/yargs-parser": "*" } }, "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg=="],-- "@types/yargs-parser": ["@types/[email protected]", "", {}, "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ=="],-"@vitejs/plugin-react": ["@vitejs/[email protected]", "", { "dependencies": { "@babel/core": "^7.28.0", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-beta.27", "@types/babel__core": "^7.20.5", "react-refresh": "^0.17.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA=="],"@vitest/expect": ["@vitest/[email protected]", "", { "dependencies": { "@types/chai": "^5.2.2", "@vitest/spy": "3.2.6", "@vitest/utils": "3.2.6", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" } }, "sha512-1+7q9BtaKzEmO+fmNT3kYvoNn5Y71XWAx2Q5HRim4tTVRQVRv4uJFAQ5FbK0OPUeNP/WmVCpxYxoJdvuHVjzBQ=="],@@ -605,9 +746,7 @@"ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],- "ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],-- "antd": ["[email protected]", "", { "dependencies": { "@ant-design/colors": "^7.2.1", "@ant-design/cssinjs": "^1.23.0", "@ant-design/cssinjs-utils": "^1.1.3", "@ant-design/fast-color": "^2.0.6", "@ant-design/icons": "^5.6.1", "@ant-design/react-slick": "~1.1.2", "@babel/runtime": "^7.26.0", "@rc-component/color-picker": "~2.0.1", "@rc-component/mutate-observer": "^1.1.0", "@rc-component/qrcode": "~1.1.0", "@rc-component/tour": "~1.15.1", "@rc-component/trigger": "^2.3.0", "classnames": "^2.5.1", "copy-to-clipboard": "^3.3.3", "dayjs": "^1.11.11", "rc-cascader": "~3.34.0", "rc-checkbox": "~3.5.0", "rc-collapse": "~3.9.0", "rc-dialog": "~9.6.0", "rc-drawer": "~7.3.0", "rc-dropdown": "~4.2.1", "rc-field-form": "~2.7.1", "rc-image": "~7.12.0", "rc-input": "~1.8.0", "rc-input-number": "~9.5.0", "rc-mentions": "~2.20.0", "rc-menu": "~9.16.1", "rc-motion": "^2.9.5", "rc-notification": "~5.6.4", "rc-pagination": "~5.1.0", "rc-picker": "~4.11.3", "rc-progress": "~4.0.0", "rc-rate": "~2.13.1", "rc-resize-observer": "^1.4.3", "rc-segmented": "~2.7.0", "rc-select": "~14.16.8", "rc-slider": "~11.1.9", "rc-steps": "~6.0.1", "rc-switch": "~4.1.0", "rc-table": "~7.54.0", "rc-tabs": "~15.7.0", "rc-textarea": "~1.10.2", "rc-tooltip": "~6.4.0", "rc-tree": "~5.13.1", "rc-tree-select": "~5.27.0", "rc-upload": "~4.11.0", "rc-util": "^5.44.4", "scroll-into-view-if-needed": "^3.1.0", "throttle-debounce": "^5.0.2" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-3DdbGCa9tWAJGcCJ6rzR8EJFsv2CtyEbkVabZE14pfgUHfCicWCj0/QzQVLDYg8CPfQk9BH7fHCoTXHTy7MP/A=="],+ "ansi-styles": ["[email protected]", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="],"aproba": ["[email protected]", "", {}, "sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew=="],@@ -615,15 +754,15 @@"argparse": ["[email protected]", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],- "aria-query": ["[email protected]", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="],+ "aria-hidden": ["[email protected]", "", { "dependencies": { "tslib": "^2.0.0" } }, "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA=="],- "array-buffer-byte-length": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.3", "is-array-buffer": "^3.0.5" } }, "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw=="],+ "aria-query": ["[email protected]", "", { "dependencies": { "dequal": "^2.0.3" } }, "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A=="],"assertion-error": ["[email protected]", "", {}, "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA=="],"asynckit": ["[email protected]", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="],- "available-typed-arrays": ["[email protected]", "", { "dependencies": { "possible-typed-array-names": "^1.0.0" } }, "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ=="],+ "autoprefixer": ["[email protected]", "", { "dependencies": { "browserslist": "^4.28.6", "caniuse-lite": "^1.0.30001806", "fraction.js": "^5.3.4", "picocolors": "^1.1.1", "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.1.0" }, "bin": { "autoprefixer": "bin/autoprefixer" } }, "sha512-MaU0U/za7N3r6brxD4YB/l4NSrFzLPlANv6wEuQVaIPlD3L4W9rFcQPbL/EilY9BHhHvhfcz3gInDLrEtWT4EA=="],"axios": ["[email protected]", "", { "dependencies": { "follow-redirects": "^1.16.0", "form-data": "^4.0.5", "proxy-from-env": "^2.1.0" } }, "sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w=="],@@ -641,23 +780,19 @@"braces": ["[email protected]", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],- "browserslist": ["[email protected]", "", { "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", "electron-to-chromium": "^1.5.263", "node-releases": "^2.0.27", "update-browserslist-db": "^1.2.0" }, "bin": { "browserslist": "cli.js" } }, "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA=="],+ "browserslist": ["[email protected]", "", { "dependencies": { "baseline-browser-mapping": "^2.10.44", "caniuse-lite": "^1.0.30001806", "electron-to-chromium": "^1.5.393", "node-releases": "^2.0.51", "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-JxV13hNrFxqjOc8alRbq9dK1MM79NEXYpma2B2J4wAtpWS5zIEIKqWPGCl7N4o7Uc7B7itylh7SuDujATRyyTw=="],"buffer-image-size": ["[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-nEh+kZOPY1w+gcCMobZ6ETUp9WfibndnosbpwB1iJk/8Gt5ZF2bhS6+B6bPYz424KtwsR6Rflc3tCz1/ghX2dQ=="],"cac": ["[email protected]", "", {}, "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ=="],- "call-bind": ["[email protected]", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", "get-intrinsic": "^1.2.4", "set-function-length": "^1.2.2" } }, "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww=="],-"call-bind-apply-helpers": ["[email protected]", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="],- "call-bound": ["[email protected]", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" } }, "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg=="],-"callsites": ["[email protected]", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="],"camelcase": ["[email protected]", "", {}, "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA=="],- "caniuse-lite": ["[email protected]", "", {}, "sha512-4C0lfJ0/YPjJQHagaE9x2Elb69CIqEPZeG0anQt9SIvIoOH4a4uaRl73IavyO+0qZh6MDLH//DrXThEYKHkmYA=="],+ "caniuse-lite": ["[email protected]", "", {}, "sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw=="],"canvas": ["[email protected]", "", { "dependencies": { "@mapbox/node-pre-gyp": "^1.0.0", "nan": "^2.17.0", "simple-get": "^3.0.3" } }, "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw=="],@@ -665,19 +800,19 @@"chai": ["[email protected]", "", { "dependencies": { "assertion-error": "^2.0.1", "check-error": "^2.1.1", "deep-eql": "^5.0.1", "loupe": "^3.1.0", "pathval": "^2.0.0" } }, "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw=="],- "chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg=="],-"character-entities": ["[email protected]", "", {}, "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw=="],- "character-entities-legacy": ["[email protected]", "", {}, "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA=="],+ "character-entities-legacy": ["[email protected]", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="],- "character-reference-invalid": ["[email protected]", "", {}, "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg=="],+ "character-reference-invalid": ["[email protected]", "", {}, "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw=="],"check-error": ["[email protected]", "", {}, "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA=="],"chownr": ["[email protected]", "", {}, "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="],- "ci-info": ["[email protected]", "", {}, "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA=="],+ "chroma-js": ["[email protected]", "", {}, "sha512-os/OippSlX1RlWWr+QDPcGUZs0uoqr32urfxESG9U93lhUfbnlyckte84Q8P1UQY/qth983AS1JONKmLS4T0nw=="],++ "class-variance-authority": ["[email protected]", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="],"classnames": ["[email protected]", "", {}, "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow=="],@@ -685,10 +820,6 @@"clsx": ["[email protected]", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="],- "color-convert": ["[email protected]", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],-- "color-name": ["[email protected]", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],-"color-support": ["[email protected]", "", { "bin": { "color-support": "bin.js" } }, "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="],"combined-stream": ["[email protected]", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="],@@ -699,16 +830,12 @@"compute-lcm": ["[email protected]", "", { "dependencies": { "compute-gcd": "^1.2.1", "validate.io-array": "^1.0.3", "validate.io-function": "^1.0.2", "validate.io-integer-array": "^1.0.0" } }, "sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ=="],- "compute-scroll-into-view": ["[email protected]", "", {}, "sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw=="],-"concat-map": ["[email protected]", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="],"console-control-strings": ["[email protected]", "", {}, "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="],"convert-source-map": ["[email protected]", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="],- "copy-to-clipboard": ["[email protected]", "", { "dependencies": { "toggle-selection": "^1.0.6" } }, "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA=="],-"core-js": ["[email protected]", "", {}, "sha512-zpEHTy1fjTMZCKLHUZoVeylt9XrzaIN2rbPXEt0k+q7JE5CkCZdo6bNq55bn24a69CH7ErAVLKijxJja4fw+UQ=="],"cosmiconfig": ["[email protected]", "", { "dependencies": { "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", "parse-json": "^5.2.0", "path-type": "^4.0.0" }, "peerDependencies": { "typescript": ">=4.9.5" }, "optionalPeers": ["typescript"] }, "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA=="],@@ -723,6 +850,8 @@"css.escape": ["[email protected]", "", {}, "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg=="],+ "cssesc": ["[email protected]", "", { "bin": { "cssesc": "bin/cssesc" } }, "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg=="],+"cssstyle": ["[email protected]", "", { "dependencies": { "@asamuzakjp/css-color": "^4.1.1", "@csstools/css-syntax-patches-for-csstree": "^1.0.21", "css-tree": "^3.1.0", "lru-cache": "^11.2.4" } }, "sha512-7D2EPVltRrsTkhpQmksIu+LxeWAIEk6wRDMJ1qljlv+CKHJM+cJLlfhWIzNA44eAsHXSNe3+vO6DW1yCYx8SuQ=="],"csstype": ["[email protected]", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="],@@ -769,12 +898,6 @@"deep-eql": ["[email protected]", "", {}, "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q=="],- "deep-equal": ["[email protected]", "", { "dependencies": { "array-buffer-byte-length": "^1.0.0", "call-bind": "^1.0.5", "es-get-iterator": "^1.1.3", "get-intrinsic": "^1.2.2", "is-arguments": "^1.1.1", "is-array-buffer": "^3.0.2", "is-date-object": "^1.0.5", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "isarray": "^2.0.5", "object-is": "^1.1.5", "object-keys": "^1.1.1", "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.5.1", "side-channel": "^1.0.4", "which-boxed-primitive": "^1.0.2", "which-collection": "^1.0.1", "which-typed-array": "^1.1.13" } }, "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA=="],-- "define-data-property": ["[email protected]", "", { "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "gopd": "^1.0.1" } }, "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A=="],-- "define-properties": ["[email protected]", "", { "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" } }, "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg=="],-"delayed-stream": ["[email protected]", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="],"delegates": ["[email protected]", "", {}, "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="],@@ -783,7 +906,9 @@"detect-libc": ["[email protected]", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],- "diff": ["[email protected]", "", {}, "sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A=="],+ "detect-node-es": ["[email protected]", "", {}, "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="],++ "diff": ["[email protected]", "", {}, "sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw=="],"dnd-core": ["[email protected]", "", { "dependencies": { "@react-dnd/asap": "^5.0.1", "@react-dnd/invariant": "^4.0.1", "redux": "^4.2.0" } }, "sha512-HK294sl7tbw6F6IeuK16YSBUoorvHpY8RHO+9yFfaJyCDVb6n7PRcezrOEOa2SBCqiYpemh5Jx20ZcjKdFAVng=="],@@ -791,15 +916,13 @@"dom-accessibility-api": ["[email protected]", "", {}, "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg=="],- "dom-align": ["[email protected]", "", {}, "sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw=="],-"dompurify": ["[email protected]", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-qkdCKzLNtrgPFP1Vo+98FRzJnBRGe4ffyCea9IwHB1fyxPOeNTHpLKYGd4Uk9xvNoH0ZoOjwZxNptyMwqrId1Q=="],"dot-case": ["[email protected]", "", { "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w=="],"dunder-proto": ["[email protected]", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],- "electron-to-chromium": ["[email protected]", "", {}, "sha512-FCPkJtpst28UmFzd903iU7PdeVTfY0KAeJy+Lk0GLZRwgwYHn/irRcaCbQQOmr5Vytc/7rcavsYLvTM8RiHYhQ=="],+ "electron-to-chromium": ["[email protected]", "", {}, "sha512-yHiw2Y3C3H9U6TMbOfoWK/BPreiOPXRfTWPBwQBoZG6/8TB6eOPnsy5oaRYuatR7Fw2SJ4kKforgufeo7fq0EQ=="],"emoji-picker-react": ["[email protected]", "", { "dependencies": { "flairup": "1.0.0" }, "peerDependencies": { "react": ">=16" } }, "sha512-d70sXdqaorBsvYwNAjRUkV8VQUQTafN/XTjucl6lH2O/B+aFUiIZy5hpRJ0FxuzgVnkeJaydnRCrYpuGd0zhgQ=="],@@ -809,6 +932,8 @@"engine.io-parser": ["[email protected]", "", {}, "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q=="],+ "enhanced-resolve": ["[email protected]", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.3" } }, "sha512-PwKooW9JUzh5chmYfHM3IQl5OkK2u2Nm011MgeZrss3JmFraUx/fqrf78kk8GUMYoibx/14MdwTl/1WKkG7TpQ=="],+"entities": ["[email protected]", "", {}, "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA=="],"error-ex": ["[email protected]", "", { "dependencies": { "is-arrayish": "^0.2.1" } }, "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ=="],@@ -817,8 +942,6 @@"es-errors": ["[email protected]", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="],- "es-get-iterator": ["[email protected]", "", { "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.3", "has-symbols": "^1.0.3", "is-arguments": "^1.1.1", "is-map": "^2.0.2", "is-set": "^2.0.2", "is-string": "^1.0.7", "isarray": "^2.0.5", "stop-iteration-iterator": "^1.0.0" } }, "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw=="],-"es-module-lexer": ["[email protected]", "", {}, "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA=="],"es-object-atoms": ["[email protected]", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA=="],@@ -837,8 +960,6 @@"eventemitter3": ["[email protected]", "", {}, "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw=="],- "expect": ["[email protected]", "", { "dependencies": { "@jest/expect-utils": "30.2.0", "@jest/get-type": "30.1.0", "jest-matcher-utils": "30.2.0", "jest-message-util": "30.2.0", "jest-mock": "30.2.0", "jest-util": "30.2.0" } }, "sha512-u/feCi0GPsI+988gU2FLcsHyAHTU0MX1Wg68NhAnN7z/+C5wqG+CY8J53N9ioe8RXgaoz0nBR/TYMf3AycUuPw=="],-"expect-type": ["[email protected]", "", {}, "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA=="],"extend": ["[email protected]", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="],@@ -863,12 +984,12 @@"follow-redirects": ["[email protected]", "", {}, "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw=="],- "for-each": ["[email protected]", "", { "dependencies": { "is-callable": "^1.2.7" } }, "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg=="],-"form-data": ["[email protected]", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.12" } }, "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w=="],"format": ["[email protected]", "", {}, "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww=="],+ "fraction.js": ["[email protected]", "", {}, "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ=="],+"framer-motion": ["[email protected]", "", { "dependencies": { "motion-dom": "^11.18.1", "motion-utils": "^11.18.1", "tslib": "^2.4.0" }, "peerDependencies": { "@emotion/is-prop-valid": "*", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@emotion/is-prop-valid", "react", "react-dom"] }, "sha512-5F5Och7wrvtLVElIpclDT0CBzMVg3dL22B64aZwHtsIY8RB4mXICLrkajK4G9R+ieSAGcgrLeae2SeUTg2pr6w=="],"fs-minipass": ["[email protected]", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg=="],@@ -879,14 +1000,14 @@"function-bind": ["[email protected]", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="],- "functions-have-names": ["[email protected]", "", {}, "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ=="],-"gauge": ["[email protected]", "", { "dependencies": { "aproba": "^1.0.3 || ^2.0.0", "color-support": "^1.1.2", "console-control-strings": "^1.0.0", "has-unicode": "^2.0.1", "object-assign": "^4.1.1", "signal-exit": "^3.0.0", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", "wide-align": "^1.1.2" } }, "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q=="],"gensync": ["[email protected]", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="],"get-intrinsic": ["[email protected]", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="],+ "get-nonce": ["[email protected]", "", {}, "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q=="],+"get-proto": ["[email protected]", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="],"glob": ["[email protected]", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],@@ -899,12 +1020,6 @@"happy-dom": ["[email protected]", "", { "dependencies": { "@types/node": ">=20.0.0", "@types/whatwg-mimetype": "^3.0.2", "@types/ws": "^8.18.1", "buffer-image-size": "^0.6.4", "entities": "^7.0.1", "whatwg-mimetype": "^3.0.0", "ws": "^8.21.0" } }, "sha512-5p9Sxis3eowDJKqx90QCsgbNA02XXqJ59NOHvD4V6cxp+rP4d/xOyVx7uY3hS8hiUbY1VeiFH8lbJ81AyuDVLQ=="],- "has-bigints": ["[email protected]", "", {}, "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg=="],-- "has-flag": ["[email protected]", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="],-- "has-property-descriptors": ["[email protected]", "", { "dependencies": { "es-define-property": "^1.0.0" } }, "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg=="],-"has-symbols": ["[email protected]", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="],"has-tostringtag": ["[email protected]", "", { "dependencies": { "has-symbols": "^1.0.3" } }, "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw=="],@@ -913,11 +1028,11 @@"hasown": ["[email protected]", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="],- "hast-util-parse-selector": ["[email protected]", "", {}, "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ=="],+ "hast-util-parse-selector": ["[email protected]", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A=="],"hast-util-whitespace": ["[email protected]", "", {}, "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng=="],- "hastscript": ["[email protected]", "", { "dependencies": { "@types/hast": "^2.0.0", "comma-separated-tokens": "^1.0.0", "hast-util-parse-selector": "^2.0.0", "property-information": "^5.0.0", "space-separated-tokens": "^1.0.0" } }, "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w=="],+ "hastscript": ["[email protected]", "", { "dependencies": { "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-parse-selector": "^4.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0" } }, "sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w=="],"highlight.js": ["[email protected]", "", {}, "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="],@@ -951,35 +1066,21 @@"inline-style-parser": ["[email protected]", "", {}, "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q=="],- "internal-slot": ["[email protected]", "", { "dependencies": { "es-errors": "^1.3.0", "hasown": "^2.0.2", "side-channel": "^1.1.0" } }, "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw=="],-"internmap": ["[email protected]", "", {}, "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg=="],"invariant": ["[email protected]", "", { "dependencies": { "loose-envify": "^1.0.0" } }, "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA=="],- "is-alphabetical": ["[email protected]", "", {}, "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg=="],-- "is-alphanumerical": ["[email protected]", "", { "dependencies": { "is-alphabetical": "^1.0.0", "is-decimal": "^1.0.0" } }, "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A=="],+ "is-alphabetical": ["[email protected]", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="],- "is-arguments": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.2", "has-tostringtag": "^1.0.2" } }, "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA=="],-- "is-array-buffer": ["[email protected]", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.3", "get-intrinsic": "^1.2.6" } }, "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A=="],+ "is-alphanumerical": ["[email protected]", "", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="],"is-arrayish": ["[email protected]", "", {}, "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="],- "is-bigint": ["[email protected]", "", { "dependencies": { "has-bigints": "^1.0.2" } }, "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ=="],-- "is-boolean-object": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" } }, "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A=="],-"is-buffer": ["[email protected]", "", {}, "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ=="],- "is-callable": ["[email protected]", "", {}, "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA=="],-"is-core-module": ["[email protected]", "", { "dependencies": { "hasown": "^2.0.2" } }, "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w=="],- "is-date-object": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.2", "has-tostringtag": "^1.0.2" } }, "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg=="],-- "is-decimal": ["[email protected]", "", {}, "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw=="],+ "is-decimal": ["[email protected]", "", {}, "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="],"is-extglob": ["[email protected]", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="],@@ -987,47 +1088,17 @@"is-glob": ["[email protected]", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="],- "is-hexadecimal": ["[email protected]", "", {}, "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw=="],-- "is-map": ["[email protected]", "", {}, "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw=="],+ "is-hexadecimal": ["[email protected]", "", {}, "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg=="],"is-number": ["[email protected]", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="],- "is-number-object": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" } }, "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw=="],-"is-plain-obj": ["[email protected]", "", {}, "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA=="],"is-potential-custom-element-name": ["[email protected]", "", {}, "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="],- "is-regex": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.2", "gopd": "^1.2.0", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g=="],-- "is-set": ["[email protected]", "", {}, "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg=="],-- "is-shared-array-buffer": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.3" } }, "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A=="],-- "is-string": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" } }, "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA=="],-- "is-symbol": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.2", "has-symbols": "^1.1.0", "safe-regex-test": "^1.1.0" } }, "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w=="],-- "is-weakmap": ["[email protected]", "", {}, "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w=="],-- "is-weakset": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.3", "get-intrinsic": "^1.2.6" } }, "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ=="],-- "isarray": ["[email protected]", "", {}, "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw=="],-"isexe": ["[email protected]", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],- "jest-diff": ["[email protected]", "", { "dependencies": { "@jest/diff-sequences": "30.0.1", "@jest/get-type": "30.1.0", "chalk": "^4.1.2", "pretty-format": "30.2.0" } }, "sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A=="],-- "jest-matcher-utils": ["[email protected]", "", { "dependencies": { "@jest/get-type": "30.1.0", "chalk": "^4.1.2", "jest-diff": "30.2.0", "pretty-format": "30.2.0" } }, "sha512-dQ94Nq4dbzmUWkQ0ANAWS9tBRfqCrn0bV9AMYdOi/MHW726xn7eQmMeRTpX2ViC00bpNaWXq+7o4lIQ3AX13Hg=="],-- "jest-message-util": ["[email protected]", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@jest/types": "30.2.0", "@types/stack-utils": "^2.0.3", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", "micromatch": "^4.0.8", "pretty-format": "30.2.0", "slash": "^3.0.0", "stack-utils": "^2.0.6" } }, "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw=="],-- "jest-mock": ["[email protected]", "", { "dependencies": { "@jest/types": "30.2.0", "@types/node": "*", "jest-util": "30.2.0" } }, "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw=="],-- "jest-regex-util": ["[email protected]", "", {}, "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA=="],-- "jest-util": ["[email protected]", "", { "dependencies": { "@jest/types": "30.2.0", "@types/node": "*", "chalk": "^4.1.2", "ci-info": "^4.2.0", "graceful-fs": "^4.2.11", "picomatch": "^4.0.2" } }, "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA=="],+ "jiti": ["[email protected]", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ=="],"js-cookie": ["[email protected]", "", {}, "sha512-yeJd4aNAdYZQjaon2bpD/Gb0B/omw7HQOsynXXcOiWVCacbBcPlgn8S/d1X6blFSaHao7ozqtW7NZW19xpCtIw=="],@@ -1051,14 +1122,36 @@"json-schema-traverse": ["[email protected]", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="],- "json2mq": ["[email protected]", "", { "dependencies": { "string-convert": "^0.2.0" } }, "sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA=="],-"json5": ["[email protected]", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="],"jsonpointer": ["[email protected]", "", {}, "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ=="],"kleur": ["[email protected]", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="],+ "lightningcss": ["[email protected]", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.32.0", "lightningcss-darwin-arm64": "1.32.0", "lightningcss-darwin-x64": "1.32.0", "lightningcss-freebsd-x64": "1.32.0", "lightningcss-linux-arm-gnueabihf": "1.32.0", "lightningcss-linux-arm64-gnu": "1.32.0", "lightningcss-linux-arm64-musl": "1.32.0", "lightningcss-linux-x64-gnu": "1.32.0", "lightningcss-linux-x64-musl": "1.32.0", "lightningcss-win32-arm64-msvc": "1.32.0", "lightningcss-win32-x64-msvc": "1.32.0" } }, "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ=="],++ "lightningcss-android-arm64": ["[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg=="],++ "lightningcss-darwin-arm64": ["[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ=="],++ "lightningcss-darwin-x64": ["[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w=="],++ "lightningcss-freebsd-x64": ["[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig=="],++ "lightningcss-linux-arm-gnueabihf": ["[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw=="],++ "lightningcss-linux-arm64-gnu": ["[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ=="],++ "lightningcss-linux-arm64-musl": ["[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg=="],++ "lightningcss-linux-x64-gnu": ["[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA=="],++ "lightningcss-linux-x64-musl": ["[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg=="],++ "lightningcss-win32-arm64-msvc": ["[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw=="],++ "lightningcss-win32-x64-msvc": ["[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q=="],+"lines-and-columns": ["[email protected]", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],"lodash": ["[email protected]", "", {}, "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q=="],@@ -1079,6 +1172,8 @@"lru-cache": ["[email protected]", "", {}, "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA=="],+ "lucide-react": ["[email protected]", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-rJicGl/3Fly/E0rOH1YmPZ6e49JCnKknh1ox1vpHnkfjujAkKA6sqUZvH3MTAaXXjgexyUwgNwTJzTtYuAFYJw=="],+"lz-string": ["[email protected]", "", { "bin": { "lz-string": "bin/bin.js" } }, "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ=="],"magic-string": ["[email protected]", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="],@@ -1215,15 +1310,17 @@"nan": ["[email protected]", "", {}, "sha512-0M90Ag7Xn5KMLLZ7zliPWP3rT90P6PN+IzVFS0VqmnPktBk3700xUVv8Ikm9EUaUE5SDWdp/BIxdENzVznpm1g=="],- "nanoid": ["[email protected]", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="],+ "nanoid": ["[email protected]", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q=="],"neo-async": ["[email protected]", "", {}, "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="],+ "next-themes": ["[email protected]", "", { "peerDependencies": { "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" } }, "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA=="],+"no-case": ["[email protected]", "", { "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" } }, "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg=="],"node-fetch": ["[email protected]", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],- "node-releases": ["[email protected]", "", {}, "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA=="],+ "node-releases": ["[email protected]", "", {}, "sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ=="],"nopt": ["[email protected]", "", { "dependencies": { "abbrev": "1" }, "bin": { "nopt": "bin/nopt.js" } }, "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ=="],@@ -1231,19 +1328,11 @@"object-assign": ["[email protected]", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="],- "object-inspect": ["[email protected]", "", {}, "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="],-- "object-is": ["[email protected]", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1" } }, "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q=="],-- "object-keys": ["[email protected]", "", {}, "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="],-- "object.assign": ["[email protected]", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0", "has-symbols": "^1.1.0", "object-keys": "^1.1.1" } }, "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw=="],-"once": ["[email protected]", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],"parent-module": ["[email protected]", "", { "dependencies": { "callsites": "^3.0.0" } }, "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g=="],- "parse-entities": ["[email protected]", "", { "dependencies": { "character-entities": "^1.0.0", "character-entities-legacy": "^1.0.0", "character-reference-invalid": "^1.0.0", "is-alphanumerical": "^1.0.0", "is-decimal": "^1.0.0", "is-hexadecimal": "^1.0.0" } }, "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ=="],+ "parse-entities": ["[email protected]", "", { "dependencies": { "@types/unist": "^2.0.0", "character-entities-legacy": "^3.0.0", "character-reference-invalid": "^2.0.0", "decode-named-character-reference": "^1.0.0", "is-alphanumerical": "^2.0.0", "is-decimal": "^2.0.0", "is-hexadecimal": "^2.0.0" } }, "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw=="],"parse-json": ["[email protected]", "", { "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" } }, "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg=="],@@ -1271,9 +1360,11 @@"picomatch": ["[email protected]", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="],- "possible-typed-array-names": ["[email protected]", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="],+ "postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.16", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg=="],- "postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg=="],+ "postcss-selector-parser": ["[email protected]", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w=="],++ "postcss-value-parser": ["[email protected]", "", {}, "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="],"posthog-js": ["[email protected]", "", { "dependencies": { "@opentelemetry/api": "^1.9.0", "@opentelemetry/api-logs": "^0.208.0", "@opentelemetry/exporter-logs-otlp-http": "^0.208.0", "@opentelemetry/resources": "^2.2.0", "@opentelemetry/sdk-logs": "^0.208.0", "@posthog/core": "1.15.0", "@posthog/types": "1.336.1", "core-js": "^3.38.1", "dompurify": "^3.3.1", "fflate": "^0.4.8", "preact": "^10.28.2", "query-selector-shadow-dom": "^1.0.1", "web-vitals": "^5.1.0" } }, "sha512-YphbVhXnImmZoALvf2oh129Cxu6IRQ9P9sWhuyY+dGe7jqt1jBp6Dg7QEK39stB4rzxmT/N3OLFcWZM7ZYQzCg=="],@@ -1297,89 +1388,21 @@"query-selector-shadow-dom": ["[email protected]", "", {}, "sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw=="],- "rc-align": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", "dom-align": "^1.7.0", "rc-util": "^5.26.0", "resize-observer-polyfill": "^1.5.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-wqJtVH60pka/nOX7/IspElA8gjPNQKIx/ZqJ6heATCkXpe1Zg4cPVrMD2vC96wjsFFL8WsmhPbx9tdMo1qqlIA=="],-- "rc-cascader": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.25.7", "classnames": "^2.3.1", "rc-select": "~14.16.2", "rc-tree": "~5.13.0", "rc-util": "^5.43.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-KpXypcvju9ptjW9FaN2NFcA2QH9E9LHKq169Y0eWtH4e/wHQ5Wh5qZakAgvb8EKZ736WZ3B0zLLOBsrsja5Dag=="],-- "rc-checkbox": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.3.2", "rc-util": "^5.25.2" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-aOAQc3E98HteIIsSqm6Xk2FPKIER6+5vyEFMZfo73TqM+VVAIqOkHoPjgKLqSNtVLWScoaM7vY2ZrGEheI79yg=="],-- "rc-collapse": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", "rc-motion": "^2.3.4", "rc-util": "^5.27.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-swDdz4QZ4dFTo4RAUMLL50qP0EY62N2kvmk2We5xYdRwcRn8WcYtuetCJpwpaCbUfUt5+huLpVxhvmnK+PHrkA=="],-- "rc-dialog": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/portal": "^1.0.0-8", "classnames": "^2.2.6", "rc-motion": "^2.3.0", "rc-util": "^5.21.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-ApoVi9Z8PaCQg6FsUzS8yvBEQy0ZL2PkuvAgrmohPkN3okps5WZ5WQWPc1RNuiOKaAYv8B97ACdsFU5LizzCqg=="],-- "rc-drawer": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.23.9", "@rc-component/portal": "^1.1.1", "classnames": "^2.2.6", "rc-motion": "^2.6.1", "rc-util": "^5.38.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-DX6CIgiBWNpJIMGFO8BAISFkxiuKitoizooj4BDyee8/SnBn0zwO2FHrNDpqqepj0E/TFTDpmEBCyFuTgC7MOg=="],-- "rc-dropdown": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.18.3", "@rc-component/trigger": "^2.0.0", "classnames": "^2.2.6", "rc-util": "^5.44.1" }, "peerDependencies": { "react": ">=16.11.0", "react-dom": ">=16.11.0" } }, "sha512-YDAlXsPv3I1n42dv1JpdM7wJ+gSUBfeyPK59ZpBD9jQhK9jVuxpjj3NmWQHOBceA1zEPVX84T2wbdb2SD0UjmA=="],-- "rc-field-form": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.18.0", "@rc-component/async-validator": "^5.0.3", "rc-util": "^5.32.2" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-vKeSifSJ6HoLaAB+B8aq/Qgm8a3dyxROzCtKNCsBQgiverpc4kWDQihoUwzUj+zNWJOykwSY4dNX3QrGwtVb9A=="],-- "rc-image": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.11.2", "@rc-component/portal": "^1.0.2", "classnames": "^2.2.6", "rc-dialog": "~9.6.0", "rc-motion": "^2.6.2", "rc-util": "^5.34.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-cZ3HTyyckPnNnUb9/DRqduqzLfrQRyi+CdHjdqgsyDpI3Ln5UX1kXnAhPBSJj9pVRzwRFgqkN7p9b6HBDjmu/Q=="],-- "rc-input": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", "rc-util": "^5.18.1" }, "peerDependencies": { "react": ">=16.0.0", "react-dom": ">=16.0.0" } }, "sha512-KXvaTbX+7ha8a/k+eg6SYRVERK0NddX8QX7a7AnRvUa/rEH0CNMlpcBzBkhI0wp2C8C4HlMoYl8TImSN+fuHKA=="],-- "rc-input-number": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/mini-decimal": "^1.0.1", "classnames": "^2.2.5", "rc-input": "~1.8.0", "rc-util": "^5.40.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-bKaEvB5tHebUURAEXw35LDcnRZLq3x1k7GxfAqBMzmpHkDGzjAtnUL8y4y5N15rIFIg5IJgwr211jInl3cipag=="],-- "rc-mentions": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.22.5", "@rc-component/trigger": "^2.0.0", "classnames": "^2.2.6", "rc-input": "~1.8.0", "rc-menu": "~9.16.0", "rc-textarea": "~1.10.0", "rc-util": "^5.34.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-w8HCMZEh3f0nR8ZEd466ATqmXFCMGMN5UFCzEUL0bM/nGw/wOS2GgRzKBcm19K++jDyuWCOJOdgcKGXU3fXfbQ=="],-- "rc-menu": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/trigger": "^2.0.0", "classnames": "2.x", "rc-motion": "^2.4.3", "rc-overflow": "^1.3.1", "rc-util": "^5.27.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-ghHx6/6Dvp+fw8CJhDUHFHDJ84hJE3BXNCzSgLdmNiFErWSOaZNsihDAsKq9ByTALo/xkNIwtDFGIl6r+RPXBg=="],-- "rc-motion": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", "rc-util": "^5.44.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-w+XTUrfh7ArbYEd2582uDrEhmBHwK1ZENJiSJVb7uRxdE7qJSYjbO2eksRXmndqyKqKoYPc9ClpPh5242mV1vA=="],-- "rc-notification": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", "rc-motion": "^2.9.0", "rc-util": "^5.20.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-KcS4O6B4qzM3KH7lkwOB7ooLPZ4b6J+VMmQgT51VZCeEcmghdeR4IrMcFq0LG+RPdnbe/ArT086tGM8Snimgiw=="],-- "rc-overflow": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", "rc-resize-observer": "^1.0.0", "rc-util": "^5.37.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-Lm/v9h0LymeUYJf0x39OveU52InkdRXqnn2aYXfWmo8WdOonIKB2kfau+GF0fWq6jPgtdO9yMqveGcK6aIhJmg=="],-- "rc-pagination": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.3.2", "rc-util": "^5.38.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-8416Yip/+eclTFdHXLKTxZvn70duYVGTvUUWbckCCZoIl3jagqke3GLsFrMs0bsQBikiYpZLD9206Ej4SOdOXQ=="],+ "radix-ui": ["[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.7", "@radix-ui/react-accessible-icon": "1.1.15", "@radix-ui/react-accordion": "1.2.20", "@radix-ui/react-alert-dialog": "1.1.23", "@radix-ui/react-arrow": "1.1.15", "@radix-ui/react-aspect-ratio": "1.1.15", "@radix-ui/react-avatar": "1.2.6", "@radix-ui/react-checkbox": "1.3.11", "@radix-ui/react-collapsible": "1.1.20", "@radix-ui/react-collection": "1.1.15", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.2.2", "@radix-ui/react-context-menu": "2.3.7", "@radix-ui/react-dialog": "1.1.23", "@radix-ui/react-direction": "1.1.4", "@radix-ui/react-dismissable-layer": "1.1.19", "@radix-ui/react-dropdown-menu": "2.1.24", "@radix-ui/react-focus-guards": "1.1.6", "@radix-ui/react-focus-scope": "1.1.16", "@radix-ui/react-form": "0.1.16", "@radix-ui/react-hover-card": "1.1.23", "@radix-ui/react-label": "2.1.15", "@radix-ui/react-menu": "2.1.24", "@radix-ui/react-menubar": "1.1.24", "@radix-ui/react-navigation-menu": "1.2.22", "@radix-ui/react-one-time-password-field": "0.1.16", "@radix-ui/react-password-toggle-field": "0.1.11", "@radix-ui/react-popover": "1.1.23", "@radix-ui/react-popper": "1.3.7", "@radix-ui/react-portal": "1.1.17", "@radix-ui/react-presence": "1.1.10", "@radix-ui/react-primitive": "2.1.10", "@radix-ui/react-progress": "1.1.16", "@radix-ui/react-radio-group": "1.4.7", "@radix-ui/react-roving-focus": "1.1.19", "@radix-ui/react-scroll-area": "1.2.18", "@radix-ui/react-select": "2.3.7", "@radix-ui/react-separator": "1.1.15", "@radix-ui/react-slider": "1.4.7", "@radix-ui/react-slot": "1.3.3", "@radix-ui/react-switch": "1.3.7", "@radix-ui/react-tabs": "1.1.21", "@radix-ui/react-toast": "1.2.23", "@radix-ui/react-toggle": "1.1.18", "@radix-ui/react-toggle-group": "1.1.19", "@radix-ui/react-toolbar": "1.1.19", "@radix-ui/react-tooltip": "1.2.16", "@radix-ui/react-use-callback-ref": "1.1.4", "@radix-ui/react-use-controllable-state": "1.2.6", "@radix-ui/react-use-effect-event": "0.0.5", "@radix-ui/react-use-escape-keydown": "1.1.5", "@radix-ui/react-use-is-hydrated": "0.1.3", "@radix-ui/react-use-layout-effect": "1.1.4", "@radix-ui/react-use-size": "1.1.4", "@radix-ui/react-visually-hidden": "1.2.11" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-QBdhh1arIEUvPC0dQ5+nwWAxt7+N+oP/9jPwjJkGFoSk/sqxg32gJtSXGtFh8frAIcS6oC9cx2Q+7KYCQLOAeA=="],- "rc-picker": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.24.7", "@rc-component/trigger": "^2.0.0", "classnames": "^2.2.1", "rc-overflow": "^1.3.2", "rc-resize-observer": "^1.4.0", "rc-util": "^5.43.0" }, "peerDependencies": { "date-fns": ">= 2.x", "dayjs": ">= 1.x", "luxon": ">= 3.x", "moment": ">= 2.x", "react": ">=16.9.0", "react-dom": ">=16.9.0" }, "optionalPeers": ["date-fns", "dayjs", "luxon", "moment"] }, "sha512-MJ5teb7FlNE0NFHTncxXQ62Y5lytq6sh5nUw0iH8OkHL/TjARSEvSHpr940pWgjGANpjCwyMdvsEV55l5tYNSg=="],-- "rc-progress": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.6", "rc-util": "^5.16.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-oofVMMafOCokIUIBnZLNcOZFsABaUw8PPrf1/y0ZBvKZNpOiu5h4AO9vv11Sw0p4Hb3D0yGWuEattcQGtNJ/aw=="],-- "rc-rate": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.5", "rc-util": "^5.0.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-QUhQ9ivQ8Gy7mtMZPAjLbxBt5y9GRp65VcUyGUMF3N3fhiftivPHdpuDIaWIMOTEprAjZPC08bls1dQB+I1F2Q=="],-- "rc-resize-observer": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.20.7", "classnames": "^2.2.1", "rc-util": "^5.44.1", "resize-observer-polyfill": "^1.5.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-YZLjUbyIWox8E9i9C3Tm7ia+W7euPItNWSPX5sCcQTYbnwDb5uNpnLHQCG1f22oZWUhLw4Mv2tFmeWe68CDQRQ=="],-- "rc-segmented": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", "rc-motion": "^2.4.4", "rc-util": "^5.17.0" }, "peerDependencies": { "react": ">=16.0.0", "react-dom": ">=16.0.0" } }, "sha512-izj1Nw/Dw2Vb7EVr+D/E9lUTkBe+kKC+SAFSU9zqr7WV2W5Ktaa9Gc7cB2jTqgk8GROJayltaec+DBlYKc6d+g=="],-- "rc-select": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/trigger": "^2.1.1", "classnames": "2.x", "rc-motion": "^2.0.1", "rc-overflow": "^1.3.1", "rc-util": "^5.16.1", "rc-virtual-list": "^3.5.2" }, "peerDependencies": { "react": "*", "react-dom": "*" } }, "sha512-NOV5BZa1wZrsdkKaiK7LHRuo5ZjZYMDxPP6/1+09+FB4KoNi8jcG1ZqLE3AVCxEsYMBe65OBx71wFoHRTP3LRg=="],-- "rc-slider": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.5", "rc-util": "^5.36.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-h8IknhzSh3FEM9u8ivkskh+Ef4Yo4JRIY2nj7MrH6GQmrwV6mcpJf5/4KgH5JaVI1H3E52yCdpOlVyGZIeph5A=="],-- "rc-steps": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.16.7", "classnames": "^2.2.3", "rc-util": "^5.16.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-lKHL+Sny0SeHkQKKDJlAjV5oZ8DwCdS2hFhAkIjuQt1/pB81M0cA0ErVFdHq9+jmPmFw1vJB2F5NBzFXLJxV+g=="],-- "rc-switch": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.21.0", "classnames": "^2.2.1", "rc-util": "^5.30.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-TI8ufP2Az9oEbvyCeVE4+90PDSljGyuwix3fV58p7HV2o4wBnVToEyomJRVyTaZeqNPAp+vqeo4Wnj5u0ZZQBg=="],-- "rc-table": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/context": "^1.4.0", "classnames": "^2.2.5", "rc-resize-observer": "^1.1.0", "rc-util": "^5.44.3", "rc-virtual-list": "^3.14.2" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-/wDTkki6wBTjwylwAGjpLKYklKo9YgjZwAU77+7ME5mBoS32Q4nAwoqhA2lSge6fobLW3Tap6uc5xfwaL2p0Sw=="],-- "rc-tabs": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.11.2", "classnames": "2.x", "rc-dropdown": "~4.2.0", "rc-menu": "~9.16.0", "rc-motion": "^2.6.2", "rc-resize-observer": "^1.0.0", "rc-util": "^5.34.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-ZepiE+6fmozYdWf/9gVp7k56PKHB1YYoDsKeQA1CBlJ/POIhjkcYiv0AGP0w2Jhzftd3AVvZP/K+V+Lpi2ankA=="],-- "rc-textarea": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.1", "rc-input": "~1.8.0", "rc-resize-observer": "^1.0.0", "rc-util": "^5.27.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-HfaeXiaSlpiSp0I/pvWpecFEHpVysZ9tpDLNkxQbMvMz6gsr7aVZ7FpWP9kt4t7DB+jJXesYS0us1uPZnlRnwQ=="],-- "rc-tooltip": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.11.2", "@rc-component/trigger": "^2.0.0", "classnames": "^2.3.1", "rc-util": "^5.44.3" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-kqyivim5cp8I5RkHmpsp1Nn/Wk+1oeloMv9c7LXNgDxUpGm+RbXJGL+OPvDlcRnx9DBeOe4wyOIl4OKUERyH1g=="],-- "rc-tree": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", "rc-motion": "^2.0.1", "rc-util": "^5.16.1", "rc-virtual-list": "^3.5.1" }, "peerDependencies": { "react": "*", "react-dom": "*" } }, "sha512-FNhIefhftobCdUJshO7M8uZTA9F4OPGVXqGfZkkD/5soDeOhwO06T/aKTrg0WD8gRg/pyfq+ql3aMymLHCTC4A=="],-- "rc-tree-select": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.25.7", "classnames": "2.x", "rc-select": "~14.16.2", "rc-tree": "~5.13.0", "rc-util": "^5.43.0" }, "peerDependencies": { "react": "*", "react-dom": "*" } }, "sha512-2qTBTzwIT7LRI1o7zLyrCzmo5tQanmyGbSaGTIf7sYimCklAToVVfpMC6OAldSKolcnjorBYPNSKQqJmN3TCww=="],-- "rc-trigger": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.18.3", "classnames": "^2.2.6", "rc-align": "^4.0.0", "rc-motion": "^2.0.0", "rc-util": "^5.19.2" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-mQv+vas0TwKcjAO2izNPkqR4j86OemLRmvL2nOzdP9OWNWA1ivoTt5hzFqYNW9zACwmTezRiN8bttrC7cZzYSw=="],-- "rc-upload": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.18.3", "classnames": "^2.2.5", "rc-util": "^5.2.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-ZUyT//2JAehfHzjWowqROcwYJKnZkIUGWaTE/VogVrepSl7AFNbQf4+zGfX4zl9Vrj/Jm8scLO0R6UlPDKK4wA=="],-- "rc-util": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.18.3", "react-is": "^18.2.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-resueRJzmHG9Q6rI/DfK6Kdv9/Lfls05vzMs1Sk3M2P+3cJa+MakaZyWY8IPfehVuhPJFKrIY1IK4GqbiaiY5w=="],-- "rc-virtual-list": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.20.0", "classnames": "^2.2.6", "rc-resize-observer": "^1.0.0", "rc-util": "^5.36.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-Ys6NcjwGkuwkeaWBDqfI3xWuZ7rDiQXlH1o2zLfFzATfEgXcqpk8CkgMfbJD81McqjcJVez25a3kPxCR807evA=="],-- "react": ["[email protected]", "", { "dependencies": { "loose-envify": "^1.1.0" } }, "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ=="],+ "react": ["[email protected]", "", {}, "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw=="],"react-async-script": ["[email protected]", "", { "dependencies": { "hoist-non-react-statics": "^3.3.0", "prop-types": "^15.5.0" }, "peerDependencies": { "react": ">=16.4.1" } }, "sha512-bCpkbm9JiAuMGhkqoAiC0lLkb40DJ0HOEJIku+9JDjxX3Rcs+ztEOG13wbrOskt3n2DTrjshhaQ/iay+SnGg5Q=="],- "react-diff-viewer-continued": ["[email protected]", "", { "dependencies": { "@emotion/css": "^11.11.2", "classnames": "^2.3.2", "diff": "^5.1.0", "memoize-one": "^6.0.0", "prop-types": "^15.8.1" }, "peerDependencies": { "react": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", "react-dom": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" } }, "sha512-kMZmUyb3Pv5L9vUtCfIGYsdOHs8mUojblGy1U1Sm0D7FhAOEsH9QhnngEIRo5hXWIPNGupNRJls1TJ6Eqx84eg=="],+ "react-day-picker": ["[email protected]", "", { "dependencies": { "@date-fns/tz": "^1.4.1", "date-fns": "^4.1.0" }, "peerDependencies": { "@types/react": ">=16.8.0", "react": ">=16.8.0" }, "optionalPeers": ["@types/react"] }, "sha512-eNh6BlwcYInWaJtRv18mXQ06Ys/H6rdTZAnTaSdOYJuTpwP1JMCHNd1FDRadA+gbeinq+psdULN5Xnowy9mV8w=="],++ "react-diff-viewer-continued": ["[email protected]", "", { "dependencies": { "@emotion/css": "^11.13.5", "@emotion/react": "^11.14.0", "classnames": "^2.5.1", "diff": "^9.0.0", "js-yaml": "^4.2.0", "memoize-one": "^6.0.0", "refractor": "^5.0.0" }, "peerDependencies": { "react": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-ezDte5YNLLLfTuaGaF2mV/8i4FRX7GdxnuA5zt7x1QjwVQHtBY0+NYzHJBwEPboOQNSx9sDU9apH2GfKoDYsyQ=="],"react-dnd": ["[email protected]", "", { "dependencies": { "@react-dnd/invariant": "^4.0.1", "@react-dnd/shallowequal": "^4.0.1", "dnd-core": "^16.0.1", "fast-deep-equal": "^3.1.3", "hoist-non-react-statics": "^3.3.2" }, "peerDependencies": { "@types/hoist-non-react-statics": ">= 3.3.1", "@types/node": ">= 12", "@types/react": ">= 16", "react": ">= 16.14" }, "optionalPeers": ["@types/hoist-non-react-statics", "@types/node", "@types/react"] }, "sha512-QeoM/i73HHu2XF9aKksIUuamHPDvRglEwdHL4jsp784BgUuWcg6mzfxT0QDdQz8Wj0qyRKx2eMg8iZtWvU4E2Q=="],"react-dnd-html5-backend": ["[email protected]", "", { "dependencies": { "dnd-core": "^16.0.1" } }, "sha512-Wu3dw5aDJmOGw8WjH1I1/yTH+vlXEL4vmjk5p+MHxP8HuHJS1lAGeIdG/hze1AvNeXWo/JgULV87LyQOr+r5jw=="],- "react-dom": ["[email protected]", "", { "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" }, "peerDependencies": { "react": "^18.3.1" } }, "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw=="],+ "react-dom": ["[email protected]", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.8" } }, "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ=="],"react-fast-compare": ["[email protected]", "", {}, "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ=="],@@ -1387,25 +1410,33 @@"react-gtm-module": ["[email protected]", "", {}, "sha512-8gyj4TTxeP7eEyc2QKawEuQoAZdjKvMY4pgWfycGmqGByhs17fR+zEBs0JUDq4US/l+vbTl+6zvUIx27iDo/Vw=="],- "react-helmet-async": ["[email protected]", "", { "dependencies": { "invariant": "^2.2.4", "react-fast-compare": "^3.2.2", "shallowequal": "^1.1.0" }, "peerDependencies": { "react": "^16.6.0 || ^17.0.0 || ^18.0.0" } }, "sha512-rYUYHeus+i27MvFE+Jaa4WsyBKGkL6qVgbJvSBoX8mbsWoABJXdEO0bZyi0F6i+4f0NuIb8AvqPMj3iXFHkMwg=="],+ "react-helmet-async": ["[email protected]", "", { "dependencies": { "invariant": "^2.2.4", "react-fast-compare": "^3.2.2", "shallowequal": "^1.1.0" }, "peerDependencies": { "react": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-nA3IEZfXiclgrz4KLxAhqJqIfFDuvzQwlKwpdmzZIuC1KNSghDEIXmyU0TKtbM+NafnkICcwx8CECFrZ/sL/1w=="],- "react-is": ["[email protected]", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="],+ "react-hook-form": ["[email protected]", "", { "peerDependencies": { "react": "^16.8.0 || ^17 || ^18 || ^19" } }, "sha512-AXt8cMCmx5a7u4uvpb2uRFVrWQhllI4pV+LSykxIac/hjt44TnQkmX9BKuQi2i+LDC62esmiLpilkav+kjVf/A=="],- "react-js-cron": ["[email protected]", "", { "peerDependencies": { "antd": ">=5.8.0", "react": ">=17.0.0", "react-dom": ">=17.0.0" } }, "sha512-+Mxm3cS7qmIoAIz7NVY27jvsJKNZ4tx+H/nNtMUJW4DcKR7jUIL1GP0jOD79K5j86Dq8jvShKJMh30+c8bmVtA=="],+ "react-is": ["[email protected]", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="],"react-markdown": ["[email protected]", "", { "dependencies": { "@types/hast": "^2.0.0", "@types/prop-types": "^15.0.0", "@types/unist": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^2.0.0", "prop-types": "^15.0.0", "property-information": "^6.0.0", "react-is": "^18.0.0", "remark-parse": "^10.0.0", "remark-rehype": "^10.0.0", "space-separated-tokens": "^2.0.0", "style-to-object": "^0.4.0", "unified": "^10.0.0", "unist-util-visit": "^4.0.0", "vfile": "^5.0.0" }, "peerDependencies": { "@types/react": ">=16", "react": ">=16" } }, "sha512-bvWbzG4MtOU62XqBx3Xx+zB2raaFFsq4mYiAzfjXJMEz2sixgeAfraA3tvzULF02ZdOMUOKTBFFaZJDDrq+BJQ=="],+ "react-number-format": ["[email protected]", "", { "peerDependencies": { "react": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-y8O2yHHj3w0aE9XO8d2BCcUOOdQTRSVq+WIuMlLVucAm5XNjJAy+BoOJiuQMldVYVOKTMyvVNfnbl2Oqp+YxGw=="],+"react-product-fruits": ["[email protected]", "", { "dependencies": { "product-fruits": "^1.0.25" }, "peerDependencies": { "react": ">= 17.0.0" } }, "sha512-jpIbVEbe+JpgxZ8vDRwC4ggjb9OIWKHB+pt3eX+oa1jiLkxdKzQKdmHcECaqF9XZtIxX3t+bzGDvvnaw3l7tYQ=="],- "react-redux": ["[email protected]", "", { "dependencies": { "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.4.0" }, "peerDependencies": { "@types/react": "^18.2.25 || ^19", "react": "^18.0 || ^19", "redux": "^5.0.0" }, "optionalPeers": ["@types/react", "redux"] }, "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g=="],+ "react-redux": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.12.1", "@types/hoist-non-react-statics": "^3.3.1", "@types/use-sync-external-store": "^0.0.3", "hoist-non-react-statics": "^3.3.2", "react-is": "^18.0.0", "use-sync-external-store": "^1.0.0" }, "peerDependencies": { "@types/react": "^16.8 || ^17.0 || ^18.0", "@types/react-dom": "^16.8 || ^17.0 || ^18.0", "react": "^16.8 || ^17.0 || ^18.0", "react-dom": "^16.8 || ^17.0 || ^18.0", "react-native": ">=0.59", "redux": "^4 || ^5.0.0-beta.0" }, "optionalPeers": ["@types/react", "@types/react-dom", "react-dom", "react-native", "redux"] }, "sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw=="],"react-refresh": ["[email protected]", "", {}, "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ=="],+ "react-remove-scroll": ["[email protected]", "", { "dependencies": { "react-remove-scroll-bar": "^2.3.7", "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", "use-callback-ref": "^1.3.3", "use-sidecar": "^1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q=="],++ "react-remove-scroll-bar": ["[email protected]", "", { "dependencies": { "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q=="],+"react-router": ["[email protected]", "", { "dependencies": { "@remix-run/router": "1.23.2" }, "peerDependencies": { "react": ">=16.8" } }, "sha512-XRnlbKMTmktBkjCLE8/XcZFlnHvr2Ltdr1eJX4idL55/9BbORzyZEaIkBFDhFGCEWBBItsVrDxwx3gnisMitdw=="],"react-router-dom": ["[email protected]", "", { "dependencies": { "@remix-run/router": "1.23.2", "react-router": "6.30.3" }, "peerDependencies": { "react": ">=16.8", "react-dom": ">=16.8" } }, "sha512-pxPcv1AczD4vso7G4Z3TKcvlxK7g7TNt3/FNGMhfqyntocvYKj+GCatfigGDjbLozC4baguJ0ReCigoDJXb0ag=="],- "react-social-login-buttons": ["[email protected]", "", { "peerDependencies": { "react": "^15.0.0 || ^16.0.0 || ^17.x || ^18.x" } }, "sha512-KtucVWvdnIZ0icG99WJ3usQUJYmlKsOIBYGyngcuNSVyyYdZtif4KHY80qnCg+teDlgYr54ToQtg3x26ZqaS2w=="],+ "react-social-login-buttons": ["[email protected]", "", { "peerDependencies": { "react": "^16.0.0 || ^17.x || ^18.x || ^19.x" } }, "sha512-GEFP+QmW9y9wSfEVrlvKDtfh1mMI4Nj1XO+Di727ND22h1+g1tYbQSydz26nNq6IKnHqe7bJiJ10sqBKm39DQg=="],++ "react-style-singleton": ["[email protected]", "", { "dependencies": { "get-nonce": "^1.0.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ=="],"react-syntax-highlighter": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.3.1", "highlight.js": "^10.4.1", "highlightjs-vue": "^1.0.0", "lowlight": "^1.17.0", "prismjs": "^1.30.0", "refractor": "^3.6.0" }, "peerDependencies": { "react": ">= 0.14.0" } }, "sha512-DgXrc+AZF47+HvAPEmn7Ua/1p10jNoVZVI/LoPiYdtY+OM+/nG5yefLHKJwdKqY1adMuHFbeyBaG9j64ML7vTw=="],@@ -1419,9 +1450,7 @@"redux-thunk": ["[email protected]", "", { "peerDependencies": { "redux": "^5.0.0" } }, "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw=="],- "refractor": ["[email protected]", "", { "dependencies": { "hastscript": "^6.0.0", "parse-entities": "^2.0.0", "prismjs": "~1.27.0" } }, "sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA=="],-- "regexp.prototype.flags": ["[email protected]", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", "get-proto": "^1.0.1", "gopd": "^1.2.0", "set-function-name": "^2.0.2" } }, "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA=="],+ "refractor": ["[email protected]", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/prismjs": "^1.0.0", "hastscript": "^9.0.0", "parse-entities": "^4.0.0" } }, "sha512-QXOrHQF5jOpjjLfiNk5GFnWhRXvxjUVnlFxkeDmewR5sXkr3iM46Zo+CnRR8B+MDVqkULW4EcLVcRBNOPXHosw=="],"remark-gfm": ["[email protected]", "", { "dependencies": { "@types/mdast": "^3.0.0", "mdast-util-gfm": "^2.0.0", "micromark-extension-gfm": "^2.0.0", "unified": "^10.0.0" } }, "sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig=="],@@ -1435,8 +1464,6 @@"reselect": ["[email protected]", "", {}, "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w=="],- "resize-observer-polyfill": ["[email protected]", "", {}, "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="],-"resolve": ["[email protected]", "", { "dependencies": { "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ=="],"resolve-from": ["[email protected]", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="],@@ -1449,36 +1476,20 @@"safe-buffer": ["[email protected]", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],- "safe-regex-test": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-regex": "^1.2.1" } }, "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw=="],-"saxes": ["[email protected]", "", { "dependencies": { "xmlchars": "^2.2.0" } }, "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA=="],- "scheduler": ["[email protected]", "", { "dependencies": { "loose-envify": "^1.1.0" } }, "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ=="],-- "scroll-into-view-if-needed": ["[email protected]", "", { "dependencies": { "compute-scroll-into-view": "^3.0.2" } }, "sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ=="],+ "scheduler": ["[email protected]", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="],"semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],"set-blocking": ["[email protected]", "", {}, "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="],- "set-function-length": ["[email protected]", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2" } }, "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg=="],-- "set-function-name": ["[email protected]", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", "has-property-descriptors": "^1.0.2" } }, "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ=="],-"shallowequal": ["[email protected]", "", {}, "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="],"shebang-command": ["[email protected]", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],"shebang-regex": ["[email protected]", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="],- "side-channel": ["[email protected]", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3", "side-channel-list": "^1.0.0", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" } }, "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw=="],-- "side-channel-list": ["[email protected]", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3" } }, "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA=="],-- "side-channel-map": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3" } }, "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA=="],-- "side-channel-weakmap": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="],-"siginfo": ["[email protected]", "", {}, "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g=="],"signal-exit": ["[email protected]", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],@@ -1487,14 +1498,14 @@"simple-get": ["[email protected]", "", { "dependencies": { "decompress-response": "^4.2.0", "once": "^1.3.1", "simple-concat": "^1.0.0" } }, "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA=="],- "slash": ["[email protected]", "", {}, "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="],-"snake-case": ["[email protected]", "", { "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg=="],"socket.io-client": ["[email protected]", "", { "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.4.1", "engine.io-client": "~6.6.1", "socket.io-parser": "~4.2.4" } }, "sha512-uP0bpjWrjQmUt5DTHq9RuoCBdFJF10cdX9X+a368j/Ft0wmaVgxlrjvK3kjvgCODOMMOz9lcaRzxmso0bTWZ/g=="],"socket.io-parser": ["[email protected]", "", { "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.4.1" } }, "sha512-asJqbVBDsBCJx0pTqw3WfesSY0iRX+2xzWEWzrpcH7L6fLzrhyF8WPI8UaeM4YCuDfpwA/cgsdugMsmtz8EJeg=="],+ "sonner": ["[email protected]", "", { "peerDependencies": { "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" } }, "sha512-W6ZN4p58k8aDKA4XPcx2hpIQXBRAgyiWVkYhT7CvK6D3iAu7xjvVyhQHg2/iaKJZ1XVJ4r7XuwGL+WGEK37i9w=="],+"source-map": ["[email protected]", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],"source-map-js": ["[email protected]", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],@@ -1505,18 +1516,12 @@"sqlstring": ["[email protected]", "", {}, "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg=="],- "stack-utils": ["[email protected]", "", { "dependencies": { "escape-string-regexp": "^2.0.0" } }, "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ=="],-"stackback": ["[email protected]", "", {}, "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="],"state-local": ["[email protected]", "", {}, "sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w=="],"std-env": ["[email protected]", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="],- "stop-iteration-iterator": ["[email protected]", "", { "dependencies": { "es-errors": "^1.3.0", "internal-slot": "^1.1.0" } }, "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ=="],-- "string-convert": ["[email protected]", "", {}, "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A=="],-"string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],"string_decoder": ["[email protected]", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="],@@ -1529,9 +1534,7 @@"style-to-object": ["[email protected]", "", { "dependencies": { "inline-style-parser": "0.1.1" } }, "sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg=="],- "stylis": ["[email protected]", "", {}, "sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ=="],-- "supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "stylis": ["[email protected]", "", {}, "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="],"supports-preserve-symlinks-flag": ["[email protected]", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="],@@ -1539,9 +1542,15 @@"symbol-tree": ["[email protected]", "", {}, "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="],- "tar": ["[email protected]", "", { "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" } }, "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A=="],+ "tailwind-merge": ["[email protected]", "", {}, "sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w=="],- "throttle-debounce": ["[email protected]", "", {}, "sha512-B71/4oyj61iNH0KeCamLuE2rmKuTO5byTOSVwECM5FA7TiAiAW+UqTKZ9ERueC4qvgSttUhdmq1mXC3kJqGX7A=="],+ "tailwindcss": ["[email protected]", "", {}, "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ=="],++ "tailwindcss-animate": ["[email protected]", "", { "peerDependencies": { "tailwindcss": ">=3.0.0 || insiders" } }, "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA=="],++ "tapable": ["[email protected]", "", {}, "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A=="],++ "tar": ["[email protected]", "", { "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" } }, "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A=="],"tiny-invariant": ["[email protected]", "", {}, "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="],@@ -1563,8 +1572,6 @@"to-regex-range": ["[email protected]", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],- "toggle-selection": ["[email protected]", "", {}, "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ=="],-"tough-cookie": ["[email protected]", "", { "dependencies": { "tldts": "^7.0.5" } }, "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw=="],"tr46": ["[email protected]", "", { "dependencies": { "punycode": "^2.3.1" } }, "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw=="],@@ -1575,6 +1582,8 @@"tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],+ "typescript": ["[email protected]", "", { "bin": { "tsc": "./bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],+"uglify-js": ["[email protected]", "", { "bin": { "uglifyjs": "bin/uglifyjs" } }, "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ=="],"undici-types": ["[email protected]", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],@@ -1595,6 +1604,10 @@"update-browserslist-db": ["[email protected]", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w=="],+ "use-callback-ref": ["[email protected]", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg=="],++ "use-sidecar": ["[email protected]", "", { "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ=="],+"use-sync-external-store": ["[email protected]", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w=="],"util-deprecate": ["[email protected]", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],@@ -1639,12 +1652,6 @@"which": ["[email protected]", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],- "which-boxed-primitive": ["[email protected]", "", { "dependencies": { "is-bigint": "^1.1.0", "is-boolean-object": "^1.2.1", "is-number-object": "^1.1.1", "is-string": "^1.1.1", "is-symbol": "^1.1.1" } }, "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA=="],-- "which-collection": ["[email protected]", "", { "dependencies": { "is-map": "^2.0.3", "is-set": "^2.0.3", "is-weakmap": "^2.0.2", "is-weakset": "^2.0.3" } }, "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw=="],-- "which-typed-array": ["[email protected]", "", { "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.8", "call-bound": "^1.0.4", "for-each": "^0.3.5", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" } }, "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg=="],-"why-is-node-running": ["[email protected]", "", { "dependencies": { "siginfo": "^2.0.0", "stackback": "0.0.2" }, "bin": { "why-is-node-running": "cli.js" } }, "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w=="],"wide-align": ["[email protected]", "", { "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } }, "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg=="],@@ -1667,28 +1674,20 @@"yaml": ["[email protected]", "", {}, "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="],+ "zod": ["[email protected]", "", {}, "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ=="],+"zustand": ["[email protected]", "", { "dependencies": { "use-sync-external-store": "^1.2.2" }, "peerDependencies": { "@types/react": ">=16.8", "immer": ">=9.0.6", "react": ">=16.8" }, "optionalPeers": ["@types/react", "immer", "react"] }, "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw=="],"zwitch": ["[email protected]", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="],- "@babel/helper-compilation-targets/lru-cache": ["[email protected]", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="],+ "@babel/helper-compilation-targets/browserslist": ["[email protected]", "", { "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", "electron-to-chromium": "^1.5.263", "node-releases": "^2.0.27", "update-browserslist-db": "^1.2.0" }, "bin": { "browserslist": "cli.js" } }, "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA=="],- "@emotion/babel-plugin/@emotion/hash": ["@emotion/[email protected]", "", {}, "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g=="],+ "@babel/helper-compilation-targets/lru-cache": ["[email protected]", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="],"@emotion/babel-plugin/convert-source-map": ["[email protected]", "", {}, "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="],"@emotion/babel-plugin/source-map": ["[email protected]", "", {}, "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ=="],- "@emotion/babel-plugin/stylis": ["[email protected]", "", {}, "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="],-- "@emotion/cache/stylis": ["[email protected]", "", {}, "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="],-- "@emotion/serialize/@emotion/hash": ["@emotion/[email protected]", "", {}, "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g=="],-- "@emotion/serialize/@emotion/unitless": ["@emotion/[email protected]", "", {}, "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg=="],-- "@jest/types/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],-"@mapbox/node-pre-gyp/https-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "6", "debug": "4" } }, "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA=="],"@mapbox/node-pre-gyp/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="],@@ -1703,26 +1702,34 @@"@opentelemetry/sdk-trace-base/@opentelemetry/resources": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.2.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A=="],- "@react-awesome-query-builder/ui/react-redux": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.12.1", "@types/hoist-non-react-statics": "^3.3.1", "@types/use-sync-external-store": "^0.0.3", "hoist-non-react-statics": "^3.3.2", "react-is": "^18.0.0", "use-sync-external-store": "^1.0.0" }, "peerDependencies": { "@types/react": "^16.8 || ^17.0 || ^18.0", "@types/react-dom": "^16.8 || ^17.0 || ^18.0", "react": "^16.8 || ^17.0 || ^18.0", "react-dom": "^16.8 || ^17.0 || ^18.0", "react-native": ">=0.59", "redux": "^4 || ^5.0.0-beta.0" }, "optionalPeers": ["@types/react", "@types/react-dom", "react-dom", "react-native", "redux"] }, "sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw=="],-"@reduxjs/toolkit/immer": ["[email protected]", "", {}, "sha512-6jQTc5z0KJFtr1UgFpIL3N9XSC3saRaI9PwWtzM2pSqkNGtiNkYY2OSwkOGDK2XcTRcLb1pi/aNkKZz0nxVH4Q=="],"@reduxjs/toolkit/redux": ["[email protected]", "", {}, "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w=="],- "@rjsf/antd/rc-picker": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.1", "date-fns": "2.x", "dayjs": "1.x", "moment": "^2.24.0", "rc-trigger": "^5.0.4", "rc-util": "^5.37.0", "shallowequal": "^1.1.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-H9if/BUJUZBOhPfWcPeT15JUI3/ntrG9muzERrXDkSoWmDj4yzmBvumozpxYrHwjcKnjyDGAke68d+whWwvhHA=="],-"@svgr/hast-util-to-babel-ast/entities": ["[email protected]", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],- "@testing-library/dom/aria-query": ["[email protected]", "", { "dependencies": { "deep-equal": "^2.0.5" } }, "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ=="],+ "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/[email protected]", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.3", "tslib": "^2.4.0" }, "bundled": true }, "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg=="],++ "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="],++ "@tailwindcss/oxide-wasm32-wasi/@emnapi/wasi-threads": ["@emnapi/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g=="],++ "@tailwindcss/oxide-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/[email protected]", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1" }, "bundled": true }, "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg=="],++ "@tailwindcss/oxide-wasm32-wasi/@tybys/wasm-util": ["@tybys/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg=="],- "@testing-library/dom/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],+ "@tailwindcss/oxide-wasm32-wasi/tslib": ["[email protected]", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],- "@types/jest/pretty-format": ["[email protected]", "", { "dependencies": { "@jest/schemas": "30.0.5", "ansi-styles": "^5.2.0", "react-is": "^18.3.1" } }, "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA=="],+ "@testing-library/jest-dom/aria-query": ["[email protected]", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="],++ "@testing-library/jest-dom/dom-accessibility-api": ["[email protected]", "", {}, "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w=="],"@vitest/mocker/estree-walker": ["[email protected]", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="],"babel-plugin-macros/cosmiconfig": ["[email protected]", "", { "dependencies": { "@types/parse-json": "^4.0.0", "import-fresh": "^3.2.1", "parse-json": "^5.0.0", "path-type": "^4.0.0", "yaml": "^1.10.0" } }, "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA=="],+ "browserslist/baseline-browser-mapping": ["[email protected]", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-s4+sLr9mZ/CyqeRritFeYV/Zx73OAtmaHn6kkBS1XRoJn1hrg3xIDUcpicAEX68tkcIN0iBCgti31C8zxtkhsQ=="],+"data-urls/whatwg-mimetype": ["[email protected]", "", {}, "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw=="],"decode-named-character-reference/character-entities": ["[email protected]", "", {}, "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="],@@ -1731,11 +1738,11 @@"fs-minipass/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],- "hastscript/comma-separated-tokens": ["[email protected]", "", {}, "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw=="],+ "hast-util-parse-selector/@types/hast": ["@types/[email protected]", "", { "dependencies": { "@types/unist": "*" } }, "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g=="],- "hastscript/property-information": ["[email protected]", "", { "dependencies": { "xtend": "^4.0.0" } }, "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA=="],+ "hastscript/@types/hast": ["@types/[email protected]", "", { "dependencies": { "@types/unist": "*" } }, "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g=="],- "hastscript/space-separated-tokens": ["[email protected]", "", {}, "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA=="],+ "hastscript/property-information": ["[email protected]", "", {}, "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg=="],"hoist-non-react-statics/react-is": ["[email protected]", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="],@@ -1743,20 +1750,6 @@"http-proxy/follow-redirects": ["[email protected]", "", {}, "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ=="],- "jest-diff/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],-- "jest-diff/pretty-format": ["[email protected]", "", { "dependencies": { "@jest/schemas": "30.0.5", "ansi-styles": "^5.2.0", "react-is": "^18.3.1" } }, "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA=="],-- "jest-matcher-utils/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],-- "jest-matcher-utils/pretty-format": ["[email protected]", "", { "dependencies": { "@jest/schemas": "30.0.5", "ansi-styles": "^5.2.0", "react-is": "^18.3.1" } }, "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA=="],-- "jest-message-util/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],-- "jest-message-util/pretty-format": ["[email protected]", "", { "dependencies": { "@jest/schemas": "30.0.5", "ansi-styles": "^5.2.0", "react-is": "^18.3.1" } }, "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA=="],-- "jest-util/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],-"jsdom/whatwg-mimetype": ["[email protected]", "", {}, "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg=="],"jsdom/ws": ["[email protected]", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="],@@ -1775,17 +1768,19 @@"parse5/entities": ["[email protected]", "", {}, "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="],- "pretty-format/ansi-styles": ["[email protected]", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="],-"pretty-format/react-is": ["[email protected]", "", {}, "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="],"prop-types/react-is": ["[email protected]", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="],- "redux-thunk/redux": ["[email protected]", "", {}, "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w=="],+ "react-diff-viewer-continued/js-yaml": ["[email protected]", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ=="],++ "react-syntax-highlighter/refractor": ["[email protected]", "", { "dependencies": { "hastscript": "^6.0.0", "parse-entities": "^2.0.0", "prismjs": "~1.27.0" } }, "sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA=="],++ "recharts/react-redux": ["[email protected]", "", { "dependencies": { "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.4.0" }, "peerDependencies": { "@types/react": "^18.2.25 || ^19", "react": "^18.0 || ^19", "redux": "^5.0.0" }, "optionalPeers": ["@types/react", "redux"] }, "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g=="],- "refractor/prismjs": ["[email protected]", "", {}, "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA=="],+ "redux-thunk/redux": ["[email protected]", "", {}, "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w=="],- "stack-utils/escape-string-regexp": ["[email protected]", "", {}, "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="],+ "refractor/@types/hast": ["@types/[email protected]", "", { "dependencies": { "@types/unist": "*" } }, "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g=="],"string-width/emoji-regex": ["[email protected]", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],@@ -1795,24 +1790,52 @@"unified/is-plain-obj": ["[email protected]", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="],- "@mapbox/node-pre-gyp/https-proxy-agent/agent-base": ["[email protected]", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="],-- "@react-awesome-query-builder/ui/react-redux/@types/use-sync-external-store": ["@types/[email protected]", "", {}, "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA=="],+ "uvu/diff": ["[email protected]", "", {}, "sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A=="],- "@rjsf/antd/rc-picker/date-fns": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.21.0" } }, "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw=="],+ "vite/postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg=="],- "@types/jest/pretty-format/ansi-styles": ["[email protected]", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="],+ "@babel/helper-compilation-targets/browserslist/caniuse-lite": ["[email protected]", "", {}, "sha512-4C0lfJ0/YPjJQHagaE9x2Elb69CIqEPZeG0anQt9SIvIoOH4a4uaRl73IavyO+0qZh6MDLH//DrXThEYKHkmYA=="],- "fs-minipass/minipass/yallist": ["[email protected]", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="],+ "@babel/helper-compilation-targets/browserslist/electron-to-chromium": ["[email protected]", "", {}, "sha512-FCPkJtpst28UmFzd903iU7PdeVTfY0KAeJy+Lk0GLZRwgwYHn/irRcaCbQQOmr5Vytc/7rcavsYLvTM8RiHYhQ=="],- "jest-diff/pretty-format/ansi-styles": ["[email protected]", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="],+ "@babel/helper-compilation-targets/browserslist/node-releases": ["[email protected]", "", {}, "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA=="],- "jest-matcher-utils/pretty-format/ansi-styles": ["[email protected]", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="],+ "@mapbox/node-pre-gyp/https-proxy-agent/agent-base": ["[email protected]", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="],- "jest-message-util/pretty-format/ansi-styles": ["[email protected]", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="],+ "fs-minipass/minipass/yallist": ["[email protected]", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="],"node-fetch/whatwg-url/tr46": ["[email protected]", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],"node-fetch/whatwg-url/webidl-conversions": ["[email protected]", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],++ "react-syntax-highlighter/refractor/hastscript": ["[email protected]", "", { "dependencies": { "@types/hast": "^2.0.0", "comma-separated-tokens": "^1.0.0", "hast-util-parse-selector": "^2.0.0", "property-information": "^5.0.0", "space-separated-tokens": "^1.0.0" } }, "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w=="],++ "react-syntax-highlighter/refractor/parse-entities": ["[email protected]", "", { "dependencies": { "character-entities": "^1.0.0", "character-entities-legacy": "^1.0.0", "character-reference-invalid": "^1.0.0", "is-alphanumerical": "^1.0.0", "is-decimal": "^1.0.0", "is-hexadecimal": "^1.0.0" } }, "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ=="],++ "react-syntax-highlighter/refractor/prismjs": ["[email protected]", "", {}, "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA=="],++ "recharts/react-redux/@types/use-sync-external-store": ["@types/[email protected]", "", {}, "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg=="],++ "vite/postcss/nanoid": ["[email protected]", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="],++ "react-syntax-highlighter/refractor/hastscript/comma-separated-tokens": ["[email protected]", "", {}, "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw=="],++ "react-syntax-highlighter/refractor/hastscript/hast-util-parse-selector": ["[email protected]", "", {}, "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ=="],++ "react-syntax-highlighter/refractor/hastscript/property-information": ["[email protected]", "", { "dependencies": { "xtend": "^4.0.0" } }, "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA=="],++ "react-syntax-highlighter/refractor/hastscript/space-separated-tokens": ["[email protected]", "", {}, "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA=="],++ "react-syntax-highlighter/refractor/parse-entities/character-entities-legacy": ["[email protected]", "", {}, "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA=="],++ "react-syntax-highlighter/refractor/parse-entities/character-reference-invalid": ["[email protected]", "", {}, "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg=="],++ "react-syntax-highlighter/refractor/parse-entities/is-alphanumerical": ["[email protected]", "", { "dependencies": { "is-alphabetical": "^1.0.0", "is-decimal": "^1.0.0" } }, "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A=="],++ "react-syntax-highlighter/refractor/parse-entities/is-decimal": ["[email protected]", "", {}, "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw=="],++ "react-syntax-highlighter/refractor/parse-entities/is-hexadecimal": ["[email protected]", "", {}, "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw=="],++ "react-syntax-highlighter/refractor/parse-entities/is-alphanumerical/is-alphabetical": ["[email protected]", "", {}, "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg=="],}}diff --git a/frontend/components.json b/frontend/components.jsonnew file mode 100644index 000000000..4c5ac2e15--- /dev/null+++ b/frontend/components.json@@ -0,0 +1,22 @@+{+ "$schema": "https://ui.shadcn.com/schema.json",+ "style": "new-york",+ "rsc": false,+ "tsx": false,+ "tailwind": {+ "config": "tailwind.config.js",+ "css": "src/index.css",+ "baseColor": "neutral",+ "cssVariables": true,+ "prefix": ""+ },+ "iconLibrary": "lucide",+ "aliases": {+ "components": "@/components",+ "utils": "@/lib/utils",+ "ui": "@/components/ui",+ "lib": "@/lib",+ "hooks": "@/hooks"+ },+ "registries": {}+}diff --git a/frontend/docs/P0-FOUNDATION.md b/frontend/docs/P0-FOUNDATION.mdnew file mode 100644index 000000000..10207b311--- /dev/null+++ b/frontend/docs/P0-FOUNDATION.md@@ -0,0 +1,102 @@+# P0 — shadcn/ui Foundation++Implements **P0-01 … P0-16** of `UN_SHADCN_IMPL_PLAN.md`+(spec: `UN_SHADCN_SPEC.md`, palette decision **D8** = Midnight Bloom).++**Zero visual change is the goal of this phase.** antd still renders every+screen; this PR only installs the shadcn stack alongside it (§7 coexistence).++---++## What landed++| Task | Change |+|---|---|+| P0-03/04 | shadcn stack + Radix + RHF/zod + self-hosted `@fontsource` Inter / Geist Mono |+| P0-05 | `components.json` (`style: new-york`, `tsx: false`, lucide) |+| P0-06 | `tailwind.config.js`, `postcss.config.js` |+| P0-07 | `@tailwindcss/vite` added **after** `optionalPluginImports()` |+| P0-08 | `src/lib/utils.js` — `cn()` |+| P0-09 | Legacy CSS vars → `--legacy-*` (D6) |+| P0-10/11/12 | `src/index.css`: Tailwind first, Midnight Bloom tokens, `@theme inline` |+| P0-13 | 32 primitives in `src/components/ui/` |+| P0-14 | `vitest.config.mjs`: `@` alias + `css: false` |+| P0-15 | `next-themes` `ThemeProvider` driven by the existing session theme |+| P0-16 | `sonner` `<Toaster />` + shared `useAppToast` helper |++## Gate results++| Gate | Result |+|---|---|+| **P0-G1** build w/o plugins | **PASS** — `src/plugins/` is absent in an OSS checkout by design (copy overlay, gitignored), so every build here exercises the `optionalPluginImports` path |+| **P0-G3** dark mode | **PASS** — see below |+| **P0-G4** lint | **PASS** (see "Pre-existing" note) |+| **P0-G5** tests | **PASS** — 4 files / 16 tests green |+| **P0-G6** no visual regression | **PASS** — see below |++### P0-G3 — `@theme inline` verified++Measured in headless Chromium by toggling `.dark` on `<html>`:++| | light | dark |+|---|---|---|+| `--background` | `#fafafa` | `#1a1a1a` |+| `--foreground` | `#1a1a1a` | `#fafafa` |+| **`bg-background` utility** | `rgb(250,250,250)` | `rgb(26,26,26)` |+| **`text-foreground` utility** | `rgb(26,26,26)` | `rgb(250,250,250)` |++The last two rows are the ones that matter: the **Tailwind utilities** flip, not+just the CSS variables. A plain `@theme` would have frozen them at the light+value — this is the trap called out in §2.5.3a.++`--primary` is `#6f5cef` in both modes (correct — Midnight Bloom keeps the+brand violet constant across themes).++### P0-G6 — no visual regression++Same page measured before and after P0:++| Metric | Before | After |+|---|---|---|+| antd elements | 33 | 33 |+| antd buttons | 5 | 5 |+| button height | 50px | 50px |+| button background | `rgb(47,147,246)` | `rgb(47,147,246)` |+| button radius | 6px | 6px |+| body background | `rgb(233,233,233)` | `rgb(233,233,233)` |+| body font | system | **Inter** |++Only the font changed — that is P0-12's intended effect. Tailwind Preflight does+not disturb antd, consistent with the coexistence test in §7.++---++## Notes for review++**Two deviations from the plan, both necessary and neither changing intent:**++1. **`jsconfig.json` added** (not in the plan). The shadcn CLI refuses to run+ without it: *"Failed to load jsconfig.json. Couldn't find tsconfig.json"*. It+ declares the same `@/*` → `./src/*` alias that `vite.config.js` already has,+ so it also fixes editor/IDE resolution.++2. **`biome.json` — `css.parser.tailwindDirectives: true`** (not in the plan).+ Without it Biome cannot parse `@theme` / `@plugin` / `@custom-variant` and+ **fails CI with 4 CSS parse errors**. This is a required companion to+ adopting Tailwind v4; the plan's P0-G4 gate missed it.++**Pre-existing lint findings (NOT introduced here):** `biome ci src/` reports 4+errors and 26 warnings. All 4 errors are in `src/assets/export-tool.svg` and+`src/assets/login-onboard-message.svg`; both files are byte-identical to `main`,+and running the same Biome binary against a pristine `main` checkout reproduces+them. The 26 warnings (`noEmptyBlockStatements`, `useBlockStatements`) are in+files this PR never touched.++**Deferred deliberately:**+- `body { overflow: hidden }` is left as-is. It interacts with Radix's+ scroll-lock; P0-12 says re-test at the first P2 dialog conversion.+- `ALERT_SURFACE = "antd"` in `App.jsx` keeps antd as the single notification+ surface. The sonner bridge is mounted and wired but dormant, so alerts are not+ double-rendered. P2-06 flips the constant and deletes the antd branch.++**Not started:** P1–P4 and the cloud plugin phase, per the 🛑 STOP gate after P0.diff --git a/frontend/docs/form-pattern.md b/frontend/docs/form-pattern.mdnew file mode 100644index 000000000..32bf47cf0--- /dev/null+++ b/frontend/docs/form-pattern.md@@ -0,0 +1,98 @@+# Form conversion pattern (P3-01)++The reviewed pattern that P3-02 applies to the remaining call-sites.++## The problem++antd's `Form` bundles validation, layout and state into one component, and this+codebase drives it **imperatively** through a form instance:++```jsx+const [form] = Form.useForm();+form.setFieldsValue({ name: group?.name }); // populate on edit+const values = await form.validateFields().catch(() => null);+if (!values) return; // bail out when invalid+form.resetFields();+```++14 `useForm()` sites and 102 `Form.Item`s depend on that API. Rewriting each by+hand onto raw react-hook-form would mean 102 independent chances to change+submit or validation behaviour — and one wrong `.catch()` silently lets an+invalid form submit.++## The pattern: keep antd's API, swap the engine++`@/components/ui/antd-form` implements antd's `Form` surface on top of+react-hook-form. Call-sites convert **by import only**:++```diff+-import { Form, Input } from "antd";++import { Form } from "@/components/ui/antd-form";++import { Input } from "@/components/ui/input";+```++The JSX is untouched:++```jsx+<Form form={form} layout="vertical">+ <Form.Item+ label="Name"+ name="name"+ rules={[{ required: true, message: "Group name is required" }]}+ >+ <Input maxLength={255} />+ </Form.Item>+</Form>+```++## What the shim guarantees++| antd API | Behaviour preserved |+|---|---|+| `Form.useForm()` | Returns `[form]` with the imperative methods below |+| `form.setFieldsValue(obj)` | Populates fields — edit-mode modals depend on this |+| `form.getFieldsValue()` / `getFieldValue(n)` | Reads current values |+| `form.validateFields()` | **Rejects** when invalid, resolves with values when valid |+| `form.resetFields()` | Clears back to empty |+| `<Form.Item rules>` | `required`, `min`, `max`, `pattern`, and custom `validator` |+| `<Form.Item>` without `name` | Renders as plain layout |+| `onFinish` | Fires only when validation passes |++**The rejection semantics are the load-bearing part.** Call-sites are written as+`await form.validateFields().catch(() => null)` and bail on `null`. If+`validateFields` resolved on invalid input instead of rejecting, every one of+those guards would silently pass and submit bad data. Two unit tests pin this:+one asserts the rejection, one asserts `onFinish` does not fire while a required+field is empty.++## Rules translation++antd rule objects map onto RHF options:++| antd | RHF |+|---|---|+| `{ required: true, message }` | `required: message` |+| `{ max: n, message }` | `maxLength: { value: n, message }` |+| `{ min: n, message }` | `minLength: { value: n, message }` |+| `{ pattern: re, message }` | `pattern: { value: re, message }` |+| `{ validator: async fn }` | `validate: { customN: … }` — a thrown error's message becomes the inline message |++## Controlled-child injection++`Form.Item` clones its single child and injects `value`/`onChange`/`onBlur`,+which is how antd wires inputs too. `valuePropName="checked"` is honoured for+`Checkbox`/`Switch`. The child's own `onChange` still fires, so call-sites that+react to changes keep working.++## Reference conversion++`src/components/groups/GroupCreateEditModal.jsx` — a small modal exercising+`setFieldsValue` (edit mode), `validateFields().catch()` (submit guard),+`resetFields()` (cancel), and a `required` rule. Converted with an import change+only.++## When NOT to use the shim++New forms should use `react-hook-form` + `@/components/ui/form` directly. The+`antd-form` module exists to carry the existing 102 call-sites across without+behaviour drift, and should not grow new antd-only props.diff --git a/frontend/docs/icon-map.md b/frontend/docs/icon-map.mdnew file mode 100644index 000000000..343810a78--- /dev/null+++ b/frontend/docs/icon-map.md@@ -0,0 +1,194 @@+# antd icons → lucide-react (P1-01)++**Complete mapping — all 116 icons** used across both repos before the+migration: **87** distinct icons in OSS (`unstract`) and **87**+in the enterprise plugins (`unstract-cloud`), overlapping to 116 unique.++Every target name was verified to exist in the installed `lucide-react` build+before the mapping was applied. Counts below are **import sites** in the+pre-migration tree (`unstract@023b14021`, `unstract-cloud@main`).++## Sizing / colour convention++antd icons inherit `font-size` and `color`; lucide icons take `size`/`className`.+Conversions use Tailwind classes so rendered size is unchanged:++| antd context | lucide replacement |+|---|---|+| default inline icon (14px) | `className="size-3.5"` |+| icon inside a `Button` | `className="size-4"` |+| explicit `style={{ fontSize: N }}` | `className="size-[Npx]"` |+| colour via `style={{ color }}` | keep the inline style, or use `text-*` |++Both libraries drive colour from `currentColor`, so inherited colour needs no change.++## ⚠ Mappings that are NOT exact — these need a human eye++27 of 116 pairs are approximations. lucide is not a+drop-in replacement for antd's icon set: it has **no filled variants at all**,+and it dropped brand icons.++| antd | lucide | OSS | Cloud | Why it differs |+|---|---|---|---|---|+| `ArrowsAltOutlined` | `Move` | 1 | 2 | antd's is a 4-way expand arrow. `Move` is closest; use `Maximize2` if the intent was 'expand'.+| `AuditOutlined` | `ClipboardCheck` | 0 | 1 | No direct match; `ClipboardCheck` conveys the review/audit sense.+| `CaretDownOutlined` | `ChevronDown` | 1 | 0 | Solid triangle → thin chevron. Also matches the shadcn/Radix idiom used elsewhere.+| `CaretRightOutlined` | `ChevronRight` | 1 | 0 | Solid triangle → thin chevron.+| `CheckCircleFilled` | `CircleCheck` | 5 | 7 | lucide has **no filled variants** — renders as an outline, visually lighter than antd's solid glyph. Add `fill-current` where the solid weight carried meaning.+| `ClearOutlined` | `Eraser` | 2 | 0 | → `Eraser`.+| `CloseCircleFilled` | `CircleX` | 6 | 3 | Same filled→outline caveat.+| `CompressOutlined` | `Shrink` | 0 | 1 | → `Shrink`.+| `ContainerOutlined` | `Container` | 0 | 1 | antd's is a document tray; `Container` is a shipping container. Different metaphor, similar role.+| `DashboardOutlined` | `Gauge` | 1 | 0 | antd's is a speedometer; `Gauge` is the nearest equivalent.+| `DiffOutlined` | `GitCompare` | 1 | 0 | → `GitCompare`; carries a VCS connotation antd's did not.+| `ExclamationCircleFilled` | `CircleAlert` | 2 | 4 | Same filled→outline caveat.+| `ExclamationOutlined` | `TriangleAlert` | 0 | 1 | Bare exclamation → `TriangleAlert` (adds a triangle the original lacked).+| `ExportOutlined` | `ExternalLink` | 1 | 4 | antd's implies data export; `ExternalLink` implies navigation. Closest available.+| `FieldTimeOutlined` | `Timer` | 0 | 1 | No direct match; `Timer` is closest.+| `FilePdfOutlined` | `FileText` | 2 | 3 | No PDF-specific glyph in lucide — falls back to generic `FileText`, losing the format hint.+| `InfoCircleFilled` | `Info` | 4 | 1 | Same filled→outline caveat.+| `MergeCellsOutlined` | `Merge` | 1 | 0 | Table-cell merge → generic `Merge`.+| `MoreOutlined` | `EllipsisVertical` | 5 | 0 | antd's is **vertical** (⋮). Plain `Ellipsis` is horizontal, so `EllipsisVertical` is the correct target.+| `PlayCircleFilled` | `CirclePlay` | 4 | 0 | Same filled→outline caveat.+| `RotateLeftOutlined` | `RotateCcw` | 0 | 1 | → `RotateCcw` (counter-clockwise).+| `ScheduleOutlined` | `CalendarClock` | 2 | 0 | antd's is a clipboard-with-check; no direct match. `CalendarClock` fits the scheduling context. Alternative: `ClipboardCheck`.+| `SlackOutlined` | `MessagesSquare` | 1 | 2 | **lucide dropped brand icons** — the Slack mark is gone. `MessagesSquare` is a generic stand-in.+| `StarFilled` | `Star` | 0 | 1 | Same filled→outline caveat; `Star` is stroked.+| `ThunderboltFilled` | `Zap` | 0 | 1 | Same filled→outline caveat.+| `UserSwitchOutlined` | `UserRoundCog` | 1 | 1 | → `UserRoundCog`; antd's implies switching users, lucide's implies configuring one.+| `WarningFilled` | `TriangleAlert` | 0 | 3 | Same filled→outline caveat.++### The filled-variant problem++lucide has no filled equivalents, so all 8 `*Filled` icons render lighter than+before. Where the solid weight carried meaning (status indicators especially),+use fill explicitly:++```jsx+// antd: <CheckCircleFilled style={{ color: "#52c41a" }} />+// lucide: solid look via fill + stroke on the same token+<CircleCheck className="size-3.5 fill-success text-white" />+```++## Exact mappings++89 pairs where the glyph and meaning both carry over.++| antd | lucide | OSS | Cloud |+|---|---|---|---|+| `ApiOutlined` | `Plug` | 2 | 1 |+| `AppstoreOutlined` | `LayoutGrid` | 1 | 0 |+| `ArrowDownOutlined` | `ArrowDown` | 2 | 0 |+| `ArrowLeftOutlined` | `ArrowLeft` | 10 | 10 |+| `ArrowRightOutlined` | `ArrowRight` | 0 | 2 |+| `ArrowUpOutlined` | `ArrowUp` | 1 | 0 |+| `BarChartOutlined` | `ChartColumn` | 1 | 0 |+| `BranchesOutlined` | `GitBranch` | 2 | 2 |+| `BugOutlined` | `Bug` | 1 | 0 |+| `BulbOutlined` | `Lightbulb` | 0 | 2 |+| `CalendarOutlined` | `Calendar` | 2 | 2 |+| `CheckCircleOutlined` | `CircleCheck` | 8 | 6 |+| `CheckOutlined` | `Check` | 1 | 2 |+| `ClockCircleOutlined` | `Clock` | 4 | 5 |+| `CloseCircleOutlined` | `CircleX` | 2 | 1 |+| `CloseOutlined` | `X` | 2 | 6 |+| `CloudDownloadOutlined` | `CloudDownload` | 3 | 1 |+| `CloudUploadOutlined` | `CloudUpload` | 1 | 1 |+| `CodeOutlined` | `Code` | 2 | 1 |+| `CopyOutlined` | `Copy` | 11 | 13 |+| `CreditCardOutlined` | `CreditCard` | 1 | 2 |+| `CrownOutlined` | `Crown` | 0 | 2 |+| `DatabaseOutlined` | `Database` | 2 | 1 |+| `DeleteOutlined` | `Trash2` | 20 | 19 |+| `DollarCircleOutlined` | `CircleDollarSign` | 0 | 1 |+| `DollarOutlined` | `DollarSign` | 1 | 1 |+| `DoubleRightOutlined` | `ChevronsRight` | 1 | 0 |+| `DownOutlined` | `ChevronDown` | 3 | 2 |+| `DownloadOutlined` | `Download` | 1 | 5 |+| `EditOutlined` | `Pencil` | 14 | 10 |+| `EllipsisOutlined` | `Ellipsis` | 2 | 1 |+| `ExclamationCircleOutlined` | `CircleAlert` | 1 | 5 |+| `ExpandOutlined` | `Expand` | 1 | 1 |+| `ExperimentOutlined` | `FlaskConical` | 0 | 3 |+| `EyeInvisibleOutlined` | `EyeOff` | 0 | 3 |+| `EyeOutlined` | `Eye` | 2 | 9 |+| `FileAddOutlined` | `FilePlus` | 0 | 1 |+| `FileDoneOutlined` | `FileCheck` | 0 | 1 |+| `FileExclamationOutlined` | `FileWarning` | 1 | 0 |+| `FileProtectOutlined` | `FileCheck` | 1 | 0 |+| `FileSearchOutlined` | `FileSearch` | 3 | 2 |+| `FileTextOutlined` | `FileText` | 5 | 10 |+| `FilterOutlined` | `Filter` | 4 | 0 |+| `FolderOpenOutlined` | `FolderOpen` | 0 | 1 |+| `ForkOutlined` | `GitFork` | 1 | 0 |+| `FullscreenExitOutlined` | `Minimize` | 1 | 0 |+| `FullscreenOutlined` | `Maximize` | 1 | 1 |+| `GiftOutlined` | `Gift` | 0 | 1 |+| `HistoryOutlined` | `History` | 3 | 4 |+| `HomeOutlined` | `House` | 0 | 1 |+| `HourglassOutlined` | `Hourglass` | 2 | 0 |+| `InboxOutlined` | `Inbox` | 1 | 5 |+| `InfoCircleOutlined` | `Info` | 8 | 13 |+| `KeyOutlined` | `Key` | 2 | 0 |+| `LeftOutlined` | `ChevronLeft` | 2 | 1 |+| `LineChartOutlined` | `ChartLine` | 0 | 1 |+| `LinkOutlined` | `Link` | 0 | 5 |+| `LoadingOutlined` | `LoaderCircle` | 2 | 4 |+| `LockOutlined` | `Lock` | 0 | 1 |+| `LoginOutlined` | `LogIn` | 1 | 1 |+| `LogoutOutlined` | `LogOut` | 1 | 2 |+| `MailOutlined` | `Mail` | 1 | 0 |+| `MenuOutlined` | `Menu` | 0 | 1 |+| `MessageOutlined` | `MessageSquare` | 1 | 2 |+| `MinusOutlined` | `Minus` | 1 | 0 |+| `NotificationOutlined` | `Bell` | 2 | 0 |+| `PlayCircleOutlined` | `CirclePlay` | 6 | 4 |+| `PlusOutlined` | `Plus` | 13 | 12 |+| `QuestionCircleOutlined` | `CircleHelp` | 8 | 2 |+| `ReloadOutlined` | `RotateCw` | 8 | 11 |+| `RightCircleOutlined` | `CircleChevronRight` | 0 | 2 |+| `RightOutlined` | `ChevronRight` | 2 | 1 |+| `RocketOutlined` | `Rocket` | 2 | 0 |+| `SaveOutlined` | `Save` | 0 | 6 |+| `SearchOutlined` | `Search` | 8 | 5 |+| `SendOutlined` | `Send` | 0 | 1 |+| `SettingOutlined` | `Settings` | 4 | 3 |+| `ShareAltOutlined` | `Share2` | 3 | 5 |+| `SwapOutlined` | `ArrowLeftRight` | 0 | 3 |+| `SyncOutlined` | `RefreshCw` | 6 | 0 |+| `TableOutlined` | `Table` | 2 | 2 |+| `TagOutlined` | `Tag` | 0 | 1 |+| `TeamOutlined` | `Users` | 2 | 0 |+| `ThunderboltOutlined` | `Zap` | 2 | 4 |+| `UnorderedListOutlined` | `List` | 2 | 1 |+| `UpOutlined` | `ChevronUp` | 2 | 0 |+| `UploadOutlined` | `Upload` | 2 | 6 |+| `UserOutlined` | `User` | 8 | 5 |+| `WarningOutlined` | `TriangleAlert` | 2 | 6 |++## Import forms handled++- Named imports (`import {{ X }} from "@ant-design/icons"`) — the only form used.+- **Multi-line import blocks**, which the first enumeration pass missed: the+ original single-line regex found only 43 of 87 OSS icons. Anything scoping a+ future sweep should use a `re.S` pattern.+- Files with **two separate** icon import statements (e.g. `ReviewHeader.jsx`).+- No deep imports (`@ant-design/icons/...`) and no default-import form exist.++## Name collisions the rename introduced++A lucide icon can collide with a same-named component in scope. Nine cases were+found; each is fixed by aliasing the **lucide** binding so the component keeps+the bare name:++| Repo | File | Collision |+|---|---|---|+| OSS | `FileUpload.jsx`, `FileWidget.jsx` | `Upload` icon vs antd's `Upload` **component** — would have broken both upload widgets |+| OSS | `Workflows.jsx` | local `User` component rendered itself — **infinite recursion** |+| Cloud | `ManageDocs`, `PdfViewer`, `Home`, `Administration` | `Upload` icon vs component |+| Cloud | `ResultEditor` | `Table` icon vs component |+| Cloud | `LandingPage` | `Tag` icon vs component |+| Cloud | `ReviewHeader` | `List` used as **both** an icon and antd's List component |++These are build breaks, not cosmetic issues — the build and the overlay gate+are what surfaced them.diff --git a/frontend/docs/shim-convention.md b/frontend/docs/shim-convention.mdnew file mode 100644index 000000000..78864ed33--- /dev/null+++ b/frontend/docs/shim-convention.md@@ -0,0 +1,89 @@+# antd → shadcn conversion: shim vs direct swap++Convention for the whole migration. Decided during P1-03/P1-04; applies to every+remaining component in P1–P4 and to Phase C (cloud plugins).++## The decision rule++For each antd component, ask: **does it implement behaviour that the shadcn+primitive does not?**++- **Yes → write a shim.** `src/components/ui/antd-<component>.jsx`, presenting+ antd's prop API on top of the shadcn primitive + Midnight Bloom tokens.+ Call-sites then change by import only, so the JSX is untouched: same+ elements, same order, same props. That is what C4 requires.+- **No (styling only) → direct swap.** Replace the element and express the+ styling as Tailwind utilities. No shim, no indirection.++Silently dropping behaviour is a **regression, not a restyle**, and C4 forbids+it. When in doubt, grep the call-sites for the behavioural props before deciding+— the counts have repeatedly contradicted intuition.++## Naming++| Kind | Path | Exports |+|---|---|---|+| Compatibility shim | `@/components/ui/antd-<name>.jsx` | antd's API |+| Pure shadcn primitive | `@/components/ui/<name>.jsx` | shadcn's API |++The `antd-` prefix is deliberate: it marks the file as **migration debt with an+exit**, and makes it obvious in review when new code reaches for the+compatibility layer instead of the primitive.++**New code should import the plain primitive.** The `antd-*` modules exist to+carry existing call-sites across without behaviour drift.++## Every shim needs++1. A header comment stating **which behaviours** justify its existence, with+ usage counts.+2. Unit tests covering **exactly those behaviours** — not just "it renders".+ The test suite is the proof that nothing was silently dropped.+3. A line in the table below.++## Decisions so far++| antd | Files | Call | Why |+|---|---|---|---|+| `Typography` | 93 | **Shim** | `ellipsis={{ tooltip, rows }}` (12 sites) truncates *and* shows full text on hover / clamps lines. Tailwind `truncate` is CSS-only. |+| `Button` | 70 | **Shim** | `loading` (234) swaps a spinner *and disables*; `icon` (106) is a slot; `danger` (12) is orthogonal to `type`; `htmlType` → DOM `type`. |+| `@ant-design/icons` | 91 | **Direct swap** | Pure glyph substitution. Mapping table in `icon-map.md`; three name collisions needed aliases. |++## Planned (from the re-measured counts)++**Shim** — behaviour antd implements and shadcn does not:++| antd | Files | Behaviour at stake |+|---|---|---|+| `Modal` | 40 | `Modal.confirm`/`info` static methods, `destroyOnClose`, `afterClose`, footer conventions |+| `Select` | 21 | `showSearch`, `mode="multiple"`, `filterOption`, `labelInValue` — Radix Select has none |+| `Table` | 16 | antd's is feature-complete; shadcn's is presentational (see D5 / TanStack) |+| `Form` | 16 | validation + layout + state in one component; RHF splits them (P3, pattern-first) |+| `Popconfirm` | 8 | routed through the shared `useConfirm()` hook (P2-01) |+| `Upload` | 4 | `beforeUpload`, `customRequest`, file-list state |++**Direct swap** — styling only:++`Space` / `Row` / `Col` / `Flex` (124 combined) · `Card` (20) · `Tag` (16) ·+`Divider` (9) · `Avatar` (7) · `Empty` (7) · `Progress` (2)++**Check first:** `Spin` (10) — bare `<Spin />` is a direct swap to `Spinner`,+but `<Spin spinning={x}>{children}</Spin>` is an overlay wrapper, which is+behaviour. Grep before deciding.++### `Space` is the one trap in the "direct swap" list++`<Space>` wraps **each child in its own `<div>`** and injects gaps between them.+Replacing it with `gap-*` on the parent removes those wrapper divs, so any CSS+selector matching `> *` against them will stop applying. Before converting,+check `Space` sites whose children come from `.map()` or conditional renders.++## Exit story++The `antd-*` shims are not permanent. Once P4 removes antd:++- `antd-button` / `antd-typography` can be unwound by migrating call-sites to+ the plain primitives, or kept as the app's own convenience layer — a decision+ worth making *after* the migration, not during it.+- Either way they must not grow new antd-only props. If a converted call-site+ needs something the shim lacks, prefer changing the call-site.diff --git a/frontend/jsconfig.json b/frontend/jsconfig.jsonnew file mode 100644index 000000000..082b33982--- /dev/null+++ b/frontend/jsconfig.json@@ -0,0 +1,10 @@+{+ "compilerOptions": {+ "baseUrl": ".",+ "paths": {+ "@/*": ["./src/*"]+ }+ },+ "include": ["src/**/*"],+ "exclude": ["node_modules", "build"]+}diff --git a/frontend/package.json b/frontend/package.jsonindex ba164307e..cf22283de 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -3,26 +3,30 @@"version": "0.1.0","private": true,"dependencies": {- "@ant-design/icons": "^5.1.4",+ "@fontsource/geist-mono": "^5.3.0",+ "@fontsource/geist-sans": "^5.3.0",+ "@fontsource/inter": "^5.3.0",+ "@hookform/resolvers": "^5.5.7","@monaco-editor/react": "^4.7.0",- "@react-awesome-query-builder/antd": "^6.6.10",+ "@react-awesome-query-builder/ui": "^6.7.0-alpha.0","@react-pdf-viewer/core": "^3.12.0","@react-pdf-viewer/default-layout": "^3.12.0","@react-pdf-viewer/highlight": "^3.12.0","@react-pdf-viewer/page-navigation": "^3.12.0",- "@rjsf/antd": "^5.16.1","@rjsf/core": "^5.8.1","@rjsf/utils": "^5.8.1","@rjsf/validator-ajv8": "^5.8.1","@stripe/stripe-js": "^4.2.0",- "@testing-library/jest-dom": "^5.16.5",- "@testing-library/react": "^13.4.0",- "@testing-library/user-event": "^13.5.0",- "antd": "^5.5.1",+ "@tanstack/react-table": "^8.21.3",+ "@testing-library/jest-dom": "^6",+ "@testing-library/react": "^16",+ "@testing-library/user-event": "^14","axios": "1.16.0",+ "class-variance-authority": "^0.7.1","cron-validator": "^1.3.1","cronstrue": "^2.48.0","date-fns": "^4.1.0",+ "dayjs": "1.11.19","emoji-picker-react": "^4.8.0","emoji-regex": "^10.3.0","file-saver": "^2.0.5",@@ -32,29 +36,37 @@"js-cookie": "^3.0.8","js-yaml": "^4.1.0","json-2-csv": "^5.5.1",+ "lucide-react": "^1.27.0","moment": "^2.29.4","moment-timezone": "^0.5.45",+ "next-themes": "^0.4.6","pdfjs-dist": "^3.4.120","posthog-js": "^1.116.5","prismjs": "^1.29.0",- "react": "^18.2.0",- "react-diff-viewer-continued": "^3.4.0",+ "radix-ui": "^1.6.7",+ "react": "^19",+ "react-day-picker": "^10.0.1",+ "react-diff-viewer-continued": "^4.4.0","react-dnd": "^16.0.1","react-dnd-html5-backend": "^16.0.1",- "react-dom": "^18.2.0",+ "react-dom": "^19","react-google-recaptcha": "^3.1.0","react-gtm-module": "^2.0.11",- "react-helmet-async": "^2.0.5",- "react-js-cron": "^5.0.1",+ "react-helmet-async": "^3.0.0",+ "react-hook-form": "^7.83.0","react-markdown": "^8.0.7","react-product-fruits": "^2.2.6","react-router-dom": "^6.11.2",- "react-social-login-buttons": "^3.9.1",+ "react-social-login-buttons": "^4.1.1","react-syntax-highlighter": "^15.6.1","recharts": "^3.5.1","remark-gfm": "^3.0.1","socket.io-client": "^4.7.2",+ "sonner": "^2.0.7",+ "tailwind-merge": "^3.6.0",+ "tailwindcss-animate": "^1.0.7","uuid": "^9.0.1",+ "zod": "^4.4.3","zustand": "^4.3.8"},"scripts": {@@ -70,7 +82,8 @@"check": "biome check src/","check:fix": "biome check --write src/","lint:all": "biome check --write src/",- "lint:changed": "(git diff --name-only --diff-filter=ACMR; git ls-files --others --exclude-standard) | grep '\\.jsx\\?$' | sed 's|^frontend/||' | sort -u | xargs -r biome check --write"+ "lint:changed": "(git diff --name-only --diff-filter=ACMR; git ls-files --others --exclude-standard) | grep -E '\\.[jt]sx?$' | sed 's|^frontend/||' | sort -u | xargs -r biome check --write",+ "typecheck": "tsc --noEmit"},"browserslist": {"production": [@@ -86,10 +99,19 @@},"devDependencies": {"@biomejs/biome": "^2.3.13",+ "@tailwindcss/postcss": "^4",+ "@tailwindcss/typography": "^0.5.20",+ "@tailwindcss/vite": "^4",+ "@testing-library/dom": "^10",+ "@types/react": "^19",+ "@types/react-dom": "^19","@vitejs/plugin-react": "^4.4.0",+ "autoprefixer": "^10.5.4","baseline-browser-mapping": "^2.9.19","happy-dom": "^20.10.2","jsdom": "^27.0.1",+ "tailwindcss": "^4",+ "typescript": "^7.0.2","vite": "^7.3.5","vite-plugin-svgr": "^4.5.0","vitest": "^3.2.6"diff --git a/frontend/postcss.config.js b/frontend/postcss.config.jsnew file mode 100644index 000000000..f69c5d411--- /dev/null+++ b/frontend/postcss.config.js@@ -0,0 +1,6 @@+export default {+ plugins: {+ "@tailwindcss/postcss": {},+ autoprefixer: {},+ },+};diff --git a/frontend/src/App.jsx b/frontend/src/App.jsxindex ce7a94103..03fb33817 100644--- a/frontend/src/App.jsx+++ b/frontend/src/App.jsx@@ -1,10 +1,15 @@-import { Button, ConfigProvider, notification, theme } from "antd";import axios from "axios";+import { ThemeProvider, useTheme } from "next-themes";+import { DismissableLayer } from "radix-ui/internal";import { useEffect } from "react";import { HelmetProvider } from "react-helmet-async";import { BrowserRouter } from "react-router-dom";+import { Toaster } from "@/components/ui/sonner";+import { ConfirmHost } from "@/components/widgets/confirm-modal/ConfirmHost";+import { showAppToast } from "@/hooks/useAppToast";import { GenericLoader } from "./components/generic-loader/GenericLoader";import CustomMarkdown from "./components/helpers/custom-markdown/CustomMarkdown.jsx";+import { NotificationClearAll } from "./components/notification/NotificationClearAll.jsx";import { NotificationIdLine } from "./components/notification/NotificationIdLine.jsx";import { PageTitle } from "./components/widgets/page-title/PageTitle.jsx";import { THEME } from "./helpers/GetStaticData.js";@@ -32,31 +37,10 @@ try {}function App() {- const [notificationAPI, contextHolder] = notification.useNotification();- const { defaultAlgorithm, darkAlgorithm } = theme;const { sessionDetails, isLogoutLoading } = useSessionStore();const { alertDetails } = useAlertStore();const { pushLogMessages } = useSocketLogsStore();- const btn = (- <>- <Button- type="link"- size="small"- onClick={() => notificationAPI.destroy(alertDetails?.key)}- >- Close- </Button>- <Button- type="link"- size="small"- onClick={() => notificationAPI.destroy()}- >- Close All- </Button>- </>- );-useEffect(() => {if (!alertDetails?.content) {return;@@ -84,14 +68,11 @@ function App() {</>);- notificationAPI.open({- message: alertDetails?.title,- description,- type: alertDetails?.type,- duration: alertDetails?.duration,- btn,- key: alertDetails?.key,- });+ // P2-06: sonner is now the single notification surface. The antd+ // `notification` branch (and its btn/contextHolder scaffolding) is gone.+ // `description` carries the rendered markdown + ID lines that antd used to+ // display, so the alert body is unchanged.+ showAppToast(alertDetails, description);const logSuffix = [showExecutionId && `Execution ID: \`${alertDetails.executionId}\``,@@ -114,23 +95,9 @@ function App() {}, [alertDetails]);return (- <ConfigProvider- direction={window.direction || "ltr"}- theme={{- algorithm:- sessionDetails.currentTheme === THEME.DARK- ? darkAlgorithm- : defaultAlgorithm,- components: {- Button: {- colorPrimary: "#092C4C",- colorPrimaryHover: "#0e4274",- colorPrimaryActive: "#092C4C",- },- },- }}- >+ <><HelmetProvider>+ <SyncShadcnTheme currentTheme={sessionDetails.currentTheme} />{isLogoutLoading && (<div className="fullscreen-loader"><GenericLoader />@@ -140,12 +107,65 @@ function App() {<PostHogPageviewTracker /><PageTitle title={"Unstract"} />{GoogleTagManagerHelper && <GoogleTagManagerHelper />}- {contextHolder}+ {/* Branch, so the toast stack is exempt from outside-dismissal:+ Radix would otherwise read a click on a toast as an interaction+ outside whatever layer is open and close it — dismissing an error+ toast would take the dialog that raised it, and the user's typed+ input, with it. The matching half of the fix is the+ `[data-sonner-toaster]` pointer-events rule in index.css, without+ which those clicks never land at all. */}+ <DismissableLayer.Branch>+ {/* top-right matches where antd's notification stack used to+ appear; sonner defaults to bottom-right (C4). The 56px offset+ reserves a band above the stack for the "Clear all" control —+ see `.notification-clear-all`, which pins itself into it. */}+ <Toaster position="top-right" offset={56} closeButton richColors />+ <NotificationClearAll />+ </DismissableLayer.Branch>+ {/* Mounted once here so a confirm dialog outlives whatever opened+ it — Delete sits inside a dropdown that unmounts on click. */}+ <ConfirmHost /><Router /></BrowserRouter></HelmetProvider>- </ConfigProvider>+ </>+ );+}++/**+ * P0-15: mirror the existing session theme onto next-themes so ONE piece of+ * state drives both antd's algorithm and the `.dark` class that the Midnight+ * Bloom tokens key off.+ *+ * `sessionDetails.currentTheme` remains the single source of truth — this only+ * reflects it. How the theme is persisted, and where the user toggles it, are+ * deliberately unchanged (C4).+ */+function SyncShadcnTheme({ currentTheme }) {+ const { setTheme } = useTheme();++ useEffect(() => {+ setTheme(currentTheme === THEME.DARK ? THEME.DARK : THEME.LIGHT);+ }, [currentTheme, setTheme]);++ return null;+}++/**+ * next-themes owns the `.dark` class on <html>. `enableSystem` is off because+ * the app's theme is driven by the user's stored preference, not the OS.+ */+function AppWithProviders() {+ return (+ <ThemeProvider+ attribute="class"+ enableSystem={false}+ defaultTheme={THEME.LIGHT}+ disableTransitionOnChange+ >+ <App />+ </ThemeProvider>);}-export { App };+export { AppWithProviders as App };diff --git a/frontend/src/components/agency/agency/Agency.css b/frontend/src/components/agency/agency/Agency.cssindex a6a8da764..9af5ab940 100644--- a/frontend/src/components/agency/agency/Agency.css+++ b/frontend/src/components/agency/agency/Agency.css@@ -25,7 +25,7 @@.agency-sider-content > div {height: 100%;- background-color: var(--white);+ background-color: var(--card);/* background-color: #DAE3EC; */}@@ -42,7 +42,7 @@}.agency-ide-collapse-panel {- background-color: var(--white);+ background-color: var(--card);border: none;border-radius: 0px;}@@ -93,7 +93,7 @@}.progress-count {- font-size: 14px;+ font-size: 13px;color: #8c8c8c;}@@ -109,8 +109,13 @@flex-direction: column;}+/* shadcn's Alert base is `w-full`, where antd's sized to its container. With+ * `margin: 0 24px` that made the box 100% + 48px, so `.agency-layout`+ * (overflow-x: auto) grew a horizontal scrollbar on every workflow page.+ * Subtract the margins from the width rather than dropping them. */.deployment-alert {margin: 0 24px;+ width: calc(100% - 48px);}.workflow-card-header {display: flex;@@ -122,7 +127,7 @@.workflow-card-number {width: 32px;height: 32px;- background: #1890ff;+ background: var(--primary);color: white;border-radius: 50%;display: flex;@@ -135,12 +140,17 @@.workflow-card-number.completed {background: #e6f7ff;- color: #1890ff;+ color: var(--primary);}.workflow-card-number.completed .anticon {font-size: 16px;- color: #1890ff;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 16px;+ height: 16px;+ color: var(--primary);}.workflow-card-info {@@ -170,7 +180,7 @@.workflow-select:focus {outline: none;- border-color: #1890ff;+ border-color: var(--primary);box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);}@@ -263,8 +273,8 @@}.select-tool-btn:hover {- border-color: #1890ff;- color: #1890ff;+ border-color: var(--primary);+ color: var(--primary);}/* Status Message */@@ -277,7 +287,7 @@}.status-text {- font-size: 14px;+ font-size: 13px;color: #586069;font-style: italic;}diff --git a/frontend/src/components/agency/agency/Agency.jsx b/frontend/src/components/agency/agency/Agency.jsxindex 5fe5ec3a9..10735cb67 100644--- a/frontend/src/components/agency/agency/Agency.jsx+++ b/frontend/src/components/agency/agency/Agency.jsx@@ -1,22 +1,12 @@-import {- BugOutlined,- HistoryOutlined,- LoadingOutlined,- PlayCircleOutlined,- SettingOutlined,-} from "@ant-design/icons";-import {- Alert,- Button,- Col,- Dropdown,- Progress,- Row,- Select,- Typography,-} from "antd";+import { Bug, CirclePlay, History, LoaderCircle, Settings } from "lucide-react";import { useEffect, useState } from "react";import { Link } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Alert, Progress } from "@/components/ui/shims/antd-leaves";+import { Dropdown } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";import "./Agency.css";import { sourceTypes, wfExecutionTypes } from "../../../helpers/GetStaticData";@@ -1033,19 +1023,19 @@ function Agency() {{key: "run-workflow",label: "Run Workflow",- icon: <PlayCircleOutlined />,+ icon: <CirclePlay />,disabled: isClearingFileHistory || loadingType === "EXECUTE",},{key: "view-file-history",label: "View File History",- icon: <HistoryOutlined />,+ icon: <History />,disabled: isClearingFileHistory || loadingType === "EXECUTE",},{key: "clear-history",label: "Clear Processed File History",- icon: isClearingFileHistory ? <LoadingOutlined /> : <HistoryOutlined />,+ icon: isClearingFileHistory ? <LoaderCircle /> : <History />,disabled: isClearingFileHistory || loadingType === "EXECUTE",},];@@ -1082,14 +1072,21 @@ function Agency() {strokeColor={workflowProgress === 100 ? "#52c41a" : "#1890ff"}/></div>+ {/*+ * The entries are portalled and built from `actionsMenuItems`, so+ * they derive their ids from this one: `workflow-actions-item-+ * run-workflow`, and so on for the other two.+ */}<Dropdownmenu={{ items: actionsMenuItems, onClick: handleMenuClick }}placement="bottomRight"trigger={["click"]}+ data-testid="workflow-actions"><Buttontype="primary"- icon={<SettingOutlined />}+ icon={<Settings />}+ data-testid="workflow-actions-btn"loading={loadingType === "EXECUTE" || isClearingFileHistory}disabled={loadingType === "EXECUTE" || isClearingFileHistory}>@@ -1251,7 +1248,7 @@ function Agency() {<div className="debug-panel"><div className="debug-panel-header"><div className="debug-panel-title">- <BugOutlined />+ <Bug /><Typography.Text>Debug Panel</Typography.Text></div><Buttondiff --git a/frontend/src/components/agency/cards-list/CardsList.jsx b/frontend/src/components/agency/cards-list/CardsList.jsxindex f0b7ab8e0..e8af9bb23 100644--- a/frontend/src/components/agency/cards-list/CardsList.jsx+++ b/frontend/src/components/agency/cards-list/CardsList.jsx@@ -1,8 +1,11 @@-import { CloseOutlined } from "@ant-design/icons";-import { Card, Col, Progress, Row, Typography } from "antd";+import { X } from "lucide-react";import PropTypes from "prop-types";import { useRef } from "react";import { useDrag, useDrop } from "react-dnd";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Progress } from "@/components/ui/shims/antd-leaves";+import { Card } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useAlertStore } from "../../../store/alert-store";@@ -161,7 +164,7 @@ const CardsList = ({ step, index, activeTool, moveItem }) => {handleConfirm={() => deleteStep()}content="Want to delete this step">- <CloseOutlined />+ <X /></ConfirmModal></div>)}diff --git a/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.css b/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.cssindex dcd520fe5..a56022e7e 100644--- a/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.css+++ b/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.css@@ -26,7 +26,7 @@}.conn-modal-col-left {- background-color: var(--page-bg-3);+ background-color: var(--muted);}.conn-modal-col .ant-tabs-nav {@@ -99,7 +99,7 @@}.connector-dropdown-add-new:focus {- outline: 2px solid #1890ff;+ outline: 2px solid var(--ring);outline-offset: -2px;background-color: #f0f0f0;}@@ -155,6 +155,11 @@.connector-placeholder-icon {font-size: 48px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 48px;+ height: 48px;margin-bottom: 16px;color: #bfbfbf;}diff --git a/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx b/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsxindex f982e3722..1c90a2d81 100644--- a/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx+++ b/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx@@ -1,18 +1,14 @@-import { CloudDownloadOutlined, CloudUploadOutlined } from "@ant-design/icons";-import {- Button,- Col,- Image,- Modal,- Row,- Select,- Space,- Tabs,- Typography,-} from "antd";import { cloneDeep, isEqual } from "lodash";+import { CloudDownload, CloudUpload } from "lucide-react";import PropTypes from "prop-types";import { useCallback, useEffect, useRef, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Col, Row, Space } from "@/components/ui/shims/antd-layout";+import { Image } from "@/components/ui/shims/antd-leaves";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Tabs } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { fetchAllPages } from "../../../helpers/pagination";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";@@ -614,9 +610,9 @@ function ConfigureConnectorModal({{!connDetails?.id && connMode !== "API" && (<div className="connector-placeholder">{connType === "input" ? (- <CloudDownloadOutlined className="connector-placeholder-icon" />+ <CloudDownload className="connector-placeholder-icon" />) : (- <CloudUploadOutlined className="connector-placeholder-icon" />+ <CloudUpload className="connector-placeholder-icon" />)}<Typography.Text className="connector-placeholder-text">Select an existing connector or create a new connector to continuediff --git a/frontend/src/components/agency/display-logs/DisplayLogs.css b/frontend/src/components/agency/display-logs/DisplayLogs.cssindex 797b27535..1cb8ee8ad 100644--- a/frontend/src/components/agency/display-logs/DisplayLogs.css+++ b/frontend/src/components/agency/display-logs/DisplayLogs.css@@ -6,10 +6,10 @@}.display-logs-col-first {- font-size: 14px;+ font-size: 13px;}.display-logs-col {- font-size: 14px;+ font-size: 13px;padding-left: 5px;}diff --git a/frontend/src/components/agency/display-logs/DisplayLogs.jsx b/frontend/src/components/agency/display-logs/DisplayLogs.jsxindex 48f8226a0..f5b46e067 100644--- a/frontend/src/components/agency/display-logs/DisplayLogs.jsx+++ b/frontend/src/components/agency/display-logs/DisplayLogs.jsx@@ -1,5 +1,6 @@-import { Col, Row, Typography } from "antd";import { useEffect, useRef } from "react";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Typography } from "@/components/ui/shims/antd-typography";import "./DisplayLogs.css";import { useSocketLogsStore } from "../../../store/socket-logs-store";diff --git a/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx b/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsxindex 41f6e0ad6..342459475 100644--- a/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx+++ b/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx@@ -1,15 +1,11 @@-import {- Button,- Col,- Image,- Row,- Select,- Space,- Tooltip,- Typography,-} from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Col, Row, Space } from "@/components/ui/shims/antd-layout";+import { Image } from "@/components/ui/shims/antd-leaves";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";diff --git a/frontend/src/components/agency/file-upload/FileUpload.jsx b/frontend/src/components/agency/file-upload/FileUpload.jsxindex 704ff0fdb..c380308ba 100644--- a/frontend/src/components/agency/file-upload/FileUpload.jsx+++ b/frontend/src/components/agency/file-upload/FileUpload.jsx@@ -1,6 +1,12 @@-import { UploadOutlined } from "@ant-design/icons";-import { Button, Modal, message, Upload } from "antd";+// Aliased: antd's `Upload` component (still in use until P3) would otherwise be+// shadowed by the lucide icon of the same name.++import { Upload as UploadIcon } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Upload } from "@/components/ui/shims/antd-structure";+import { message } from "@/hooks/useAppToast";import {WORKFLOW_PAGE_MAX_FILES,WORKFLOW_VALIDATION_MESSAGES,@@ -66,7 +72,7 @@ const FileUpload = ({maxCount={WORKFLOW_PAGE_MAX_FILES}multiple={true}>- <Button icon={<UploadOutlined />}>Select File</Button>+ <Button icon={<UploadIcon className="size-4" />}>Select File</Button></Upload></Modal>);diff --git a/frontend/src/components/agency/input-output/InputOutput.jsx b/frontend/src/components/agency/input-output/InputOutput.jsxindex 7ccef4b67..e6650c78e 100644--- a/frontend/src/components/agency/input-output/InputOutput.jsx+++ b/frontend/src/components/agency/input-output/InputOutput.jsx@@ -1,5 +1,6 @@-import { Col, Row, Typography } from "antd";import PropTypes from "prop-types";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Typography } from "@/components/ui/shims/antd-typography";import { InputPlaceholder, OutputPlaceholder } from "../../../assets";import "./InputOutput.css";diff --git a/frontend/src/components/agency/list-of-tools/ListOfTools.jsx b/frontend/src/components/agency/list-of-tools/ListOfTools.jsxindex 2f259cd5a..4ca4a97a2 100644--- a/frontend/src/components/agency/list-of-tools/ListOfTools.jsx+++ b/frontend/src/components/agency/list-of-tools/ListOfTools.jsx@@ -1,7 +1,7 @@-import { Empty } from "antd";import PropTypes from "prop-types";import { DndProvider } from "react-dnd";import { HTML5Backend } from "react-dnd-html5-backend";+import { Empty } from "@/components/ui/shims/antd-leaves";import { SpinnerLoader } from "../../widgets/spinner-loader/SpinnerLoader.jsx";import { ToolInfoCard } from "../tool-info-card/ToolInfoCard.jsx";diff --git a/frontend/src/components/agency/logs-label/LogsLabel.jsx b/frontend/src/components/agency/logs-label/LogsLabel.jsxindex 6f5a50e7a..02c41bea5 100644--- a/frontend/src/components/agency/logs-label/LogsLabel.jsx+++ b/frontend/src/components/agency/logs-label/LogsLabel.jsx@@ -1,4 +1,5 @@-import { Col, Row, Typography } from "antd";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Typography } from "@/components/ui/shims/antd-typography";import "./LogsLabel.css";diff --git a/frontend/src/components/agency/prompt/Prompt.jsx b/frontend/src/components/agency/prompt/Prompt.jsxindex 83940b5a8..e6f2f306c 100644--- a/frontend/src/components/agency/prompt/Prompt.jsx+++ b/frontend/src/components/agency/prompt/Prompt.jsx@@ -1,6 +1,8 @@-import { EditOutlined, MinusOutlined } from "@ant-design/icons";-import { Button, Input, Typography } from "antd";+import { Minus, Pencil } from "lucide-react";import { useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useAlertStore } from "../../../store/alert-store";@@ -88,7 +90,7 @@ function Prompt() {<Buttonsize="small"type="text"- icon={<MinusOutlined />}+ icon={<Minus />}onClick={() => setIsPromptOpen(false)}/></div>@@ -121,7 +123,7 @@ function Prompt() {<Buttonsize="small"type="text"- icon={<EditOutlined />}+ icon={<Pencil />}onClick={() => setIsPromptOpen(true)}/></div>diff --git a/frontend/src/components/agency/side-panel/SidePanel.jsx b/frontend/src/components/agency/side-panel/SidePanel.jsxindex d6476ad0a..9a4ace479 100644--- a/frontend/src/components/agency/side-panel/SidePanel.jsx+++ b/frontend/src/components/agency/side-panel/SidePanel.jsx@@ -1,6 +1,6 @@-import { Typography } from "antd";import { useEffect, useState } from "react";import { useParams } from "react-router-dom";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useSessionStore } from "../../../store/session-store";diff --git a/frontend/src/components/agency/tool-icon/ToolIcon.jsx b/frontend/src/components/agency/tool-icon/ToolIcon.jsxindex bbed9bd60..ed807726a 100644--- a/frontend/src/components/agency/tool-icon/ToolIcon.jsx+++ b/frontend/src/components/agency/tool-icon/ToolIcon.jsx@@ -1,6 +1,6 @@-import { Image } from "antd";import emojiRegex from "emoji-regex";import PropTypes from "prop-types";+import { Image } from "@/components/ui/shims/antd-leaves";import "./ToolIcon.css";diff --git a/frontend/src/components/agency/tool-info-card/ToolInfoCard.jsx b/frontend/src/components/agency/tool-info-card/ToolInfoCard.jsxindex e972d1f0a..b1a28095c 100644--- a/frontend/src/components/agency/tool-info-card/ToolInfoCard.jsx+++ b/frontend/src/components/agency/tool-info-card/ToolInfoCard.jsx@@ -1,6 +1,8 @@-import { Card, Col, Row, Typography } from "antd";import PropTypes from "prop-types";import { useDrag } from "react-dnd";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Card } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "./ToolInfoCard.css";import { ToolIcon } from "../tool-icon/ToolIcon";diff --git a/frontend/src/components/agency/tool-selection-sidebar/ToolSelectionSidebar.css b/frontend/src/components/agency/tool-selection-sidebar/ToolSelectionSidebar.cssindex 01afa5dd4..198380930 100644--- a/frontend/src/components/agency/tool-selection-sidebar/ToolSelectionSidebar.css+++ b/frontend/src/components/agency/tool-selection-sidebar/ToolSelectionSidebar.css@@ -90,6 +90,11 @@.tool-icon {font-size: 20px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 20px;+ height: 20px;color: #262626;flex-shrink: 0;margin-top: 2px;@@ -111,7 +116,7 @@.tool-description {display: block;- font-size: 14px;+ font-size: 13px;line-height: 1.5;color: #6b7280;word-wrap: break-word;@@ -131,16 +136,21 @@.author-icon {color: #9ca3af;- font-size: 14px;+ font-size: 13px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 13px;+ height: 13px;}.author-text {- font-size: 14px;+ font-size: 13px;color: #6b7280;}.time-text {- font-size: 14px;+ font-size: 13px;color: #9ca3af;margin-left: 8px;}diff --git a/frontend/src/components/agency/tool-selection-sidebar/ToolSelectionSidebar.jsx b/frontend/src/components/agency/tool-selection-sidebar/ToolSelectionSidebar.jsxindex 185ed247b..59654622d 100644--- a/frontend/src/components/agency/tool-selection-sidebar/ToolSelectionSidebar.jsx+++ b/frontend/src/components/agency/tool-selection-sidebar/ToolSelectionSidebar.jsx@@ -1,7 +1,11 @@-import { FileTextOutlined, SearchOutlined } from "@ant-design/icons";-import { Button, Card, Input, List, Tag, Typography } from "antd";+import { FileText, Search } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Tag } from "@/components/ui/shims/antd-leaves";+import { Card, List } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "./ToolSelectionSidebar.css";import { ToolIcon } from "../tool-icon/ToolIcon";@@ -66,7 +70,7 @@ function ToolSelectionSidebar({</Typography.Title><Inputplaceholder="Search Prompt Studio project..."- prefix={<SearchOutlined />}+ prefix={<Search />}value={searchTerm}onChange={(e) => setSearchTerm(e.target.value)}className="tool-search-input"@@ -97,7 +101,7 @@ function ToolSelectionSidebar({{tool.icon ? (<ToolIcon iconSrc={tool.icon} showBorder={true} />) : (- <FileTextOutlined className="tool-icon" />+ <FileText className="tool-icon" />)}</div><div className="tool-details">diff --git a/frontend/src/components/agency/tool-settings/ToolSettings.jsx b/frontend/src/components/agency/tool-settings/ToolSettings.jsxindex 79220e060..436eb90ff 100644--- a/frontend/src/components/agency/tool-settings/ToolSettings.jsx+++ b/frontend/src/components/agency/tool-settings/ToolSettings.jsx@@ -1,6 +1,7 @@-import { Empty, Typography } from "antd";import PropTypes from "prop-types";import { createRef, useEffect, useState } from "react";+import { Empty } from "@/components/ui/shims/antd-leaves";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { RjsfFormLayout } from "../../../layouts/rjsf-form-layout/RjsfFormLayout.jsx";diff --git a/frontend/src/components/agency/tools/Tools.jsx b/frontend/src/components/agency/tools/Tools.jsxindex a0cf156da..1d19bae99 100644--- a/frontend/src/components/agency/tools/Tools.jsx+++ b/frontend/src/components/agency/tools/Tools.jsx@@ -1,7 +1,7 @@-import { SearchOutlined } from "@ant-design/icons";-import { Input } from "antd";import debounce from "lodash/debounce";+import { Search } from "lucide-react";import { useCallback, useEffect, useState } from "react";+import { Input } from "@/components/ui/shims/antd-inputs";import "./Tools.css";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";@@ -68,7 +68,7 @@ function Tools() {className="tool-chest-input"placeholder="Search for tool"onChange={onSearchDebounce}- prefix={<SearchOutlined className="icon" />}+ prefix={<Search className="icon" />}/></div><div className="wf-tools-list">diff --git a/frontend/src/components/agency/workflow-card/WorkflowCard.jsx b/frontend/src/components/agency/workflow-card/WorkflowCard.jsxindex d094977bb..fa2dd3ff6 100644--- a/frontend/src/components/agency/workflow-card/WorkflowCard.jsx+++ b/frontend/src/components/agency/workflow-card/WorkflowCard.jsx@@ -1,6 +1,8 @@-import { CheckOutlined } from "@ant-design/icons";-import { Flex, Image, Typography } from "antd";+import { Check } from "lucide-react";import PropTypes from "prop-types";+import { Flex } from "@/components/ui/shims/antd-layout";+import { Image } from "@/components/ui/shims/antd-leaves";+import { Typography } from "@/components/ui/shims/antd-typography";import { DsSettingsCard } from "../ds-settings-card/DsSettingsCard";import "./WorkflowCard.css";@@ -51,7 +53,7 @@ const renderConnectorBadge = (number, stepNumber) => {// Main function to render the number displayconst renderNumberDisplay = (number, connectorIcon, stepNumber) => {if (isCompletedStatus(number)) {- return <CheckOutlined />;+ return <Check />;}if (isConnectorTypeStatus(number)) {diff --git a/frontend/src/components/common/PromptStudioModal.css b/frontend/src/components/common/PromptStudioModal.cssindex 17cd59cf8..f3f5916c5 100644--- a/frontend/src/components/common/PromptStudioModal.css+++ b/frontend/src/components/common/PromptStudioModal.css@@ -1,7 +1,12 @@/* Modal styles */.prompt-studio-modal {padding: 10px;- top: 20px;+ /* `top: 20px` removed. It was written for antd, whose modal wrapper is+ * statically positioned so the value read as "offset from the top of the+ * viewport". The shadcn Dialog is `position: fixed` and centred with+ * `top: 50%; translate-y(-50%)`, so the same rule overrode the centring and+ * the transform then pulled the dialog 127px ABOVE the viewport — header+ * clipped off-screen. Centring is the component's job now. */}.prompt-studio-modal .ant-modal-content {@@ -33,7 +38,7 @@.prompt-studio-modal .ant-modal-close-x {font-size: 20px;- color: rgba(0, 0, 0, 0.45);+ color: var(--muted-foreground);font-weight: 300;width: 32px;height: 32px;@@ -47,7 +52,7 @@.prompt-studio-title {font-size: 16px;font-weight: 500;- color: rgba(0, 0, 0, 0.88);+ color: var(--foreground);padding: 0;margin-bottom: -4px;}@@ -55,8 +60,8 @@/* Description styles */.prompt-studio-description {margin-bottom: 24px;- font-size: 14px;- color: rgba(0, 0, 0, 0.65);+ font-size: 13px;+ color: var(--muted-foreground);line-height: 22px;}@@ -70,10 +75,10 @@/* Button styles */.prompt-studio-create-btn {transition: all 0.2s ease-in-out !important;- background-color: #1677ff !important;- border-color: #1677ff !important;+ background-color: var(--primary) !important;+ border-color: var(--primary) !important;height: 32px !important;- font-size: 14px !important;+ font-size: 13px !important;display: flex !important;align-items: center !important;justify-content: center !important;@@ -86,8 +91,9 @@}.prompt-studio-create-btn:hover {- background-color: #4096ff !important;- border-color: #4096ff !important;+ background-color: var(--primary) !important;+ opacity: 0.85;+ border-color: var(--primary) !important;}.prompt-studio-create-btn .plus-icon {@@ -101,16 +107,17 @@transition: all 0.2s ease-in-out !important;margin-top: 8px !important;height: 32px !important;- font-size: 14px !important;+ font-size: 13px !important;padding: 4px 0 !important;margin: 0 !important;font-weight: normal !important;- color: #1677ff !important;+ color: var(--primary) !important;border-radius: 6px !important;}.prompt-studio-guide-btn:hover {- color: #4096ff !important;+ color: var(--primary) !important;+ opacity: 0.85;background-color: transparent !important;}@@ -118,16 +125,16 @@transition: all 0.2s ease-in-out !important;margin-top: 8px !important;height: 32px !important;- font-size: 14px !important;+ font-size: 13px !important;padding: 4px 0 !important;margin: 0 !important;- color: rgba(0, 0, 0, 0.45) !important;+ color: var(--muted-foreground) !important;font-weight: normal !important;border-radius: 6px !important;}.prompt-studio-cancel-btn:hover {- color: rgba(0, 0, 0, 0.88) !important;+ color: var(--foreground) !important;background-color: rgba(0, 0, 0, 0.06) !important;}@@ -138,10 +145,10 @@}.prompt-studio-modal .ant-modal-close:hover .ant-modal-close-x {- color: rgba(0, 0, 0, 0.88) !important;+ color: var(--foreground) !important;}/* Mask styles */.prompt-studio-modal .ant-modal-mask {- background-color: rgba(0, 0, 0, 0.45) !important;+ background-color: var(--muted-foreground) !important;}diff --git a/frontend/src/components/common/PromptStudioModal.jsx b/frontend/src/components/common/PromptStudioModal.jsxindex 503399ec0..613cc2ea7 100644--- a/frontend/src/components/common/PromptStudioModal.jsx+++ b/frontend/src/components/common/PromptStudioModal.jsx@@ -1,11 +1,12 @@-import { Button, Modal } from "antd";import PropTypes from "prop-types";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Modal } from "@/components/ui/shims/antd-overlays";import { useSessionStore } from "../../store/session-store";import "./PromptStudioModal.css";-export function PromptStudioModal({ onClose, showModal }) {+export function PromptStudioModal({ onClose = null, showModal = false }) {const navigate = useNavigate();const { sessionDetails } = useSessionStore();@@ -68,8 +69,3 @@ PromptStudioModal.propTypes = {onClose: PropTypes.func,showModal: PropTypes.bool,};--PromptStudioModal.defaultProps = {- onClose: null,- showModal: false,-};diff --git a/frontend/src/components/connectors/connector-card/ConnectorCard.css b/frontend/src/components/connectors/connector-card/ConnectorCard.cssindex fc5b0802d..d50099301 100644--- a/frontend/src/components/connectors/connector-card/ConnectorCard.css+++ b/frontend/src/components/connectors/connector-card/ConnectorCard.css@@ -5,7 +5,7 @@}.connector-card.selected {- border-color: #1890ff;+ border-color: var(--primary);box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);}diff --git a/frontend/src/components/connectors/connector-card/ConnectorCard.jsx b/frontend/src/components/connectors/connector-card/ConnectorCard.jsxindex 183aa6214..5ab33280d 100644--- a/frontend/src/components/connectors/connector-card/ConnectorCard.jsx+++ b/frontend/src/components/connectors/connector-card/ConnectorCard.jsx@@ -1,5 +1,7 @@-import { Card, Image, Typography } from "antd";import PropTypes from "prop-types";+import { Image } from "@/components/ui/shims/antd-leaves";+import { Card } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "../../input-output/data-source-card/DataSourceCard.css";import "./ConnectorCard.css";diff --git a/frontend/src/components/connectors/connector-list-modal/ConnectorListModal.jsx b/frontend/src/components/connectors/connector-list-modal/ConnectorListModal.jsxindex df71042a3..68b6f5415 100644--- a/frontend/src/components/connectors/connector-list-modal/ConnectorListModal.jsx+++ b/frontend/src/components/connectors/connector-list-modal/ConnectorListModal.jsx@@ -1,8 +1,12 @@-import { SearchOutlined } from "@ant-design/icons";-import { Col, Input, Row, Spin, Tabs, Typography } from "antd";import debounce from "lodash/debounce";+import { Search } from "lucide-react";import PropTypes from "prop-types";-import { useEffect, useState } from "react";+import { useEffect, useMemo, useState } from "react";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Spin } from "@/components/ui/shims/antd-leaves";+import { Tabs } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { ConnectorCard } from "../connector-card/ConnectorCard";import "./ConnectorListModal.css";@@ -17,40 +21,61 @@ function ConnectorListModal({const [searchText, setSearchText] = useState("");const [activeTab, setActiveTab] = useState("all");- useEffect(() => {- filterConnectors(searchText, activeTab);- }, [connectors, searchText, activeTab]);-- const filterConnectors = debounce((searchText, mode) => {- let filtered = [...connectors];-- // Filter by search text- if (searchText?.trim()) {- const searchUpper = searchText.toUpperCase().trim();- filtered = filtered.filter((connector) =>- connector?.name?.toUpperCase().includes(searchUpper),- );- }-- // Filter by connector mode- if (mode !== "all") {- filtered = filtered.filter((connector) => {- if (mode === "FILESYSTEM") {- return (- connector?.connector_mode === "FILESYSTEM" ||- connector?.can_write ||- connector?.can_read- ); // fallback logic+ /*+ * Built inline, `debounce(...)` was a fresh instance on every render, so the+ * effect below scheduled its filter on a brand-new 300ms timer each time and+ * nothing was ever coalesced. `connectors` is a dep because the closure reads+ * it — memoising on [] would filter a stale list once the connectors load.+ *+ * It has to be declared ABOVE the effect now: the dep array is evaluated+ * during render, so naming a `const` that is initialised further down would+ * throw on the temporal dead zone rather than merely read as undefined.+ */+ const filterConnectors = useMemo(+ () =>+ debounce((searchText, mode) => {+ let filtered = [...connectors];++ // Filter by search text+ if (searchText?.trim()) {+ const searchUpper = searchText.toUpperCase().trim();+ filtered = filtered.filter((connector) =>+ connector?.name?.toUpperCase().includes(searchUpper),+ );}- if (mode === "DATABASE") {- return connector?.connector_mode === "DATABASE";++ // Filter by connector mode+ if (mode !== "all") {+ filtered = filtered.filter((connector) => {+ if (mode === "FILESYSTEM") {+ return (+ connector?.connector_mode === "FILESYSTEM" ||+ connector?.can_write ||+ connector?.can_read+ ); // fallback logic+ }+ if (mode === "DATABASE") {+ return connector?.connector_mode === "DATABASE";+ }+ return true;+ });}- return true;- });- }- setFilteredConnectors(filtered);- }, 300);+ setFilteredConnectors(filtered);+ }, 300),+ [connectors],+ );++ useEffect(() => {+ filterConnectors(searchText, activeTab);+ }, [filterConnectors, searchText, activeTab]);++ /*+ * Cancel on unmount, and on every `connectors` change: the superseded+ * instance would otherwise still fire and write a filter of the OLD list+ * over the new one.+ */+ useEffect(() => () => filterConnectors.cancel(), [filterConnectors]);const handleSearchChange = (event) => {const { value } = event.target;@@ -96,7 +121,7 @@ function ConnectorListModal({<div className="connector-search-section"><Inputplaceholder="Search for connectors..."- prefix={<SearchOutlined className="search-icon" />}+ prefix={<Search className="search-icon" />}onChange={handleSearchChange}value={searchText}size="large"diff --git a/frontend/src/components/cron-generator/CronGenerator.jsx b/frontend/src/components/cron-generator/CronGenerator.jsxindex 538a21896..5b77d879f 100644--- a/frontend/src/components/cron-generator/CronGenerator.jsx+++ b/frontend/src/components/cron-generator/CronGenerator.jsx@@ -1,20 +1,142 @@-import { Modal } from "antd";-import { useState } from "react";-import { Cron } from "react-js-cron";-import "react-js-cron/dist/styles.css";+import cronstrue from "cronstrue";import PropTypes from "prop-types";+import { useMemo, useState } from "react";++import { Modal } from "@/components/ui/shims/antd-overlays";+import { cn } from "@/lib/utils";++/**+ * Cron schedule picker.+ *+ * Replaces `react-js-cron`, which was the LAST thing pulling antd into the+ * dependency tree — a 58MB framework serving one 38-line component. Hand-rolled+ * on the existing primitives rather than swapping in another library, because a+ * new dependency is a new transitive surface and removing exactly that is the+ * point of this change.+ *+ * The contract is unchanged: `setCronValue` receives a standard 5-field cron+ * string, and the parent (EtlTaskDeploy) keeps rendering the human-readable+ * summary itself via cronstrue.+ *+ * Known and deliberately NOT changed here: the picker opens at the default+ * schedule rather than loading the pipeline's current one. That was true of the+ * react-js-cron version too, and fixing it means changing the call-site's+ * contract, which belongs in its own change.+ */++const PERIODS = [+ { key: "hour", label: "Every hour" },+ { key: "day", label: "Every day" },+ { key: "week", label: "Every week" },+ { key: "month", label: "Every month" },+ { key: "custom", label: "Custom expression" },+];++const WEEKDAYS = [+ { value: 0, label: "Sunday" },+ { value: 1, label: "Monday" },+ { value: 2, label: "Tuesday" },+ { value: 3, label: "Wednesday" },+ { value: 4, label: "Thursday" },+ { value: 5, label: "Friday" },+ { value: 6, label: "Saturday" },+];++const range = (n) => Array.from({ length: n }, (_, i) => i);+const pad = (n) => String(n).padStart(2, "0");++/** Compose the 5-field expression: minute hour day-of-month month day-of-week */+function buildCron({ period, minute, hour, weekday, monthDay }) {+ switch (period) {+ case "hour":+ return `${minute} * * * *`;+ case "day":+ return `${minute} ${hour} * * *`;+ case "week":+ return `${minute} ${hour} * * ${weekday}`;+ case "month":+ return `${minute} ${hour} ${monthDay} * *`;+ default:+ return "";+ }+}++/**+ * cronstrue is the same parser the call-site uses for its summary, so if it+ * accepts the expression the surrounding UI will too. Cheaper and stricter+ * than hand-rolling a validator.+ */+function describe(expression) {+ if (!expression) {+ return { ok: false, text: "Enter a cron expression." };+ }+ try {+ return { ok: true, text: cronstrue.toString(expression) };+ } catch {+ return { ok: false, text: "Not a valid cron expression." };+ }+}++/** Bare <select>, styled to match the app's Input. */+function Field({ label, value, onChange, children }) {+ return (+ <label className="flex flex-col gap-1 text-sm">+ <span className="text-muted-foreground">{label}</span>+ <select+ value={value}+ onChange={(e) => onChange(e.target.value)}+ className={cn(+ "h-9 rounded-md border border-input bg-transparent px-2 py-1 text-sm",+ "shadow-sm transition-colors",+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",+ )}+ >+ {children}+ </select>+ </label>+ );+}++Field.propTypes = {+ label: PropTypes.string.isRequired,+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,+ onChange: PropTypes.func.isRequired,+ children: PropTypes.node,+};function CronGenerator({ open, showCronGenerator, setCronValue }) {- const [cronState, setCronState] = useState("0 * * * *");+ const [period, setPeriod] = useState("hour");+ const [minute, setMinute] = useState(0);+ const [hour, setHour] = useState(0);+ const [weekday, setWeekday] = useState(1);+ const [monthDay, setMonthDay] = useState(1);+ const [custom, setCustom] = useState("0 * * * *");++ const expression = useMemo(() => {+ if (period === "custom") {+ return custom.trim();+ }+ return buildCron({ period, minute, hour, weekday, monthDay });+ }, [period, minute, hour, weekday, monthDay, custom]);++ const summary = useMemo(() => describe(expression), [expression]);+const handleCancel = () => {showCronGenerator(false);};const updateCron = () => {- setCronValue(cronState);+ // Guard the OK path rather than each keystroke: a half-typed custom+ // expression should not be rejected while it is still being typed.+ if (!summary.ok) {+ return;+ }+ setCronValue(expression);handleCancel();};+ const showTime = period !== "hour" && period !== "custom";+return (<Modaltitle="Choose Cron schedule"@@ -23,8 +145,96 @@ function CronGenerator({ open, showCronGenerator, setCronValue }) {closable={false}onCancel={handleCancel}onOk={updateCron}+ okButtonProps={{ disabled: !summary.ok }}>- <Cron value={cronState} setValue={setCronState} />+ <div className="flex flex-col gap-4">+ <div className="flex flex-wrap gap-3">+ <Field label="Repeat" value={period} onChange={setPeriod}>+ {PERIODS.map((p) => (+ <option key={p.key} value={p.key}>+ {p.label}+ </option>+ ))}+ </Field>++ {period === "week" && (+ <Field label="On" value={weekday} onChange={(v) => setWeekday(+v)}>+ {WEEKDAYS.map((d) => (+ <option key={d.value} value={d.value}>+ {d.label}+ </option>+ ))}+ </Field>+ )}++ {period === "month" && (+ <Field+ label="Day of month"+ value={monthDay}+ onChange={(v) => setMonthDay(+v)}+ >+ {range(31).map((d) => (+ <option key={d + 1} value={d + 1}>+ {d + 1}+ </option>+ ))}+ </Field>+ )}++ {showTime && (+ <Field label="Hour" value={hour} onChange={(v) => setHour(+v)}>+ {range(24).map((h) => (+ <option key={h} value={h}>+ {pad(h)}+ </option>+ ))}+ </Field>+ )}++ {period !== "custom" && (+ <Field+ label="Minute"+ value={minute}+ onChange={(v) => setMinute(+v)}+ >+ {range(60).map((m) => (+ <option key={m} value={m}>+ {pad(m)}+ </option>+ ))}+ </Field>+ )}+ </div>++ {period === "custom" && (+ <label className="flex flex-col gap-1 text-sm">+ <span className="text-muted-foreground">Cron expression</span>+ <input+ type="text"+ value={custom}+ onChange={(e) => setCustom(e.target.value)}+ placeholder="minute hour day-of-month month day-of-week"+ className={cn(+ "h-9 rounded-md border border-input bg-transparent px-3 py-1",+ "font-mono text-sm shadow-sm transition-colors",+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",+ )}+ />+ </label>+ )}++ <div className="rounded-md border border-border bg-muted px-3 py-2">+ <div className="font-mono text-sm">{expression || "—"}</div>+ <div+ className={cn(+ "mt-1 text-xs",+ summary.ok ? "text-muted-foreground" : "text-destructive",+ )}+ >+ {summary.text}+ </div>+ </div>+ </div></Modal>);}diff --git a/frontend/src/components/cron-generator/CronGenerator.test.jsx b/frontend/src/components/cron-generator/CronGenerator.test.jsxnew file mode 100644index 000000000..d98086d16--- /dev/null+++ b/frontend/src/components/cron-generator/CronGenerator.test.jsx@@ -0,0 +1,191 @@+import { fireEvent, render, screen, waitFor } from "@testing-library/react";+import cronstrue from "cronstrue";+import { describe, expect, it, vi } from "vitest";++import { Modal } from "@/components/ui/shims/antd-overlays";+import CronGenerator from "./CronGenerator";++/**+ * This replaced `react-js-cron` — the last thing pulling antd into the tree.+ * The contract that matters is narrow: emit a valid 5-field cron string+ * through `setCronValue`, because the call-site (EtlTaskDeploy) feeds that+ * straight to cronstrue for its summary and to the backend as the schedule.+ *+ * So the assertions round-trip through cronstrue rather than string-matching:+ * "the expression means what the user picked" is the real property, and it is+ * checked by the same parser production uses.+ */++function open(props = {}) {+ const setCronValue = vi.fn();+ const showCronGenerator = vi.fn();+ render(+ <CronGenerator+ open+ setCronValue={setCronValue}+ showCronGenerator={showCronGenerator}+ {...props}+ />,+ );+ return { setCronValue, showCronGenerator };+}++const pick = (label, value) =>+ fireEvent.change(screen.getByLabelText(label), { target: { value } });++const confirm = () =>+ fireEvent.click(screen.getByRole("button", { name: "OK" }));++describe("CronGenerator", () => {+ it("defaults to hourly and emits a valid expression", () => {+ const { setCronValue } = open();+ confirm();+ expect(setCronValue).toHaveBeenCalledWith("0 * * * *");+ expect(cronstrue.toString("0 * * * *")).toMatch(/every hour/i);+ });++ it("builds a daily schedule at the chosen time", () => {+ const { setCronValue } = open();+ pick("Repeat", "day");+ pick("Hour", "9");+ pick("Minute", "30");+ confirm();++ const [expression] = setCronValue.mock.calls[0];+ expect(expression).toBe("30 9 * * *");+ // The user picked 09:30 daily — assert the MEANING, not the string.+ expect(cronstrue.toString(expression)).toMatch(/09:30 AM/);+ });++ it("builds a weekly schedule on the chosen weekday", () => {+ const { setCronValue } = open();+ pick("Repeat", "week");+ pick("On", "3");+ pick("Hour", "6");+ pick("Minute", "0");+ confirm();++ const [expression] = setCronValue.mock.calls[0];+ expect(expression).toBe("0 6 * * 3");+ expect(cronstrue.toString(expression)).toMatch(/wednesday/i);+ });++ it("builds a monthly schedule on the chosen day", () => {+ const { setCronValue } = open();+ pick("Repeat", "month");+ pick("Day of month", "15");+ pick("Hour", "1");+ pick("Minute", "5");+ confirm();++ const [expression] = setCronValue.mock.calls[0];+ expect(expression).toBe("5 1 15 * *");+ expect(cronstrue.toString(expression)).toMatch(/15/);+ });++ it("accepts a custom expression", () => {+ const { setCronValue } = open();+ pick("Repeat", "custom");+ fireEvent.change(screen.getByLabelText("Cron expression"), {+ target: { value: "*/15 2 * * 1-5" },+ });+ confirm();+ expect(setCronValue).toHaveBeenCalledWith("*/15 2 * * 1-5");+ });++ // A schedule the backend would reject must not escape the dialog.+ it("refuses to emit an invalid custom expression", () => {+ const { setCronValue, showCronGenerator } = open();+ pick("Repeat", "custom");+ fireEvent.change(screen.getByLabelText("Cron expression"), {+ target: { value: "not a cron" },+ });++ expect(screen.getByText(/not a valid cron/i)).toBeInTheDocument();+ confirm();+ expect(setCronValue).not.toHaveBeenCalled();+ expect(showCronGenerator).not.toHaveBeenCalled();+ });++ it("shows a live human-readable summary", () => {+ open();+ pick("Repeat", "day");+ pick("Hour", "13");+ pick("Minute", "45");+ expect(screen.getByText("45 13 * * *")).toBeInTheDocument();+ // cronstrue renders 12-hour time, so 13:45 reads as "01:45 PM".+ expect(screen.getByText(/01:45 PM/)).toBeInTheDocument();+ });++ it("closes without emitting on cancel", () => {+ const { setCronValue, showCronGenerator } = open();+ fireEvent.click(screen.getByRole("button", { name: "Cancel" }));+ expect(showCronGenerator).toHaveBeenCalledWith(false);+ expect(setCronValue).not.toHaveBeenCalled();+ });+});++/**+ * The call-site renders <CronGenerator> as a sibling AFTER EtlTaskDeploy's own+ * </Modal>, so in production this is two stacked Radix dialogs. The existing+ * scroll-lock test covers ONE dialog's lifecycle; two is a different case, and+ * P0-12 (body overflow) is exactly the invariant a nested dialog can break on+ * unmount.+ */+describe("CronGenerator nested inside another Modal", () => {+ function Stack({ innerOpen }) {+ return (+ <>+ <Modal open title="Deploy">+ outer body+ </Modal>+ {innerOpen && (+ <CronGenerator+ open+ setCronValue={() => undefined}+ showCronGenerator={() => undefined}+ />+ )}+ </>+ );+ }++ it("renders over the outer dialog and stays interactive", async () => {+ render(<Stack innerOpen />);+ expect(screen.getByText("outer body")).toBeInTheDocument();+ expect(screen.getByText("Choose Cron schedule")).toBeInTheDocument();++ // Inert Radix triggers have bitten this migration twice; prove the inner+ // dialog's controls actually respond.+ pick("Repeat", "week");+ expect(screen.getByLabelText("On")).toBeInTheDocument();+ });++ it("leaves the outer dialog open when the inner one closes", async () => {+ const { rerender } = render(<Stack innerOpen />);+ rerender(<Stack innerOpen={false} />);++ await waitFor(() =>+ expect(+ screen.queryByText("Choose Cron schedule"),+ ).not.toBeInTheDocument(),+ );+ expect(screen.getByText("outer body")).toBeInTheDocument();+ });++ it("keeps body overflow hidden after the inner dialog unmounts (P0-12)", async () => {+ document.body.style.overflow = "hidden";+ const { rerender } = render(<Stack innerOpen />);+ rerender(<Stack innerOpen={false} />);++ await waitFor(() =>+ expect(+ screen.queryByText("Choose Cron schedule"),+ ).not.toBeInTheDocument(),+ );+ // The regression: the inner dialog's cleanup restoring "" or "visible"+ // would make the fixed app shell scrollable behind the outer dialog.+ expect(document.body.style.overflow).toBe("hidden");+ document.body.style.overflow = "";+ });+});diff --git a/frontend/src/components/custom-tools/adapter-selection-modal/AdapterSelectionModal.jsx b/frontend/src/components/custom-tools/adapter-selection-modal/AdapterSelectionModal.jsxindex af1edd952..fd6bd5943 100644--- a/frontend/src/components/custom-tools/adapter-selection-modal/AdapterSelectionModal.jsx+++ b/frontend/src/components/custom-tools/adapter-selection-modal/AdapterSelectionModal.jsx@@ -1,6 +1,11 @@-import { Divider, Form, Modal, Select, Space, Typography } from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Form } from "@/components/ui/shims/antd-form";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Divider } from "@/components/ui/shims/antd-leaves";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Text, Title } from "@/components/ui/shims/antd-typography";import "./AdapterSelectionModal.css";@@ -10,7 +15,6 @@ import { useExceptionHandler } from "../../../hooks/useExceptionHandler";import { useAlertStore } from "../../../store/alert-store";import { useSessionStore } from "../../../store/session-store";-const { Text, Title } = Typography;const { Option } = Select;function AdapterSelectionModal({diff --git a/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.css b/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.cssindex 19d3dc68d..7217c94ec 100644--- a/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.css+++ b/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.css@@ -9,7 +9,19 @@margin-bottom: 16px;}-.emoji-modal .ant-modal-content {+/*+ * The emoji picker is a Popover, not a Modal — the old+ * `.emoji-modal .ant-modal-content` selector matched nothing after the+ * migration.+ *+ * The picker brings its own chrome and sizing, so the popover must not add+ * padding (shadcn's PopoverContent defaults to `p-4`) or the bubble is padded+ * on all sides and pushed wider than the viewport allows.+ */+.emoji-modal.emoji-modal {+ /* Doubled selector for specificity: this competes with Tailwind's `p-4`+ * utility on PopoverContent, and a single class ties with it on+ * specificity — leaving the winner down to source order. */padding: 0;width: fit-content;}diff --git a/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.jsx b/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.jsxindex b6755343a..5e541b4a1 100644--- a/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.jsx+++ b/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.jsx@@ -1,7 +1,10 @@-import { Button, Form, Input, Modal, Popover } from "antd";import EmojiPicker from "emoji-picker-react";import PropTypes from "prop-types";import { useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Form } from "@/components/ui/shims/antd-form";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Modal, Popover } from "@/components/ui/shims/antd-overlays";import { getBackendErrorDetail } from "../../../helpers/GetStaticData";import { useAlertStore } from "../../../store/alert-store";@@ -106,6 +109,7 @@ function AddCustomToolFormModal({maskClosable={false}onOk={handleSubmit}okText={isEdit ? "Update" : "Save"}+ data-testid="add-prompt-project-modal"okButtonProps={{loading: isLoading,}}@@ -162,14 +166,38 @@ function AddCustomToolFormModal({<Form.Item label="Icon" name="icon"><Popoveropen={showEmojiPicker}- placement="rightTop"+ // Without this the picker is a controlled popover with no way to+ // report a close, so Esc and clicking outside did nothing.+ onOpenChange={setShowEmojiPicker}+ /*+ * `rightTop` threw the picker out past the modal's right edge,+ * where it was sliced off mid-column. Opening downward from the+ * trigger keeps its full width on screen; Radix still flips it+ * upward automatically when there is no room below.+ */+ placement="bottomLeft"arrow={false}trigger={"click"}+ data-testid="add-prompt-project-icon-popover"className="emoji-modal"title={<EmojiPickerpreviewConfig={{ showPreview: false }}lazyLoadEmojis+ /*+ * `height` is the picker's TOTAL height, and its search box,+ * category bar and padding take ~132px of it — so at 320 the+ * scrollable emoji grid was only 188px inside a 326px panel.+ * The wheel then appeared dead: it works only while the+ * pointer is inside that short strip, and most of the visible+ * panel is not it.+ *+ * 450 gives the grid ~318px, filling the panel. The popover+ * caps itself at `--radix-popover-content-available-height`+ * and the picker scrolls internally, so a short viewport+ * shrinks the panel rather than clipping the picker.+ */+ height={450}onEmojiClick={(emoji) => {updateIcon(emoji.emoji);setShowEmojiPicker(false);@@ -177,7 +205,13 @@ function AddCustomToolFormModal({/>}>- <Button onClick={() => setShowEmojiPicker((prev) => !prev)}>+ {/*+ * No onClick here: the Popover trigger already toggles `open` and+ * reports it through onOpenChange. Doing both meant two state+ * updates per click — Radix's (open -> false) and this one+ * (!prev), which race and can leave the picker unable to reopen.+ */}+ <Button data-testid="add-prompt-project-icon-btn">{icon} {icon ? "Change" : "Choose"} Icon</Button></Popover>diff --git a/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.css b/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.cssindex aa6d44c18..d1b8587ae 100644--- a/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.css+++ b/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.css@@ -24,10 +24,28 @@width: 100%;}-.add-llm-profile-panel {+/* The Form shim spaces its items with `space-y-*` on the <form> element, and+ * that only reaches direct children. Every field here sits a level or two+ * deeper — SpaceWrapper > div, Row > Col, the Advanced Settings body — so they+ * came out flush, each label pressed against the input above it. Give the+ * items their own rhythm, matching the shim's 16px vertical form gap. */+.add-llm-profile-body .ant-form-item {margin-bottom: 16px;}+/* The sticky footer stays flush to the bottom edge. It renders through+ * FormItem's no-`name` branch, which emits no `.ant-form-item`, so the rule+ * above misses it today — this outranks that rule either way. */+.add-llm-profile-body .add-llm-profile-footer {+ margin-bottom: 0;+}++/* Separates the "Advanced Settings" header from the last field above it. */+.add-llm-profile-advanced {+ border-top: 1px solid var(--border);+ padding-top: 4px;+}+.retrieval-strategy-selector {border: 1px solid #d9d9d9;border-radius: 6px;@@ -46,12 +64,12 @@}.retrieval-strategy-selector:hover {- border-color: #40a9ff !important;+ border-color: var(--violet-300) !important;box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);}.retrieval-strategy-selector:active {- border-color: #1890ff !important;+ border-color: var(--primary) !important;box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.15);}@@ -75,13 +93,23 @@}.retrieval-strategy-settings-icon {- color: #1890ff;+ color: var(--primary);font-size: 12px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 12px;+ height: 12px;cursor: pointer;}.retrieval-strategy-dropdown-icon {color: #bfbfbf;font-size: 10px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 10px;+ height: 10px;cursor: pointer;}diff --git a/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.jsx b/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.jsxindex e5e120399..8d845ae82 100644--- a/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.jsx+++ b/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.jsx@@ -1,23 +1,13 @@-import {- ArrowLeftOutlined,- CaretRightOutlined,- DownOutlined,- SettingOutlined,-} from "@ant-design/icons";-import {- Button,- Col,- Collapse,- Form,- Input,- Row,- Select,- Space,- Typography,- theme,-} from "antd";+import { ArrowLeft, ChevronDown, ChevronRight, Settings } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Form } from "@/components/ui/shims/antd-form";+import { Input, Select } from "@/components/ui/shims/antd-inputs";+import { Col, Row, Space } from "@/components/ui/shims/antd-layout";+import { Collapse } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";+import { cn } from "@/lib/utils";import { getBackendErrorDetail } from "../../../helpers/GetStaticData";import { fetchAllPages } from "../../../helpers/pagination";@@ -58,7 +48,8 @@ function AddLlmProfile({const { details, llmProfiles, updateCustomTool } = useCustomToolStore();const { setAlertDetails } = useAlertStore();const axiosPrivate = useAxiosPrivate();- const { token } = theme.useToken();+ // P4: antd's theme token replaced by the Midnight Bloom CSS variable.+ const token = { colorBgContainer: "var(--card)" };const handleException = useExceptionHandler();const { setPostHogCustomEvent } = usePostHogEvents();const { getStrategies } = useRetrievalStrategies();@@ -233,7 +224,6 @@ function AddLlmProfile({{key: "1",label: "Advanced Settings",- className: "add-llm-profile-panel",children: (<div><Form.Item@@ -268,11 +258,11 @@ function AddLlmProfile({: "Select retrieval strategy"}</span><div className="retrieval-strategy-actions">- <SettingOutlined+ <SettingsclassName="retrieval-strategy-settings-icon"title="Configure retrieval strategy"/>- <DownOutlined className="retrieval-strategy-dropdown-icon" />+ <ChevronDown className="retrieval-strategy-dropdown-icon" /></div></button></Form.Item>@@ -371,7 +361,14 @@ function AddLlmProfile({};const handleCaretIcon = (isActive) => {- return <CaretRightOutlined rotate={isActive ? 90 : 0} />;+ // `rotate` was an antd icon-font prop; lucide ships SVGs and ignores it, so+ // the caret stayed pointing right and the panel read as collapsed while+ // open. Tailwind's transform does what the prop used to.+ return (+ <ChevronRight+ className={cn("transition-transform", isActive && "rotate-90")}+ />+ );};const handleLlmChangeForTokens = async (value) => {@@ -455,7 +452,7 @@ function AddLlmProfile({<SpaceWrapper><div><Button size="small" type="text" onClick={() => setIsAddLlm(false)}>- <ArrowLeftOutlined />+ <ArrowLeft /></Button><Typography.Text className="add-cus-tool-header">{modalTitle}@@ -496,6 +493,7 @@ function AddLlmProfile({help={getBackendErrorDetail("llm", backendErrors)}><Select+ showSearchoptions={adapterOptions(llmItems, "llm")}onSelect={handleLlmChangeForTokens}/>@@ -552,6 +550,7 @@ function AddLlmProfile({help={getBackendErrorDetail("vector_store", backendErrors)}><Select+ showSearchoptions={adapterOptions(vectorDbItems, "vector_store")}/></Form.Item>@@ -596,6 +595,7 @@ function AddLlmProfile({help={getBackendErrorDetail("embedding_model", backendErrors)}><Select+ showSearchoptions={adapterOptions(embeddingItems, "embedding_model")}/></Form.Item>@@ -614,9 +614,13 @@ function AddLlmProfile({}help={getBackendErrorDetail("x2text", backendErrors)}>- <Select options={adapterOptions(x2TextItems, "x2text")} />+ <Select+ showSearch+ options={adapterOptions(x2TextItems, "x2text")}+ /></Form.Item><Collapse+ className="add-llm-profile-advanced"expandIcon={({ isActive }) => handleCaretIcon(isActive)}size="small"style={{diff --git a/frontend/src/components/custom-tools/combined-output/JsonView.jsx b/frontend/src/components/custom-tools/combined-output/JsonView.jsxindex 0ea8d754a..f05dfd263 100644--- a/frontend/src/components/custom-tools/combined-output/JsonView.jsx+++ b/frontend/src/components/custom-tools/combined-output/JsonView.jsx@@ -1,8 +1,8 @@-import { Tabs, Tooltip } from "antd";-import TabPane from "antd/es/tabs/TabPane";import Prism from "prismjs";import PropTypes from "prop-types";import { useEffect, useRef, useState } from "react";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Tabs } from "@/components/ui/shims/antd-structure";import { useCustomToolStore } from "../../../store/custom-tool-store";import { JsonViewBody } from "./JsonViewBody";@@ -66,10 +66,10 @@ function JsonView({<div className="combined-op-header"><Tabs activeKey={activeKey} onChange={handleTabChange} moreIcon={<></>}>{!isSinglePass && (- <TabPane tab={<span>Default</span>} key={"0"}></TabPane>+ <Tabs.TabPane tab={<span>Default</span>} key={"0"}></Tabs.TabPane>)}{adapterData.map((adapter) => (- <TabPane+ <Tabs.TabPanetab={<Tooltip title={adapter?.llm_model || adapter?.profile_name}><span>diff --git a/frontend/src/components/custom-tools/custom-data-settings/CustomDataSettings.css b/frontend/src/components/custom-tools/custom-data-settings/CustomDataSettings.cssindex c296f4142..b4228318e 100644--- a/frontend/src/components/custom-tools/custom-data-settings/CustomDataSettings.css+++ b/frontend/src/components/custom-tools/custom-data-settings/CustomDataSettings.css@@ -48,15 +48,15 @@}.custom-data-icon-success {- color: #52c41a;+ color: var(--success);}.custom-data-icon-warning {- color: #faad14;+ color: var(--warning);}.custom-data-variable-undefined {- color: #faad14;+ color: var(--warning);}.custom-data-variable-status {diff --git a/frontend/src/components/custom-tools/custom-data-settings/CustomDataSettings.jsx b/frontend/src/components/custom-tools/custom-data-settings/CustomDataSettings.jsxindex 6550b98fe..26c581789 100644--- a/frontend/src/components/custom-tools/custom-data-settings/CustomDataSettings.jsx+++ b/frontend/src/components/custom-tools/custom-data-settings/CustomDataSettings.jsx@@ -1,11 +1,9 @@-import {- CheckCircleOutlined,- InfoCircleOutlined,- WarningOutlined,-} from "@ant-design/icons";import Editor from "@monaco-editor/react";-import { Alert, Space, Tag, Typography } from "antd";+import { CircleCheck, Info, TriangleAlert } from "lucide-react";import { useEffect, useMemo, useState } from "react";+import { Space } from "@/components/ui/shims/antd-layout";+import { Alert, Tag } from "@/components/ui/shims/antd-leaves";+import { Typography } from "@/components/ui/shims/antd-typography";import { promptType } from "../../../helpers/GetStaticData";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";@@ -238,7 +236,7 @@ function CustomDataSettings() {{extractedVariables.length > 0 && (<div className="custom-data-variables-section"><div className="custom-data-variables-header">- <InfoCircleOutlined />+ <Info /><Typography.Text strong>Variables Referenced in Active Prompts</Typography.Text>@@ -252,9 +250,9 @@ function CustomDataSettings() {{variableStatus.map(({ variable, isDefined }) => (<div key={variable} className="custom-data-variable-item">{isDefined ? (- <CheckCircleOutlined className="custom-data-icon-success" />+ <CircleCheck className="custom-data-icon-success" />) : (- <WarningOutlined className="custom-data-icon-warning" />+ <TriangleAlert className="custom-data-icon-warning" />)}<Typography.Textcodediff --git a/frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.css b/frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.cssindex 200f43542..e0e23ac35 100644--- a/frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.css+++ b/frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.css@@ -7,4 +7,9 @@.cus-syn-del {font-size: 10px;+ /* width/height, not font-size alone: these classes sit on lucide SVGs,+ * which ignore font-size and fall back to their own 24px default. The+ * antd originals were an icon FONT, where font-size was the size. */+ width: 10px;+ height: 10px;}diff --git a/frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.jsx b/frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.jsxindex 616b64886..7fb50b6f9 100644--- a/frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.jsx+++ b/frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.jsx@@ -1,6 +1,10 @@-import { DeleteOutlined, PlusOutlined } from "@ant-design/icons";-import { Button, Input, Select, Space, Table, Typography } from "antd";-import { useEffect, useState } from "react";+import { Plus, Trash2 } from "lucide-react";+import { useEffect, useMemo, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Input, Select } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Table } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useAlertStore } from "../../../store/alert-store";@@ -42,7 +46,6 @@ const actionTypes = {function CustomSynonyms() {const [synonyms, setSynonyms] = useState([]);- const [rows, setRows] = useState([]);const [isLoading, setIsLoading] = useState(false);const [currentPage, setCurrentPage] = useState(1);const [hasChanges, setHasChanges] = useState(false);@@ -78,13 +81,21 @@ function CustomSynonyms() {setSynonyms(updatedSynonyms);}, [details]);- useEffect(() => {+ /*+ * Derived during render, NOT stored in state via an effect.+ *+ * The rows hold live <Input>/<Select> elements. Building them in a+ * `useEffect` keyed on [synonyms] meant every keystroke rendered once with+ * the STALE element (still carrying the previous value) before the effect+ * replaced it, so the controlled input was reset mid-typing and dropped the+ * leading characters — typing "bill" into the Word column produced "il".+ */+ const rows = useMemo(() => {if (!synonyms || synonyms.length === 0) {- setRows([]);- return;+ return [];}- const data = [...synonyms].map((item, index) => {+ return [...synonyms].map((item, index) => {const word = item?.word;const listOfSynonyms = item?.synonyms || [];return {@@ -115,15 +126,15 @@ function CustomSynonyms() {isDisabled={listOfSynonyms?.length === 0}><Button size="small" disabled={isPublicSource} type="text">- <DeleteOutlined className="cus-syn-del" />+ <Trash2 className="cus-syn-del" /></Button></ConfirmModal>),};});-- setRows(data);- }, [synonyms]);+ // handleChange/handleDelete close over `synonyms`, which is in the deps.+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [synonyms, isPublicSource]);const handleChange = (index, propertyName, value) => {const updatedSynonyms = [...synonyms];@@ -225,7 +236,7 @@ function CustomSynonyms() {<div><CustomButtontype="primary"- icon={<PlusOutlined />}+ icon={<Plus />}onClick={handleAddRow}disabled={isPublicSource || synonyms?.length >= SYNONYMS_LIMIT}>diff --git a/frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.test.jsx b/frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.test.jsxnew file mode 100644index 000000000..2a1edf1a8--- /dev/null+++ b/frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.test.jsx@@ -0,0 +1,60 @@+import { render, screen } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { useCallback, useMemo, useState } from "react";+import { describe, expect, it } from "vitest";++import { Input } from "@/components/ui/shims/antd-inputs";++/**+ * CustomSynonyms stores LIVE <Input> elements as its table cells. The original+ * code built them inside a `useEffect` keyed on [synonyms] and parked the+ * result in state, so each keystroke rendered once with the STALE element —+ * still carrying the previous value — before the effect swapped it in. Against+ * a strictly controlled input that resets the field mid-typing and drops the+ * leading characters: typing "bill" into the Word column produced "il" on dev.+ *+ * The component itself pulls in axios and three zustand stores, so this+ * exercises the row-building PATTERN in isolation: rows derived during render,+ * exactly as the fixed component does it.+ */+function Harness() {+ const [items, setItems] = useState([{ word: "" }]);++ const handleChange = useCallback((index, value) => {+ setItems((prev) =>+ prev.map((it, i) => (i === index ? { ...it, word: value } : it)),+ );+ }, []);++ const rows = useMemo(+ () =>+ items.map((item, index) => (+ <Input+ key={index}+ value={item.word}+ onChange={(e) => handleChange(index, e.target.value)}+ />+ )),+ [items, handleChange],+ );++ return <div>{rows}</div>;+}++describe("CustomSynonyms row building", () => {+ it("keeps every typed character when rows are derived during render", async () => {+ const user = userEvent.setup();+ render(<Harness />);+ await user.type(screen.getByRole("textbox"), "bill");+ expect(screen.getByRole("textbox")).toHaveValue("bill");+ });++ it("keeps characters typed into the middle of an existing value", async () => {+ const user = userEvent.setup();+ render(<Harness />);+ const box = screen.getByRole("textbox");+ await user.type(box, "bll");+ await user.type(box, "i", { initialSelectionStart: 1 });+ expect(box).toHaveValue("bill");+ });+});diff --git a/frontend/src/components/custom-tools/display-logs/DisplayLogs.jsx b/frontend/src/components/custom-tools/display-logs/DisplayLogs.jsxindex b22daf69b..153a45b0e 100644--- a/frontend/src/components/custom-tools/display-logs/DisplayLogs.jsx+++ b/frontend/src/components/custom-tools/display-logs/DisplayLogs.jsx@@ -1,5 +1,6 @@-import { Col, Row, Typography } from "antd";import { useEffect, useRef } from "react";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Typography } from "@/components/ui/shims/antd-typography";import "../../agency/display-logs/DisplayLogs.css";import { getDateTimeString } from "../../../helpers/GetStaticData";diff --git a/frontend/src/components/custom-tools/document-manager/DocumentManager.css b/frontend/src/components/custom-tools/document-manager/DocumentManager.cssindex 52054962a..e316acd35 100644--- a/frontend/src/components/custom-tools/document-manager/DocumentManager.css+++ b/frontend/src/components/custom-tools/document-manager/DocumentManager.css@@ -9,6 +9,10 @@.doc-manager-header {display: flex;+ /* Without this, children default to `stretch`: the view tabs centred at one+ * height while the file name and Manage Documents button sat 4-5px lower,+ * so nothing in the row shared a baseline. */+ align-items: center;justify-content: space-between;padding-right: 12px;}@@ -24,6 +28,11 @@.doc-manager-paginate-icon {font-size: 12px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 12px;+ height: 12px;}.text-viewer-layout {diff --git a/frontend/src/components/custom-tools/document-manager/DocumentManager.jsx b/frontend/src/components/custom-tools/document-manager/DocumentManager.jsxindex 9afe20eb2..e1cc1b14d 100644--- a/frontend/src/components/custom-tools/document-manager/DocumentManager.jsx+++ b/frontend/src/components/custom-tools/document-manager/DocumentManager.jsx@@ -1,13 +1,13 @@-import {- FilePdfOutlined,- FileTextOutlined,- LeftOutlined,- RightOutlined,-} from "@ant-design/icons";+import { ChevronLeft, ChevronRight, FileText } from "lucide-react";+import { Button } from "@/components/ui/shims/antd-button";+import { Space } from "@/components/ui/shims/antd-layout";+import { Tag } from "@/components/ui/shims/antd-leaves";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Tabs } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "@react-pdf-viewer/core/lib/styles/index.css";import "@react-pdf-viewer/default-layout/lib/styles/index.css";import "@react-pdf-viewer/page-navigation/lib/styles/index.css";-import { Button, Space, Tabs, Tag, Tooltip, Typography } from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";import { useParams } from "react-router-dom";@@ -133,7 +133,7 @@ function DocumentManager({ generateIndex, handleUpdateTool, handleDocChange }) {key: "1",label: (<Tooltip title="PDF View">- <FilePdfOutlined />+ <FileText /></Tooltip>),},@@ -141,7 +141,7 @@ function DocumentManager({ generateIndex, handleUpdateTool, handleDocChange }) {key: "2",label: (<Tooltip title="Raw View">- <FileTextOutlined />+ <FileText /></Tooltip>),},@@ -390,6 +390,7 @@ function DocumentManager({ generateIndex, handleUpdateTool, handleDocChange }) {activeKey={activeKey}items={items}onChange={handleActiveKeyChange}+ data-testid="doc-manager-tabs"moreIcon={<></>}/></div>@@ -466,9 +467,10 @@ function DocumentManager({ generateIndex, handleUpdateTool, handleDocChange }) {isSinglePassExtractLoading ||page <= 1}+ data-testid="doc-manager-prev-doc-btn"onClick={handlePageLeft}>- <LeftOutlined className="doc-manager-paginate-icon" />+ <ChevronLeft className="doc-manager-paginate-icon" /></Button><Buttontype="text"@@ -479,9 +481,10 @@ function DocumentManager({ generateIndex, handleUpdateTool, handleDocChange }) {isSinglePassExtractLoading ||page >= listOfDocs?.length}+ data-testid="doc-manager-next-doc-btn"onClick={handlePageRight}>- <RightOutlined className="doc-manager-paginate-icon" />+ <ChevronRight className="doc-manager-paginate-icon" /></Button></div></Space>diff --git a/frontend/src/components/custom-tools/document-viewer/DocumentViewer.jsx b/frontend/src/components/custom-tools/document-viewer/DocumentViewer.jsxindex 8e9b70530..93134953a 100644--- a/frontend/src/components/custom-tools/document-viewer/DocumentViewer.jsx+++ b/frontend/src/components/custom-tools/document-viewer/DocumentViewer.jsx@@ -1,5 +1,5 @@-import { Typography } from "antd";import PropTypes from "prop-types";+import { Typography } from "@/components/ui/shims/antd-typography";import { EmptyState } from "../../widgets/empty-state/EmptyState";import { SpinnerLoader } from "../../widgets/spinner-loader/SpinnerLoader";diff --git a/frontend/src/components/custom-tools/edit-tool-info/EditToolInfo.jsx b/frontend/src/components/custom-tools/edit-tool-info/EditToolInfo.jsxindex 6499ac110..b82b4955e 100644--- a/frontend/src/components/custom-tools/edit-tool-info/EditToolInfo.jsx+++ b/frontend/src/components/custom-tools/edit-tool-info/EditToolInfo.jsx@@ -1,4 +1,6 @@-import { Input, Space, Typography } from "antd";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Typography } from "@/components/ui/shims/antd-typography";import "./EditToolInfo.css";diff --git a/frontend/src/components/custom-tools/editable-text/EditableText.css b/frontend/src/components/custom-tools/editable-text/EditableText.cssindex fa526d14b..11eb9356e 100644--- a/frontend/src/components/custom-tools/editable-text/EditableText.css+++ b/frontend/src/components/custom-tools/editable-text/EditableText.css@@ -18,5 +18,5 @@.input-header-text {font-weight: bold;- font-size: 14px;+ font-size: 13px;}diff --git a/frontend/src/components/custom-tools/editable-text/EditableText.jsx b/frontend/src/components/custom-tools/editable-text/EditableText.jsxindex c2bc5bceb..eba4dd750 100644--- a/frontend/src/components/custom-tools/editable-text/EditableText.jsx+++ b/frontend/src/components/custom-tools/editable-text/EditableText.jsx@@ -1,7 +1,7 @@-import { Input } from "antd";import debounce from "lodash/debounce";import PropTypes from "prop-types";import { useCallback, useEffect, useRef, useState } from "react";+import { Input } from "@/components/ui/shims/antd-inputs";import "./EditableText.css";import { useCustomToolStore } from "../../../store/custom-tool-store";diff --git a/frontend/src/components/custom-tools/export-reminder-bar/ExportReminderBar.jsx b/frontend/src/components/custom-tools/export-reminder-bar/ExportReminderBar.jsxindex 13967e5ad..7808b5dd8 100644--- a/frontend/src/components/custom-tools/export-reminder-bar/ExportReminderBar.jsx+++ b/frontend/src/components/custom-tools/export-reminder-bar/ExportReminderBar.jsx@@ -1,15 +1,17 @@-import { ExclamationCircleOutlined } from "@ant-design/icons";-import { Alert, Button, Space } from "antd";+import { CircleAlert } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";+import { Space } from "@/components/ui/shims/antd-layout";+import { Alert } from "@/components/ui/shims/antd-leaves";import "./ExportReminderBar.css";-function ExportReminderBar({ message, onExport, isExporting }) {+function ExportReminderBar({ message, onExport, isExporting = false }) {return (<div className="export-reminder-bar"><Alertmessage={<Space className="export-reminder-content">- <ExclamationCircleOutlined />+ <CircleAlert /><span className="export-reminder-text">{message}</span><Buttontype="primary"@@ -36,8 +38,4 @@ ExportReminderBar.propTypes = {isExporting: PropTypes.bool,};-ExportReminderBar.defaultProps = {- isExporting: false,-};-export { ExportReminderBar };diff --git a/frontend/src/components/custom-tools/export-tool/ExportTool.jsx b/frontend/src/components/custom-tools/export-tool/ExportTool.jsxindex dcce98495..f91e6689a 100644--- a/frontend/src/components/custom-tools/export-tool/ExportTool.jsx+++ b/frontend/src/components/custom-tools/export-tool/ExportTool.jsx@@ -1,19 +1,12 @@-import {- DeleteOutlined,- QuestionCircleOutlined,- UserOutlined,-} from "@ant-design/icons";-import {- Avatar,- List,- Modal,- Popconfirm,- Radio,- Select,- Typography,-} from "antd";+import { CircleHelp, Trash2, User } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Radio, Select } from "@/components/ui/shims/antd-inputs";+import { Avatar } from "@/components/ui/shims/antd-leaves";+import { Modal, Popconfirm } from "@/components/ui/shims/antd-overlays";+import { List } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "./ExportTool.css";import { SpinnerLoader } from "../../widgets/spinner-loader/SpinnerLoader";@@ -120,12 +113,21 @@ function ExportTool({description={`Are you sure to remove ${item?.email}?`}okText="Yes"cancelText="No"- icon={<QuestionCircleOutlined />}+ icon={<CircleHelp />}onConfirm={(event) => handleDeleteUser(item?.id)}>- <Typography.Text>- <DeleteOutlined className="action-icon-buttons" />- </Typography.Text>+ {/*+ * A real button with a name: the icon on its own put+ * nothing in the accessibility tree, so the only way to+ * un-share was unreachable by keyboard and unnameable by+ * a screen reader. Matches CoOwnerManagement.+ */}+ <Button+ type="text"+ size="small"+ icon={<Trash2 className="action-icon-buttons" />}+ aria-label={`Remove ${item?.email}`}+ /></Popconfirm></div>}@@ -133,10 +135,7 @@ function ExportTool({<List.Item.Metatitle={<>- <Avatar- className="shared-user-avatar"- icon={<UserOutlined />}- />+ <Avatar className="shared-user-avatar" icon={<User />} /><Typography.Text className="export-username">{item?.email}</Typography.Text>diff --git a/frontend/src/components/custom-tools/footer/Footer.jsx b/frontend/src/components/custom-tools/footer/Footer.jsxindex 788256353..77c2c8810 100644--- a/frontend/src/components/custom-tools/footer/Footer.jsx+++ b/frontend/src/components/custom-tools/footer/Footer.jsx@@ -1,6 +1,6 @@-import { PlusOutlined } from "@ant-design/icons";-import { Button } from "antd";+import { Plus } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";import "./Footer.css";import { promptType } from "../../../helpers/GetStaticData";@@ -16,7 +16,7 @@ function Footer({ activeKey, addPromptInstance }) {<div><Buttontype="link"- icon={<PlusOutlined />}+ icon={<Plus />}onClick={() => addPromptInstance(promptType.notes)}disabled={isPublicSource}>@@ -26,7 +26,7 @@ function Footer({ activeKey, addPromptInstance }) {<div><Buttontype="link"- icon={<PlusOutlined />}+ icon={<Plus />}onClick={() => addPromptInstance(promptType.prompt)}disabled={isPublicSource}>diff --git a/frontend/src/components/custom-tools/generate-index/GenerateIndex.css b/frontend/src/components/custom-tools/generate-index/GenerateIndex.cssindex 7646e74c0..b127169a2 100644--- a/frontend/src/components/custom-tools/generate-index/GenerateIndex.css+++ b/frontend/src/components/custom-tools/generate-index/GenerateIndex.css@@ -5,11 +5,11 @@}.gen-index-progress {- color: #faad14;+ color: var(--warning);}.gen-index-success {- color: #52c41a;+ color: var(--success);}.gen-index-fail {@@ -18,4 +18,9 @@.gen-index-icon {font-size: 24px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 24px;+ height: 24px;}diff --git a/frontend/src/components/custom-tools/generate-index/GenerateIndex.jsx b/frontend/src/components/custom-tools/generate-index/GenerateIndex.jsxindex d9dcb0e85..1a5f9fd29 100644--- a/frontend/src/components/custom-tools/generate-index/GenerateIndex.jsx+++ b/frontend/src/components/custom-tools/generate-index/GenerateIndex.jsx@@ -1,11 +1,8 @@-import {- CheckCircleFilled,- CloseCircleFilled,- ExclamationCircleFilled,-} from "@ant-design/icons";-import { Col, Row, Typography } from "antd";+import { CircleAlert, CircleCheck, CircleX } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Typography } from "@/components/ui/shims/antd-typography";import "./GenerateIndex.css";@@ -43,13 +40,13 @@ function GenerateIndex({ isGeneratingIndex, result }) {<Col span={3}><div>{isGeneratingIndex ? (- <ExclamationCircleFilled className="gen-index-progress gen-index-icon" />+ <CircleAlert className="gen-index-progress gen-index-icon" />) : (<>{result === "SUCCESS" ? (- <CheckCircleFilled className="gen-index-success gen-index-icon" />+ <CircleCheck className="gen-index-success gen-index-icon" />) : (- <CloseCircleFilled className="gen-index-fail gen-index-icon" />+ <CircleX className="gen-index-fail gen-index-icon" />)}</>)}diff --git a/frontend/src/components/custom-tools/header-title/HeaderTitle.jsx b/frontend/src/components/custom-tools/header-title/HeaderTitle.jsxindex 9b8dc710f..dae8dbba5 100644--- a/frontend/src/components/custom-tools/header-title/HeaderTitle.jsx+++ b/frontend/src/components/custom-tools/header-title/HeaderTitle.jsx@@ -1,6 +1,7 @@-import { ArrowLeftOutlined, EditOutlined } from "@ant-design/icons";-import { Button, Typography } from "antd";+import { ArrowLeft, Pencil } from "lucide-react";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Typography } from "@/components/ui/shims/antd-typography";import { useCustomToolStore } from "../../../store/custom-tool-store";import { useSessionStore } from "../../../store/session-store";@@ -19,14 +20,14 @@ function HeaderTitle() {type="text"onClick={() => navigate(`/${sessionDetails?.orgName}/tools`)}>- <ArrowLeftOutlined />+ <ArrowLeft /></Button></div><div><Typography.Text className="custom-tools-name" strong>{details?.tool_name}</Typography.Text>- <Button size="small" type="text" icon={<EditOutlined />} disabled />+ <Button size="small" type="text" icon={<Pencil />} disabled /></div></div>);diff --git a/frontend/src/components/custom-tools/header/Header.css b/frontend/src/components/custom-tools/header/Header.cssindex c94aef156..9b5dc86e7 100644--- a/frontend/src/components/custom-tools/header/Header.css+++ b/frontend/src/components/custom-tools/header/Header.css@@ -51,11 +51,11 @@.api-deployment-notice-description {margin: 0 0 8px 0;- font-size: 14px;+ font-size: 13px;}.api-deployment-existing-section {- font-size: 14px;+ font-size: 13px;}.api-deployment-existing-list {diff --git a/frontend/src/components/custom-tools/header/Header.jsx b/frontend/src/components/custom-tools/header/Header.jsxindex 4e0d39a51..34bae4dd8 100644--- a/frontend/src/components/custom-tools/header/Header.jsx+++ b/frontend/src/components/custom-tools/header/Header.jsx@@ -1,7 +1,10 @@-import { SettingOutlined } from "@ant-design/icons";-import { Button, Dropdown, Form, Input, Modal, Tooltip } from "antd";+import { Settings } from "lucide-react";import PropTypes from "prop-types";import { useCallback, useMemo, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Form } from "@/components/ui/shims/antd-form";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Dropdown, Modal, Tooltip } from "@/components/ui/shims/antd-overlays";import { ExportToolIcon } from "../../../assets";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";@@ -336,7 +339,8 @@ function Header({<div><Tooltip title="Settings"><Button- icon={<SettingOutlined />}+ icon={<Settings />}+ data-testid="ps-header-settings-btn"onClick={() => setOpenSettings(true)}/></Tooltip>@@ -369,6 +373,7 @@ function Header({}}trigger={["click"]}disabled={isPublicSource}+ data-testid="ps-header-export-menu"><CustomButtontype="primary"@@ -376,6 +381,7 @@ function Header({disabled={isPublicSource}icon={<ExportToolIcon />}className="export-text"+ data-testid="ps-header-export-btn">Export</CustomButton>@@ -442,6 +448,7 @@ function Header({/><Modaltitle="Edit Project"+ data-testid="ps-edit-project-modal"open={editModalOpen}onOk={handleEditSubmit}onCancel={() => setEditModalOpen(false)}@@ -467,6 +474,7 @@ function Header({onCancel={() => setConfirmModalVisible(false)} // Close the modal on cancelopen={confirmModalVisible}title="Are you sure"+ data-testid="ps-force-export-modal"okText="Force Export"centered>@@ -479,6 +487,7 @@ function Header({onCancel={() => setApiDeploymentConfirmModalVisible(false)}open={apiDeploymentConfirmModalVisible}title="Create API Deployment"+ data-testid="ps-create-api-deployment-modal"okText="Proceed"centeredwidth={600}diff --git a/frontend/src/components/custom-tools/import-tool/ImportTool.css b/frontend/src/components/custom-tools/import-tool/ImportTool.cssindex 488311677..3165933ce 100644--- a/frontend/src/components/custom-tools/import-tool/ImportTool.css+++ b/frontend/src/components/custom-tools/import-tool/ImportTool.css@@ -9,12 +9,17 @@}.import-tool-uploader:hover {- border-color: #1890ff;+ border-color: var(--primary);}.import-tool-uploader .ant-upload-drag-icon {font-size: 48px;- color: #1890ff;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 48px;+ height: 48px;+ color: var(--primary);margin-bottom: 16px;}@@ -26,5 +31,5 @@.import-tool-uploader .ant-upload-hint {color: rgba(0, 0, 0, 0.45);- font-size: 14px;+ font-size: 13px;}diff --git a/frontend/src/components/custom-tools/import-tool/ImportTool.jsx b/frontend/src/components/custom-tools/import-tool/ImportTool.jsxindex e0d972cd9..78d63dcd2 100644--- a/frontend/src/components/custom-tools/import-tool/ImportTool.jsx+++ b/frontend/src/components/custom-tools/import-tool/ImportTool.jsx@@ -1,20 +1,32 @@-import { InboxOutlined } from "@ant-design/icons";-import { Modal, message, Typography, Upload } from "antd";+import { Inbox } from "lucide-react";import PropTypes from "prop-types";-import { useState } from "react";+import { useEffect, useState } from "react";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Upload } from "@/components/ui/shims/antd-structure";+import { Text } from "@/components/ui/shims/antd-typography";+import { message } from "@/hooks/useAppToast";import { AdapterSelectionModal } from "../adapter-selection-modal/AdapterSelectionModal";import "./ImportTool.css";const { Dragger } = Upload;-const { Text } = Typography;-function ImportTool({ open, setOpen, onImport, loading }) {const [fileList, setFileList] = useState([]);const [projectData, setProjectData] = useState(null);const [showAdapterSelection, setShowAdapterSelection] = useState(false);const [parseLoading, setParseLoading] = useState(false);+ // The parent closes the modal itself once an import succeeds, so without+ // this the next Import Project opens with the previous file still staged.+ useEffect(() => {+ if (!open) {+ setFileList([]);+ setProjectData(null);+ setShowAdapterSelection(false);+ setParseLoading(false);+ }+ }, [open]);+const handleUploadChange = (info) => {setFileList(info.fileList);};@@ -78,6 +90,9 @@ function ImportTool({ open, setOpen, onImport, loading }) {const uploadProps = {name: "file",multiple: false,+ // Only one project is imported at a time, so a second pick replaces the+ // first rather than queueing behind it.+ maxCount: 1,accept: ".json",beforeUpload: () => false, // Prevent automatic uploadfileList,@@ -106,7 +121,7 @@ function ImportTool({ open, setOpen, onImport, loading }) {<Dragger {...uploadProps}><p className="ant-upload-drag-icon">- <InboxOutlined />+ <Inbox /></p><p className="ant-upload-text">Click or drag file to this area to uploaddiff --git a/frontend/src/components/custom-tools/list-of-tools/ListOfTools.css b/frontend/src/components/custom-tools/list-of-tools/ListOfTools.cssindex 3c2983ab2..58d2c465b 100644--- a/frontend/src/components/custom-tools/list-of-tools/ListOfTools.css+++ b/frontend/src/components/custom-tools/list-of-tools/ListOfTools.css@@ -2,7 +2,19 @@.list-of-tools-layout {height: 100%;- background-color: var(--page-bg-2);+ /*+ * The island sits on this as a raised surface, so the trough has to be+ * clearly darker than it. --background (#fafafa) is only two values off+ * --card (#fcfcfc), so the well was invisible and the list read as+ * floating on a flat page.+ *+ * --well resolves to a 23-value gap against --card in light mode, matching+ * the reference's 22 (#e9e9e9 behind #fff) almost exactly. It is a semantic+ * token rather than a raw palette step because the palette is shared+ * between themes: hard-coding --neutral-200 would paint a LIGHT trough in+ * dark mode. --well recesses in both directions.+ */+ background-color: var(--well);padding: 12px;overflow-y: auto;}@@ -27,7 +39,7 @@}.list-of-tools-island {- background-color: var(--page-bg-1);+ background-color: var(--card);height: 100%;padding: 20px;overflow-y: auto;diff --git a/frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx b/frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsxindex 9f2d40300..116e076ed 100644--- a/frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx+++ b/frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx@@ -1,7 +1,7 @@-import { ArrowDownOutlined, PlusOutlined } from "@ant-design/icons";-import { Space } from "antd";+import { ArrowDown, Plus } from "lucide-react";import PropTypes from "prop-types";import { useCallback, useEffect, useMemo, useRef, useState } from "react";+import { Space } from "@/components/ui/shims/antd-layout";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useCoOwnerManagement } from "../../../hooks/useCoOwnerManagement";@@ -37,7 +37,7 @@ const DefaultCustomButtons = ({<Space gap={16}><CustomButtontype="default"- icon={<ArrowDownOutlined />}+ icon={<ArrowDown />}onClick={() => setOpenImportTool(true)}loading={isImportLoading}>@@ -45,7 +45,7 @@ const DefaultCustomButtons = ({</CustomButton><CustomButtontype="primary"- icon={<PlusOutlined />}+ icon={<Plus />}onClick={handleNewProjectBtnClick}>New Project@@ -487,6 +487,7 @@ function ListOfTools({ segmentOptions, segmentValue, onSegmentChange }) {)}{!loadError && displayList?.length > 0 && (<ResourceTable+ testIdPrefix="prompt-studio-list"dataSource={displayList}loading={isLoading}pagination={pagination}diff --git a/frontend/src/components/custom-tools/logs-label/LogsLabel.jsx b/frontend/src/components/custom-tools/logs-label/LogsLabel.jsxindex b86c32265..5b9e06e42 100644--- a/frontend/src/components/custom-tools/logs-label/LogsLabel.jsx+++ b/frontend/src/components/custom-tools/logs-label/LogsLabel.jsx@@ -1,4 +1,5 @@-import { Col, Row, Typography } from "antd";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Typography } from "@/components/ui/shims/antd-typography";import "../../agency/logs-label/LogsLabel.css";diff --git a/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.css b/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.cssindex 036ffc552..1b5c9cf6c 100644--- a/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.css+++ b/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.css@@ -34,7 +34,7 @@}.summarization-status-enabled {- background-color: #52c41a;+ background-color: var(--success);}.summarization-status-disabled {diff --git a/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx b/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsxindex a8abf9a20..512386748 100644--- a/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx+++ b/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx@@ -1,24 +1,14 @@-import {- CheckCircleFilled,- CloseCircleFilled,- DeleteOutlined,- ReloadOutlined,-} from "@ant-design/icons";-import {- Button,- Divider,- Modal,- Radio,- Space,- Table,- Tag,- Tooltip,- Typography,- Upload,-} from "antd";+import { CircleCheck, CircleX, RotateCw, Trash2 } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";import { useParams } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Radio } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Divider, Tag } from "@/components/ui/shims/antd-leaves";+import { Modal, Tooltip } from "@/components/ui/shims/antd-overlays";+import { Table, Upload } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";@@ -116,7 +106,7 @@ function ManageDocsModal({const successIndex = (<Typography.Text><span style={{ marginRight: "8px" }}>- <CheckCircleFilled style={{ color: "#52C41A" }} />+ <CircleCheck style={{ color: "#52C41A" }} /></span>{" "}Indexed</Typography.Text>@@ -125,7 +115,7 @@ function ManageDocsModal({const failedIndex = (<Typography.Text><span style={{ marginRight: "8px" }}>- <CloseCircleFilled style={{ color: "#FF4D4F" }} />+ <CircleX style={{ color: "#FF4D4F" }} /></span>{" "}Not Indexed</Typography.Text>@@ -157,7 +147,7 @@ function ManageDocsModal({const failedSummary = (<Typography.Text><span style={{ marginRight: "8px" }}>- <CloseCircleFilled style={{ color: "#FF4D4F" }} />+ <CircleX style={{ color: "#FF4D4F" }} /></span>{" "}Not Summarized</Typography.Text>@@ -481,7 +471,7 @@ function ManageDocsModal({<Tooltip title="Index"><Buttonsize="small"- icon={<ReloadOutlined />}+ icon={<RotateCw />}onClick={() => handleReIndexBtnClick(item)}disabled={isMultiPassExtractLoading ||@@ -502,7 +492,7 @@ function ManageDocsModal({<Tooltip title="Delete"><Buttonsize="small"- icon={<DeleteOutlined />}+ icon={<Trash2 />}disabled={isMultiPassExtractLoading ||isSinglePassExtractLoading ||diff --git a/frontend/src/components/custom-tools/manage-llm-profiles-modal/ManageLlmProfilesModal.jsx b/frontend/src/components/custom-tools/manage-llm-profiles-modal/ManageLlmProfilesModal.jsxindex 5d73545bb..2dc3839b3 100644--- a/frontend/src/components/custom-tools/manage-llm-profiles-modal/ManageLlmProfilesModal.jsx+++ b/frontend/src/components/custom-tools/manage-llm-profiles-modal/ManageLlmProfilesModal.jsx@@ -1,5 +1,5 @@-import { Modal } from "antd";import PropTypes from "prop-types";+import { Modal } from "@/components/ui/shims/antd-overlays";import { ManageLlmProfiles } from "../manage-llm-profiles/ManageLlmProfiles";diff --git a/frontend/src/components/custom-tools/manage-llm-profiles/ManageLlmProfiles.css b/frontend/src/components/custom-tools/manage-llm-profiles/ManageLlmProfiles.cssindex 56cf5658e..f2a418230 100644--- a/frontend/src/components/custom-tools/manage-llm-profiles/ManageLlmProfiles.css+++ b/frontend/src/components/custom-tools/manage-llm-profiles/ManageLlmProfiles.css@@ -25,4 +25,9 @@.profile-copy-icon {font-size: 12px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 12px;+ height: 12px;}diff --git a/frontend/src/components/custom-tools/manage-llm-profiles/ManageLlmProfiles.jsx b/frontend/src/components/custom-tools/manage-llm-profiles/ManageLlmProfiles.jsxindex 15d2263f6..2a690736a 100644--- a/frontend/src/components/custom-tools/manage-llm-profiles/ManageLlmProfiles.jsx+++ b/frontend/src/components/custom-tools/manage-llm-profiles/ManageLlmProfiles.jsx@@ -1,6 +1,10 @@-import { CopyOutlined, DeleteOutlined, EditOutlined } from "@ant-design/icons";-import { Button, Radio, Table, Tooltip, Typography } from "antd";+import { Copy, Pencil, Trash2 } from "lucide-react";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Radio } from "@/components/ui/shims/antd-inputs";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Table } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";@@ -110,6 +114,9 @@ function ManageLlmProfiles() {useEffect(() => {const modifiedRows = llmProfiles.map((item) => {+ // One id per profile — every action below repeats once per table row.+ const rowTestId = (action) =>+ `ps-llm-profile-${action}-${item?.profile_id}`;return {key: item?.profile_id,name: item?.profile_name || "",@@ -121,14 +128,16 @@ function ManageLlmProfiles() {<div className="action-buttons-container"><Tooltip title="Copy Profile ID"><Button+ data-testid={rowTestId("copy-id")}size="small"- icon={<CopyOutlined />}+ icon={<Copy />}onClick={() => copyProfileId(item?.profile_id)}/></Tooltip><Button+ data-testid={rowTestId("edit")}size="small"- icon={<EditOutlined />}+ icon={<Pencil />}disabled={isPublicSource}onClick={() => handleEdit(item?.profile_id)}/>@@ -143,8 +152,9 @@ function ManageLlmProfiles() {}><Button+ data-testid={rowTestId("delete")}size="small"- icon={<DeleteOutlined />}+ icon={<Trash2 />}disabled={isPublicSource || defaultLlmProfile === item?.profile_id}@@ -155,6 +165,7 @@ function ManageLlmProfiles() {),select: (<Radio+ data-testid={rowTestId("select-default")}checked={defaultLlmProfile === item?.profile_id}onClick={() => handleDefaultLlm(item?.profile_id)}disabled={isPublicSource}diff --git a/frontend/src/components/custom-tools/notes-card/NotesCard.css b/frontend/src/components/custom-tools/notes-card/NotesCard.cssindex d7d31bdcf..b5b6fae3e 100644--- a/frontend/src/components/custom-tools/notes-card/NotesCard.css+++ b/frontend/src/components/custom-tools/notes-card/NotesCard.css@@ -11,5 +11,10 @@.tool-ide-notes-card .delete-icon {font-size: 12px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 12px;+ height: 12px;color: #575859;}diff --git a/frontend/src/components/custom-tools/notes-card/NotesCard.jsx b/frontend/src/components/custom-tools/notes-card/NotesCard.jsxindex e2ddaa499..f743408e0 100644--- a/frontend/src/components/custom-tools/notes-card/NotesCard.jsx+++ b/frontend/src/components/custom-tools/notes-card/NotesCard.jsx@@ -1,11 +1,10 @@-import {- CheckCircleOutlined,- DeleteOutlined,- EditOutlined,- SyncOutlined,-} from "@ant-design/icons";-import { Button, Card, Col, Collapse, Row, Space, Tag, Tooltip } from "antd";+import { CircleCheck, Pencil, RefreshCw, Trash2 } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";+import { Col, Row, Space } from "@/components/ui/shims/antd-layout";+import { Tag } from "@/components/ui/shims/antd-leaves";+import { Collapse, Tooltip } from "@/components/ui/shims/antd-overlays";+import { Card } from "@/components/ui/shims/antd-structure";import "./NotesCard.css";import { useEffect, useState } from "react";import { promptStudioUpdateStatus } from "../../../helpers/GetStaticData";@@ -123,7 +122,7 @@ function NotesCard({{updateStatus?.status ===promptStudioUpdateStatus.isUpdating && (<Tag- icon={<SyncOutlined spin />}+ icon={<RefreshCw spin />}color="processing"className="display-flex-align-center">@@ -132,7 +131,7 @@ function NotesCard({)}{updateStatus?.status === promptStudioUpdateStatus.done && (<Tag- icon={<CheckCircleOutlined />}+ icon={<CircleCheck />}color="success"className="display-flex-align-center">@@ -152,7 +151,7 @@ function NotesCard({className="display-flex-align-center"onClick={enableEdit}>- <EditOutlined className="prompt-card-actions-head" />+ <Pencil className="prompt-card-actions-head" /></Button></Tooltip><ConfirmModal@@ -161,7 +160,7 @@ function NotesCard({><Tooltip title="Delete"><Button size="small" type="text">- <DeleteOutlined className="delete-icon" />+ <Trash2 className="delete-icon" /></Button></Tooltip></ConfirmModal>diff --git a/frontend/src/components/custom-tools/output-analyzer/FilterPromptFields.jsx b/frontend/src/components/custom-tools/output-analyzer/FilterPromptFields.jsxindex b7e8e70a1..662368366 100644--- a/frontend/src/components/custom-tools/output-analyzer/FilterPromptFields.jsx+++ b/frontend/src/components/custom-tools/output-analyzer/FilterPromptFields.jsx@@ -1,6 +1,7 @@-import { Checkbox, Form } from "antd";import PropTypes from "prop-types";import React, { useCallback, useEffect, useState } from "react";+import { Form } from "@/components/ui/shims/antd-form";+import { Checkbox } from "@/components/ui/shims/antd-inputs";const FilterPromptFields = React.memo(({ isOpen, selectedPrompts, setSelectedPrompts }) => {diff --git a/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzer.css b/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzer.cssindex 842fd9430..e1dc5fd86 100644--- a/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzer.css+++ b/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzer.css@@ -4,7 +4,7 @@height: 100%;display: flex;flex-direction: column;- background-color: var(--page-bg-2);+ background-color: var(--background);overflow-y: hidden;}@@ -58,7 +58,7 @@.output-analyzer-left-box > div {height: 100%;- background-color: var(--white);+ background-color: var(--card);padding: 0px 12px;}@@ -69,5 +69,5 @@.output-analyzer-right-box > div {height: 100%;- background-color: var(--white);+ background-color: var(--card);}diff --git a/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzer.jsx b/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzer.jsxindex 7922a1a0f..4907902a7 100644--- a/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzer.jsx+++ b/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzer.jsx@@ -1,5 +1,5 @@-import { Drawer } from "antd";import { useCallback, useEffect, useMemo, useState } from "react";+import { Drawer } from "@/components/ui/shims/antd-structure";import { OutputAnalyzerHeader } from "./OutputAnalyzerHeader";import "./OutputAnalyzer.css";diff --git a/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzerCard.jsx b/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzerCard.jsxindex 814a317b3..2625fbf2e 100644--- a/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzerCard.jsx+++ b/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzerCard.jsx@@ -1,7 +1,9 @@-import { Col, Divider, Flex, Row, Space, Typography } from "antd";import PropTypes from "prop-types";import { useEffect, useMemo, useState } from "react";import { useParams } from "react-router-dom";+import { Col, Flex, Row, Space } from "@/components/ui/shims/antd-layout";+import { Divider } from "@/components/ui/shims/antd-leaves";+import { Typography } from "@/components/ui/shims/antd-typography";import { base64toBlob } from "../../../helpers/GetStaticData";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";diff --git a/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzerHeader.jsx b/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzerHeader.jsxindex 53e945cb8..32ffab41f 100644--- a/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzerHeader.jsx+++ b/frontend/src/components/custom-tools/output-analyzer/OutputAnalyzerHeader.jsx@@ -1,14 +1,17 @@import {- ArrowLeftOutlined,- FilePdfOutlined,- FilterOutlined,- LeftOutlined,- RightOutlined,-} from "@ant-design/icons";-import { Button, Drawer, Menu, Space, Typography } from "antd";+ ArrowLeft,+ ChevronLeft,+ ChevronRight,+ FileText,+ Filter,+} from "lucide-react";import PropTypes from "prop-types";import { useCallback, useMemo, useState } from "react";import { useNavigate, useParams } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Space } from "@/components/ui/shims/antd-layout";+import { Drawer, Menu } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { useCustomToolStore } from "../../../store/custom-tool-store";import { useSessionStore } from "../../../store/session-store";@@ -87,7 +90,7 @@ function OutputAnalyzerHeader({<div><Space><Button size="small" type="text" onClick={handleNavigate}>- <ArrowLeftOutlined />+ <ArrowLeft /></Button><Typography.Text className="font-size-16" strong>Output Analyzer@@ -98,26 +101,26 @@ function OutputAnalyzerHeader({<Space><Buttontype="text"- icon={<FilterOutlined />}+ icon={<Filter />}onClick={openFilterDrawer}>{`${selectedPromptFields} of ${Object.keys(selectedPrompts).length} fields selected`}</Button><Buttontype="primary"- icon={<FilePdfOutlined />}+ icon={<FileText />}onClick={() => setOpenDocListDrawer(true)}/><div><Buttontype="text"- icon={<LeftOutlined />}+ icon={<ChevronLeft />}onClick={() => handlePagination(PAGINATION_ACTIONS.PREV)}disabled={currentDocIndex === 0}/><Buttontype="text"- icon={<RightOutlined />}+ icon={<ChevronRight />}onClick={() => handlePagination(PAGINATION_ACTIONS.NEXT)}disabled={currentDocIndex === docsLength - 1}/>diff --git a/frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx b/frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsxindex ef358abe1..37449e2de 100644--- a/frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx+++ b/frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx@@ -1,13 +1,11 @@-import {- CheckCircleFilled,- CloseCircleFilled,- InfoCircleFilled,-} from "@ant-design/icons";-import { Button, Modal, Table, Tabs, Tooltip, Typography } from "antd";-import TabPane from "antd/es/tabs/TabPane";+import { CircleCheck, CircleX, Info } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";import { useNavigate, useParams } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Modal, Tooltip } from "@/components/ui/shims/antd-overlays";+import { Table, Tabs } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useCustomToolStore } from "../../../store/custom-tool-store";import { useSessionStore } from "../../../store/session-store";@@ -266,13 +264,13 @@ function OutputForDocModal({<Typography.Text><span style={{ marginRight: "8px" }}>{status === outputStatus.yet_to_process && (- <InfoCircleFilled style={{ color: "#F0AD4E" }} />+ <Info style={{ color: "#F0AD4E" }} />)}{status === outputStatus.fail && (- <CloseCircleFilled style={{ color: "#FF4D4F" }} />+ <CircleX style={{ color: "#FF4D4F" }} />)}{status === outputStatus.success && (- <CheckCircleFilled style={{ color: "#52C41A" }} />+ <CircleCheck style={{ color: "#52C41A" }} />)}</span>{" "}{message}@@ -333,9 +331,9 @@ function OutputForDocModal({<div className="output-doc-gap" /><div className="lmm-profile-outputs"><Tabs defaultActiveKey="0" onChange={handleTabChange}>- <TabPane tab={<span>Default</span>} key={"0"}></TabPane>+ <Tabs.TabPane tab={<span>Default</span>} key={"0"}></Tabs.TabPane>{adapterData?.map((adapter, index) => (- <TabPane+ <Tabs.TabPanetab={<Tooltip title={adapter?.llm_model || adapter?.profile_name}><span>@@ -346,7 +344,7 @@ function OutputForDocModal({</Tooltip>}key={(index + 1)?.toString()}- ></TabPane>+ ></Tabs.TabPane>))}</Tabs>{" "}<ProfileInfoBar profileId={selectedProfile} profiles={llmProfiles} />diff --git a/frontend/src/components/custom-tools/pdf-viewer/Highlight.css b/frontend/src/components/custom-tools/pdf-viewer/Highlight.cssindex cab0046c7..ca9da19d3 100644--- a/frontend/src/components/custom-tools/pdf-viewer/Highlight.css+++ b/frontend/src/components/custom-tools/pdf-viewer/Highlight.css@@ -30,7 +30,7 @@.pdf-viewer-error .ant-result-subtitle {color: #8c8c8c;- font-size: 14px;+ font-size: 13px;max-width: 400px;margin: 0 auto;}diff --git a/frontend/src/components/custom-tools/pdf-viewer/PdfViewer.jsx b/frontend/src/components/custom-tools/pdf-viewer/PdfViewer.jsxindex 0d1c5e7a6..af3c349a1 100644--- a/frontend/src/components/custom-tools/pdf-viewer/PdfViewer.jsx+++ b/frontend/src/components/custom-tools/pdf-viewer/PdfViewer.jsx@@ -1,12 +1,15 @@-import { FileExclamationOutlined, ReloadOutlined } from "@ant-design/icons";import { Viewer, Worker } from "@react-pdf-viewer/core";import { defaultLayoutPlugin } from "@react-pdf-viewer/default-layout";import { highlightPlugin } from "@react-pdf-viewer/highlight";import { pageNavigationPlugin } from "@react-pdf-viewer/page-navigation";-import { Button, Result } from "antd";+import { FileWarning, RotateCw } from "lucide-react";import PropTypes from "prop-types";import { useCallback, useEffect, useMemo, useRef, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Result } from "@/components/ui/shims/antd-structure";+import "@react-pdf-viewer/core/lib/styles/index.css";+import "@react-pdf-viewer/default-layout/lib/styles/index.css";import "@react-pdf-viewer/highlight/lib/styles/index.css";import "./Highlight.css";import { PDF_WORKER_URL } from "../../../helpers/pdfWorkerConfig";@@ -31,11 +34,11 @@ function PdfLoadError({ error, onRetry, reportError }) {return (<div className="pdf-viewer-error"><Result- icon={<FileExclamationOutlined style={{ color: "#ff4d4f" }} />}+ icon={<FileWarning style={{ color: "#ff4d4f" }} />}title="Failed to Load PDF"subTitle={errorMessage}extra={- <Button type="primary" icon={<ReloadOutlined />} onClick={onRetry}>+ <Button type="primary" icon={<RotateCw />} onClick={onRetry}>Retry</Button>}@@ -165,7 +168,7 @@ function PdfViewer({ fileUrl, highlightData, currentHighlightIndex, onError }) {return (<div ref={parentRef} className="doc-manager-body pdf-viewer-error"><Result- icon={<FileExclamationOutlined style={{ color: "#faad14" }} />}+ icon={<FileWarning style={{ color: "var(--warning)" }} />}title="No PDF Available"subTitle="The PDF document URL is not available. Please ensure the document has been processed correctly."/>diff --git a/frontend/src/components/custom-tools/pre-and-post-amble-modal/PreAndPostAmbleModal.jsx b/frontend/src/components/custom-tools/pre-and-post-amble-modal/PreAndPostAmbleModal.jsxindex bd71ef322..5e279e28d 100644--- a/frontend/src/components/custom-tools/pre-and-post-amble-modal/PreAndPostAmbleModal.jsx+++ b/frontend/src/components/custom-tools/pre-and-post-amble-modal/PreAndPostAmbleModal.jsx@@ -1,7 +1,11 @@-import { ExpandOutlined } from "@ant-design/icons";-import { Button, Input, Modal, Space, Typography } from "antd";+import { Expand } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useRef, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";import "./PreAndPostAmbleModal.css";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";@@ -119,7 +123,7 @@ function PreAndPostAmbleModal({ type, handleUpdateTool }) {autoSize={{ minRows: 4 }}/><Button- icon={<ExpandOutlined />}+ icon={<Expand />}className="expand-button"onClick={toggleExpandModal}type="text"diff --git a/frontend/src/components/custom-tools/profile-info-bar/ProfileInfoBar.jsx b/frontend/src/components/custom-tools/profile-info-bar/ProfileInfoBar.jsxindex 934175398..9e84211a0 100644--- a/frontend/src/components/custom-tools/profile-info-bar/ProfileInfoBar.jsx+++ b/frontend/src/components/custom-tools/profile-info-bar/ProfileInfoBar.jsx@@ -1,5 +1,5 @@-import { Tag } from "antd";import PropTypes from "prop-types";+import { Tag } from "@/components/ui/shims/antd-leaves";import "./ProfileInfoBar.css";const ProfileInfoBar = ({ profiles, profileId }) => {diff --git a/frontend/src/components/custom-tools/prompt-card/CopyPromptOutputBtn.jsx b/frontend/src/components/custom-tools/prompt-card/CopyPromptOutputBtn.jsxindex c44bda95f..fe58514c9 100644--- a/frontend/src/components/custom-tools/prompt-card/CopyPromptOutputBtn.jsx+++ b/frontend/src/components/custom-tools/prompt-card/CopyPromptOutputBtn.jsx@@ -1,6 +1,7 @@-import { CopyOutlined } from "@ant-design/icons";-import { Button, Tooltip } from "antd";+import { Copy } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";+import { Tooltip } from "@/components/ui/shims/antd-overlays";function CopyPromptOutputBtn({ isDisabled, copyToClipboard }) {return (@@ -12,7 +13,7 @@ function CopyPromptOutputBtn({ isDisabled, copyToClipboard }) {onClick={copyToClipboard}disabled={isDisabled}>- <CopyOutlined className="prompt-card-actions-head" />+ <Copy className="prompt-card-actions-head" /></Button></Tooltip>);diff --git a/frontend/src/components/custom-tools/prompt-card/DisplayPromptResult.jsx b/frontend/src/components/custom-tools/prompt-card/DisplayPromptResult.jsxindex f5f947402..d3bb329f2 100644--- a/frontend/src/components/custom-tools/prompt-card/DisplayPromptResult.jsx+++ b/frontend/src/components/custom-tools/prompt-card/DisplayPromptResult.jsx@@ -1,7 +1,9 @@-import { InfoCircleFilled } from "@ant-design/icons";-import { Space, Spin, Typography } from "antd";+import { Info } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Space } from "@/components/ui/shims/antd-layout";+import { Spin } from "@/components/ui/shims/antd-leaves";+import { Typography } from "@/components/ui/shims/antd-typography";import {displayPromptResult,@@ -88,7 +90,7 @@ function DisplayPromptResult({return (<Typography.Text className="prompt-not-ran"><span>- <InfoCircleFilled className="info-circle-colored" />+ <Info className="info-circle-colored" /></span>{" "}Yet to run</Typography.Text>diff --git a/frontend/src/components/custom-tools/prompt-card/ExpandCardBtn.jsx b/frontend/src/components/custom-tools/prompt-card/ExpandCardBtn.jsxindex 69ba45a51..284df84a4 100644--- a/frontend/src/components/custom-tools/prompt-card/ExpandCardBtn.jsx+++ b/frontend/src/components/custom-tools/prompt-card/ExpandCardBtn.jsx@@ -1,18 +1,19 @@-import { FullscreenExitOutlined, FullscreenOutlined } from "@ant-design/icons";-import { Button, Tooltip } from "antd";+import { Maximize, Minimize } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Tooltip } from "@/components/ui/shims/antd-overlays";-function ExpandCardBtn({ expandCard, setExpandCard }) {+function ExpandCardBtn({ expandCard, setExpandCard, testId }) {const [icon, setIcon] = useState(null);const [tooltip, setTooltip] = useState("");useEffect(() => {if (expandCard) {- setIcon(<FullscreenExitOutlined className="prompt-card-actions-head" />);+ setIcon(<Minimize className="prompt-card-actions-head" />);setTooltip("Collapse");} else {- setIcon(<FullscreenOutlined className="prompt-card-actions-head" />);+ setIcon(<Maximize className="prompt-card-actions-head" />);setTooltip("Expand");}}, [expandCard]);@@ -24,6 +25,7 @@ function ExpandCardBtn({ expandCard, setExpandCard }) {return (<Tooltip title={tooltip}><Button+ data-testid={testId}size="small"type="text"className="prompt-card-action-button"@@ -38,6 +40,7 @@ function ExpandCardBtn({ expandCard, setExpandCard }) {ExpandCardBtn.propTypes = {expandCard: PropTypes.bool.isRequired,setExpandCard: PropTypes.func.isRequired,+ testId: PropTypes.string,};export { ExpandCardBtn };diff --git a/frontend/src/components/custom-tools/prompt-card/Header.jsx b/frontend/src/components/custom-tools/prompt-card/Header.jsxindex e5a340f53..a90ed8f47 100644--- a/frontend/src/components/custom-tools/prompt-card/Header.jsx+++ b/frontend/src/components/custom-tools/prompt-card/Header.jsx@@ -1,26 +1,21 @@-import {- CheckCircleOutlined,- DeleteOutlined,- InfoCircleOutlined,- LoadingOutlined,- MoreOutlined,- PlayCircleFilled,- PlayCircleOutlined,- SyncOutlined,-} from "@ant-design/icons";-import {- Button,- Checkbox,- Col,- Dropdown,- Input,- Row,- Tag,- Tooltip,-} from "antd";import debounce from "lodash/debounce";+import {+ CircleCheck,+ CirclePlay,+ EllipsisVertical,+ FastForward,+ Info,+ LoaderCircle,+ RefreshCw,+ Trash2,+} from "lucide-react";import PropTypes from "prop-types";-import { useEffect, useRef, useState } from "react";+import { useEffect, useMemo, useRef, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Checkbox, Input } from "@/components/ui/shims/antd-inputs";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Tag } from "@/components/ui/shims/antd-leaves";+import { Dropdown, Tooltip } from "@/components/ui/shims/antd-overlays";import {PROMPT_RUN_TYPES,@@ -113,7 +108,6 @@ function Header({details,} = useCustomToolStore();const runGate = usePromptRunGate(promptDetails);- const [items, setItems] = useState([]);const [isDisablePrompt, setIsDisablePrompt] = useState(null);const [required, setRequired] = useState(false);@@ -197,14 +191,38 @@ function Header({setWebhookUrl,);};+ /*+ * One effect per field, keyed on that field's own value. Keyed on the whole+ * `promptDetails` object (plus `details`, which none of these fields read),+ * the effect re-ran on every *unrelated* optimistic update and re-seeded all+ * four from the last persisted prompt — so the webhook toggle's own save+ * landing mid-keystroke blanked the URL input the user was still typing in.+ */useEffect(() => {setIsDisablePrompt(promptDetails?.active);+ }, [promptDetails?.prompt_id, promptDetails?.active]);++ useEffect(() => {setRequired(promptDetails?.required);+ }, [promptDetails?.prompt_id, promptDetails?.required]);++ useEffect(() => {setWebhookEnabled(promptDetails?.enable_postprocessing_webhook || false);- setWebhookUrl(promptDetails?.postprocessing_webhook_url || "");- }, [promptDetails, details]);+ }, [promptDetails?.prompt_id, promptDetails?.enable_postprocessing_webhook]);useEffect(() => {+ setWebhookUrl(promptDetails?.postprocessing_webhook_url || "");+ }, [promptDetails?.prompt_id, promptDetails?.postprocessing_webhook_url]);++ /*+ * Derived, NOT state written from an effect. The webhook URL <Input> lives+ * inside these menu entries, so with `setItems` in an effect its `value` prop+ * trailed `webhookUrl` by one render: the render right after a keystroke+ * still carried the previous string, and React wrote that back onto the DOM+ * input. Typing at speed therefore dropped characters. useMemo builds the+ * entries in the same pass that updates the state they read.+ */+ const items = useMemo(() => {const dropdownItems = [{label: (@@ -224,31 +242,49 @@ function Header({>Value Required{" "}<Tooltip title="Marks this as a required field. Saving this record won't be allowed in Human Quality Review should this field be empty.">- <InfoCircleOutlined />+ <span>+ <Info />+ </span></Tooltip></Checkbox>)}{enforceType === "json" && (<>- <Checkbox- checked={required === "all"}- onChange={() => handleRequiredChange("all")}- >- All JSON Values Required- </Checkbox>- <Tooltip title="When set, saving this record won't be allowed in Human Quality Review without all key/values filled in this JSON structure.">- <InfoCircleOutlined />- </Tooltip>- <Checkbox- checked={required === "any"}- onChange={() => handleRequiredChange("any")}- className="required-checkbox-padding"- >- At least 1 JSON Value Required- </Checkbox>- <Tooltip title="When set, saving this record won't be allowed in Human Quality Review without at least one value filled in this JSON structure.">- <InfoCircleOutlined />- </Tooltip>+ {/*+ * Each checkbox is grouped with its own tooltip icon so the+ * two never separate, and the pairs share a row as they did+ * under antd. `required-checkbox-padding`, which used to sit+ * on the second checkbox, has no rule anywhere in the app —+ * the gap came from antd's own adjacent-wrapper margin.+ */}+ <div className="flex flex-wrap items-center gap-x-4 gap-y-1">+ <span className="inline-flex items-center gap-1">+ <Checkbox+ checked={required === "all"}+ onChange={() => handleRequiredChange("all")}+ >+ All JSON Values Required+ </Checkbox>+ <Tooltip title="When set, saving this record won't be allowed in Human Quality Review without all key/values filled in this JSON structure.">+ <span>+ <Info />+ </span>+ </Tooltip>+ </span>+ <span className="inline-flex items-center gap-1">+ <Checkbox+ checked={required === "any"}+ onChange={() => handleRequiredChange("any")}+ >+ At least 1 JSON Value Required+ </Checkbox>+ <Tooltip title="When set, saving this record won't be allowed in Human Quality Review without at least one value filled in this JSON structure.">+ <span>+ <Info />+ </span>+ </Tooltip>+ </span>+ </div><divstyle={{marginTop: "8px",@@ -263,7 +299,9 @@ function Header({>Enable Postprocessing Webhook{" "}<Tooltip title="Enable external webhook call to postprocess JSON responses before returning to user.">- <InfoCircleOutlined />+ <span>+ <Info />+ </span></Tooltip></Checkbox>{webhookEnabled && (@@ -300,7 +338,7 @@ function Header({handleConfirm={() => handleDelete(promptDetails?.prompt_id)}content="The prompt will be permanently deleted.">- <DeleteOutlined /> Delete+ <Trash2 /> Delete</ConfirmModal>),key: "delete",@@ -329,7 +367,8 @@ function Header({dropdownItems.splice(0, 1);}- setItems(dropdownItems);+ return dropdownItems;+ // eslint-disable-next-line react-hooks/exhaustive-deps}, [isDisablePrompt, required, enforceType, webhookEnabled, webhookUrl]);return (@@ -352,7 +391,7 @@ function Header({{progressMsg?.message && (<Tooltip title={progressMsg?.message || ""}><Tag- icon={isCoverageLoading && <LoadingOutlined spin />}+ icon={isCoverageLoading && <LoaderCircle spin />}color={progressMsg?.level === "ERROR" ? "error" : "processing"}className="display-flex-align-center">@@ -368,7 +407,7 @@ function Header({<div>{updateStatus?.status === promptStudioUpdateStatus.isUpdating && (<Tag- icon={<SyncOutlined spin />}+ icon={<RefreshCw spin />}color="processing"className="display-flex-align-center">@@ -379,7 +418,7 @@ function Header({<div>{updateStatus?.status === promptStudioUpdateStatus.done && (<Tag- icon={<CheckCircleOutlined />}+ icon={<CircleCheck />}color="success"className="display-flex-align-center">@@ -391,7 +430,7 @@ function Header({{updateStatus?.status ===promptStudioUpdateStatus.validationError && (<Tag- icon={<CheckCircleOutlined />}+ icon={<CircleCheck />}color="error"className="display-flex-align-center">@@ -407,6 +446,7 @@ function Header({title={runGate?.reason || "Run all LLMs for current document"}><Button+ data-testid={`ps-prompt-run-doc-${promptDetails?.prompt_id}`}size="small"type="text"className="prompt-card-action-button"@@ -428,13 +468,14 @@ function Header({!!runGate?.disabled}>- <PlayCircleOutlined className="prompt-card-actions-head" />+ <CirclePlay className="prompt-card-actions-head" /></Button></Tooltip><Tooltiptitle={runGate?.reason || "Run all LLMs for all documents"}><Button+ data-testid={`ps-prompt-run-all-docs-${promptDetails?.prompt_id}`}size="small"type="text"className="prompt-card-action-button"@@ -454,12 +495,24 @@ function Header({!!runGate?.disabled}>- <PlayCircleFilled className="prompt-card-actions-head" />+ {/*+ * "All documents" needs a DIFFERENT glyph from the+ * "current document" button beside it. antd used+ * PlayCircleFilled vs PlayCircleOutlined; the icon migration+ * collapsed both to CirclePlay, leaving two identical buttons+ * distinguished only by their tooltips. The double-chevron+ * play reads as "run across everything".+ */}+ <FastForward className="prompt-card-actions-head" /></Button></Tooltip></>)}- <ExpandCardBtn expandCard={expandCard} setExpandCard={setExpandCard} />+ <ExpandCardBtn+ expandCard={expandCard}+ setExpandCard={setExpandCard}+ testId={`ps-prompt-expand-${promptDetails?.prompt_id}`}+ />{PromptChangeIndicator && (<PromptChangeIndicatorpromptDetails={promptDetails}@@ -478,11 +531,12 @@ function Header({)}<Dropdown menu={{ items }} trigger={["click"]} placement="bottomLeft"><Button+ data-testid={`ps-prompt-menu-${promptDetails?.prompt_id}`}size="small"type="text"className="prompt-card-action-button">- <MoreOutlined className="prompt-card-actions-head" />+ <EllipsisVertical className="prompt-card-actions-head" /></Button></Dropdown></Col>diff --git a/frontend/src/components/custom-tools/prompt-card/OutputForIndex.jsx b/frontend/src/components/custom-tools/prompt-card/OutputForIndex.jsxindex 0a3dbc891..e808eb4d8 100644--- a/frontend/src/components/custom-tools/prompt-card/OutputForIndex.jsx+++ b/frontend/src/components/custom-tools/prompt-card/OutputForIndex.jsx@@ -1,8 +1,11 @@-import { Button, Input, Modal, Typography } from "antd";+import { ArrowDown, ArrowUp } from "lucide-react";import PropTypes from "prop-types";import { useCallback, useEffect, useRef, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";import "./PromptCard.css";-import { ArrowDownOutlined, ArrowUpOutlined } from "@ant-design/icons";import { uniqueId } from "lodash";import debounce from "lodash/debounce";@@ -161,7 +164,7 @@ function OutputForIndex({ chunkData, setIsIndexOpen, isIndexOpen }) {onClick={handlePrev}disabled={highlightedChunks.length === 0}>- <ArrowUpOutlined />+ <ArrowUp /></Button><span className="page-count-container">{highlightedChunks.length > 0 ? currentIndex + 1 : 0}/{" "}@@ -172,7 +175,7 @@ function OutputForIndex({ chunkData, setIsIndexOpen, isIndexOpen }) {onClick={handleNext}disabled={highlightedChunks.length === 0}>- <ArrowDownOutlined />+ <ArrowDown /></Button></div></div>diff --git a/frontend/src/components/custom-tools/prompt-card/ProfileIcon.jsx b/frontend/src/components/custom-tools/prompt-card/ProfileIcon.jsxindex 4d10178c0..a59f9d258 100644--- a/frontend/src/components/custom-tools/prompt-card/ProfileIcon.jsx+++ b/frontend/src/components/custom-tools/prompt-card/ProfileIcon.jsx@@ -1,5 +1,5 @@-import { Image } from "antd";import PropTypes from "prop-types";+import { Image } from "@/components/ui/shims/antd-leaves";import { isImageUrl } from "../../../helpers/GetStaticData";diff --git a/frontend/src/components/custom-tools/prompt-card/PromptCard.css b/frontend/src/components/custom-tools/prompt-card/PromptCard.cssindex 72ba8bcb7..46f9c5d0e 100644--- a/frontend/src/components/custom-tools/prompt-card/PromptCard.css+++ b/frontend/src/components/custom-tools/prompt-card/PromptCard.css@@ -27,7 +27,22 @@.prompt-card-actions-head {font-size: 12px;+ /* width/height, not font-size alone: these classes sit on lucide SVGs,+ * which ignore font-size and fall back to their own 24px default. The+ * antd originals were an icon FONT, where font-size was the size. */+ width: 12px;+ height: 12px;color: #575859;+ transition: color 0.2s;+}++/* The button carries `hover:text-accent-foreground`, but that only sets an+ * INHERITED colour — this rule puts `color` directly on the SVG, so it wins and+ * the icon never reacted. Only the button's faint background changed, which on+ * a tinted prompt card is nearly imperceptible: several icons looked like they+ * had no hover state at all. Tint the icon itself. */+.prompt-card-action-button:hover:not(:disabled) .prompt-card-actions-head {+ color: var(--primary);}.prompt-card-head .ant-typography {@@ -223,7 +238,7 @@.ant-tag-checkable.checked {background-color: #f6ffed !important;border-color: #b7eb8f !important;- color: #52c41a !important;+ color: var(--success) !important;}.ant-tag-checkable.unchecked {@@ -293,7 +308,7 @@.highlighted-prompt {border-width: 1.2px;border-style: solid;- border-color: #4096ff;+ border-color: var(--primary);box-shadow: 4px 4px 12.5px 0px rgba(0, 0, 0, 0.08);}diff --git a/frontend/src/components/custom-tools/prompt-card/PromptCard.jsx b/frontend/src/components/custom-tools/prompt-card/PromptCard.jsxindex 29fda260e..437e27751 100644--- a/frontend/src/components/custom-tools/prompt-card/PromptCard.jsx+++ b/frontend/src/components/custom-tools/prompt-card/PromptCard.jsx@@ -152,10 +152,18 @@ const PromptCard = memo(value = event.target.value;}- const prevPromptDetailsState = { ...promptDetailsState };-- const updatedPromptDetailsState = { ...promptDetailsState };- updatedPromptDetailsState[name] = value;+ /*+ * Functional update, NOT a spread of the captured snapshot. Header's+ * debounced savers hold on to the `handleChange` from the render they+ * were called in, so a save can land against newer state than it was+ * built from. Spreading the snapshot wrote every *other* field back as+ * it stood then: ticking "Enable Postprocessing Webhook" and typing the+ * URL inside the 300ms toggle debounce made the URL save re-assert+ * `enable_postprocessing_webhook: false`, unticking the box the user+ * had just ticked (the PATCH itself only ever carries `name`, so the+ * server kept both values and a refresh looked correct).+ */+ const prevValue = promptDetailsState?.[name];handleUpdateStatus(isUpdateStatus,@@ -163,7 +171,7 @@ const PromptCard = memo(promptStudioUpdateStatus.isUpdating,setUpdateStatus,);- setPromptDetailsState(updatedPromptDetailsState);+ setPromptDetailsState((prev) => ({ ...prev, [name]: value }));return handleChangePromptCard(name, value, promptId).then((res) => {const data = res?.data;@@ -180,7 +188,8 @@ const PromptCard = memo(}).catch(() => {handleUpdateStatus(isUpdateStatus, promptId, null, setUpdateStatus);- setPromptDetailsState(prevPromptDetailsState);+ // Roll back only the field that failed, for the same reason.+ setPromptDetailsState((prev) => ({ ...prev, [name]: prevValue }));}).finally(() => {if (isUpdateStatus) {diff --git a/frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsx b/frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsxindex 7061eb9ed..dace59fcd 100644--- a/frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsx+++ b/frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsx@@ -1,17 +1,13 @@-import { SearchOutlined } from "@ant-design/icons";-import {- Button,- Card,- Collapse,- Divider,- Row,- Select,- Space,- Tag,- Typography,-} from "antd";+import { Search } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useRef, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Row, Space } from "@/components/ui/shims/antd-layout";+import { Divider, Tag } from "@/components/ui/shims/antd-leaves";+import { Collapse } from "@/components/ui/shims/antd-overlays";+import { Card } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { useCustomToolStore } from "../../../store/custom-tool-store";import { SpinnerLoader } from "../../widgets/spinner-loader/SpinnerLoader";import { EditableText } from "../editable-text/EditableText";@@ -243,7 +239,11 @@ function PromptCardItems({{isCoverageLoading ? (<SpinnerLoader size="small" />) : (- <SearchOutlined className="font-size-12" />+ // size-3 (12px), not `font-size-12`: that class is+ // a TEXT utility shared with the Typography.Link+ // below, and font-size does nothing to an SVG — the+ // icon fell back to lucide's 24px default.+ <Search className="size-3" />)}<Typography.Link className="font-size-12">Coverage: {promptCoverage?.length || 0} of{" "}@@ -283,7 +283,7 @@ function PromptCardItems({className="prompt-card-select-type"size="small"placeholder="Enforce Type"- optionFilterProp="children"+ showSearchoptions={enforceTypeList}value={promptDetails?.enforce_type || null}disabled={diff --git a/frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx b/frontend/src/components/custom-tools/prompt-card/PromptOutput.jsxindex d001ca95c..30aacb194 100644--- a/frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx+++ b/frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx@@ -1,13 +1,13 @@-import {- DatabaseOutlined,- InfoCircleOutlined,- PlayCircleFilled,- PlayCircleOutlined,-} from "@ant-design/icons";-import { Button, Col, Divider, Radio, Space, Tooltip, Typography } from "antd";import { AnimatePresence, motion } from "framer-motion";+import { CirclePlay, Database, FastForward, Info } from "lucide-react";import PropTypes from "prop-types";import { useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Radio } from "@/components/ui/shims/antd-inputs";+import { Col, Space } from "@/components/ui/shims/antd-layout";+import { Divider } from "@/components/ui/shims/antd-leaves";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";import {displayPromptResult,@@ -268,6 +268,7 @@ function PromptOutput({}}/><PromptOutputExpandBtn+ testId={`ps-prompt-expand-output-${promptDetails?.prompt_id}`}promptId={promptDetails?.prompt_id}llmProfiles={llmProfileDetails}enforceType={enforceType}@@ -292,6 +293,11 @@ function PromptOutput({const promptId = promptDetails?.prompt_id;const docId = selectedDoc?.document_id;const profileId = profile?.profile_id;+ // Every control below repeats once per prompt AND per profile, so+ // both ids are needed to address one of them uniquely. Ids go last,+ // per the Test IDs convention in FRONTEND_DEV_GUIDE.md.+ const profileTestId = (action) =>+ `ps-prompt-profile-${action}-${promptId}-${profileId}`;const tokenUsageId = promptId + "__" + docId + "__" + profileId;let promptOutputData = {};if (promptOutputs && Object.keys(promptOutputs)) {@@ -358,10 +364,14 @@ function PromptOutput({<div className="llm-info-right"><Space><Tooltip title={tooltipContent(profile?.conf)}>- <InfoCircleOutlined className="prompt-card-actions-head" />+ <Info+ data-testid={profileTestId("info")}+ className="prompt-card-actions-head"+ /></Tooltip><Tooltip title="Chunk used">- <DatabaseOutlined+ <Database+ data-testid={profileTestId("chunk")}onClick={() => {setIsIndexOpen(true);setOpenIndexProfile(promptOutputData?.context);@@ -381,6 +391,7 @@ function PromptOutput({{isNotSingleLlmProfile && (<Tooltip title="Select Default"><Radio+ data-testid={profileTestId("select-default")}checked={profileId === selectedLlmProfileId}onChange={() => handleSelectDefaultLLM(profileId)}disabled={isPublicSource}@@ -416,6 +427,7 @@ function PromptOutput({<div className="prompt-info"><Tooltip title="Run LLM for current document"><Button+ data-testid={profileTestId("run-doc")}size="small"type="text"className="prompt-card-action-button"@@ -433,11 +445,12 @@ function PromptOutput({isPublicSource}>- <PlayCircleOutlined className="prompt-card-actions-head" />+ <CirclePlay className="prompt-card-actions-head" /></Button></Tooltip><Tooltip title="Run LLM for all documents"><Button+ data-testid={profileTestId("run-all-docs")}size="small"type="text"className="prompt-card-action-button"@@ -455,10 +468,13 @@ function PromptOutput({isPublicSource}>- <PlayCircleFilled className="prompt-card-actions-head" />+ {/* All-documents run; the current-document button+ beside it keeps CirclePlay. */}+ <FastForward className="prompt-card-actions-head" /></Button></Tooltip><PromptOutputExpandBtn+ testId={profileTestId("expand")}promptId={promptDetails?.prompt_id}llmProfiles={llmProfileDetails}enforceType={enforceType}diff --git a/frontend/src/components/custom-tools/prompt-card/PromptOutputActions.jsx b/frontend/src/components/custom-tools/prompt-card/PromptOutputActions.jsxindex af7d42a2a..063cb20ab 100644--- a/frontend/src/components/custom-tools/prompt-card/PromptOutputActions.jsx+++ b/frontend/src/components/custom-tools/prompt-card/PromptOutputActions.jsx@@ -1,6 +1,7 @@-import { PlayCircleFilled, PlayCircleOutlined } from "@ant-design/icons";-import { Button, Tooltip } from "antd";+import { CirclePlay, FastForward } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";+import { Tooltip } from "@/components/ui/shims/antd-overlays";import { useCustomToolStore } from "../../../store/custom-tool-store";@@ -29,7 +30,7 @@ function PromptOutputActions({isPublicSource}>- <PlayCircleOutlined className="prompt-card-actions-head" />+ <CirclePlay className="prompt-card-actions-head" /></Button></Tooltip><Tooltip title="Run All">@@ -43,7 +44,8 @@ function PromptOutputActions({isPublicSource}>- <PlayCircleFilled className="prompt-card-actions-head" />+ {/* All-documents run; the button beside it keeps CirclePlay. */}+ <FastForward className="prompt-card-actions-head" /></Button></Tooltip></>diff --git a/frontend/src/components/custom-tools/prompt-card/PromptOutputExpandBtn.jsx b/frontend/src/components/custom-tools/prompt-card/PromptOutputExpandBtn.jsxindex f08ec59e9..62f523412 100644--- a/frontend/src/components/custom-tools/prompt-card/PromptOutputExpandBtn.jsx+++ b/frontend/src/components/custom-tools/prompt-card/PromptOutputExpandBtn.jsx@@ -1,6 +1,7 @@-import { ArrowsAltOutlined } from "@ant-design/icons";-import { Button, Tooltip } from "antd";+import { Move } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";+import { Tooltip } from "@/components/ui/shims/antd-overlays";import { PromptOutputsModal } from "./PromptOutputsModal";@@ -14,17 +15,19 @@ function PromptOutputExpandBtn({tableSettings,openExpandModal,setOpenExpandModal,+ testId,}) {return (<><Tooltip title="Expand"><Button+ data-testid={testId}size="small"type="text"className="prompt-card-action-button"onClick={() => setOpenExpandModal(true)}>- <ArrowsAltOutlined className="prompt-card-actions-head" />+ <Move className="prompt-card-actions-head" /></Button></Tooltip><PromptOutputsModal@@ -52,6 +55,7 @@ PromptOutputExpandBtn.propTypes = {promptRunStatus: PropTypes.object.isRequired,openExpandModal: PropTypes.bool.isRequired,setOpenExpandModal: PropTypes.func.isRequired,+ testId: PropTypes.string,};export { PromptOutputExpandBtn };diff --git a/frontend/src/components/custom-tools/prompt-card/PromptOutputsModal.jsx b/frontend/src/components/custom-tools/prompt-card/PromptOutputsModal.jsxindex 3297c2407..ad579d125 100644--- a/frontend/src/components/custom-tools/prompt-card/PromptOutputsModal.jsx+++ b/frontend/src/components/custom-tools/prompt-card/PromptOutputsModal.jsx@@ -1,5 +1,7 @@-import { Col, Modal, Row, Typography } from "antd";import PropTypes from "prop-types";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";import usePromptOutput from "../../../hooks/usePromptOutput";import { useCustomToolStore } from "../../../store/custom-tool-store";import SpaceWrapper from "../../widgets/space-wrapper/SpaceWrapper";diff --git a/frontend/src/components/custom-tools/prompt-card/RunAllPrompts.jsx b/frontend/src/components/custom-tools/prompt-card/RunAllPrompts.jsxindex abf187845..7cba7170e 100644--- a/frontend/src/components/custom-tools/prompt-card/RunAllPrompts.jsx+++ b/frontend/src/components/custom-tools/prompt-card/RunAllPrompts.jsx@@ -1,5 +1,7 @@-import { PlayCircleFilled, PlayCircleOutlined } from "@ant-design/icons";-import { Button, Space, Tooltip } from "antd";+import { CirclePlay, FastForward } from "lucide-react";+import { Button } from "@/components/ui/shims/antd-button";+import { Space } from "@/components/ui/shims/antd-layout";+import { Tooltip } from "@/components/ui/shims/antd-overlays";import { PROMPT_RUN_TYPES } from "../../../helpers/GetStaticData";import usePromptRun from "../../../hooks/usePromptRun";import { useCustomToolStore } from "../../../store/custom-tool-store";@@ -13,7 +15,8 @@ function RunAllPrompts() {<Space><Tooltip title="Run all prompts for all LLMs and current document"><Button- icon={<PlayCircleOutlined className="prompt-card-actions-head" />}+ data-testid="ps-run-all-prompts-one-doc-btn"+ icon={<CirclePlay className="prompt-card-actions-head" />}onClick={() =>handlePromptRunRequest(PROMPT_RUN_TYPES.RUN_ALL_PROMPTS_ALL_LLMS_ONE_DOC,@@ -27,7 +30,10 @@ function RunAllPrompts() {</Tooltip><Tooltip title="Run all prompts for all LLMs and documents"><Button- icon={<PlayCircleFilled className="prompt-card-actions-head" />}+ data-testid="ps-run-all-prompts-all-docs-btn"+ // All-documents runs use FastForward; the single-document button+ // beside it keeps CirclePlay, so the two are told apart at a glance.+ icon={<FastForward className="prompt-card-actions-head" />}onClick={() =>handlePromptRunRequest(PROMPT_RUN_TYPES.RUN_ALL_PROMPTS_ALL_LLMS_ALL_DOCS,diff --git a/frontend/src/components/custom-tools/prompts-reorder/DraggablePrompt.jsx b/frontend/src/components/custom-tools/prompts-reorder/DraggablePrompt.jsxindex e0a8ddea0..c60ff9bbb 100644--- a/frontend/src/components/custom-tools/prompts-reorder/DraggablePrompt.jsx+++ b/frontend/src/components/custom-tools/prompts-reorder/DraggablePrompt.jsx@@ -1,8 +1,9 @@import PropTypes from "prop-types";import { memo, useRef } from "react";import { useDrag, useDrop } from "react-dnd";+import { Card } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "./PromptsReorder.css";-import { Card, Typography } from "antd";const ItemTypes = {PROMPT: "prompt",diff --git a/frontend/src/components/custom-tools/prompts-reorder/PromptsReorder.jsx b/frontend/src/components/custom-tools/prompts-reorder/PromptsReorder.jsxindex 5947453ce..19f17ae03 100644--- a/frontend/src/components/custom-tools/prompts-reorder/PromptsReorder.jsx+++ b/frontend/src/components/custom-tools/prompts-reorder/PromptsReorder.jsx@@ -1,8 +1,8 @@-import { Space } from "antd";import PropTypes from "prop-types";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { DndProvider } from "react-dnd";import { HTML5Backend } from "react-dnd-html5-backend";+import { Space } from "@/components/ui/shims/antd-layout";import { useCustomToolStore } from "../../../store/custom-tool-store";import DraggablePrompt from "./DraggablePrompt";diff --git a/frontend/src/components/custom-tools/prompts-reorder/PromptsReorderModal.jsx b/frontend/src/components/custom-tools/prompts-reorder/PromptsReorderModal.jsxindex af0157151..922c8da97 100644--- a/frontend/src/components/custom-tools/prompts-reorder/PromptsReorderModal.jsx+++ b/frontend/src/components/custom-tools/prompts-reorder/PromptsReorderModal.jsx@@ -1,5 +1,5 @@-import { Modal } from "antd";import PropTypes from "prop-types";+import { Modal } from "@/components/ui/shims/antd-overlays";import { PromptsReorder } from "./PromptsReorder";diff --git a/frontend/src/components/custom-tools/prompts-reorder/PromptsReorderTitle.jsx b/frontend/src/components/custom-tools/prompts-reorder/PromptsReorderTitle.jsxindex 43838b23f..856b967be 100644--- a/frontend/src/components/custom-tools/prompts-reorder/PromptsReorderTitle.jsx+++ b/frontend/src/components/custom-tools/prompts-reorder/PromptsReorderTitle.jsx@@ -1,12 +1,14 @@-import { InfoCircleOutlined } from "@ant-design/icons";-import { Space, Tooltip, Typography } from "antd";+import { Info } from "lucide-react";+import { Space } from "@/components/ui/shims/antd-layout";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";function PromptsReorderTitle() {return (<Space><Typography.Text>Reorder Prompts</Typography.Text><Tooltip title="Drag and drop the prompts to arrange them in your desired order.">- <InfoCircleOutlined />+ <Info /></Tooltip></Space>);diff --git a/frontend/src/components/custom-tools/retrieval-strategy-modal/RetrievalStrategyModal.css b/frontend/src/components/custom-tools/retrieval-strategy-modal/RetrievalStrategyModal.cssindex ea4940b2d..f9e191391 100644--- a/frontend/src/components/custom-tools/retrieval-strategy-modal/RetrievalStrategyModal.css+++ b/frontend/src/components/custom-tools/retrieval-strategy-modal/RetrievalStrategyModal.css@@ -25,12 +25,12 @@}.retrieval-strategy-modal .ant-radio-wrapper:hover {- border-color: #1890ff;+ border-color: var(--primary);background-color: #f6ffed;}.retrieval-strategy-modal .ant-radio-wrapper-checked {- border-color: #1890ff;+ border-color: var(--primary);background-color: #e6f7ff;}@@ -72,7 +72,7 @@background-color: #fafafa;padding: 12px;border-radius: 4px;- border-left: 3px solid #1890ff;+ border-left: 3px solid var(--primary);}.retrieval-strategy-modal .strategy-icon {@@ -173,11 +173,11 @@}.retrieval-strategy-modal__token-usage-low {- color: #52c41a;+ color: var(--success);}.retrieval-strategy-modal__token-usage-medium {- color: #faad14;+ color: var(--warning);}.retrieval-strategy-modal__token-usage-high {@@ -185,11 +185,11 @@}.retrieval-strategy-modal__cost-impact-low {- color: #52c41a;+ color: var(--success);}.retrieval-strategy-modal__cost-impact-medium {- color: #faad14;+ color: var(--warning);}.retrieval-strategy-modal__cost-impact-high {diff --git a/frontend/src/components/custom-tools/retrieval-strategy-modal/RetrievalStrategyModal.jsx b/frontend/src/components/custom-tools/retrieval-strategy-modal/RetrievalStrategyModal.jsxindex 1549b5c13..3b3d1b592 100644--- a/frontend/src/components/custom-tools/retrieval-strategy-modal/RetrievalStrategyModal.jsx+++ b/frontend/src/components/custom-tools/retrieval-strategy-modal/RetrievalStrategyModal.jsx@@ -1,39 +1,33 @@import {- ForkOutlined,- MergeCellsOutlined,- QuestionCircleOutlined,- ReloadOutlined,- SearchOutlined,- ShareAltOutlined,- TableOutlined,-} from "@ant-design/icons";-import {- Alert,- Button,- Divider,- Modal,- Radio,- Space,- Spin,- Typography,-} from "antd";+ CircleHelp,+ GitFork,+ Merge,+ RotateCw,+ Search,+ Share2,+ Table,+} from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";import { useParams } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Radio } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Alert, Divider, Spin } from "@/components/ui/shims/antd-leaves";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Paragraph, Text, Title } from "@/components/ui/shims/antd-typography";import { useRetrievalStrategies } from "../../../hooks/useRetrievalStrategies";import "./RetrievalStrategyModal.css";-const { Title, Text, Paragraph } = Typography;-const ICON_MAP = {- SearchOutlined: <SearchOutlined />,- QuestionCircleOutlined: <QuestionCircleOutlined />,- ForkOutlined: <ForkOutlined />,- ReloadOutlined: <ReloadOutlined />,- ShareAltOutlined: <ShareAltOutlined />,- TableOutlined: <TableOutlined />,- MergeCellsOutlined: <MergeCellsOutlined />,+ Search: <Search />,+ CircleHelp: <CircleHelp />,+ GitFork: <GitFork />,+ RotateCw: <RotateCw />,+ Share2: <Share2 />,+ Table: <Table />,+ Merge: <Merge />,};const RetrievalStrategyModal = ({@@ -71,7 +65,7 @@ const RetrievalStrategyModal = ({// Transform strategies to include React iconsconst strategiesWithIcons = retrievalStrategies.map((strategy) => ({...strategy,- icon: ICON_MAP[strategy.icon] || <SearchOutlined />,+ icon: ICON_MAP[strategy.icon] || <Search />,}));const selectedDetails = strategiesWithIcons.find(diff --git a/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsx b/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsxindex 99a2fc00b..99a68d5fb 100644--- a/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsx+++ b/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsx@@ -1,13 +1,16 @@import {- CodeOutlined,- DatabaseOutlined,- DiffOutlined,- FileTextOutlined,- MessageOutlined,-} from "@ant-design/icons";-import { Col, Menu, Modal, Row, Typography } from "antd";+ Code,+ Database,+ FileText,+ GitCompare,+ MessageSquare,+} from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Menu } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { getMenuItem } from "../../../helpers/GetStaticData";import SpaceWrapper from "../../widgets/space-wrapper/SpaceWrapper";import { CustomDataSettings } from "../custom-data-settings/CustomDataSettings";@@ -44,11 +47,11 @@ function SettingsModal({ open, setOpen, handleUpdateTool }) {useEffect(() => {const items = [- getMenuItem("LLM Profiles", 1, <CodeOutlined />),- getMenuItem("Custom Data", 9, <DatabaseOutlined />),- getMenuItem("Grammar", 5, <MessageOutlined />),- getMenuItem("Preamble", 6, <DiffOutlined />),- getMenuItem("Postamble", 7, <DiffOutlined />),+ getMenuItem("LLM Profiles", 1, <Code />),+ getMenuItem("Custom Data", 9, <Database />),+ getMenuItem("Grammar", 5, <MessageSquare />),+ getMenuItem("Preamble", 6, <GitCompare />),+ getMenuItem("Postamble", 7, <GitCompare />),];const listOfComponents = {@@ -74,7 +77,7 @@ function SettingsModal({ open, setOpen, handleUpdateTool }) {items.splice(position,0,- getMenuItem("SummarizedExtraction", 2, <FileTextOutlined />),+ getMenuItem("SummarizedExtraction", 2, <FileText />),);listOfComponents[2] = (<SummarizeManager handleUpdateTool={handleUpdateTool} />@@ -86,7 +89,7 @@ function SettingsModal({ open, setOpen, handleUpdateTool }) {items.splice(position,0,- getMenuItem("Evaluation Manager", 3, <FileTextOutlined />),+ getMenuItem("Evaluation Manager", 3, <FileText />),);listOfComponents[3] = (<EvaluationManager handleUpdateTool={handleUpdateTool} />@@ -95,11 +98,7 @@ function SettingsModal({ open, setOpen, handleUpdateTool }) {}if (ChallengeManager) {- items.splice(- position,- 0,- getMenuItem("LLMChallenge", 4, <FileTextOutlined />),- );+ items.splice(position, 0, getMenuItem("LLMChallenge", 4, <FileText />));listOfComponents[4] = (<ChallengeManagerhandleUpdateTool={handleUpdateTool}@@ -109,7 +108,7 @@ function SettingsModal({ open, setOpen, handleUpdateTool }) {position++;}if (HighlightManager) {- items.push(getMenuItem("Highlighting", 8, <FileTextOutlined />));+ items.push(getMenuItem("Highlighting", 8, <FileText />));listOfComponents[8] = (<HighlightManagerhandleUpdateTool={handleUpdateTool}diff --git a/frontend/src/components/custom-tools/text-viewer/TextViewer.jsx b/frontend/src/components/custom-tools/text-viewer/TextViewer.jsxindex a68fd006f..952a88a6b 100644--- a/frontend/src/components/custom-tools/text-viewer/TextViewer.jsx+++ b/frontend/src/components/custom-tools/text-viewer/TextViewer.jsx@@ -1,6 +1,6 @@-import { Typography } from "antd";import PropTypes from "prop-types";import React from "react";+import { Typography } from "@/components/ui/shims/antd-typography";function TextViewer({ text }) {return (diff --git a/frontend/src/components/custom-tools/tool-ide/ToolIde.css b/frontend/src/components/custom-tools/tool-ide/ToolIde.cssindex bd1371221..9a09ed384 100644--- a/frontend/src/components/custom-tools/tool-ide/ToolIde.css+++ b/frontend/src/components/custom-tools/tool-ide/ToolIde.css@@ -1,7 +1,7 @@/* Styles for ToolIde */.tool-ide-layout {- background-color: var(--page-bg-2);+ background-color: var(--background);height: 100%;display: flex;flex-direction: column;@@ -47,7 +47,7 @@.tool-ide-prompts > div,.tool-ide-pdf > div {- background-color: var(--white);+ background-color: var(--card);height: 100%;}@@ -77,7 +77,7 @@}.tool-ide-collapse-panel {- background-color: var(--white);+ background-color: var(--card);border: none;border-radius: 0px;}diff --git a/frontend/src/components/custom-tools/tool-ide/ToolIde.jsx b/frontend/src/components/custom-tools/tool-ide/ToolIde.jsxindex 1f7e21c25..86a6147ec 100644--- a/frontend/src/components/custom-tools/tool-ide/ToolIde.jsx+++ b/frontend/src/components/custom-tools/tool-ide/ToolIde.jsx@@ -1,5 +1,5 @@-import { Col, Row } from "antd";import { useCallback, useEffect, useRef, useState } from "react";+import { Col, Row } from "@/components/ui/shims/antd-layout";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";@@ -66,6 +66,19 @@ try {useLookupExportGate = mod.useLookupExportGate;} catch {}+/*+ * Cloud-only. Mounted here rather than beside either of its triggers: the+ * kebab menu unmounts its contents on click and the prompt card body unmounts+ * on collapse, so a drawer rendered in either was destroyed as it opened.+ */+let LookupDrawerHost;+try {+ const mod = await import(+ "../../../plugins/lookup-studio/prompt-card/LookupDrawerHost"+ );+ LookupDrawerHost = mod.LookupDrawerHost;+} catch {}+function ToolIde() {const [openSettings, setOpenSettings] = useState(false);const customToolStore = useCustomToolStore();@@ -372,6 +385,7 @@ function ToolIde() {/>)}{lookupGateModalEl}+ {LookupDrawerHost && <LookupDrawerHost />}<HeaderhandleUpdateTool={handleUpdateTool}setOpenSettings={setOpenSettings}diff --git a/frontend/src/components/custom-tools/tools-main/ToolsMain.css b/frontend/src/components/custom-tools/tools-main/ToolsMain.cssindex 7dbe14566..f1488cdb0 100644--- a/frontend/src/components/custom-tools/tools-main/ToolsMain.css+++ b/frontend/src/components/custom-tools/tools-main/ToolsMain.css@@ -15,6 +15,33 @@margin: 0px;}+/* The doc-manager toolbar sets `align-items: center`, but the tab labels still+ * sat 5.6px above the file name and buttons beside them. antd's tab nav filled+ * its wrapper, so the 4px top padding never showed; the shadcn nav is shorter+ * than the neighbouring 32px controls, and `.ant-tabs` is a block wrapping the+ * nav AND the content panel — so the 23.6px nav stayed pinned to the top of a+ * 31.6px box.+ *+ * Centre at both levels. Scoped to this toolbar: here the panels are empty+ * (each view renders elsewhere) and only the nav is on screen. ToolsMain+ * shares `.tools-main-tabs` but DOES render its panels below the nav, so it+ * must keep the default block flow. */+.doc-manager-header .tools-main-tabs,+.doc-manager-header .tools-main-tabs .ant-tabs {+ display: flex;+ align-items: center;+}++/* The shim pads line-style tabs `12px 0` to match antd's 46px nav, which is+ * right everywhere the nav stands alone. Here it is not: this toolbar puts the+ * tabs in a row with a file name and 32px buttons, and the padding inflates the+ * label's own box so the TEXT sits above the row's centre line. Strip it for+ * this one toolbar rather than leaving every other nav short. */+.doc-manager-header .tools-main-tabs [role="tab"] {+ padding-top: 0;+ padding-bottom: 0;+}+.tools-main-body {flex: 1;padding: 0px 12px;diff --git a/frontend/src/components/custom-tools/tools-main/ToolsMain.jsx b/frontend/src/components/custom-tools/tools-main/ToolsMain.jsxindex dd8d75bd9..30ec4a170 100644--- a/frontend/src/components/custom-tools/tools-main/ToolsMain.jsx+++ b/frontend/src/components/custom-tools/tools-main/ToolsMain.jsx@@ -1,6 +1,7 @@-import { TableOutlined, UnorderedListOutlined } from "@ant-design/icons";-import { Tabs, Tooltip } from "antd";+import { List, Table } from "lucide-react";import { useEffect, useState } from "react";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Tabs } from "@/components/ui/shims/antd-structure";import { getSequenceNumber, promptType } from "../../../helpers/GetStaticData";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";@@ -41,7 +42,7 @@ function ToolsMain() {key: "1",label: isSimplePromptStudio ? (<Tooltip title="Fields">- <UnorderedListOutlined />+ <List /></Tooltip>) : ("Document Parser"@@ -51,7 +52,7 @@ function ToolsMain() {key: "2",label: isSimplePromptStudio ? (<Tooltip title="Combined Output">- <TableOutlined />+ <Table /></Tooltip>) : ("Combined Output"diff --git a/frontend/src/components/custom-tools/tools-main/ToolsMainActionBtns.jsx b/frontend/src/components/custom-tools/tools-main/ToolsMainActionBtns.jsxindex c7053ac92..ba60b90c8 100644--- a/frontend/src/components/custom-tools/tools-main/ToolsMainActionBtns.jsx+++ b/frontend/src/components/custom-tools/tools-main/ToolsMainActionBtns.jsx@@ -1,7 +1,9 @@-import { BarChartOutlined, UnorderedListOutlined } from "@ant-design/icons";-import { Button, Space, Tooltip } from "antd";+import { ChartColumn, List } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useNavigate, useParams } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Space } from "@/components/ui/shims/antd-layout";+import { Tooltip } from "@/components/ui/shims/antd-overlays";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";import usePostHogEvents from "../../../hooks/usePostHogEvents";@@ -132,14 +134,16 @@ function ToolsMainActionBtns() {{!singlePassExtractMode && <RunAllPrompts />}<Tooltip title="Output Analyzer"><Button- icon={<BarChartOutlined />}+ data-testid="ps-output-analyzer-btn"+ icon={<ChartColumn />}onClick={handleOutputAnalyzerBtnClick}disabled={isMultiPassExtractLoading || isSinglePassExtractLoading}/></Tooltip><Tooltip title="Reorder the list of prompts"><Button- icon={<UnorderedListOutlined />}+ data-testid="ps-reorder-prompts-btn"+ icon={<List />}onClick={() => setOpenReorderModal(true)}loading={isNewOrderLoading}/>diff --git a/frontend/src/components/data-table/ColumnFilter.jsx b/frontend/src/components/data-table/ColumnFilter.jsxnew file mode 100644index 000000000..21dd32ae7--- /dev/null+++ b/frontend/src/components/data-table/ColumnFilter.jsx@@ -0,0 +1,265 @@+import { Filter } from "lucide-react";+import PropTypes from "prop-types";+import * as React from "react";++import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Input } from "@/components/ui/input";+import {+ Popover,+ PopoverContent,+ PopoverTrigger,+} from "@/components/ui/popover";+import { cn } from "@/lib/utils";++/**+ * antd's per-column filter affordance: the little icon in the header and the+ * panel it opens.+ *+ * `DataTable` presents antd's `Table` API, but every filter prop on a column —+ * `filters`, `filterDropdown`, `filterIcon`, `onFilter`, `filteredValue` — was+ * dropped on the floor, so the header rendered the bare title. The visible+ * casualties were the Execution Logs screens: the Execution ID search, the file+ * name search and the Status filter all vanished from a page whose whole+ * purpose is finding one execution among thousands.+ *+ * Two shapes, both in use here:+ *+ * - `filterDropdown` — the call-site renders the whole panel. It may be a+ * node (LogsTable's execution-ID box, which owns its own state and never+ * calls back) or a function given antd's render props.+ * - `filters` — a list of `{ text, value }`; this file renders antd's own+ * checkbox menu with the Reset/OK footer under it.+ */++/** antd's column identity: `key`, else `dataIndex`. */+function columnKey(column) {+ return String(column.key ?? column.dataIndex);+}++/** A string for `aria-label` even when `title` is a node. */+function columnLabel(column) {+ return typeof column.title === "string" ? column.title : columnKey(column);+}++/** The built-in `filters` menu: a checkbox (or radio) per option. */+function FilterMenu({ options, filterSearch, multiple, draft, onDraftChange }) {+ const [query, setQuery] = React.useState("");++ const visible = query+ ? options.filter((o) =>+ String(o.text).toLowerCase().includes(query.toLowerCase()),+ )+ : options;++ const toggle = (value) => {+ if (!multiple) {+ // antd's `filterMultiple: false` is a radio group: picking one option+ // replaces the selection rather than adding to it.+ onDraftChange(draft.includes(value) ? [] : [value]);+ return;+ }+ onDraftChange(+ draft.includes(value)+ ? draft.filter((v) => v !== value)+ : [...draft, value],+ );+ };++ return (+ <div className="max-h-64 overflow-y-auto py-1">+ {filterSearch ? (+ <div className="px-2 pb-1">+ <Input+ value={query}+ onChange={(e) => setQuery(e.target.value)}+ placeholder="Search in filters"+ className="h-7 text-xs"+ />+ </div>+ ) : null}+ {visible.length === 0 ? (+ <div className="px-3 py-2 text-xs text-muted-foreground">+ No filters+ </div>+ ) : null}+ {visible.map((option) => (+ <label+ // Values are raw — `filters` legitimately carries booleans (Manual+ // Review's In Review / Pending) — so only the React key is stringly.+ key={String(option.value)}+ className="flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm hover:bg-muted"+ >+ <Checkbox+ checked={draft.includes(option.value)}+ onCheckedChange={() => toggle(option.value)}+ className={cn(!multiple && "rounded-full")}+ />+ <span className="truncate">{option.text}</span>+ </label>+ ))}+ </div>+ );+}++FilterMenu.propTypes = {+ options: PropTypes.array.isRequired,+ filterSearch: PropTypes.bool,+ multiple: PropTypes.bool,+ draft: PropTypes.array.isRequired,+ onDraftChange: PropTypes.func.isRequired,+};++/**+ * The header trigger plus its panel.+ *+ * `selectedKeys` is the COMMITTED filter — what the table is filtered by right+ * now. The panel edits a draft and only publishes it through `onConfirm`, which+ * is what makes antd's Reset/OK footer mean anything.+ */+function ColumnFilter({ column, selectedKeys, onConfirm }) {+ const [open, setOpen] = React.useState(false);+ const [draft, setDraft] = React.useState(selectedKeys);+ /*+ * The draft lives in a ref as well as in state because antd's render props+ * are routinely called back-to-back in one handler — LogModal's level filter+ * does `setSelectedKeys([level]); confirm();` — and `confirm` has to publish+ * the keys that were just set, not the ones React has yet to re-render with.+ */+ const draftRef = React.useRef(selectedKeys);++ const setSelectedKeys = (keys) => {+ draftRef.current = keys ?? [];+ setDraft(draftRef.current);+ };++ const confirm = (options) => {+ onConfirm(draftRef.current);+ // antd's `confirm({ closeDropdown: false })` commits but leaves the panel up.+ if (options?.closeDropdown !== false) {+ setOpen(false);+ }+ };++ // antd's `clearFilters` publishes the empty selection and, by default, leaves+ // the panel open so the user can pick something else.+ const clearFilters = () => {+ draftRef.current = [];+ setDraft([]);+ onConfirm([]);+ };++ const handleOpenChange = (next) => {+ if (next) {+ // Re-seed on open: a panel dismissed with Escape must not carry its+ // abandoned draft into the next visit.+ draftRef.current = selectedKeys;+ setDraft(selectedKeys);+ }+ setOpen(next);+ };++ const filtered = selectedKeys.length > 0;++ const icon =+ typeof column.filterIcon === "function"+ ? column.filterIcon(filtered)+ : (column.filterIcon ?? <Filter className="size-3" />);++ let panel;+ if (column.filterDropdown) {+ panel =+ typeof column.filterDropdown === "function"+ ? column.filterDropdown({+ prefixCls: "ant-table-filter-dropdown",+ setSelectedKeys,+ selectedKeys: draft,+ confirm,+ clearFilters,+ filters: column.filters,+ visible: open,+ close: () => setOpen(false),+ })+ : column.filterDropdown;+ } else {+ const multiple = column.filterMultiple !== false;+ panel = (+ <>+ <FilterMenu+ options={column.filters ?? []}+ filterSearch={Boolean(column.filterSearch)}+ multiple={multiple}+ draft={draft}+ onDraftChange={setSelectedKeys}+ />+ <div className="flex items-center justify-between border-t border-separator px-2 py-1.5">+ <Button+ variant="link"+ size="sm"+ className="h-6 px-1"+ disabled={draft.length === 0}+ onClick={clearFilters}+ >+ Reset+ </Button>+ <Button size="sm" className="h-6" onClick={() => confirm()}>+ OK+ </Button>+ </div>+ </>+ );+ }++ return (+ <Popover open={open} onOpenChange={handleOpenChange}>+ <PopoverTrigger asChild>+ <button+ type="button"+ aria-label={`Filter by ${columnLabel(column)}`}+ aria-expanded={open}+ data-filtered={filtered ? "true" : undefined}+ className={cn(+ "ant-table-filter-trigger inline-flex cursor-pointer items-center rounded p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground",+ /*+ * The trigger sizes its icon rather than trusting the call site to,+ * exactly as antd does (`.ant-table-filter-trigger .anticon` is a+ * 12px font-size). Every custom `filterIcon` in the app — the two+ * Search boxes and the two Filter menus — is a bare lucide icon, so+ * all four came out at lucide's 24px default and towered over both+ * the header text and the sort carets beside them.+ */+ "[&_svg]:size-3.5",+ filtered && "active text-primary hover:text-primary",+ )}+ /*+ * The <th> carries the sort handler, so without this a click on the+ * filter icon would also re-sort the column underneath the panel.+ * `stopPropagation` leaves `defaultPrevented` alone, so Radix still+ * gets its own click through and opens the popover.+ */+ onClick={(event) => event.stopPropagation()}+ >+ {icon}+ </button>+ </PopoverTrigger>+ <PopoverContent+ align="end"+ className="ant-table-filter-dropdown w-auto min-w-[160px] max-w-xs p-0 font-normal"+ // A custom `filterDropdown` is usually a search box the user is about+ // to type in; antd focuses it, and stealing focus back to the trigger+ // would undo that.+ onOpenAutoFocus={(event) => event.preventDefault()}+ >+ {panel}+ </PopoverContent>+ </Popover>+ );+}++ColumnFilter.propTypes = {+ column: PropTypes.object.isRequired,+ selectedKeys: PropTypes.array.isRequired,+ onConfirm: PropTypes.func.isRequired,+};++export { ColumnFilter, columnKey };diff --git a/frontend/src/components/data-table/DataTable.jsx b/frontend/src/components/data-table/DataTable.jsxnew file mode 100644index 000000000..ddf6b17fa--- /dev/null+++ b/frontend/src/components/data-table/DataTable.jsx@@ -0,0 +1,929 @@+import {+ flexRender,+ getCoreRowModel,+ getPaginationRowModel,+ getSortedRowModel,+ useReactTable,+} from "@tanstack/react-table";+import {+ ChevronDown,+ ChevronLeft,+ ChevronRight,+ ChevronUp,+} from "lucide-react";+import * as React from "react";+import { ColumnFilter, columnKey } from "@/components/data-table/ColumnFilter";+import { Checkbox } from "@/components/ui/checkbox";+import { Empty } from "@/components/ui/shims/antd-leaves";+import { Spinner } from "@/components/ui/spinner";+import {+ Table,+ TableBody,+ TableCell,+ TableHead,+ TableHeader,+ TableRow,+} from "@/components/ui/table";+import { cn } from "@/lib/utils";++/**+ * Shared data table (P4-02, D5 / D9).+ *+ * shadcn's `table` is presentational only, so sorting, pagination and row+ * selection come from TanStack. This wrapper presents **antd's `Table` API**+ * (`columns`, `dataSource`, `rowKey`, `rowSelection`, `pagination`, `loading`)+ * so the 16 OSS call-sites — and the cloud plugin sites in Phase C — convert by+ * import rather than by rewriting each table.+ *+ * Per D9 this is the single table implementation for both repos: plugins must+ * import it rather than build their own.+ */++/**+ * One antd column → one TanStack column def.+ *+ * antd spells a banded header as a column that carries a `title` and a+ * `children` array instead of a `dataIndex`; the leaves under it are the real+ * columns. Ignoring `children` collapsed the whole band to a single leaf whose+ * accessor was undefined, so the LLMWhisperer processing-modes table rendered+ * its group title above sixteen blank rows — a header with no table under it.+ *+ * `path` only supplies the id for a column with neither `key` nor `dataIndex`:+ * child indices restart at 0 inside every band, so the plain index the flat+ * version used would collide across levels.+ */+function toColumn(c, path) {+ const id = String(c.key ?? c.dataIndex ?? path);+ // `column` rides along so the header can render antd's filter affordance,+ // which is declared on the antd def and has no TanStack equivalent.+ const meta = {+ align: c.align,+ width: c.width,+ className: c.className,+ column: c,+ };++ if (c.children?.length) {+ return {+ id,+ header: c.title,+ meta,+ columns: c.children+ .filter(Boolean)+ .map((child, i) => toColumn(child, `${path}-${i}`)),+ };+ }++ return {+ id,+ accessorKey: c.dataIndex,+ header: c.title,+ enableSorting: Boolean(c.sorter),+ /*+ * antd reads the sorter's SHAPE: a function is a local comparator, while+ * `sorter: true` means "the server sorts this — just tell me it was+ * clicked". Both used to sort locally with TanStack's guessed comparator,+ * which got it wrong in both directions. A `localeCompare` sorter was+ * replaced by a generic one, and — worse — every `sorter: true` column+ * reordered the ten rows already on screen while the parent's `onChange`+ * never fired, so the Execution Logs list looked sorted and wasn't: the+ * rows it should have pulled from page two stayed on page two.+ */+ sortingFn:+ typeof c.sorter === "function"+ ? (a, b) => c.sorter(a.original, b.original)+ : () => 0,+ meta,+ cell: ({ row }) => {+ const value = c.dataIndex ? row.original?.[c.dataIndex] : undefined;+ // antd's render(value, record, index) contract.+ return c.render ? c.render(value, row.original, row.index) : value;+ },+ };+}++/** antd column defs → TanStack column defs. */+function toColumns(antdColumns = [], rowSelection) {+ const cols = antdColumns.filter(Boolean).map((c, i) => toColumn(c, i));++ if (!rowSelection) {+ return cols;+ }++ return [+ {+ id: "__select",+ header: ({ table }) => (+ <Checkbox+ checked={table.getIsAllPageRowsSelected()}+ onCheckedChange={(v) => table.toggleAllPageRowsSelected(Boolean(v))}+ aria-label="Select all"+ />+ ),+ cell: ({ row }) => (+ <Checkbox+ checked={row.getIsSelected()}+ onCheckedChange={(v) => row.toggleSelected(Boolean(v))}+ aria-label="Select row"+ />+ ),+ enableSorting: false,+ },+ ...cols,+ ];+}++/** Every leaf antd column, flattened out of any banded headers. */+function leafColumns(antdColumns = []) {+ return antdColumns+ .filter(Boolean)+ .flatMap((c) => (c.children?.length ? leafColumns(c.children) : [c]));+}++/** Does this column offer a filter at all? */+function isFilterable(c) {+ return Boolean(c.filters || c.filterDropdown);+}++/**+ * antd's sorter affordance: a caret pair, ALWAYS on for a sortable column.+ *+ * Only the active direction used to render, so an unsorted column looked+ * exactly like an unsortable one — on Execution Logs neither "Executed At" nor+ * "Execution Time" advertised that they sort at all, and the single chevron+ * that appeared after a click read as decoration rather than as state. antd+ * shows both carets greyed and lights the applied one, which is what makes the+ * column both discoverable and self-describing once sorted.+ */+function SortCarets({ sorted }) {+ return (+ <span+ className="ant-table-column-sorter inline-flex flex-col items-center justify-center leading-none"+ aria-hidden="true"+ >+ <ChevronUp+ className={cn(+ // The pair has to read as one control, so the carets overlap: two+ // 12px lucide icons stacked at their natural height sit a header row+ // apart.+ "-mb-[3px] size-3",+ sorted === "asc" ? "text-primary" : "text-muted-foreground/40",+ )}+ />+ <ChevronDown+ className={cn(+ "size-3",+ sorted === "desc" ? "text-primary" : "text-muted-foreground/40",+ )}+ />+ </span>+ );+}++/**+ * antd's `onChange` hands back a `filters` object with an entry for EVERY+ * filterable column, not just the active ones — LogModal indexes straight into+ * `filters.level[0]`, so a missing key is a TypeError rather than "no filter".+ *+ * The null-vs-empty split is antd's own: a column driving its own+ * `filterDropdown` reports its raw keys (`[]` when cleared), while a+ * `filters`-list column reports `null` once nothing is ticked.+ */+function toFilterInfo(cols, keysFor) {+ const info = {};+ for (const c of cols) {+ if (!isFilterable(c)) {+ continue;+ }+ const keys = keysFor(c);+ info[columnKey(c)] = c.filterDropdown ? keys : keys.length ? keys : null;+ }+ return info;+}++/** A TanStack sort entry in the shape antd's `onChange` promises. */+function toSorterInfo(sortEntry, cols) {+ if (!sortEntry) {+ return {};+ }+ const column = cols.find(+ (c) => String(c.key ?? c.dataIndex) === sortEntry.id,+ );+ return {+ column,+ columnKey: column?.key,+ field: column?.dataIndex,+ order: sortEntry.desc ? "descend" : "ascend",+ };+}++/** One 24px square in antd's pager: a page number, an arrow, or the ellipsis. */+function PagerButton({ children, label, active, ...props }) {+ return (+ <button+ type="button"+ aria-label={label}+ aria-current={active ? "page" : undefined}+ className={cn(+ "inline-flex size-6 items-center justify-center rounded border text-xs transition-colors",+ "disabled:cursor-not-allowed disabled:opacity-40",+ active+ ? "border-primary text-primary"+ : "border-separator hover:border-primary hover:text-primary",+ )}+ {...props}+ >+ {children}+ </button>+ );+}++/**+ * antd shows every page up to 7, then collapses the middle to an ellipsis so+ * the pager keeps a fixed width. Returns page numbers with "…" for the gaps.+ */+function pageNumbers(current, total) {+ if (total <= 7) {+ return Array.from({ length: total }, (_, i) => i + 1);+ }+ // First and last are always reachable; the window slides around `current`.+ const from = Math.max(2, Math.min(current - 1, total - 4));+ const to = Math.min(total - 1, Math.max(current + 1, 5));+ return [+ 1,+ ...(from > 2 ? ["…"] : []),+ ...Array.from({ length: to - from + 1 }, (_, i) => from + i),+ ...(to < total - 1 ? ["…"] : []),+ total,+ ];+}++function DataTable({+ columns,+ dataSource,+ rowKey = "id",+ rowSelection,+ pagination,+ loading,+ size,+ /**+ * antd's `tableLayout`, forwarded to CSS `table-layout`.+ *+ * Also load-bearing, and also silently dropped before: column `width` is+ * rendered onto the <th> only, and under the browser's default AUTO layout a+ * width is a hint, not a bound. One long unbroken description in+ * ResourceTable's Name column therefore stretched that column and pushed the+ * Actions column off the right edge. With "fixed" the declared widths win and+ * the cell's own ellipsis can finally take effect.+ */+ tableLayout,+ rowClassName,+ /**+ * antd's per-row event hook: `onRow(record, index)` returns props (usually+ * `{ onClick }`) that get spread onto the row.+ *+ * Declaring it is load-bearing. Undeclared, it fell into `...props` and was+ * spread onto the wrapper <div>, where React silently ignores an unknown+ * `onRow` attribute — so ResourceTable's rows carried+ * `rowClassName="…-clickable"` (cursor: pointer) while the click handler was+ * never wired, and Prompt Studio and Workflows became unopenable with no+ * console error to show for it.+ */+ onRow,+ /**+ * antd's Table-level `onChange(pagination, filters, sorter)` — the callback a+ * server-paged call-site listens to so it can fetch the page the user just+ * clicked.+ *+ * Declared for the same reason as `onRow` above: undeclared it fell into+ * `...props` and was spread onto the wrapper <div>, where React silently+ * ignores an unknown `onChange` attribute. ResourceTable's `handleChange`+ * therefore never ran, so on every server-paged list — LLMs, Vector DBs,+ * Embeddings, Text Extractors, Connectors — clicking a page number did+ * nothing whatsoever.+ */+ onChange,+ /**+ * antd's `showHeader`, default true.+ *+ * Declared for the same reason as `onRow` above: undeclared, it fell into+ * `...props` and was spread onto the wrapper <div>, where React not only+ * ignored it but warned about an unknown `showHeader` DOM attribute on every+ * render of the logs panel. A call site asking for `showHeader={false}` would+ * silently have got a header anyway.+ */+ showHeader = true,+ /**+ * antd's `scroll={{ x, y }}`: `y` caps the body height and pins the header+ * above it, `x` gives the table a minimum width so cramped columns overflow+ * sideways instead of squashing.+ *+ * Declared for the same reason as `onRow` and `showHeader` above — it fell+ * into `...props` and onto the wrapper <div>, so all ten call-sites asking+ * for it silently got a table that grew to its full height instead. The+ * LLMWhisperer processing-modes table asks for `y: 500` and stood 1270px+ * tall, pushing its own header off the top of the screen.+ */+ scroll,+ /**+ * antd's `bordered`: rules between every cell, plus an outer frame.+ *+ * Declared for the same reason as `onRow`, `showHeader` and `scroll` above —+ * undeclared it fell into `...props` and onto the wrapper <div>, where React+ * warned "Received `true` for a non-boolean attribute `bordered`" on every+ * render. The agentic Prompt Studio's extracted-data tables ask for it, and+ * got a borderless table plus a console error instead.+ */+ bordered = false,+ className,+ emptyText = "No data",+ /**+ * antd's `locale={{ emptyText }}` — the spelling six call-sites actually use.+ *+ * Declared for the same reason as `onRow`, `showHeader`, `scroll` and+ * `bordered` above, and it failed both ways at once: the custom empty state+ * was silently replaced by the bare "No data" default, AND the object landed+ * on the wrapper <div> as `locale="[object Object]"`. The agentic Prompt+ * Studio's status table is the visible casualty — a project with no+ * documents showed an empty box where "No documents in this project yet …+ * click Manage Documents to upload PDFs" should be.+ */+ locale,+ /**+ * antd's `sortDirections`: the orders a header cycles through.+ *+ * Declared for the same reason as `onRow`, `showHeader`, `scroll`, `bordered`+ * and `locale` above — undeclared it fell into `...props` and onto the+ * wrapper <div>, where React warned "does not recognize the `sortDirections`+ * prop on a DOM element" on every render of all four Execution Logs tables.+ * All four pass `["ascend", "descend", "ascend"]`, antd's idiom for "never+ * cycle back to unsorted": a repeated entry is what removes the third,+ * order-less state.+ */+ sortDirections,+ ...props+}) {+ const empty = locale?.emptyText ?? emptyText;+ const [sorting, setSorting] = React.useState([]);+ const [selection, setSelection] = React.useState({});++ const rows = React.useMemo(() => dataSource ?? [], [dataSource]);+ const cols = React.useMemo(+ () => toColumns(columns, rowSelection),+ [columns, rowSelection],+ );+ const leaves = React.useMemo(() => leafColumns(columns), [columns]);++ /*+ * Committed filters, keyed by antd column key. Only the uncontrolled ones+ * live here: a column passing `filteredValue` is driven by its parent, and a+ * column passing only `defaultFilteredValue` seeds from that until the user+ * touches it. Resolving all three in one place means the rest of the+ * component never has to know which kind it is looking at.+ */+ const [filterState, setFilterState] = React.useState({});+ const keysFor = React.useCallback(+ (c) => {+ if (c.filteredValue !== undefined) {+ return c.filteredValue ?? [];+ }+ const committed = filterState[columnKey(c)];+ return committed ?? c.defaultFilteredValue ?? [];+ },+ [filterState],+ );++ /*+ * antd applies `onFilter` itself: OR across the keys ticked within one+ * column, AND across columns. A column with `filters` but NO `onFilter` is+ * asking the server to do it, so it must not also be applied here — that is+ * the Execution Logs status filter, which pages on the server.+ */+ const data = React.useMemo(() => {+ const active = leaves.filter(+ (c) => typeof c.onFilter === "function" && keysFor(c).length > 0,+ );+ if (active.length === 0) {+ return rows;+ }+ return rows.filter((record) =>+ active.every((c) => keysFor(c).some((v) => c.onFilter(v, record))),+ );+ }, [rows, leaves, keysFor]);++ // antd reads `scroll.x === true` as "as wide as the content needs".+ const scrollX = scroll?.x === true ? "max-content" : scroll?.x;+ const scrollY = scroll?.y;++ // antd accepts `pagination={false}` to disable, or an object to configure.+ const paginated = pagination !== false;+ const pageSize = pagination?.pageSize ?? 10;+ /*+ * antd slices `dataSource` only when it holds MORE rows than fit on a page;+ * otherwise it renders what it was handed and lets `total` drive the pager.+ * That distinction IS server-side paging, and losing it broke every list that+ * pages on the server. ToolSettings requests `?page=1&page_size=10`, so+ * `dataSource` is 10 rows while the response's `count` — passed here as+ * `total` — says 12. Deriving the page count from `data.length` collapsed the+ * pager to a single page, so on the LLM settings screen two adapters the API+ * had already advertised via its `next` link were simply unreachable.+ */+ const clientPaged = paginated && data.length > pageSize;+ const total = pagination?.total ?? data.length;+ const pageCount = Math.max(1, Math.ceil(total / (pageSize || 1)));+ const [internalPage, setInternalPage] = React.useState(1);+ /*+ * antd: passing `current` makes the pager controlled — the parent refetches+ * and feeds the new page back down. Without it the table owns its own page.+ * Clamped so a shrinking list (a search, a delete) can't leave the pager+ * pointing past the last page with a blank body under it.+ */+ const currentPage = Math.min(pagination?.current ?? internalPage, pageCount);++ const goToPage = (page) => {+ const next = Math.min(Math.max(1, page), pageCount);+ if (next === currentPage) {+ return;+ }+ // Controlled pagers move only when the parent says so; uncontrolled ones+ // page themselves.+ if (pagination?.current === undefined) {+ setInternalPage(next);+ }+ onChange?.(+ { ...pagination, current: next, pageSize, total },+ toFilterInfo(leaves, keysFor),+ toSorterInfo(sorting[0], leaves),+ );+ };++ /*+ * Sorting and filtering both report through antd's single+ * `onChange(pagination, filters, sorter)`, and both used to report nothing at+ * all: `onSortingChange` went straight to `setSorting`, and filters had no+ * state to change. Every server-sorted and server-filtered list was inert.+ */+ const handleSortingChange = (updater) => {+ const next = typeof updater === "function" ? updater(sorting) : updater;+ setSorting(next);+ onChange?.(+ { ...pagination, current: currentPage, pageSize, total },+ toFilterInfo(leaves, keysFor),+ toSorterInfo(next[0], leaves),+ );+ };++ const commitFilter = (c, keys) => {+ const next = { ...filterState, [columnKey(c)]: keys };+ setFilterState(next);+ /*+ * The column being committed reports the keys the user just picked — even+ * when it is CONTROLLED. `filteredValue` is the parent's current value,+ * which is exactly the stale one here: reporting it back is how the parent+ * would learn nothing changed. LogModal's level filter is controlled on+ * `selectedLogLevel` and sets it from this callback, so echoing its own+ * `filteredValue` left the filter permanently stuck on "no level".+ * Every OTHER column still reports its own controlled or committed value.+ */+ const committedKey = columnKey(c);+ const nextKeysFor = (col) => {+ if (columnKey(col) === committedKey) {+ return keys;+ }+ return col.filteredValue !== undefined+ ? (col.filteredValue ?? [])+ : (next[columnKey(col)] ?? col.defaultFilteredValue ?? []);+ };+ if (pagination?.current === undefined) {+ setInternalPage(1);+ }+ onChange?.(+ // antd sends the user back to the first page when the filter changes:+ // page 4 of the old result set means nothing in the new one.+ { ...pagination, current: 1, pageSize, total },+ toFilterInfo(leaves, nextKeysFor),+ toSorterInfo(sorting[0], leaves),+ );+ };++ const table = useReactTable({+ data,+ columns: cols,+ // A repeat in the list means the cycle never reaches "unsorted"; a list+ // that leads with "descend" means the first click sorts that way.+ enableSortingRemoval: sortDirections+ ? new Set(sortDirections).size === sortDirections.length+ : true,+ /*+ * antd's first click is always ascending unless `sortDirections` leads+ * with "descend". Set here rather than per column because TanStack lets a+ * column def override the table option, and its own default is+ * descending-first for numeric columns — which silently reversed the first+ * click on every numeric column.+ */+ sortDescFirst: sortDirections?.[0] === "descend",+ state: {+ sorting,+ rowSelection: selection,+ // Only meaningful while we slice: a server-paged table is handed exactly+ // one page and must not have it sliced a second time.+ ...(clientPaged+ ? { pagination: { pageIndex: currentPage - 1, pageSize } }+ : {}),+ },+ onSortingChange: handleSortingChange,+ onRowSelectionChange: setSelection,+ /*+ * The pager below is the only thing that may change the page, so TanStack+ * deliberately gets no `onPaginationChange`.+ *+ * Wiring one back to the parent looks right and ping-pongs: TanStack calls+ * `resetPageIndex()` by itself every time `data` changes, so fetching page+ * 2 delivered new rows, which reset the index to 0, which fetched page 1+ * again — the table snapped back the instant it arrived. `autoResetPageIndex`+ * is off for the same reason; the `currentPage` clamp above already covers+ * the case it exists for, a page left pointing past a shrunken list.+ */+ autoResetPageIndex: false,+ getCoreRowModel: getCoreRowModel(),+ getSortedRowModel: getSortedRowModel(),+ ...(clientPaged ? { getPaginationRowModel: getPaginationRowModel() } : {}),+ getRowId: (row, index) =>+ typeof rowKey === "function"+ ? String(rowKey(row))+ : String(row?.[rowKey] ?? index),+ });++ /*+ * Held in a ref, and deliberately NOT in the effect's deps.+ *+ * antd tolerates an inline `rowSelection={{ selectedRowKeys, onChange }}`,+ * which most call-sites write — a fresh object every render. Depending on it+ * (or on `table`, likewise rebuilt each render) re-ran this effect on every+ * commit, and since it calls back into the parent's setState that is an+ * infinite loop: React #185, which crashed the File History modal outright.+ */+ const rowSelectionRef = React.useRef(rowSelection);+ rowSelectionRef.current = rowSelection;+ const tableRef = React.useRef(table);+ tableRef.current = table;++ // Mirror selection back through antd's callback shape.+ React.useEffect(() => {+ const onChange = rowSelectionRef.current?.onChange;+ if (!onChange) {+ return;+ }+ const rows = tableRef.current+ .getSelectedRowModel()+ .rows.map((r) => r.original);+ onChange(+ rows.map((r) => r?.[typeof rowKey === "function" ? "id" : rowKey]),+ rows,+ );+ // `selection` is the only real input: it changes exactly when the user+ // ticks a row, which is when antd would fire onChange.+ }, [selection, rowKey]);++ /*+ * antd renders the header as a SECOND table outside the scrolling body, so a+ * banded header stays put in full. One table can only pin rows with+ * `position: sticky`, and every row after the first has to sit below the+ * ones above it — an offset that cannot be known statically, since a header+ * row's height depends on where its titles wrap. So: measure after layout.+ */+ const headRef = React.useRef(null);+ const [headerOffsets, setHeaderOffsets] = React.useState([]);+ const headerRowCount = table.getHeaderGroups().length;+ React.useLayoutEffect(() => {+ if (!scrollY || !headRef.current) {+ return undefined;+ }+ const measure = () => {+ let top = 0;+ setHeaderOffsets(+ // `querySelectorAll` rather than `thead.rows`, which jsdom does not+ // implement — the measurement threw and took the whole table with it.+ Array.from(headRef.current.querySelectorAll("tr")).map((row) => {+ const offset = top;+ top += row.offsetHeight;+ return offset;+ }),+ );+ };+ measure();+ // Re-wrapping at a new width restacks the rows.+ window.addEventListener("resize", measure);+ return () => window.removeEventListener("resize", measure);+ }, [scrollY, headerRowCount]);++ // antd accepts `loading` as a boolean or `{ spinning }`.+ const isLoading =+ typeof loading === "object" ? Boolean(loading?.spinning) : Boolean(loading);++ return (+ // ant-table-* class names are emitted deliberately: the app has ~12 CSS+ // rules targeting these (heights, sticky headers, overflow) that would+ // otherwise match nothing.+ <div className={cn("ant-table-wrapper w-full", className)} {...props}>+ <div+ className={cn(+ "ant-table ant-table-container",+ /*+ * The cap goes on shadcn's own `overflow-auto` wrapper (the <div>+ * this one holds), NOT here: `position: sticky` resolves against the+ * nearest scrolling ancestor, and capping the outer div would leave+ * the inner one unscrolled — a header pinned to something that never+ * moves does not move either.+ */+ scrollY && "[&>div]:max-h-[var(--table-scroll-y)]",+ )}+ style={+ scrollY+ ? {+ "--table-scroll-y":+ typeof scrollY === "number" ? `${scrollY}px` : scrollY,+ }+ : undefined+ }+ >+ <Table+ className={cn(+ size === "small" && "text-sm",+ bordered &&+ "ant-table-bordered border border-separator [&_td]:border-r [&_td]:border-separator [&_th]:border-r [&_th]:border-separator [&_td:last-child]:border-r-0 [&_th:last-child]:border-r-0",+ )}+ style={+ tableLayout || scrollX+ ? { tableLayout, minWidth: scrollX }+ : undefined+ }+ >+ {showHeader ? (+ <TableHeader className="ant-table-thead" ref={headRef}>+ {table.getHeaderGroups().map((hg, groupIndex) => (+ /*+ * antd's `.ant-table-thead > tr > th` is `background: #fafafa`+ * with a 1px #f0f0f0 bottom border (verified against the+ * reference's own stylesheet). shadcn leaves the header+ * transparent, so on the now-white table surface the header row+ * was indistinguishable from the body.+ *+ * `hover:bg-muted` on TableRow would otherwise repaint the+ * header on hover, so it is neutralised here.+ */+ <TableRow+ key={hg.id}+ className="border-b border-separator bg-[var(--neutral-50)] hover:bg-[var(--neutral-50)]"+ >+ {hg.headers.map((header) => {+ const sorted = header.column.getIsSorted();+ const antdColumn = header.column.columnDef.meta?.column;+ const filterable = Boolean(+ antdColumn && isFilterable(antdColumn),+ );+ const hasAffordance =+ header.column.getCanSort() || filterable;+ // A banded column's own row: antd centres the band title+ // over the leaves it covers.+ const isBand = header.subHeaders.length > 0;+ return (+ <TableHead+ key={header.id}+ /*+ * A band spans its leaves, and TanStack pads the rows+ * where a column has no parent with placeholder+ * headers — without the span the second header row+ * would be pushed out of alignment with the first.+ */+ colSpan={header.colSpan}+ style={{+ width: header.column.columnDef.meta?.width,+ ...(scrollY+ ? {+ position: "sticky",+ top: headerOffsets[groupIndex] ?? 0,+ }+ : null),+ }}+ className={cn(+ /*+ * The row's own background and bottom border belong+ * to the <tr>, which the pinned cell leaves behind —+ * the body would scroll through it. An inset shadow+ * stands in for the border because a collapsed+ * table border does not travel with a sticky cell.+ */+ scrollY &&+ "z-[1] bg-[var(--neutral-50)] shadow-[inset_0_-1px_0_var(--separator)]",+ /*+ * shadcn's TableHead defaults to `font-medium+ * text-muted-foreground`, which renders headers at+ * weight 500 in grey. antd's `.ant-table-thead > th`+ * is weight 600 at near-full opacity, so dev's column+ * titles read as washed out beside the reference.+ */+ "font-semibold text-foreground",+ isBand && "text-center",+ header.column.columnDef.meta?.align === "center" &&+ "text-center",+ header.column.columnDef.meta?.align === "right" &&+ "text-right",+ header.column.getCanSort() &&+ "cursor-pointer select-none",+ )}+ onClick={header.column.getToggleSortingHandler()}+ >+ {header.isPlaceholder ? null : (+ /*+ * antd pins a column's affordances to the RIGHT edge+ * of its header cell (`.ant-table-column-sorters` is+ * `justify-content: space-between`), so a row of+ * headers puts its sorters and filter icons on one+ * vertical rule. Laying them inline after the title+ * instead left them ragged — each one wherever its+ * own text happened to end.+ *+ * The flex row is conditional because it is not free:+ * `w-full` on a plain title would defeat the+ * `text-center` / `text-right` alignment above.+ */+ <span+ className={cn(+ "items-center gap-1",+ hasAffordance+ ? "flex w-full justify-between"+ : "inline-flex",+ )}+ >+ {/*+ * `flex-1` so a centred or right-aligned column+ * still aligns its title — within the space the+ * icon cluster leaves, which is what antd does+ * (`.ant-table-column-title { flex: 1 }`). Without+ * it the title would bunch against the left edge+ * of every aligned sortable column.+ */}+ <span className="min-w-0 flex-1">+ {flexRender(+ header.column.columnDef.header,+ header.getContext(),+ )}+ </span>+ {hasAffordance ? (+ <span className="inline-flex shrink-0 items-center gap-1">+ {header.column.getCanSort() ? (+ <SortCarets sorted={sorted} />+ ) : null}+ {filterable ? (+ <ColumnFilter+ column={antdColumn}+ selectedKeys={keysFor(antdColumn)}+ onConfirm={(keys) =>+ commitFilter(antdColumn, keys)+ }+ />+ ) : null}+ </span>+ ) : null}+ </span>+ )}+ </TableHead>+ );+ })}+ </TableRow>+ ))}+ </TableHeader>+ ) : null}+ <TableBody className="ant-table-tbody ant-table-body">+ {isLoading ? (+ <TableRow>+ <TableCell+ colSpan={table.getVisibleLeafColumns().length}+ className="h-24 text-center"+ >+ <Spinner />+ </TableCell>+ </TableRow>+ ) : table.getRowModel().rows.length ? (+ table.getRowModel().rows.map((row) => (+ <TableRow+ key={row.id}+ data-state={row.getIsSelected() ? "selected" : undefined}+ className={+ typeof rowClassName === "function"+ ? rowClassName(row.original, row.index)+ : rowClassName+ }+ {...(onRow ? onRow(row.original, row.index) : {})}+ >+ {row.getVisibleCells().map((cell) => (+ <TableCell+ key={cell.id}+ className={cn(+ cell.column.columnDef.meta?.align === "center" &&+ "text-center",+ cell.column.columnDef.meta?.align === "right" &&+ "text-right",+ )}+ >+ {flexRender(+ cell.column.columnDef.cell,+ cell.getContext(),+ )}+ </TableCell>+ ))}+ </TableRow>+ ))+ ) : (+ <TableRow className="hover:bg-transparent">+ <TableCell+ colSpan={table.getVisibleLeafColumns().length}+ className="p-0"+ >+ {/*+ * antd renders <Empty> here — an illustration above the+ * text — not a bare string. Emitting only `emptyText` left+ * "No data" floating in the middle of the table with no+ * icon, which read as a rendering failure rather than an+ * empty state. A caller that passes its own node (an+ * <Empty> with a custom image, say) still gets it as-is.+ */}+ {typeof empty === "string" ? (+ <Empty description={empty} />+ ) : (+ empty+ )}+ </TableCell>+ </TableRow>+ )}+ </TableBody>+ </Table>+ </div>++ {/*+ * antd's `hideOnSinglePage` defaults to FALSE — the pager stays put on a+ * single page, which is why Manage Documents has a footer under its+ * one-row table in the reference and had none here. Hiding it also made+ * the modal's height jump as rows crossed the page-size boundary.+ */}+ {paginated && pageCount > (pagination?.hideOnSinglePage ? 1 : 0) ? (+ /*+ * antd's pager is a 24px strip of square numbered buttons with 16px+ * margins, right-aligned. The "Previous / Page 1 of 1 / Next" text row+ * this replaces stood 56px tall and read as a different component+ * beside the reference.+ */+ <div className="ant-pagination my-4 flex items-center justify-end gap-2 text-sm">+ {/*+ * antd renders `showTotal(total, range)` as a label beside the page+ * buttons. ResourceTable passes one ("Page 1 of 2 · 12 items") and it+ * never appeared, because this pager only ever read `pageSize` off+ * the `pagination` object and ignored the rest of it.+ */}+ {pagination?.showTotal ? (+ <span className="mr-2 text-muted-foreground">+ {pagination.showTotal(total, [+ total === 0 ? 0 : (currentPage - 1) * pageSize + 1,+ Math.min(currentPage * pageSize, total),+ ])}+ </span>+ ) : null}+ <PagerButton+ label="Previous page"+ onClick={() => goToPage(currentPage - 1)}+ disabled={currentPage <= 1}+ >+ <ChevronLeft className="size-3" />+ </PagerButton>+ {pageNumbers(currentPage, pageCount).map((page, i) =>+ page === "…" ? (+ // Keyed by position: the ellipsis carries no identity of its own.+ <span key={`gap-${i}`} className="w-6 text-center">+ …+ </span>+ ) : (+ <PagerButton+ key={page}+ label={`Page ${page}`}+ active={page === currentPage}+ onClick={() => goToPage(page)}+ >+ {page}+ </PagerButton>+ ),+ )}+ <PagerButton+ label="Next page"+ onClick={() => goToPage(currentPage + 1)}+ disabled={currentPage >= pageCount}+ >+ <ChevronRight className="size-3" />+ </PagerButton>+ </div>+ ) : null}+ </div>+ );+}++export { DataTable };diff --git a/frontend/src/components/data-table/DataTable.test.jsx b/frontend/src/components/data-table/DataTable.test.jsxnew file mode 100644index 000000000..d305594ff--- /dev/null+++ b/frontend/src/components/data-table/DataTable.test.jsx@@ -0,0 +1,1523 @@+import { render, screen, waitFor, within } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { useState } from "react";+import { describe, expect, it, vi } from "vitest";++import { DataTable } from "./DataTable";++/**+ * The pager is the part of this table users compare most directly against the+ * reference: antd renders a compact strip of square numbered buttons, not a+ * "Previous / Page 1 of 1 / Next" text row.+ */++const columns = [{ key: "name", dataIndex: "name", title: "Name" }];++const rowsFor = (n) =>+ Array.from({ length: n }, (_, i) => ({ id: i + 1, name: `Row ${i + 1}` }));++function pager() {+ return document.querySelector(".ant-pagination");+}++describe("DataTable rowSelection", () => {+ /*+ * antd tolerates an inline `rowSelection={{ selectedRowKeys, onChange }}`,+ * which is what most call-sites write — a fresh object on every render.+ * Depending on that object (or on the TanStack `table`, likewise rebuilt each+ * render) re-ran the mirror effect on every commit, and because the effect+ * calls back into the parent's setState that is an infinite loop. It crashed+ * the File History modal outright with React #185.+ */+ it("does not loop when rowSelection is an inline object", () => {+ function Harness() {+ const [keys, setKeys] = useState([]);+ return (+ <DataTable+ columns={columns}+ dataSource={rowsFor(2)}+ rowKey="id"+ rowSelection={{ selectedRowKeys: keys, onChange: setKeys }}+ />+ );+ }+ expect(() => render(<Harness />)).not.toThrow();+ expect(screen.getByText("Row 1")).toBeInTheDocument();+ });++ it("still reports the selected keys through onChange", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(2)}+ rowKey="id"+ rowSelection={{ onChange }}+ />,+ );+ await userEvent.click(screen.getAllByLabelText("Select row")[0]);+ // The first call fires on mount with an empty selection, as antd's does.+ await waitFor(() =>+ expect(onChange).toHaveBeenLastCalledWith(+ [1],+ expect.arrayContaining([expect.objectContaining({ id: 1 })]),+ ),+ );+ });+});++describe("DataTable pagination", () => {+ it("renders numbered page buttons rather than a Previous/Next text row", () => {+ render(+ <DataTable columns={columns} dataSource={rowsFor(25)} rowKey="id" />,+ );+ expect(screen.queryByText(/Page 1 of/)).not.toBeInTheDocument();+ expect(within(pager()).getByLabelText("Page 2")).toBeInTheDocument();+ expect(within(pager()).getByLabelText("Page 3")).toBeInTheDocument();+ });++ it("marks the current page for assistive tech", () => {+ render(+ <DataTable columns={columns} dataSource={rowsFor(25)} rowKey="id" />,+ );+ expect(within(pager()).getByLabelText("Page 1")).toHaveAttribute(+ "aria-current",+ "page",+ );+ });++ it("moves to the page whose number was clicked", async () => {+ render(+ <DataTable columns={columns} dataSource={rowsFor(25)} rowKey="id" />,+ );+ await userEvent.click(within(pager()).getByLabelText("Page 3"));+ expect(screen.getByText("Row 21")).toBeInTheDocument();+ expect(screen.queryByText("Row 1")).not.toBeInTheDocument();+ });++ it("disables the arrows at the ends of the range", async () => {+ render(+ <DataTable columns={columns} dataSource={rowsFor(25)} rowKey="id" />,+ );+ const p = pager();+ expect(within(p).getByLabelText("Previous page")).toBeDisabled();+ await userEvent.click(within(p).getByLabelText("Page 3"));+ expect(within(p).getByLabelText("Next page")).toBeDisabled();+ });++ /*+ * antd keeps the pager a fixed width past 7 pages by collapsing the middle,+ * so a 200-row table must not render 20 buttons in a row.+ */+ it("collapses the middle with an ellipsis on long ranges", () => {+ render(+ <DataTable columns={columns} dataSource={rowsFor(200)} rowKey="id" />,+ );+ const p = pager();+ expect(within(p).getByText("…")).toBeInTheDocument();+ expect(within(p).getByLabelText("Page 20")).toBeInTheDocument();+ expect(within(p).queryByLabelText("Page 10")).not.toBeInTheDocument();+ });++ /*+ * antd's `hideOnSinglePage` defaults to FALSE — Manage Documents shows a+ * footer under its one-row table in the reference.+ */+ it("keeps the pager on a single page unless hideOnSinglePage is set", () => {+ const { rerender } = render(+ <DataTable columns={columns} dataSource={rowsFor(3)} rowKey="id" />,+ );+ expect(pager()).toBeInTheDocument();++ rerender(+ <DataTable+ columns={columns}+ dataSource={rowsFor(3)}+ rowKey="id"+ pagination={{ hideOnSinglePage: true }}+ />,+ );+ expect(pager()).not.toBeInTheDocument();+ });++ it("renders no pager at all when pagination is false", () => {+ render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(25)}+ rowKey="id"+ pagination={false}+ />,+ );+ expect(pager()).not.toBeInTheDocument();+ expect(screen.getByText("Row 25")).toBeInTheDocument();+ });+});++/*+ * Server-side paging, which every resource list uses: the page fetches+ * `?page=N&page_size=10` and hands this table ONE page of rows plus the real+ * row count as `total`. Sizing the pager off `dataSource.length` instead makes+ * every such list look like it has exactly one page — the LLM settings screen+ * held 12 adapters and offered no way to reach the last two.+ */+describe("DataTable server-side pagination", () => {+ const serverPage = (props) => (+ <DataTable+ columns={columns}+ dataSource={rowsFor(10)}+ rowKey="id"+ pagination={{ current: 1, pageSize: 10, total: 12 }}+ {...props}+ />+ );++ it("sizes the pager from `total`, not from the rows it was handed", () => {+ render(serverPage());+ expect(within(pager()).getByLabelText("Page 2")).toBeInTheDocument();+ expect(within(pager()).getByLabelText("Next page")).not.toBeDisabled();+ });++ /*+ * antd slices `dataSource` only when it holds more rows than fit on a page,+ * so a page of exactly `pageSize` rows must be rendered whole. Slicing it+ * again would show 10 rows on "page 1" and nothing on "page 2".+ */+ it("renders the whole page it was given without re-slicing it", () => {+ render(serverPage());+ expect(screen.getByText("Row 1")).toBeInTheDocument();+ expect(screen.getByText("Row 10")).toBeInTheDocument();+ });++ it("reports the requested page through antd's onChange", async () => {+ const onChange = vi.fn();+ render(serverPage({ onChange }));+ await userEvent.click(within(pager()).getByLabelText("Page 2"));+ expect(onChange).toHaveBeenCalledWith(+ expect.objectContaining({ current: 2, pageSize: 10, total: 12 }),+ expect.anything(),+ expect.anything(),+ );+ });++ it("reports the requested page from the next arrow too", async () => {+ const onChange = vi.fn();+ render(serverPage({ onChange }));+ await userEvent.click(within(pager()).getByLabelText("Next page"));+ expect(onChange).toHaveBeenCalledWith(+ expect.objectContaining({ current: 2 }),+ expect.anything(),+ expect.anything(),+ );+ });++ /*+ * `current` makes the pager controlled: the parent refetches and feeds the+ * new page back down. Moving locally would blank the body, because the rows+ * for page 2 are not in `dataSource` yet.+ */+ it("stays on the parent's page until new rows arrive", async () => {+ const onChange = vi.fn();+ render(serverPage({ onChange }));+ await userEvent.click(within(pager()).getByLabelText("Page 2"));+ expect(within(pager()).getByLabelText("Page 1")).toHaveAttribute(+ "aria-current",+ "page",+ );+ expect(screen.getByText("Row 1")).toBeInTheDocument();+ });++ it("follows the parent to the page it fetched", () => {+ const { rerender } = render(serverPage());+ rerender(+ serverPage({+ dataSource: [+ { id: 11, name: "Row 11" },+ { id: 12, name: "Row 12" },+ ],+ pagination: { current: 2, pageSize: 10, total: 12 },+ }),+ );+ expect(within(pager()).getByLabelText("Page 2")).toHaveAttribute(+ "aria-current",+ "page",+ );+ expect(screen.getByText("Row 11")).toBeInTheDocument();+ expect(within(pager()).getByLabelText("Next page")).toBeDisabled();+ });++ /*+ * ResourceTable passes `showTotal` to render "Page 1 of 2 · 12 items" beside+ * the buttons; the pager read only `pageSize` off `pagination` and dropped it.+ */+ it("renders showTotal with the real count and range", () => {+ render(+ serverPage({+ pagination: {+ current: 1,+ pageSize: 10,+ total: 12,+ showTotal: (total, range) =>+ `${range[0]}-${range[1]} of ${total} items`,+ },+ }),+ );+ expect(within(pager()).getByText("1-10 of 12 items")).toBeInTheDocument();+ });++ /*+ * The last page holds fewer rows than `pageSize`; the range must stop at the+ * real count rather than at `current * pageSize`.+ */+ it("clamps the showTotal range on the last page", () => {+ render(+ serverPage({+ dataSource: [+ { id: 11, name: "Row 11" },+ { id: 12, name: "Row 12" },+ ],+ pagination: {+ current: 2,+ pageSize: 10,+ total: 12,+ showTotal: (total, range) =>+ `${range[0]}-${range[1]} of ${total} items`,+ },+ }),+ );+ expect(within(pager()).getByText("11-12 of 12 items")).toBeInTheDocument();+ });++ /*+ * The whole loop, end to end, against a parent that behaves like ToolSettings:+ * it answers `onChange` by fetching that page and feeding the rows back down.+ *+ * This is the one that catches the ping-pong. TanStack calls+ * `resetPageIndex()` itself whenever `data` changes, so bridging its+ * `onPaginationChange` back to the parent meant page 2's rows arriving+ * immediately asked for page 1 — the pager snapped back within a frame and+ * the last two adapters stayed just as unreachable as before the fix. Every+ * assertion below still passed with that bridge in place; only driving a real+ * round trip shows it.+ */+ it("settles on the fetched page instead of bouncing back to the first", async () => {+ const pageOf = (n) =>+ n === 1 ? rowsFor(10) : [{ id: 11, name: "Row 11" }];+ const fetched = [];++ function Harness() {+ const [page, setPage] = useState(1);+ return (+ <DataTable+ columns={columns}+ dataSource={pageOf(page)}+ rowKey="id"+ pagination={{ current: page, pageSize: 10, total: 11 }}+ onChange={(p) => {+ fetched.push(p.current);+ setPage(p.current);+ }}+ />+ );+ }++ render(<Harness />);+ await userEvent.click(within(pager()).getByLabelText("Page 2"));++ await waitFor(() => expect(screen.getByText("Row 11")).toBeInTheDocument());+ expect(fetched).toEqual([2]);+ expect(within(pager()).getByLabelText("Page 2")).toHaveAttribute(+ "aria-current",+ "page",+ );+ expect(screen.queryByText("Row 1")).not.toBeInTheDocument();+ });++ /*+ * A search that narrows 12 rows to 3 leaves `current` at 2 for one render.+ * Unclamped, the pager pointed past the end and the body went blank.+ */+ it("clamps a stale page past the end of a shrunken list", () => {+ render(+ serverPage({+ dataSource: rowsFor(3),+ pagination: { current: 2, pageSize: 10, total: 3 },+ }),+ );+ expect(within(pager()).getByLabelText("Page 1")).toHaveAttribute(+ "aria-current",+ "page",+ );+ expect(screen.getByText("Row 1")).toBeInTheDocument();+ });+});++/*+ * Two antd Table props this wrapper claims to support and silently did not.+ * Both failed the same way: undeclared, they fell into `...props` and were+ * spread onto the wrapper <div>, where React drops an unknown attribute without+ * a word. Nothing threw, nothing logged, and the existing tests — which assert+ * what RENDERS — passed against a table that had quietly stopped responding to+ * clicks. Prompt Studio and Workflows became unopenable that way.+ */+describe("DataTable antd row/layout props", () => {+ it("calls onRow and wires the returned handlers to the row", async () => {+ const user = userEvent.setup();+ const onClick = vi.fn();++ render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(2)}+ rowKey="id"+ onRow={(record) => ({ onClick: () => onClick(record) })}+ />,+ );++ await user.click(screen.getByText("Row 2"));++ expect(onClick).toHaveBeenCalledTimes(1);+ // The record, not TanStack's row wrapper — call-sites read `record.id`.+ expect(onClick.mock.calls[0][0]).toMatchObject({ id: 2, name: "Row 2" });+ });++ it("passes the record's index to onRow as antd does", () => {+ const onRow = vi.fn(() => ({}));+ render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(2)}+ rowKey="id"+ onRow={onRow}+ />,+ );+ expect(onRow.mock.calls.map((c) => c[1])).toEqual([0, 1]);+ });++ it("applies tableLayout to the table element", () => {+ const { container } = render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(1)}+ rowKey="id"+ tableLayout="fixed"+ />,+ );+ // Without this the column `width`s are only hints, and one long cell+ // stretches its column until the trailing ones leave the viewport.+ expect(container.querySelector("table")).toHaveStyle({+ tableLayout: "fixed",+ });+ });++ it("leaves the table layout alone when the prop is absent", () => {+ const { container } = render(+ <DataTable columns={columns} dataSource={rowsFor(1)} rowKey="id" />,+ );+ expect(container.querySelector("table").style.tableLayout).toBe("");+ });+});++describe("DataTable showHeader", () => {+ it("renders the column headers by default", () => {+ const { container } = render(+ <DataTable columns={columns} dataSource={rowsFor(1)} rowKey="id" />,+ );+ expect(container.querySelector("thead")).toBeInTheDocument();+ expect(screen.getByText("Name")).toBeInTheDocument();+ });++ /*+ * antd omits the <thead> entirely for `showHeader={false}` rather than+ * emitting an empty one, and ~12 CSS rules in the app target+ * `.ant-table-thead` (heights, sticky offsets) that an empty header row+ * would still reserve space for.+ */+ it("omits the header entirely when showHeader is false", () => {+ const { container } = render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(1)}+ rowKey="id"+ showHeader={false}+ />,+ );+ expect(container.querySelector("thead")).not.toBeInTheDocument();+ expect(screen.queryByText("Name")).not.toBeInTheDocument();+ // The body still renders — this hides the header, not the table.+ expect(screen.getByText("Row 1")).toBeInTheDocument();+ });+});++/*+ * antd's banded header: a column carrying `title` + `children` instead of a+ * `dataIndex`. Ignoring `children` collapsed the band to one accessor-less+ * leaf, which is how the LLMWhisperer processing-modes table came to render+ * its title over sixteen empty rows.+ */+describe("DataTable grouped columns", () => {+ const grouped = [+ {+ title: "Processing Modes",+ children: [+ { title: "Name", dataIndex: "feature", key: "feature" },+ { title: "Native Text", dataIndex: "nativeText", key: "nativeText" },+ ],+ },+ ];+ const rows = [{ key: "1", feature: "Cost", nativeText: "$1/1,000 pages" }];++ it("renders the band title and its leaf titles as two header rows", () => {+ const { container } = render(+ <DataTable+ columns={grouped}+ dataSource={rows}+ rowKey="key"+ pagination={false}+ />,+ );+ expect(container.querySelectorAll("thead tr")).toHaveLength(2);+ expect(screen.getByText("Processing Modes")).toBeInTheDocument();+ expect(screen.getByText("Name")).toBeInTheDocument();+ expect(screen.getByText("Native Text")).toBeInTheDocument();+ });++ it("renders a cell per leaf column, not one blank cell per row", () => {+ render(+ <DataTable+ columns={grouped}+ dataSource={rows}+ rowKey="key"+ pagination={false}+ />,+ );+ expect(screen.getByText("Cost")).toBeInTheDocument();+ expect(screen.getByText("$1/1,000 pages")).toBeInTheDocument();+ expect(document.querySelectorAll("tbody tr td")).toHaveLength(2);+ });++ it("spans the band across its leaves so the header rows line up", () => {+ const { container } = render(+ <DataTable+ columns={grouped}+ dataSource={rows}+ rowKey="key"+ pagination={false}+ />,+ );+ const [bandRow, leafRow] = container.querySelectorAll("thead tr");+ expect(bandRow.querySelectorAll("th")).toHaveLength(1);+ expect(bandRow.querySelector("th")).toHaveAttribute("colspan", "2");+ expect(leafRow.querySelectorAll("th")).toHaveLength(2);+ });++ it("honours a leaf column's render as antd does", () => {+ render(+ <DataTable+ columns={[+ {+ title: "Band",+ children: [+ {+ title: "Name",+ dataIndex: "feature",+ key: "feature",+ render: (value) => <b>{`rendered ${value}`}</b>,+ },+ ],+ },+ ]}+ dataSource={rows}+ rowKey="key"+ pagination={false}+ />,+ );+ expect(screen.getByText("rendered Cost")).toBeInTheDocument();+ });++ /*+ * Child indices restart at 0 inside every band, so an index-derived id+ * collides with a top-level column's — and TanStack rejects duplicate ids.+ */+ it("keeps ids unique when neither band nor leaf declares a key", () => {+ expect(() =>+ render(+ <DataTable+ columns={[+ { title: "Band", children: [{ title: "A", dataIndex: "feature" }] },+ ]}+ dataSource={rows}+ rowKey="key"+ pagination={false}+ />,+ ),+ ).not.toThrow();+ expect(screen.getByText("Cost")).toBeInTheDocument();+ });++ it("spans the empty state across every leaf column", () => {+ const { container } = render(+ <DataTable+ columns={grouped}+ dataSource={[]}+ rowKey="key"+ pagination={false}+ />,+ );+ expect(container.querySelector("tbody td")).toHaveAttribute("colspan", "2");+ });+});++/*+ * antd's `scroll={{ x, y }}`. Ten call-sites pass it; before it was declared it+ * fell into `...props` and onto the wrapper <div>, so every one of them got a+ * table at full height with no pinned header.+ */+describe("DataTable scroll", () => {+ // shadcn's own overflow wrapper is the scrolling ancestor, so the cap has to+ // land there for `position: sticky` to have anything to stick to.+ const scroller = (container) =>+ container.querySelector("table").parentElement;++ it("caps the scrolling wrapper at scroll.y", () => {+ const { container } = render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(20)}+ rowKey="id"+ pagination={false}+ scroll={{ y: 500 }}+ />,+ );+ const wrapper = container.querySelector(".ant-table-container");+ // The cap is declared here but applies to the child — assert the child is+ // the element that actually scrolls.+ expect(wrapper).toHaveClass("[&>div]:max-h-[var(--table-scroll-y)]");+ expect(wrapper).toHaveStyle({ "--table-scroll-y": "500px" });+ expect(scroller(container).parentElement).toBe(wrapper);+ expect(scroller(container)).toHaveClass("overflow-auto");+ });++ it("passes a string scroll.y through as the caller wrote it", () => {+ const { container } = render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(3)}+ rowKey="id"+ scroll={{ y: "calc(100vh - 450px)" }}+ />,+ );+ expect(container.querySelector(".ant-table-container")).toHaveStyle({+ "--table-scroll-y": "calc(100vh - 450px)",+ });+ });++ it("pins the header rows when the body scrolls", () => {+ const { container } = render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(20)}+ rowKey="id"+ scroll={{ y: 500 }}+ />,+ );+ const th = container.querySelector("thead th");+ expect(th).toHaveStyle({ position: "sticky", top: "0px" });+ // The <tr> carries the background and border, and a pinned cell leaves the+ // row behind — so the cell has to bring its own.+ expect(th).toHaveClass("bg-[var(--neutral-50)]");+ });++ it("leaves the header unpinned without scroll.y", () => {+ const { container } = render(+ <DataTable columns={columns} dataSource={rowsFor(3)} rowKey="id" />,+ );+ expect(container.querySelector("thead th").style.position).toBe("");+ expect(container.querySelector(".ant-table-container")).not.toHaveClass(+ "[&>div]:max-h-[var(--table-scroll-y)]",+ );+ });++ it("gives the table a minimum width for scroll.x", () => {+ const { container } = render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(3)}+ rowKey="id"+ scroll={{ x: 1200 }}+ />,+ );+ expect(container.querySelector("table")).toHaveStyle({+ minWidth: "1200px",+ });+ });++ it("reads scroll.x === true as max-content, as antd does", () => {+ const { container } = render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(3)}+ rowKey="id"+ scroll={{ x: true }}+ />,+ );+ expect(container.querySelector("table")).toHaveStyle({+ minWidth: "max-content",+ });+ });++ it("keeps tableLayout working alongside scroll.x", () => {+ const { container } = render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(3)}+ rowKey="id"+ tableLayout="fixed"+ scroll={{ x: "max-content" }}+ />,+ );+ expect(container.querySelector("table")).toHaveStyle({+ tableLayout: "fixed",+ minWidth: "max-content",+ });+ });++ it("does not leak scroll onto the DOM as an attribute", () => {+ const { container } = render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(3)}+ rowKey="id"+ scroll={{ x: 900, y: 400 }}+ />,+ );+ expect(+ container.querySelector(".ant-table-wrapper").getAttribute("scroll"),+ ).toBeNull();+ });+});++/*+ * `bordered` was the fourth antd prop to reach the wrapper <div> instead of+ * being consumed, after onRow, showHeader and scroll. This one was noisier+ * than the others — React rejects it outright ("Received `true` for a+ * non-boolean attribute `bordered`") on every render — but just as invisible+ * to the suite, because a console error fails nothing.+ */+describe("DataTable bordered", () => {+ it("draws cell rules when asked", () => {+ const { container } = render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(2)}+ rowKey="id"+ bordered+ />,+ );+ expect(container.querySelector("table").className).toContain(+ "ant-table-bordered",+ );+ });++ it("leaves the table unbordered by default", () => {+ const { container } = render(+ <DataTable columns={columns} dataSource={rowsFor(2)} rowKey="id" />,+ );+ expect(container.querySelector("table").className).not.toContain(+ "ant-table-bordered",+ );+ });++ it("does not leak bordered onto the DOM as an attribute", () => {+ const { container } = render(+ <DataTable+ columns={columns}+ dataSource={rowsFor(2)}+ rowKey="id"+ bordered+ />,+ );+ expect(+ container.querySelector(".ant-table-wrapper").getAttribute("bordered"),+ ).toBeNull();+ });+});++/**+ * antd's column filters. The shim used to drop `filters`, `filterDropdown`,+ * `filterIcon`, `onFilter` and `filteredValue` on the floor, which is what+ * stripped the Execution ID search, the file-name search and the Status filter+ * off the Execution Logs screens during the shadcn migration.+ */+describe("DataTable column filters", () => {+ const typed = [+ { id: 1, name: "Row 1", type: "LOG" },+ { id: 2, name: "Row 2", type: "NOTIFICATION" },+ ];++ const typeColumn = (extra = {}) => ({+ title: "Type",+ dataIndex: "type",+ key: "type",+ filters: [+ { text: "LOG", value: "LOG" },+ { text: "NOTIFICATION", value: "NOTIFICATION" },+ ],+ ...extra,+ });++ async function openFilter(label = "Filter by Type") {+ await userEvent.click(screen.getByLabelText(label));+ }++ // The option labels double as cell values, so every query inside the panel+ // has to be scoped to it or it matches the table body too.+ const panel = () =>+ within(document.querySelector(".ant-table-filter-dropdown"));++ it("renders a filter trigger for a column that declares filters", () => {+ render(+ <DataTable columns={[...columns, typeColumn()]} dataSource={typed} />,+ );+ expect(screen.getByLabelText("Filter by Type")).toBeInTheDocument();+ });++ it("renders no trigger on a column with no filter at all", () => {+ render(<DataTable columns={columns} dataSource={typed} />);+ expect(screen.queryByLabelText("Filter by Name")).not.toBeInTheDocument();+ });++ it("applies onFilter locally once the selection is confirmed", async () => {+ render(+ <DataTable+ columns={[+ ...columns,+ typeColumn({ onFilter: (value, record) => record.type === value }),+ ]}+ dataSource={typed}+ />,+ );+ expect(screen.getByText("Row 2")).toBeInTheDocument();+ await openFilter();+ await userEvent.click(panel().getByText("LOG"));+ await userEvent.click(panel().getByRole("button", { name: "OK" }));+ expect(screen.getByText("Row 1")).toBeInTheDocument();+ expect(screen.queryByText("Row 2")).not.toBeInTheDocument();+ });++ /*+ * antd holds the draft until OK: ticking a box must not filter the table+ * underneath the open panel.+ */+ it("leaves the rows alone until OK is pressed", async () => {+ render(+ <DataTable+ columns={[+ ...columns,+ typeColumn({ onFilter: (value, record) => record.type === value }),+ ]}+ dataSource={typed}+ />,+ );+ await openFilter();+ await userEvent.click(panel().getByText("LOG"));+ expect(screen.getByText("Row 2")).toBeInTheDocument();+ });++ it("puts every row back when the filter is reset", async () => {+ render(+ <DataTable+ columns={[+ ...columns,+ typeColumn({ onFilter: (value, record) => record.type === value }),+ ]}+ dataSource={typed}+ />,+ );+ await openFilter();+ await userEvent.click(panel().getByText("LOG"));+ await userEvent.click(panel().getByRole("button", { name: "OK" }));+ expect(screen.queryByText("Row 2")).not.toBeInTheDocument();+ await openFilter();+ await userEvent.click(panel().getByRole("button", { name: "Reset" }));+ expect(screen.getByText("Row 2")).toBeInTheDocument();+ });++ /*+ * `filters` with no `onFilter` is antd's server-side filter — the Execution+ * Logs status filter. Applying it locally would hide rows the server was+ * about to replace.+ */+ it("does not filter locally when the column has no onFilter", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={[...columns, typeColumn()]}+ dataSource={typed}+ onChange={onChange}+ />,+ );+ await openFilter();+ await userEvent.click(panel().getByText("LOG"));+ await userEvent.click(panel().getByRole("button", { name: "OK" }));+ expect(screen.getByText("Row 2")).toBeInTheDocument();+ expect(onChange).toHaveBeenCalledWith(+ expect.anything(),+ { type: ["LOG"] },+ {},+ );+ });++ it("sends the reader back to the first page when a filter changes", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={[...columns, typeColumn()]}+ dataSource={typed}+ pagination={{ current: 4, pageSize: 10, total: 40 }}+ onChange={onChange}+ />,+ );+ await openFilter();+ await userEvent.click(panel().getByText("LOG"));+ await userEvent.click(panel().getByRole("button", { name: "OK" }));+ expect(onChange.mock.calls[0][0]).toMatchObject({ current: 1 });+ });++ it("reports null rather than an empty list for an untouched filters column", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={[+ ...columns,+ typeColumn(),+ typeColumn({ title: "Level", key: "level" }),+ ]}+ dataSource={typed}+ onChange={onChange}+ />,+ );+ await openFilter();+ await userEvent.click(panel().getByText("LOG"));+ await userEvent.click(panel().getByRole("button", { name: "OK" }));+ // Every filterable column gets an entry, active or not: LogModal indexes+ // straight into `filters.level[0]` and a missing key is a TypeError.+ expect(onChange.mock.calls[0][1]).toEqual({ type: ["LOG"], level: null });+ });++ it("selects only one option at a time when filterMultiple is false", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={[...columns, typeColumn({ filterMultiple: false })]}+ dataSource={typed}+ onChange={onChange}+ />,+ );+ await openFilter();+ await userEvent.click(panel().getByText("LOG"));+ await userEvent.click(panel().getByText("NOTIFICATION"));+ await userEvent.click(panel().getByRole("button", { name: "OK" }));+ expect(onChange.mock.calls[0][1]).toEqual({ type: ["NOTIFICATION"] });+ });++ it("narrows the option list when filterSearch is on", async () => {+ render(+ <DataTable+ columns={[...columns, typeColumn({ filterSearch: true })]}+ dataSource={typed}+ />,+ );+ await openFilter();+ await userEvent.type(+ panel().getByPlaceholderText("Search in filters"),+ "NOTIF",+ );+ expect(panel().queryByText("LOG")).not.toBeInTheDocument();+ expect(panel().getByText("NOTIFICATION")).toBeInTheDocument();+ });++ it("seeds the selection from defaultFilteredValue", async () => {+ render(+ <DataTable+ columns={[+ ...columns,+ typeColumn({+ defaultFilteredValue: ["LOG"],+ onFilter: (value, record) => record.type === value,+ }),+ ]}+ dataSource={typed}+ />,+ );+ expect(screen.queryByText("Row 2")).not.toBeInTheDocument();+ });++ it("marks the trigger active while a filter is applied", async () => {+ render(+ <DataTable+ columns={[...columns, typeColumn({ filteredValue: ["LOG"] })]}+ dataSource={typed}+ />,+ );+ expect(screen.getByLabelText("Filter by Type")).toHaveAttribute(+ "data-filtered",+ "true",+ );+ });+});++describe("DataTable custom filterDropdown", () => {+ const rows = [{ id: 1, name: "Row 1" }];++ /*+ * LogsTable passes the execution-ID search box as a NODE, not a function: it+ * owns its own state and never calls back through the table at all.+ */+ it("renders a filterDropdown passed as a node", async () => {+ render(+ <DataTable+ columns={[+ {+ title: "Execution ID",+ dataIndex: "name",+ key: "executionId",+ filterDropdown: <input placeholder="Search execution ID" />,+ },+ ]}+ dataSource={rows}+ />,+ );+ await userEvent.click(screen.getByLabelText("Filter by Execution ID"));+ expect(+ screen.getByPlaceholderText("Search execution ID"),+ ).toBeInTheDocument();+ });++ /*+ * LogModal's level filter calls `setSelectedKeys([...])` and `confirm()` back+ * to back in one handler, so `confirm` has to publish the keys just set+ * rather than the ones React has yet to re-render with.+ */+ it("publishes keys set immediately before confirm in the same handler", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={[+ {+ title: "Level",+ dataIndex: "name",+ key: "level",+ filterDropdown: ({ setSelectedKeys, confirm }) => (+ <button+ type="button"+ onClick={() => {+ setSelectedKeys(["ERROR"]);+ confirm();+ }}+ >+ Pick ERROR+ </button>+ ),+ },+ ]}+ dataSource={rows}+ onChange={onChange}+ />,+ );+ await userEvent.click(screen.getByLabelText("Filter by Level"));+ await userEvent.click(screen.getByRole("button", { name: "Pick ERROR" }));+ expect(onChange.mock.calls[0][1]).toEqual({ level: ["ERROR"] });+ });++ /*+ * antd reports a filterDropdown column's raw keys, so a cleared one is `[]`+ * and not `null` — LogModal reads `filters.level[0]`, which throws on null.+ */+ it("reports an empty list, not null, for a cleared filterDropdown column", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={[+ {+ title: "Level",+ dataIndex: "name",+ key: "level",+ filterDropdown: ({ clearFilters }) => (+ <button type="button" onClick={clearFilters}>+ Clear+ </button>+ ),+ },+ ]}+ dataSource={rows}+ onChange={onChange}+ />,+ );+ await userEvent.click(screen.getByLabelText("Filter by Level"));+ await userEvent.click(screen.getByRole("button", { name: "Clear" }));+ expect(onChange.mock.calls[0][1]).toEqual({ level: [] });+ expect(onChange.mock.calls[0][1].level[0]).toBeUndefined();+ });++ it("hands filterIcon the filtered flag as antd does", () => {+ render(+ <DataTable+ columns={[+ {+ title: "Level",+ dataIndex: "name",+ key: "level",+ filteredValue: ["ERROR"],+ filterDropdown: <div />,+ filterIcon: (filtered) => <span>{filtered ? "on" : "off"}</span>,+ },+ ]}+ dataSource={rows}+ />,+ );+ expect(screen.getByText("on")).toBeInTheDocument();+ });++ /*+ * The sort handler sits on the <th>, so a click on the icon nested inside it+ * would otherwise re-sort the column under the panel that just opened.+ */+ it("does not sort the column when the filter icon is clicked", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={[+ {+ title: "Level",+ dataIndex: "name",+ key: "level",+ sorter: true,+ filterDropdown: <div />,+ },+ ]}+ dataSource={rows}+ onChange={onChange}+ />,+ );+ await userEvent.click(screen.getByLabelText("Filter by Level"));+ expect(onChange).not.toHaveBeenCalled();+ });+});++/**+ * antd reads the sorter's shape: a function sorts locally with that+ * comparator, `sorter: true` means the SERVER sorts and the table should only+ * report the click. Both used to sort locally with a guessed comparator.+ */+describe("DataTable sorting", () => {+ const rows = [+ { id: 1, name: "beta", size: 2 },+ { id: 2, name: "alpha", size: 10 },+ ];++ const bodyText = () =>+ Array.from(document.querySelectorAll("tbody tr")).map(+ (tr) => tr.querySelector("td").textContent,+ );++ it("sorts with the comparator the column supplied", async () => {+ render(+ <DataTable+ columns={[+ {+ title: "Name",+ dataIndex: "name",+ key: "name",+ sorter: (a, b) => a.name.localeCompare(b.name),+ },+ ]}+ dataSource={rows}+ />,+ );+ expect(bodyText()).toEqual(["beta", "alpha"]);+ await userEvent.click(screen.getByText("Name"));+ expect(bodyText()).toEqual(["alpha", "beta"]);+ });++ it("sorts ascending on the first click, as antd does", async () => {+ render(+ <DataTable+ columns={[+ {+ title: "Size",+ dataIndex: "size",+ key: "size",+ sorter: (a, b) => a.size - b.size,+ },+ ]}+ dataSource={rows}+ />,+ );+ await userEvent.click(screen.getByText("Size"));+ expect(bodyText()).toEqual(["2", "10"]);+ });++ /*+ * The rows on screen are one server page. Reordering them locally made the+ * Execution Logs list look sorted while the rows that belonged at the top+ * stayed on page two.+ */+ it("leaves a server-sorted column's rows in the order they arrived", async () => {+ render(+ <DataTable+ columns={[+ { title: "Name", dataIndex: "name", key: "name", sorter: true },+ ]}+ dataSource={rows}+ />,+ );+ await userEvent.click(screen.getByText("Name"));+ expect(bodyText()).toEqual(["beta", "alpha"]);+ });++ it("reports the sorted column through antd's onChange", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={[+ {+ title: "Executed At",+ dataIndex: "executedAt",+ key: "executedAt",+ sorter: true,+ },+ ]}+ dataSource={rows}+ onChange={onChange}+ />,+ );+ await userEvent.click(screen.getByText("Executed At"));+ expect(onChange.mock.calls[0][2]).toMatchObject({+ field: "executedAt",+ columnKey: "executedAt",+ order: "ascend",+ });+ await userEvent.click(screen.getByText("Executed At"));+ expect(onChange.mock.calls[1][2]).toMatchObject({ order: "descend" });+ });++ it("reports an empty sorter once sorting is cleared", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={[+ { title: "Name", dataIndex: "name", key: "name", sorter: true },+ ]}+ dataSource={rows}+ onChange={onChange}+ />,+ );+ const header = screen.getByText("Name");+ await userEvent.click(header);+ await userEvent.click(header);+ await userEvent.click(header);+ expect(onChange.mock.calls[2][2]).toEqual({});+ });+});++/**+ * The header's affordances: what a column ADVERTISES before it is touched, and+ * where the advertisement sits.+ *+ * Both were wrong on Execution Logs. A sortable column drew nothing at all+ * until it was sorted, so "Executed At" and "Execution Time" looked inert; and+ * the sorter and filter icons trailed the title inline, landing wherever each+ * title happened to end rather than on the right-hand rule antd puts them on.+ */+describe("DataTable header affordances", () => {+ const rows = [{ id: 1, name: "a" }];++ const sorterIn = (title) =>+ screen+ .getByText(title)+ .closest("th")+ .querySelector(".ant-table-column-sorter");++ it("shows a sortable column's sorter before it is sorted", () => {+ render(+ <DataTable+ columns={[+ { title: "Sortable", dataIndex: "name", key: "name", sorter: true },+ { title: "Plain", dataIndex: "name", key: "plain" },+ ]}+ dataSource={rows}+ />,+ );+ // Two carets, so the column reads as "sorts, currently unsorted" rather+ // than as an ordinary column.+ expect(sorterIn("Sortable").querySelectorAll("svg")).toHaveLength(2);+ // An unsortable column must not grow one.+ expect(sorterIn("Plain")).toBeNull();+ });++ it("marks the applied direction and only that one", async () => {+ render(+ <DataTable+ columns={[+ { title: "Sortable", dataIndex: "name", key: "name", sorter: true },+ ]}+ dataSource={rows}+ />,+ );+ const highlighted = () =>+ Array.from(sorterIn("Sortable").querySelectorAll("svg")).map((svg) =>+ svg.classList.contains("text-primary"),+ );++ expect(highlighted()).toEqual([false, false]);+ await userEvent.click(screen.getByText("Sortable"));+ expect(highlighted()).toEqual([true, false]);+ await userEvent.click(screen.getByText("Sortable"));+ expect(highlighted()).toEqual([false, true]);+ });++ it("puts the sorter and the filter after the title, not around it", () => {+ render(+ <DataTable+ columns={[+ {+ title: "Both",+ dataIndex: "name",+ key: "name",+ sorter: true,+ filters: [{ text: "a", value: "a" }],+ onFilter: () => true,+ },+ ]}+ dataSource={rows}+ />,+ );+ /*+ * The order in the DOM is what the right-hand alignment rests on: title+ * first in a flex row that grows, then the icon cluster pushed to the+ * cell's trailing edge.+ */+ const th = screen.getByText("Both").closest("th");+ const cluster = th.querySelector(".ant-table-column-sorter").parentElement;+ expect(cluster.querySelector(".ant-table-filter-trigger")).not.toBeNull();+ expect(+ screen.getByText("Both").compareDocumentPosition(cluster) &+ Node.DOCUMENT_POSITION_FOLLOWING,+ ).toBeTruthy();+ });++ it("keeps a centred sortable column's title centred", () => {+ // Three columns in the app are both aligned and sortable; antd centres the+ // title in the space the sorter leaves rather than flushing it left.+ render(+ <DataTable+ columns={[+ {+ title: "Errors",+ dataIndex: "name",+ key: "name",+ align: "center",+ sorter: true,+ },+ ]}+ dataSource={rows}+ />,+ );+ const th = screen.getByText("Errors").closest("th");+ expect(th.className).toContain("text-center");+ // The title box grows, so the inherited text-align has room to act on.+ expect(screen.getByText("Errors").className).toContain("flex-1");+ });++ it("sizes a call-site's own filter icon rather than trusting it to", () => {+ // Every filterIcon in the app is a bare lucide icon, which defaults to+ // 24px and dwarfed both the title and the carets beside it.+ render(+ <DataTable+ columns={[+ {+ title: "Filtered",+ dataIndex: "name",+ key: "name",+ filters: [{ text: "a", value: "a" }],+ filterIcon: () => <svg data-testid="custom-icon" />,+ onFilter: () => true,+ },+ ]}+ dataSource={rows}+ />,+ );+ expect(+ screen.getByTestId("custom-icon").closest(".ant-table-filter-trigger")+ .className,+ ).toContain("[&_svg]:size-3.5");+ });+});++/**+ * antd's `sortDirections`. All four Execution Logs tables pass+ * `["ascend", "descend", "ascend"]` — the idiom for "never cycle back to+ * unsorted" — and the prop was landing on the wrapper <div> instead, where+ * React warned about an unrecognised DOM attribute on every render.+ */+describe("DataTable sortDirections", () => {+ const rows = [{ id: 1, name: "a" }];+ const sortable = [+ { title: "Name", dataIndex: "name", key: "name", sorter: true },+ ];++ it("keeps cycling between ascend and descend when a direction repeats", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={sortable}+ dataSource={rows}+ sortDirections={["ascend", "descend", "ascend"]}+ onChange={onChange}+ />,+ );+ const header = screen.getByText("Name");+ await userEvent.click(header);+ await userEvent.click(header);+ await userEvent.click(header);+ // A third click returns to ascend rather than clearing the sort.+ expect(onChange.mock.calls[2][2]).toMatchObject({ order: "ascend" });+ });++ it("leaves the prop off the DOM", () => {+ const { container } = render(+ <DataTable+ columns={sortable}+ dataSource={rows}+ sortDirections={["ascend", "descend"]}+ />,+ );+ expect(+ container.querySelector("[sortdirections], [sortDirections]"),+ ).toBeNull();+ });+});++/**+ * A CONTROLLED filter column — one passing `filteredValue` — still has to+ * report the keys the user just picked, not the value its parent is currently+ * holding. Echoing `filteredValue` back is how the parent learns nothing+ * changed, which left LogModal's level filter permanently stuck.+ */+describe("DataTable controlled filters", () => {+ const rows = [{ id: 1, name: "Row 1" }];++ it("reports the newly picked keys, not the parent's stale filteredValue", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={[+ {+ title: "Level",+ dataIndex: "name",+ key: "level",+ // The parent holds "no level selected" while the user picks ERROR.+ filteredValue: [],+ filterDropdown: ({ setSelectedKeys, confirm }) => (+ <button+ type="button"+ onClick={() => {+ setSelectedKeys(["ERROR"]);+ confirm();+ }}+ >+ Pick ERROR+ </button>+ ),+ },+ ]}+ dataSource={rows}+ onChange={onChange}+ />,+ );+ await userEvent.click(screen.getByLabelText("Filter by Level"));+ await userEvent.click(screen.getByRole("button", { name: "Pick ERROR" }));+ expect(onChange.mock.calls[0][1]).toEqual({ level: ["ERROR"] });+ });++ it("drives the parent's state through a full controlled round trip", async () => {+ function Harness() {+ const [level, setLevel] = useState(null);+ return (+ <>+ <span data-testid="level">{level ?? "none"}</span>+ <DataTable+ columns={[+ {+ title: "Level",+ dataIndex: "name",+ key: "level",+ filteredValue: level ? [level] : [],+ filterDropdown: ({ setSelectedKeys, confirm }) => (+ <button+ type="button"+ onClick={() => {+ setSelectedKeys(["ERROR"]);+ confirm();+ }}+ >+ Pick ERROR+ </button>+ ),+ },+ ]}+ dataSource={rows}+ onChange={(_p, filters) => setLevel(filters.level[0] ?? null)}+ />+ </>+ );+ }+ render(<Harness />);+ await userEvent.click(screen.getByLabelText("Filter by Level"));+ await userEvent.click(screen.getByRole("button", { name: "Pick ERROR" }));+ expect(screen.getByTestId("level")).toHaveTextContent("ERROR");+ });++ it("leaves the other columns' reported values alone", async () => {+ const onChange = vi.fn();+ render(+ <DataTable+ columns={[+ {+ title: "Level",+ dataIndex: "name",+ key: "level",+ filteredValue: ["INFO"],+ filterDropdown: <div />,+ },+ {+ title: "Stage",+ dataIndex: "name",+ key: "stage",+ filters: [{ text: "RUN", value: "RUN" }],+ filterDropdown: ({ setSelectedKeys, confirm }) => (+ <button+ type="button"+ onClick={() => {+ setSelectedKeys(["RUN"]);+ confirm();+ }}+ >+ Pick RUN+ </button>+ ),+ },+ ]}+ dataSource={rows}+ onChange={onChange}+ />,+ );+ await userEvent.click(screen.getByLabelText("Filter by Stage"));+ await userEvent.click(screen.getByRole("button", { name: "Pick RUN" }));+ expect(onChange.mock.calls[0][1]).toEqual({+ level: ["INFO"],+ stage: ["RUN"],+ });+ });+});diff --git a/frontend/src/components/deployments/api-deployment/ApiDeploymentCardConfig.jsx b/frontend/src/components/deployments/api-deployment/ApiDeploymentCardConfig.jsxindex e08b86da7..fde548844 100644--- a/frontend/src/components/deployments/api-deployment/ApiDeploymentCardConfig.jsx+++ b/frontend/src/components/deployments/api-deployment/ApiDeploymentCardConfig.jsx@@ -1,13 +1,16 @@import {- CloudDownloadOutlined,- CodeOutlined,- FileSearchOutlined,- KeyOutlined,- NotificationOutlined,- SyncOutlined,-} from "@ant-design/icons";-import { Flex, Space, Switch, Tooltip, Typography } from "antd";+ Bell,+ CloudDownload,+ Code,+ FileSearch,+ Key,+ RefreshCw,+} from "lucide-react";import PropTypes from "prop-types";+import { Switch } from "@/components/ui/shims/antd-inputs";+import { Flex, Space } from "@/components/ui/shims/antd-layout";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";import { StatusPills } from "../../pipelines-or-deployments/pipelines/PipelineCardConfig";import {@@ -52,33 +55,33 @@ function createApiDeploymentCardConfig({items: [{key: "view-logs",- icon: <FileSearchOutlined />,+ icon: <FileSearch />,label: "View Logs",onClick: () => onViewLogs?.(deployment),},{ type: "divider" },{key: "manage-keys",- icon: <KeyOutlined />,+ icon: <Key />,label: "Manage Keys",onClick: () => onManageKeys?.(deployment),},{key: "notifications",- icon: <NotificationOutlined />,+ icon: <Bell />,label: "Notifications",onClick: () => onSetupNotifications?.(deployment),},{ type: "divider" },{key: "code-snippets",- icon: <CodeOutlined />,+ icon: <Code />,label: "Code Snippets",onClick: () => onCodeSnippets?.(deployment),},{key: "download-postman",- icon: <CloudDownloadOutlined />,+ icon: <CloudDownload />,label: "Download Postman Collection",onClick: () => onDownloadPostman?.(deployment),},@@ -102,6 +105,7 @@ function createApiDeploymentCardConfig({<Switchsize="small"checked={deployment.is_active}+ data-testid={`api-deployment-toggle-${deployment.id}`}onChange={(checked, e) => {e.stopPropagation();updateStatus(deployment);@@ -110,6 +114,7 @@ function createApiDeploymentCardConfig({</Tooltip><CardActionBoxitem={deployment}+ testIdPrefix="api-deployment"setSelectedItem={setSelectedRow}onEdit={onEdit}onShare={onShare}@@ -146,7 +151,7 @@ function createApiDeploymentCardConfig({<Flex align="center" gap={32} className="card-list-footer-row"><Space size={10} className="card-list-footer-item">- <SyncOutlined />+ <RefreshCw /><Typography.Texttype="secondary"className="card-list-footer-label"diff --git a/frontend/src/components/deployments/body/Body.jsx b/frontend/src/components/deployments/body/Body.jsxindex 86aa56527..912c06638 100644--- a/frontend/src/components/deployments/body/Body.jsx+++ b/frontend/src/components/deployments/body/Body.jsx@@ -49,6 +49,7 @@ function Body({cardConfig={cardConfig}loading={isTableLoading}onCardClick={onCardClick}+ testIdPrefix={`${type}-deployment-list`}rowKey="id"listMode={listMode}forceExpandedId={forceExpandedId}diff --git a/frontend/src/components/deployments/create-api-deployment-from-prompt-studio/CreateApiDeploymentFromPromptStudio.css b/frontend/src/components/deployments/create-api-deployment-from-prompt-studio/CreateApiDeploymentFromPromptStudio.cssindex 2f7c10215..9f3fd5cd8 100644--- a/frontend/src/components/deployments/create-api-deployment-from-prompt-studio/CreateApiDeploymentFromPromptStudio.css+++ b/frontend/src/components/deployments/create-api-deployment-from-prompt-studio/CreateApiDeploymentFromPromptStudio.css@@ -48,7 +48,7 @@h4 {text-align: center;margin-bottom: 24px;- color: #52c41a;+ color: var(--success);}.create-api-deployment-from-prompt-studio-modal .success-content .ant-btn {diff --git a/frontend/src/components/deployments/create-api-deployment-from-prompt-studio/CreateApiDeploymentFromPromptStudio.jsx b/frontend/src/components/deployments/create-api-deployment-from-prompt-studio/CreateApiDeploymentFromPromptStudio.jsxindex 9ce4dbc05..63c587584 100644--- a/frontend/src/components/deployments/create-api-deployment-from-prompt-studio/CreateApiDeploymentFromPromptStudio.jsx+++ b/frontend/src/components/deployments/create-api-deployment-from-prompt-studio/CreateApiDeploymentFromPromptStudio.jsx@@ -1,17 +1,14 @@-import {- Button,- Divider,- Form,- Input,- Modal,- Space,- Spin,- Steps,- Typography,-} from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Form } from "@/components/ui/shims/antd-form";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Divider, Spin } from "@/components/ui/shims/antd-leaves";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Steps } from "@/components/ui/shims/antd-structure";+import { Text, Title } from "@/components/ui/shims/antd-typography";import { getBackendErrorDetail } from "../../../helpers/GetStaticData";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";@@ -25,8 +22,6 @@ import { apiDeploymentsService } from "../api-deployment/api-deployments-serviceimport "./CreateApiDeploymentFromPromptStudio.css";const { Step } = Steps;-const { Title, Text } = Typography;-const CreateApiDeploymentFromPromptStudio = ({open,setOpen,@@ -52,7 +47,6 @@ const CreateApiDeploymentFromPromptStudio = ({const [createdWorkflowId, setCreatedWorkflowId] = useState(null);const [createdApiDeployment, setCreatedApiDeployment] = useState(null);const [isCreationComplete, setIsCreationComplete] = useState(false);- const [exportRetryCount, setExportRetryCount] = useState(0);// Form data statesconst [deploymentDetails, setDeploymentDetails] = useState({@@ -87,14 +81,18 @@ const CreateApiDeploymentFromPromptStudio = ({setCreatedWorkflowId(null);setCreatedApiDeployment(null);setIsCreationComplete(false);- setExportRetryCount(0);+ setToolFunctionName(null);// Fetch tool function name first, then schemafetchToolFunctionName();}- }, [open, toolDetails, form]);+ // Keyed on the project id rather than `toolDetails` itself: that object comes+ // from the custom-tool store and gets a fresh identity on every store write+ // (SinglePass toggle, tool edit), which would otherwise restart the whole+ // lookup/export chain — concurrently — while the modal is open.+ }, [open, toolDetails?.tool_id, form]);- const fetchToolFunctionName = async () => {+ const fetchToolFunctionName = async (retriesLeft = 1) => {if (!toolDetails?.tool_id) {return;}@@ -107,18 +105,28 @@ const CreateApiDeploymentFromPromptStudio = ({});const tools = response.data || [];- const matchingTool = tools.find(- (tool) =>- tool.function_name === toolDetails.tool_id ||- tool.name === toolDetails.tool_name,+ // `function_name` is the registry's own UUID (PromptStudioRegistry's PK),+ // never the Prompt Studio project id — so correlate on the+ // `prompt_studio_tool_id` back-reference the listing publishes for exactly+ // this purpose. Fall back to the display name only for legacy registry rows+ // that carry no back-reference; matching on name alone goes stale the moment+ // a project is renamed after export, and is ambiguous when two projects+ // share a name.+ const matchingTool = tools.find((tool) =>+ tool.prompt_studio_tool_id+ ? tool.prompt_studio_tool_id === toolDetails.tool_id+ : tool.name === toolDetails.tool_name,);if (matchingTool?.function_name) {setToolFunctionName(matchingTool.function_name);// Now fetch schema using the function namefetchToolSchema(matchingTool.function_name);- } else if (exportRetryCount < 2) {- // Tool not found in registry, automatically export it to the organization+ } else if (retriesLeft > 0) {+ // Not exported yet — export it, then re-read the listing. Sharing is kept+ // private and mirrors the export `createApiDeployment` performs; exporting+ // to the whole org here would silently widen access to the project for a+ // user who only opened this modal.try {await axiosPrivate({method: "POST",@@ -128,18 +136,15 @@ const CreateApiDeploymentFromPromptStudio = ({"Content-Type": "application/json",},data: {- is_shared_with_org: true,- user_id: [], // Export to everyone in the org+ is_shared_with_org: false,+ user_id: [toolDetails?.created_by],force_export: true,},});- setExportRetryCount((prev) => prev + 1);-- // Retry fetching tool function name after export- setTimeout(() => {- fetchToolFunctionName();- }, 1000); // Wait 1 second for export to complete+ // The export endpoint commits before it responds, so the entry is+ // readable now — no delay to wait out.+ await fetchToolFunctionName(retriesLeft - 1);} catch (exportErr) {setAlertDetails(handleException(exportErr));setToolSchema(null);@@ -211,7 +216,6 @@ const CreateApiDeploymentFromPromptStudio = ({setCreatedWorkflowId(null);setCreatedApiDeployment(null);setIsCreationComplete(false);- setExportRetryCount(0);form.resetFields();};@@ -313,6 +317,18 @@ const CreateApiDeploymentFromPromptStudio = ({return;}+ // The registry lookup is async and can still be in flight when the wizard is+ // clicked through quickly. Without the uid there is nothing valid to attach to+ // the workflow, so bail before creating resources we would only roll back.+ if (!toolFunctionName) {+ setAlertDetails({+ type: "error",+ content:+ "Still preparing this tool for deployment. Please retry in a moment.",+ });+ return;+ }+setPostHogCustomEvent("intent_create_api_deployment_from_prompt_studio", {info: "Creating API deployment from prompt studio",tool_id: toolDetails?.tool_id,@@ -372,7 +388,7 @@ const CreateApiDeploymentFromPromptStudio = ({"Content-Type": "application/json",},data: {- tool_id: toolFunctionName || toolDetails.tool_id,+ tool_id: toolFunctionName,workflow_id: workflowId,},});@@ -423,30 +439,18 @@ const CreateApiDeploymentFromPromptStudio = ({// Cleanup created resources on failureawait cleanupCreatedResources(createdResources);- // Show error message to user- let errorMessage = "Failed to create API deployment";- const errorDetails = err?.response?.data?.errors;-- if (errorDetails) {- setBackendErrors(err.response.data);- // Extract specific error messages for better user feedback- if (errorDetails.length > 0) {- const errorDetails = errorDetails- .map((e) => `${e.attr}: ${e.detail}`)- .join(", ");- errorMessage = `API deployment creation failed: ${errorDetails}`;- }- }-- // Always show an alert for API deployment failures- setAlertDetails({- type: "error",- content: errorMessage,- });+ setAlertDetails(+ handleException(+ err,+ "Failed to create API deployment",+ setBackendErrors,+ ),+ );// If we're on step 2 and have backend errors for deployment fields,// go back to step 1 to show the errors- if (errorDetails && currentStep === 1) {+ const errorDetails = err?.response?.data?.errors;+ if (Array.isArray(errorDetails) && currentStep === 1) {const hasDeploymentFieldErrors = errorDetails.some((error) =>["api_name", "display_name", "description"].includes(error?.attr),);@@ -587,6 +591,7 @@ const CreateApiDeploymentFromPromptStudio = ({cancelText={getCancelText()}okButtonProps={{loading: isLoading,+ disabled: currentStep === 1 && (isSchemaLoading || !toolFunctionName),}}footer={isCreationCompletediff --git a/frontend/src/components/deployments/create-api-deployment-modal/CreateApiDeploymentModal.jsx b/frontend/src/components/deployments/create-api-deployment-modal/CreateApiDeploymentModal.jsxindex 8562b3264..6669c7339 100644--- a/frontend/src/components/deployments/create-api-deployment-modal/CreateApiDeploymentModal.jsx+++ b/frontend/src/components/deployments/create-api-deployment-modal/CreateApiDeploymentModal.jsx@@ -1,6 +1,8 @@-import { Form, Input, Modal, Select } from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Form } from "@/components/ui/shims/antd-form";+import { Input, Select } from "@/components/ui/shims/antd-inputs";+import { Modal } from "@/components/ui/shims/antd-overlays";import { getBackendErrorDetail } from "../../../helpers/GetStaticData.js";import { useExceptionHandler } from "../../../hooks/useExceptionHandler.jsx";@@ -261,7 +263,7 @@ const CreateApiDeploymentModal = ({}help={getBackendErrorDetail("workflow", backendErrors)}>- <Select>+ <Select showSearch>{workflowEndpointList?.map((endpoint) => {return (<Optiondiff --git a/frontend/src/components/deployments/delete-modal/DeleteModal.jsx b/frontend/src/components/deployments/delete-modal/DeleteModal.jsxindex d852bfaf6..545ae68e9 100644--- a/frontend/src/components/deployments/delete-modal/DeleteModal.jsx+++ b/frontend/src/components/deployments/delete-modal/DeleteModal.jsx@@ -1,5 +1,5 @@-import { Modal } from "antd";import PropTypes from "prop-types";+import { Modal } from "@/components/ui/shims/antd-overlays";const DeleteModal = ({ open, setOpen, deleteRecord }) => {return (diff --git a/frontend/src/components/deployments/display-code/DisplayCode.jsx b/frontend/src/components/deployments/display-code/DisplayCode.jsxindex a86852b3a..a399fdb21 100644--- a/frontend/src/components/deployments/display-code/DisplayCode.jsx+++ b/frontend/src/components/deployments/display-code/DisplayCode.jsx@@ -1,8 +1,10 @@-import { CheckCircleOutlined, CopyOutlined } from "@ant-design/icons";-import { Modal, Select, Tabs, Tooltip } from "antd";import Handlebars from "handlebars";+import { CircleCheck, Copy } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Modal, Tooltip } from "@/components/ui/shims/antd-overlays";+import { Tabs } from "@/components/ui/shims/antd-structure";import CodeSnippet from "./CodeSnippet.jsx";import "./DisplayCode.css";@@ -188,11 +190,11 @@ const DisplayCode = ({ isDialogOpen, setDialogOpen, url }) => {<button className="copyCodeBtn" onClick={handleCopyClick}>{copied ? (<Tooltip title="Copied">- <CheckCircleOutlined />+ <CircleCheck /></Tooltip>) : (<Tooltip title="Copy snippet">- <CopyOutlined />+ <Copy /></Tooltip>)}</button>diff --git a/frontend/src/components/deployments/header/Header.jsx b/frontend/src/components/deployments/header/Header.jsxindex a2fcbaf62..feef449ea 100644--- a/frontend/src/components/deployments/header/Header.jsx+++ b/frontend/src/components/deployments/header/Header.jsx@@ -1,4 +1,4 @@-import { PlusOutlined } from "@ant-design/icons";+import { Plus } from "lucide-react";import PropTypes from "prop-types";import { deploymentsStaticContent } from "../../../helpers/GetStaticData";import usePostHogEvents from "../../../hooks/usePostHogEvents";@@ -24,7 +24,8 @@ function Header({ type, openAddModal, enableSearch, onSearch, setSearchList }) {const addButton = (<CustomButtontype="primary"- icon={<PlusOutlined />}+ icon={<Plus />}+ data-testid={`${type}-deployment-add-btn`}onClick={handleOnClick}>{deploymentsStaticContent[type].addBtn}diff --git a/frontend/src/components/deployments/layout/Layout.css b/frontend/src/components/deployments/layout/Layout.cssindex 0da02838f..e08dde821 100644--- a/frontend/src/components/deployments/layout/Layout.css+++ b/frontend/src/components/deployments/layout/Layout.css@@ -4,7 +4,7 @@height: 100%;display: flex;flex-direction: column;- background-color: var(--page-bg-2);+ background-color: var(--background);}.layout-header {@@ -51,13 +51,13 @@}.layout-body .table .workflowName {- color: #1890ff;+ color: var(--primary);cursor: pointer;}.layout-body .gap {padding-bottom: 3px;- background-color: var(--page-bg-2);+ background-color: var(--background);}.layout-body .empty {diff --git a/frontend/src/components/deployments/manage-keys/ManageKeys.jsx b/frontend/src/components/deployments/manage-keys/ManageKeys.jsxindex 5c3613e8d..e13621b0f 100644--- a/frontend/src/components/deployments/manage-keys/ManageKeys.jsx+++ b/frontend/src/components/deployments/manage-keys/ManageKeys.jsx@@ -1,12 +1,11 @@-import {- CopyOutlined,- DeleteOutlined,- EditOutlined,- PlusOutlined,-} from "@ant-design/icons";-import { Input, Modal, Space, Switch, Table, Tooltip, Typography } from "antd";+import { Copy, Pencil, Plus, Trash2 } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Input, Switch } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Modal, Tooltip } from "@/components/ui/shims/antd-overlays";+import { Table } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useAlertStore } from "../../../store/alert-store";@@ -242,7 +241,7 @@ const ManageKeys = ({className="cursorPointer"onClick={() => copyText(record?.api_key)}>- <CopyOutlined />+ <Copy /></Tooltip></div><div>@@ -274,12 +273,12 @@ const ManageKeys = ({<><Space className="actions" onClick={() => openEditModal(record)}><Tooltip title="edit" className="cursorPointer">- <EditOutlined />+ <Pencil /></Tooltip></Space><Space className="actions" onClick={() => showDeleteModal(record)}><Tooltip title="delete" className="cursorPointer">- <DeleteOutlined />+ <Trash2 /></Tooltip></Space></>@@ -302,7 +301,7 @@ const ManageKeys = ({<CustomButtontype="primary"size="small"- icon={<PlusOutlined />}+ icon={<Plus />}onClick={openAddModal}>New Keydiff --git a/frontend/src/components/error/GenericError/GenericError.jsx b/frontend/src/components/error/GenericError/GenericError.jsxindex d1050dda7..04267a0fb 100644--- a/frontend/src/components/error/GenericError/GenericError.jsx+++ b/frontend/src/components/error/GenericError/GenericError.jsx@@ -1,6 +1,6 @@-import { Result } from "antd";import { useEffect, useState } from "react";import { useSearchParams } from "react-router-dom";+import { Result } from "@/components/ui/shims/antd-structure";function GenericError() {const [searchParams] = useSearchParams();diff --git a/frontend/src/components/error/LazyOutlet/LazyOutlet.jsx b/frontend/src/components/error/LazyOutlet/LazyOutlet.jsxindex fb43d5a0e..6bd0609ac 100644--- a/frontend/src/components/error/LazyOutlet/LazyOutlet.jsx+++ b/frontend/src/components/error/LazyOutlet/LazyOutlet.jsx@@ -1,6 +1,7 @@-import { Button, Result } from "antd";import { Suspense } from "react";import { Outlet, useLocation } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Result } from "@/components/ui/shims/antd-structure";import { GenericLoader } from "../../generic-loader/GenericLoader.jsx";import { ErrorBoundary } from "../../widgets/error-boundary/ErrorBoundary.jsx";diff --git a/frontend/src/components/error/NotFound/NotFound.jsx b/frontend/src/components/error/NotFound/NotFound.jsxindex f70e1904b..1de9daf25 100644--- a/frontend/src/components/error/NotFound/NotFound.jsx+++ b/frontend/src/components/error/NotFound/NotFound.jsx@@ -1,5 +1,6 @@-import { Button, Result } from "antd";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Result } from "@/components/ui/shims/antd-structure";function NotFound() {const navigate = useNavigate();diff --git a/frontend/src/components/error/UnAuthorized/Unauthorized.jsx b/frontend/src/components/error/UnAuthorized/Unauthorized.jsxindex 1eb60d326..a6a91defe 100644--- a/frontend/src/components/error/UnAuthorized/Unauthorized.jsx+++ b/frontend/src/components/error/UnAuthorized/Unauthorized.jsx@@ -1,5 +1,4 @@-import { Typography } from "antd";-+import { Typography } from "@/components/ui/shims/antd-typography";import { IslandLayout } from "../../../layouts/island-layout/IslandLayout.jsx";import "./Unauthorized.css";diff --git a/frontend/src/components/generic-loader/GenericLoader.css b/frontend/src/components/generic-loader/GenericLoader.cssindex d34bd55e8..b4ce6ebb5 100644--- a/frontend/src/components/generic-loader/GenericLoader.css+++ b/frontend/src/components/generic-loader/GenericLoader.css@@ -9,9 +9,32 @@}}+/*+ * The full-page loader must fill the viewport to centre in it.+ *+ * `.center` (index.css) sizes itself with `width/height: inherit`, which does+ * not give it the viewport: it collapsed to the height of its own content+ * (24px), so the logo and "Please wait…" text sat wherever that box landed+ * rather than in the middle of the screen. LazyOutlet.css already patches+ * `.center` for its own fallback, for the same reason.+ *+ * Scoped to the loader so the other `.center` consumer (FileSystem's inline+ * empty state) keeps sizing to its container.+ */+.generic-loader.center {+ width: 100%;+ min-height: 100dvh;+ place-content: center;+ place-items: center;+}+/* PULSE BUBBLES */.spinner-box {text-align: center;+ /* The logo, pulse dots and text share one centred column. */+ display: flex;+ flex-direction: column;+ align-items: center;}.pulse-container {width: 60px;diff --git a/frontend/src/components/generic-loader/GenericLoader.jsx b/frontend/src/components/generic-loader/GenericLoader.jsxindex 5ebc75812..72110f982 100644--- a/frontend/src/components/generic-loader/GenericLoader.jsx+++ b/frontend/src/components/generic-loader/GenericLoader.jsx@@ -1,11 +1,10 @@-import { Typography } from "antd";-+import { Typography } from "@/components/ui/shims/antd-typography";import { Logo64 } from "../../assets";import "./GenericLoader.css";function GenericLoader() {return (- <div className="center">+ <div className="generic-loader center"><div className="spinner-box"><Logo64 className="fadeinout" /><div className="pulse-container">diff --git a/frontend/src/components/groups/GroupCreateEditModal.jsx b/frontend/src/components/groups/GroupCreateEditModal.jsxindex bcbe76962..41f0d7410 100644--- a/frontend/src/components/groups/GroupCreateEditModal.jsx+++ b/frontend/src/components/groups/GroupCreateEditModal.jsx@@ -1,6 +1,8 @@-import { Form, Input, Modal } from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Form } from "@/components/ui/shims/antd-form";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Modal } from "@/components/ui/shims/antd-overlays";import { useExceptionHandler } from "../../hooks/useExceptionHandler.jsx";import { useAlertStore } from "../../store/alert-store";diff --git a/frontend/src/components/groups/GroupMemberManager.jsx b/frontend/src/components/groups/GroupMemberManager.jsxindex 1c1a1eb12..dd01c2d13 100644--- a/frontend/src/components/groups/GroupMemberManager.jsx+++ b/frontend/src/components/groups/GroupMemberManager.jsx@@ -1,7 +1,11 @@-import { DeleteOutlined, QuestionCircleOutlined } from "@ant-design/icons";-import { Avatar, List, Modal, Popconfirm, Select } from "antd";+import { CircleHelp, Trash2 } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Avatar } from "@/components/ui/shims/antd-leaves";+import { Modal, Popconfirm } from "@/components/ui/shims/antd-overlays";+import { List } from "@/components/ui/shims/antd-structure";import { useExceptionHandler } from "../../hooks/useExceptionHandler.jsx";import { useAlertStore } from "../../store/alert-store";@@ -138,10 +142,20 @@ function GroupMemberManager({ open, group, onClose }) {description={`Remove ${item.email} from this group?`}okText="Remove"cancelText="Cancel"- icon={<QuestionCircleOutlined />}+ icon={<CircleHelp />}onConfirm={() => handleRemove(item.user_id)}>- <DeleteOutlined style={{ cursor: "pointer" }} />+ {/*+ * A named button, not a bare icon: the icon alone is+ * absent from the accessibility tree, leaving no way to+ * remove a member except with a mouse.+ */}+ <Button+ type="text"+ size="small"+ icon={<Trash2 />}+ aria-label={`Remove ${item.email} from this group`}+ /></Popconfirm>}>diff --git a/frontend/src/components/groups/Groups.css b/frontend/src/components/groups/Groups.cssindex 8016e49ff..76f971f4d 100644--- a/frontend/src/components/groups/Groups.css+++ b/frontend/src/components/groups/Groups.css@@ -1,5 +1,5 @@.groups-bg-col {- background-color: var(--page-bg-2);+ background-color: var(--background);height: 100%;}diff --git a/frontend/src/components/groups/Groups.jsx b/frontend/src/components/groups/Groups.jsxindex 1527ec89e..849fba77f 100644--- a/frontend/src/components/groups/Groups.jsx+++ b/frontend/src/components/groups/Groups.jsx@@ -1,13 +1,17 @@import {- DeleteOutlined,- EditOutlined,- EllipsisOutlined,- PlusOutlined,- ReloadOutlined,- TeamOutlined,-} from "@ant-design/icons";-import { Button, Dropdown, Modal, Space, Table, Typography } from "antd";+ EllipsisVertical,+ Pencil,+ Plus,+ RotateCw,+ Trash2,+ Users,+} from "lucide-react";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Space } from "@/components/ui/shims/antd-layout";+import { Dropdown, Modal } from "@/components/ui/shims/antd-overlays";+import { Table } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { useExceptionHandler } from "../../hooks/useExceptionHandler.jsx";import { IslandLayout } from "../../layouts/island-layout/IslandLayout.jsx";@@ -142,7 +146,7 @@ function Groups() {key: "members",label: (<Space onClick={() => handleManageMembers(record)}>- <TeamOutlined />+ <Users /><span>Manage members</span></Space>),@@ -151,7 +155,7 @@ function Groups() {key: "edit",label: (<Space onClick={() => handleEdit(record)}>- <EditOutlined />+ <Pencil /><span>Edit</span></Space>),@@ -160,7 +164,7 @@ function Groups() {key: "delete",label: (<Space onClick={() => handleDeleteClick(record)}>- <DeleteOutlined />+ <Trash2 /><span>Delete</span></Space>),@@ -184,7 +188,19 @@ function Groups() {trigger={["click"]}placement="bottomLeft">- <EllipsisOutlined rotate={90} style={{ cursor: "pointer" }} />+ {/*+ * The trigger has to be a real, named button. A bare icon merged the+ * Dropdown's trigger props onto the <svg>, which puts no node in the+ * accessibility tree: the only way to reach Manage members / Edit /+ * Delete was a mouse. `rotate` came across from antd's icon font and+ * does nothing on a lucide SVG — EllipsisVertical is the glyph it+ * was asking for, and the same one the card kebab menus use.+ */}+ <Button+ type="text"+ icon={<EllipsisVertical />}+ aria-label={`Actions for ${record?.name}`}+ /></Dropdown>),},@@ -200,16 +216,12 @@ function Groups() {searchKey="name"searchPlaceholder="Search Groups">- <CustomButton- type="primary"- icon={<PlusOutlined />}- onClick={handleCreate}- >+ <CustomButton type="primary" icon={<Plus />} onClick={handleCreate}>New Group</CustomButton><Buttonshape="circle"- icon={<ReloadOutlined />}+ icon={<RotateCw />}onClick={refresh}className="groups-reload-button"/>diff --git a/frontend/src/components/helpers/auth/PersistentLogin.js b/frontend/src/components/helpers/auth/PersistentLogin.jsxsimilarity index 100%rename from frontend/src/components/helpers/auth/PersistentLogin.jsrename to frontend/src/components/helpers/auth/PersistentLogin.jsxdiff --git a/frontend/src/components/helpers/auth/RequireAdmin.js b/frontend/src/components/helpers/auth/RequireAdmin.jsxsimilarity index 100%rename from frontend/src/components/helpers/auth/RequireAdmin.jsrename to frontend/src/components/helpers/auth/RequireAdmin.jsxdiff --git a/frontend/src/components/helpers/auth/RequireAuth.js b/frontend/src/components/helpers/auth/RequireAuth.jsxsimilarity index 100%rename from frontend/src/components/helpers/auth/RequireAuth.jsrename to frontend/src/components/helpers/auth/RequireAuth.jsxdiff --git a/frontend/src/components/helpers/auth/RequireGuest.js b/frontend/src/components/helpers/auth/RequireGuest.jsxsimilarity index 100%rename from frontend/src/components/helpers/auth/RequireGuest.jsrename to frontend/src/components/helpers/auth/RequireGuest.jsxdiff --git a/frontend/src/components/helpers/custom-markdown/CustomMarkdown.jsx b/frontend/src/components/helpers/custom-markdown/CustomMarkdown.jsxindex 177299a0f..b9a639adc 100644--- a/frontend/src/components/helpers/custom-markdown/CustomMarkdown.jsx+++ b/frontend/src/components/helpers/custom-markdown/CustomMarkdown.jsx@@ -1,13 +1,11 @@-import { Typography } from "antd";import PropTypes from "prop-types";import { useMemo } from "react";import { Link as RouterLink } from "react-router-dom";+import { Link, Paragraph, Text } from "@/components/ui/shims/antd-typography";import { isSafeExternalUrl } from "../../../helpers/urlSafety";import { useSessionStore } from "../../../store/session-store";-const { Text, Link, Paragraph } = Typography;-const CustomMarkdown = ({text = "",renderNewLines = true,diff --git a/frontend/src/components/helpers/custom-tools/CustomToolsHelper.js b/frontend/src/components/helpers/custom-tools/CustomToolsHelper.jsxsimilarity index 100%rename from frontend/src/components/helpers/custom-tools/CustomToolsHelper.jsrename to frontend/src/components/helpers/custom-tools/CustomToolsHelper.jsxdiff --git a/frontend/src/components/helpers/project/ProjectHelper.js b/frontend/src/components/helpers/project/ProjectHelper.jsxsimilarity index 100%rename from frontend/src/components/helpers/project/ProjectHelper.jsrename to frontend/src/components/helpers/project/ProjectHelper.jsxdiff --git a/frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx b/frontend/src/components/input-output/add-source-modal/AddSourceModal.jsxindex b375e7512..398026fa9 100644--- a/frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx+++ b/frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx@@ -1,7 +1,8 @@-import { ArrowLeftOutlined } from "@ant-design/icons";-import { Button, Modal } from "antd";+import { ArrowLeft } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Modal } from "@/components/ui/shims/antd-overlays";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";@@ -16,7 +17,7 @@ function AddSourceModal({open,setOpen,type,- isConnector,+ isConnector = false,connectorMode,addNewItem,editItemId,@@ -166,7 +167,7 @@ function AddSourceModal({type="text"shape="circle"size="small"- icon={<ArrowLeftOutlined />}+ icon={<ArrowLeft />}onClick={handleBack}aria-label="Go back to source selection"/>@@ -191,6 +192,7 @@ function AddSourceModal({centeredfooter={null}closable={true}+ data-testid="add-source-modal"className="add-source-modal">{selectedSourceId ? (@@ -231,8 +233,4 @@ AddSourceModal.propTypes = {setEditItemId: PropTypes.func.isRequired,};-AddSourceModal.defaultProps = {- isConnector: false,-};-export { AddSourceModal };diff --git a/frontend/src/components/input-output/add-source/AddSource.jsx b/frontend/src/components/input-output/add-source/AddSource.jsxindex e55c9b529..60b1585f8 100644--- a/frontend/src/components/input-output/add-source/AddSource.jsx+++ b/frontend/src/components/input-output/add-source/AddSource.jsx@@ -1,8 +1,8 @@import { getDefaultFormState } from "@rjsf/utils";import validator from "@rjsf/validator-ajv8";-import { Typography } from "antd";import PropTypes from "prop-types";import { useEffect, useMemo, useState } from "react";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";diff --git a/frontend/src/components/input-output/configure-ds/ConfigureDs.css b/frontend/src/components/input-output/configure-ds/ConfigureDs.cssindex cc3e02704..5d44bc3fe 100644--- a/frontend/src/components/input-output/configure-ds/ConfigureDs.css+++ b/frontend/src/components/input-output/configure-ds/ConfigureDs.css@@ -28,6 +28,11 @@.config-doc-icon {font-size: 16px;- color: #1890ff;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 16px;+ height: 16px;+ color: var(--primary);cursor: pointer;}diff --git a/frontend/src/components/input-output/configure-ds/ConfigureDs.jsx b/frontend/src/components/input-output/configure-ds/ConfigureDs.jsxindex 636f04e7e..5bb0d6f63 100644--- a/frontend/src/components/input-output/configure-ds/ConfigureDs.jsx+++ b/frontend/src/components/input-output/configure-ds/ConfigureDs.jsx@@ -1,7 +1,8 @@-import { InfoCircleOutlined } from "@ant-design/icons";-import { Col, Popover, Row } from "antd";+import { Info } from "lucide-react";import PropTypes from "prop-types";import { createRef, useEffect, useState } from "react";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Popover } from "@/components/ui/shims/antd-overlays";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler.jsx";@@ -383,7 +384,7 @@ function ConfigureDs({trigger="click"placement="bottomRight">- <InfoCircleOutlined className="config-doc-icon" />+ <Info className="config-doc-icon" /></Popover></div>)}diff --git a/frontend/src/components/input-output/data-source-card/DataSourceCard.jsx b/frontend/src/components/input-output/data-source-card/DataSourceCard.jsxindex 7452ec694..3e0a2267e 100644--- a/frontend/src/components/input-output/data-source-card/DataSourceCard.jsx+++ b/frontend/src/components/input-output/data-source-card/DataSourceCard.jsx@@ -1,5 +1,7 @@-import { Card, Image, Typography } from "antd";import PropTypes from "prop-types";+import { Image } from "@/components/ui/shims/antd-leaves";+import { Card } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "./DataSourceCard.css";import usePostHogEvents from "../../../hooks/usePostHogEvents";@@ -30,6 +32,7 @@ function DataSourceCard({ srcDetails, setSelectedSourceId, type }) {type="inner"bordered={true}className={`ds-card ${srcDetails?.isDisabled ? "disabled" : ""}`}+ data-testid={`ds-card-${srcDetails?.id}`}onClick={handleSelectSource}><div className="cover-container">diff --git a/frontend/src/components/input-output/file-system/FileSystem.jsx b/frontend/src/components/input-output/file-system/FileSystem.jsxindex 3380abcde..ad09a046c 100644--- a/frontend/src/components/input-output/file-system/FileSystem.jsx+++ b/frontend/src/components/input-output/file-system/FileSystem.jsx@@ -1,7 +1,8 @@-import { CaretDownOutlined } from "@ant-design/icons";-import { Tree, Typography } from "antd";+import { ChevronDown } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useRef, useState } from "react";+import { Tree } from "@/components/ui/shims/antd-structure";+import { Text } from "@/components/ui/shims/antd-typography";import { Document, Folder } from "../../../assets";import { formatBytes } from "../../../helpers/GetStaticData";@@ -12,8 +13,6 @@ import { SpinnerLoader } from "../../widgets/spinner-loader/SpinnerLoader.jsx";import "./FileSystem.css";const { DirectoryTree } = Tree;-const { Text } = Typography;-function FileExplorer({selectedConnector = "",data = [],@@ -145,7 +144,7 @@ function FileExplorer({rootClassName="explorerTree"showLinetreeData={tree}- switcherIcon={<CaretDownOutlined />}+ switcherIcon={<ChevronDown />}expandedKeys={expandedKeys}selectedKeys={selectedKeys}autoExpandParent={autoExpandParent}diff --git a/frontend/src/components/input-output/file-system/FileSystem.test.jsx b/frontend/src/components/input-output/file-system/FileSystem.test.jsxnew file mode 100644index 000000000..39b897171--- /dev/null+++ b/frontend/src/components/input-output/file-system/FileSystem.test.jsx@@ -0,0 +1,128 @@+import { render, screen, waitFor } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { beforeEach, describe, expect, it, vi } from "vitest";++/**+ * The Configure Connector modal's file browser.+ *+ * `Tree.DirectoryTree` was never defined on the Tree shim, so the module-scope+ * `const { DirectoryTree } = Tree` resolved to undefined and rendering it threw+ * React #130 — which took down the whole workflow page ("Couldn't load this+ * page") the moment any FILESYSTEM connector was picked for an ETL pipeline.+ *+ * The shim-completeness guard missed it because it only read `<Foo.Bar>` and+ * `Foo.bar(` from the source, not the destructured form used here.+ */+const getFileList = vi.fn();++vi.mock("../../input-output/input-output/input-service.js", () => ({+ inputService: () => ({ getFileList }),+}));++vi.mock("../../../hooks/useExceptionHandler", () => ({+ useExceptionHandler: () => (err, fallback) => ({ content: fallback }),+}));++/*+ * The real icons are `*.svg?react` imports, which only become components once+ * vite-plugin-svgr runs. That plugin is not in the test pipeline, so unmocked+ * they resolve to data-URI strings and React renders each as an unknown tag.+ */+vi.mock("../../../assets", () => ({+ Document: () => <span data-testid="file-icon" />,+ Folder: () => <span data-testid="folder-icon" />,+}));++const { FileExplorer } = await import("./FileSystem.jsx");++const ROOT = [+ { name: "invoices", type: "directory", modified_at: "2026-08-01 10:00:00" },+ {+ name: "readme.txt",+ type: "file",+ size: 2048,+ modified_at: "2026-08-02 11:00:00",+ },+];++describe("FileExplorer", () => {+ beforeEach(() => {+ getFileList.mockReset();+ });++ it("renders the connector's files instead of throwing #130", () => {+ render(<FileExplorer selectedConnector="conn-1" data={ROOT} />);+ expect(screen.getByText("invoices")).toBeInTheDocument();+ expect(screen.getByText("readme.txt")).toBeInTheDocument();+ });++ it("shows the size and modified date columns", () => {+ render(<FileExplorer selectedConnector="conn-1" data={ROOT} />);+ expect(screen.getByText("2 KB")).toBeInTheDocument();+ expect(screen.getByText("2026-08-02")).toBeInTheDocument();+ });++ it("reports a picked folder as a folder and a picked file as a file", async () => {+ const onFolderSelect = vi.fn();+ render(+ <FileExplorer+ selectedConnector="conn-1"+ data={ROOT}+ onFolderSelect={onFolderSelect}+ />,+ );++ await userEvent.click(screen.getByText("invoices"));+ expect(onFolderSelect).toHaveBeenLastCalledWith("invoices", "folder");++ await userEvent.click(screen.getByText("readme.txt"));+ expect(onFolderSelect).toHaveBeenLastCalledWith("readme.txt", "file");+ });++ /*+ * Directories come back from the connector without their children — the+ * browser fetches one level at a time. Without loadData wired through, every+ * folder in the tree is permanently unopenable.+ */+ it("fetches a directory's children the first time it is expanded", async () => {+ getFileList.mockResolvedValue({+ data: [+ {+ name: "invoices/jan.pdf",+ type: "file",+ size: 512,+ modified_at: "2026-08-03 09:00:00",+ },+ ],+ });++ render(<FileExplorer selectedConnector="conn-1" data={ROOT} />);+ expect(screen.queryByText("jan.pdf")).not.toBeInTheDocument();++ await userEvent.click(screen.getByRole("button", { name: "Expand" }));++ expect(getFileList).toHaveBeenCalledWith("conn-1", "invoices");+ expect(await screen.findByText("jan.pdf")).toBeInTheDocument();+ });++ it("surfaces a load error rather than leaving the folder silently empty", async () => {+ getFileList.mockRejectedValue(new Error("boom"));+ const setError = vi.fn();++ render(+ <FileExplorer+ selectedConnector="conn-1"+ data={ROOT}+ setError={setError}+ />,+ );++ await userEvent.click(screen.getByRole("button", { name: "Expand" }));++ await waitFor(() => {+ expect(setError).toHaveBeenCalledWith(+ 'Error loading files from "invoices"',+ );+ });+ });+});diff --git a/frontend/src/components/input-output/list-of-sources/ListOfSources.css b/frontend/src/components/input-output/list-of-sources/ListOfSources.cssindex ecd9bedec..81f230d7b 100644--- a/frontend/src/components/input-output/list-of-sources/ListOfSources.css+++ b/frontend/src/components/input-output/list-of-sources/ListOfSources.css@@ -56,6 +56,6 @@.list-of-srcs .filter-hint {margin-top: 8px !important;- font-size: 14px !important;+ font-size: 13px !important;color: #bfbfbf !important;}diff --git a/frontend/src/components/input-output/list-of-sources/ListOfSources.jsx b/frontend/src/components/input-output/list-of-sources/ListOfSources.jsxindex c4bee8252..7ad4da07d 100644--- a/frontend/src/components/input-output/list-of-sources/ListOfSources.jsx+++ b/frontend/src/components/input-output/list-of-sources/ListOfSources.jsx@@ -1,8 +1,9 @@-import { SearchOutlined } from "@ant-design/icons";-import { Input, List, Segmented } from "antd";import debounce from "lodash/debounce";+import { Search } from "lucide-react";import PropTypes from "prop-types";-import { useEffect, useState } from "react";+import { useEffect, useMemo, useState } from "react";+import { Input } from "@/components/ui/shims/antd-inputs";+import { List, Segmented } from "@/components/ui/shims/antd-structure";import { DataSourceCard } from "../data-source-card/DataSourceCard";import "./ListOfSources.css";@@ -41,10 +42,18 @@ function ListOfSources({setFilteredSourcesList(filteredList);}, [sourcesList, searchText, localModeFilter, isConnector, connectorMode]);- const handleInputChange = debounce((event) => {- const { value } = event.target;- setSearchText(value);- }, 300);+ /*+ * Built inline, `debounce(...)` was a fresh instance on every render, so each+ * keystroke started a new 300ms timer on a new closure and the list filtered+ * per keypress. `setSearchText` is a stable setState setter, so no deps are+ * needed and the single memoised instance can never go stale.+ */+ const handleInputChange = useMemo(+ () => debounce((value) => setSearchText(value), 300),+ [],+ );+ // A pending timer firing after unmount would setState on a dead component.+ useEffect(() => () => handleInputChange.cancel(), [handleInputChange]);const renderModeFilters = () => {if (!isConnector || connectorMode) {@@ -74,8 +83,8 @@ function ListOfSources({<div className="searchbox"><Inputplaceholder="Search"- prefix={<SearchOutlined className="search-outlined" />}- onChange={handleInputChange}+ prefix={<Search className="search-outlined" />}+ onChange={(event) => handleInputChange(event.target.value)}/></div>{renderModeFilters()}diff --git a/frontend/src/components/log-in/Login.css b/frontend/src/components/log-in/Login.cssindex 1503e62a5..b04f5ea09 100644--- a/frontend/src/components/log-in/Login.css+++ b/frontend/src/components/log-in/Login.css@@ -265,7 +265,7 @@}.login-trial-info {- font-size: 14px;+ font-size: 13px;font-weight: 400;line-height: 22px;text-align: center;@@ -290,7 +290,7 @@}.login-trust-text {- font-size: 14px;+ font-size: 13px;color: #282828;}@@ -444,7 +444,7 @@}.llm-stat-label {- font-size: 14px;+ font-size: 13px;font-weight: 500;color: #d1d5dc;text-align: center;@@ -622,7 +622,7 @@}.unstract-stat-label {- font-size: 14px;+ font-size: 13px;font-weight: 500;color: #d1d5dc;text-align: center;@@ -977,7 +977,7 @@}.llm-left-subheading {- font-size: 14px !important;+ font-size: 13px !important;line-height: 22px !important;color: #282828 !important;text-align: center;@@ -1090,7 +1090,7 @@}.llm-light-stat-label {- font-size: 14px;+ font-size: 13px;font-weight: 400;color: #545454;text-align: center;@@ -1316,7 +1316,7 @@}.unstract-light-stat-label {- font-size: 14px;+ font-size: 13px;font-weight: 400;color: #545454;text-align: center;diff --git a/frontend/src/components/log-in/Login.jsx b/frontend/src/components/log-in/Login.jsxindex 1c3d796f4..54b55bb83 100644--- a/frontend/src/components/log-in/Login.jsx+++ b/frontend/src/components/log-in/Login.jsx@@ -1,4 +1,5 @@-import { Button, Col, Row } from "antd";+import { Button } from "@/components/ui/shims/antd-button";+import { Col, Row } from "@/components/ui/shims/antd-layout";import { getBaseUrl } from "../../helpers/GetStaticData";import "./Login.css";diff --git a/frontend/src/components/log-in/ProductContentLayout.jsx b/frontend/src/components/log-in/ProductContentLayout.jsxindex cf0180211..761389eef 100644--- a/frontend/src/components/log-in/ProductContentLayout.jsx+++ b/frontend/src/components/log-in/ProductContentLayout.jsx@@ -1,5 +1,5 @@-import { Typography } from "antd";import PropTypes from "prop-types";+import { Typography } from "@/components/ui/shims/antd-typography";import loginRightBanner from "../../assets/login-right-panel.svg";const defaultUnstractContent = {diff --git a/frontend/src/components/logging/detailed-logs/DetailedLogs.css b/frontend/src/components/logging/detailed-logs/DetailedLogs.cssindex 668af2000..b18bd866a 100644--- a/frontend/src/components/logging/detailed-logs/DetailedLogs.css+++ b/frontend/src/components/logging/detailed-logs/DetailedLogs.css@@ -16,12 +16,21 @@.detailed-logs-cards {flex: 0 0 auto;+ /* Match the 24px gutter of .detailed-logs-header and of the table below, so+ * the title, the cards and the table all share one left and right edge. */+ padding: 0 24px 12px;+}++.detailed-logs-card-group {+ /* stretch, so a card whose text wraps does not leave the others short */+ align-items: stretch;+ gap: 16px;}.detailed-logs-table-container {flex: 1;min-height: 0;- padding: 0 12px 8px;+ padding: 0 24px 8px;display: flex;flex-direction: column;}@@ -64,23 +73,39 @@.logging-card-title {font-weight: 600;- font-size: 14px;+ font-size: 13px;}.logs-details-card {width: 250px;margin: 0;padding: 0;- height: 60px;- margin-right: 20px;+ /* min-height, not a fixed height: at 60px the card clipped its own content,+ * so a timestamp that wrapped to a second line spilled below the border. */+ min-height: 64px;+}++/* The shim's card body carries Tailwind `p-6 pt-0`, which pinned the content to+ * the top edge and left 24px of dead space beneath it. Centre it instead. */+.logs-details-card .ant-card-body {+ display: flex;+ align-items: center;+ height: 100%;+ padding: 12px 16px;}.logging-card-icons {- margin: 0 12px;+ margin: 0 12px 0 0;+ /* width/height, not font-size, and flex-shrink so the icon keeps its box:+ * see the note on .column-settings-icon below. */+ width: 20px;+ height: 20px;+ flex-shrink: 0;}.view-log-button {- margin-right: 24px;+ /* the row's own 24px padding now supplies the gutter */+ margin-right: 0;}/* Action column header with settings icon */@@ -105,11 +130,16 @@.column-settings-icon {font-size: 16px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 16px;+ height: 16px;color: rgba(0, 0, 0, 0.45);}.column-settings-trigger:hover .column-settings-icon {- color: #1677ff;+ color: var(--primary);}/* Thin scrollbar */@@ -166,6 +196,6 @@}.copy-btn-outlined:hover {- border-color: #1677ff;- color: #1677ff;+ border-color: var(--primary);+ color: var(--primary);}diff --git a/frontend/src/components/logging/detailed-logs/DetailedLogs.jsx b/frontend/src/components/logging/detailed-logs/DetailedLogs.jsxindex 3ff003423..de6021bcd 100644--- a/frontend/src/components/logging/detailed-logs/DetailedLogs.jsx+++ b/frontend/src/components/logging/detailed-logs/DetailedLogs.jsx@@ -1,29 +1,24 @@import {- CalendarOutlined,- ClockCircleOutlined,- CloseCircleFilled,- CopyOutlined,- EyeOutlined,- FileTextOutlined,- HourglassOutlined,- InfoCircleFilled,- MoreOutlined,- SearchOutlined,-} from "@ant-design/icons";-import {- Button,- Card,- Checkbox,- Dropdown,- Flex,- Input,- Table,- Tooltip,- Typography,-} from "antd";+ Calendar,+ CircleX,+ Clock,+ Copy,+ EllipsisVertical,+ Eye,+ FileText,+ Hourglass,+ Info,+ Search,+} from "lucide-react";import PropTypes from "prop-types";import { useEffect, useRef, useState } from "react";import { useParams } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Checkbox, Input } from "@/components/ui/shims/antd-inputs";+import { Flex } from "@/components/ui/shims/antd-layout";+import { Dropdown, Tooltip } from "@/components/ui/shims/antd-overlays";+import { Card, Table } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";@@ -76,7 +71,7 @@ const ActionColumnHeader = ({ menu }) => (<span>Action</span><Dropdown menu={menu} trigger={["click"]} placement="bottomRight"><span className="column-settings-trigger">- <MoreOutlined className="column-settings-icon" />+ <EllipsisVertical className="column-settings-icon" /></span></Dropdown></div>@@ -251,7 +246,7 @@ const DetailedLogs = () => {sorter: true,render: (_, record) => (<Tooltip title={record.executedAtWithSeconds}>- {record.executedAt}+ <span>{record.executedAt}</span></Tooltip>),},@@ -272,7 +267,7 @@ const DetailedLogs = () => {</div>),filterIcon: () => (- <SearchOutlined style={{ color: searchText ? "#1890ff" : undefined }} />+ <Search style={{ color: searchText ? "var(--primary)" : undefined }} />),},{@@ -327,7 +322,7 @@ const DetailedLogs = () => {render: (_, record) => (<Tooltip title="View logs"><Button- icon={<EyeOutlined />}+ icon={<Eye />}onClick={() => handleLogsModalOpen(record)}></Button></Tooltip>@@ -457,7 +452,7 @@ const DetailedLogs = () => {{type} Execution ID {id}<ButtonclassName="copy-btn-outlined"- icon={<CopyOutlined />}+ icon={<Copy />}onClick={() => copyToClipboard(id, "Execution ID")}/></Typography.Title>@@ -473,10 +468,10 @@ const DetailedLogs = () => {justify="space-between"className="detailed-logs-cards">- <Flex className="pad-12">+ <Flex className="detailed-logs-card-group"><Card className="logs-details-card"><Flex justify="flex-start" align="center">- <CalendarOutlined className="logging-card-icons" />+ <Calendar className="logging-card-icons" /><div><Typography className="logging-card-title">Started</Typography><Tooltip title={executionDetails?.executedAtWithSeconds}>@@ -487,7 +482,7 @@ const DetailedLogs = () => {</Card><Card className="logs-details-card"><Flex justify="flex-start" align="center">- <ClockCircleOutlined className="logging-card-icons" />+ <Clock className="logging-card-icons" /><div><Typography className="logging-card-title">{executionDetails?.status.toLowerCase() === "executing"@@ -500,7 +495,7 @@ const DetailedLogs = () => {</Card><Card className="logs-details-card"><Flex justify="flex-start" align="center">- <FileTextOutlined className="logging-card-icons" />+ <FileText className="logging-card-icons" /><div><Typography className="logging-card-title">{executionDetails?.status.toLowerCase() === "executing"@@ -509,7 +504,7 @@ const DetailedLogs = () => {-{" "}<Tooltip title="Total files"><span className="status-container">- <FileTextOutlined className="gen-index-progress" />{" "}+ <FileText className="gen-index-progress" />{" "}{executionDetails?.totalFiles}</span></Tooltip>@@ -517,13 +512,13 @@ const DetailedLogs = () => {<span><Tooltip title="Successful files"><span className="status-container">- <InfoCircleFilled className="gen-index-success" />{" "}+ <Info className="gen-index-success" />{" "}{executionDetails?.successfulFiles}</span></Tooltip><Tooltip title="Failed files"><span className="status-container">- <CloseCircleFilled className="gen-index-fail" />{" "}+ <CircleX className="gen-index-fail" />{" "}{executionDetails?.failedFiles}</span></Tooltip>@@ -533,7 +528,7 @@ const DetailedLogs = () => {executionDetails?.failedFiles) >0 && (<span className="status-container">- <HourglassOutlined className="gen-index-progress" />{" "}+ <Hourglass className="gen-index-progress" />{" "}{executionDetails?.totalFiles -(executionDetails?.successfulFiles +executionDetails?.failedFiles)}@@ -547,7 +542,7 @@ const DetailedLogs = () => {</Flex><ButtonclassName="view-log-button"- icon={<EyeOutlined />}+ icon={<Eye />}onClick={() => handleLogsModalOpen({})}>View Logsdiff --git a/frontend/src/components/logging/execution-logs/ExecutionLogs.css b/frontend/src/components/logging/execution-logs/ExecutionLogs.cssindex 1b059f550..ca29a2606 100644--- a/frontend/src/components/logging/execution-logs/ExecutionLogs.css+++ b/frontend/src/components/logging/execution-logs/ExecutionLogs.css@@ -1,5 +1,5 @@.file-log-layout {- background-color: var(--white);+ background-color: var(--card);height: 100%;margin: 12px;overflow: hidden;@@ -19,7 +19,7 @@.active.log-tab-icon > g > path,.active.log-tab-icon > path {- fill: #1677ff;+ fill: var(--primary);}.invite-user-search .ant-tabs-nav {diff --git a/frontend/src/components/logging/execution-logs/ExecutionLogs.jsx b/frontend/src/components/logging/execution-logs/ExecutionLogs.jsxindex b73ab9468..f06481d68 100644--- a/frontend/src/components/logging/execution-logs/ExecutionLogs.jsx+++ b/frontend/src/components/logging/execution-logs/ExecutionLogs.jsx@@ -1,6 +1,7 @@-import { DatePicker, Tabs } from "antd";import { useEffect, useRef, useState } from "react";import { useLocation, useNavigate, useParams } from "react-router-dom";+import { DatePicker } from "@/components/ui/shims/antd-datetime";+import { Tabs } from "@/components/ui/shims/antd-structure";import {ApiDeployments,ETLIcon,diff --git a/frontend/src/components/logging/filter-dropdown/FilterDropdown.jsx b/frontend/src/components/logging/filter-dropdown/FilterDropdown.jsxindex 72bf0e294..c0222504a 100644--- a/frontend/src/components/logging/filter-dropdown/FilterDropdown.jsx+++ b/frontend/src/components/logging/filter-dropdown/FilterDropdown.jsx@@ -1,9 +1,11 @@-import { FilterOutlined } from "@ant-design/icons";-import { Button, Radio, Space } from "antd";+import { Filter } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";+import { Radio } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";const FilterIcon = ({ filtered }) => (- <FilterOutlined style={{ color: filtered ? "#1677ff" : undefined }} />+ <Filter style={{ color: filtered ? "var(--primary)" : undefined }} />);const FilterDropdown = ({@@ -19,7 +21,11 @@ const FilterDropdown = ({setSelectedKeys(e.target.value ? [e.target.value] : []);confirm();}}- value={selectedKeys[0] || null}+ // "" rather than null: Radix reads a nullish value as "uncontrolled", so+ // picking the first level flipped the group from uncontrolled to+ // controlled and React warned about it. An empty string is the+ // controlled spelling of "nothing selected".+ value={selectedKeys[0] ?? ""}><Space direction="vertical">{filterOptions.map((filter) => (@@ -34,7 +40,17 @@ const FilterDropdown = ({className="clear-button"type="primary"size="small"- onClick={() => handleClearFilter(confirm)}+ /*+ * Empty the draft BEFORE confirming. `confirm()` publishes whatever+ * `setSelectedKeys` last set — it cannot see the parent state+ * `handleClearFilter` is about to clear, because that re-render has not+ * happened yet. Without this, Clear republished the level it was meant+ * to remove and the log list stayed filtered.+ */+ onClick={() => {+ setSelectedKeys([]);+ handleClearFilter(confirm);+ }}>Clear</Button>diff --git a/frontend/src/components/logging/log-modal/LogModal.css b/frontend/src/components/logging/log-modal/LogModal.cssindex 3440916c0..4340a5267 100644--- a/frontend/src/components/logging/log-modal/LogModal.css+++ b/frontend/src/components/logging/log-modal/LogModal.css@@ -18,8 +18,8 @@}.log-modal-title .copy-btn-outlined:hover {- border-color: #1677ff;- color: #1677ff;+ border-color: var(--primary);+ color: var(--primary);}.log-modal-title .export-btn-outlined {diff --git a/frontend/src/components/logging/log-modal/LogModal.jsx b/frontend/src/components/logging/log-modal/LogModal.jsxindex 5baa6e5a1..5848f0a65 100644--- a/frontend/src/components/logging/log-modal/LogModal.jsx+++ b/frontend/src/components/logging/log-modal/LogModal.jsx@@ -1,7 +1,9 @@-import { CopyOutlined, DownloadOutlined } from "@ant-design/icons";-import { Button, Dropdown, Modal, Table, Tooltip } from "antd";+import { Copy, Download } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Dropdown, Modal, Tooltip } from "@/components/ui/shims/antd-overlays";+import { Table } from "@/components/ui/shims/antd-structure";import "./LogModal.css";import {@@ -177,7 +179,7 @@ function LogModal({width: 200,render: (_, record) => (<Tooltip title={record.executedAtWithSeconds}>- {record.eventTime}+ <span>{record.eventTime}</span></Tooltip>),},@@ -246,7 +248,7 @@ function LogModal({{displayId && (<ButtonclassName="copy-btn-outlined"- icon={<CopyOutlined />}+ icon={<Copy />}aria-label="Copy execution ID"onClick={() => copyToClipboard(displayId, "File Execution ID")}/>@@ -263,7 +265,7 @@ function LogModal({<span><ButtonclassName="export-btn-outlined"- icon={<DownloadOutlined />}+ icon={<Download />}loading={exporting}disabled={!pagination.total || exporting}>diff --git a/frontend/src/components/logging/logs-refresh-controls/LogsRefreshControls.jsx b/frontend/src/components/logging/logs-refresh-controls/LogsRefreshControls.jsxindex c54e2f74d..ceb674385 100644--- a/frontend/src/components/logging/logs-refresh-controls/LogsRefreshControls.jsx+++ b/frontend/src/components/logging/logs-refresh-controls/LogsRefreshControls.jsx@@ -1,6 +1,9 @@-import { ReloadOutlined } from "@ant-design/icons";-import { Button, Switch, Tooltip, Typography } from "antd";+import { RotateCw } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";+import { Switch } from "@/components/ui/shims/antd-inputs";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";import "./LogsRefreshControls.css";function LogsRefreshControls({@@ -22,7 +25,7 @@ function LogsRefreshControls({disabled={disabled}/><Button- icon={<ReloadOutlined />}+ icon={<RotateCw />}onClick={onRefresh}className="logs-refresh-btn"disabled={disabled}diff --git a/frontend/src/components/logging/logs-table/LogsTable.css b/frontend/src/components/logging/logs-table/LogsTable.cssindex af23d7f82..df0859dbc 100644--- a/frontend/src/components/logging/logs-table/LogsTable.css+++ b/frontend/src/components/logging/logs-table/LogsTable.css@@ -50,11 +50,11 @@}.gen-index-progress {- color: #faad14;+ color: var(--warning);}.gen-index-success {- color: #52c41a;+ color: var(--success);}.gen-index-fail {@@ -77,5 +77,5 @@}.search-filter-icon-active {- color: #1890ff;+ color: var(--primary);}diff --git a/frontend/src/components/logging/logs-table/LogsTable.jsx b/frontend/src/components/logging/logs-table/LogsTable.jsxindex e75ccb41f..82a4d06f0 100644--- a/frontend/src/components/logging/logs-table/LogsTable.jsx+++ b/frontend/src/components/logging/logs-table/LogsTable.jsx@@ -1,11 +1,9 @@-import { Input, Table, Tooltip, Typography } from "antd";+import { CircleX, Hourglass, Info, Search } from "lucide-react";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Table } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "./LogsTable.css";-import {- CloseCircleFilled,- HourglassOutlined,- InfoCircleFilled,- SearchOutlined,-} from "@ant-design/icons";import PropTypes from "prop-types";import { useNavigate } from "react-router-dom";import { logsStaticContent } from "../../../helpers/GetStaticData";@@ -31,7 +29,7 @@ SearchFilterDropdown.propTypes = {// Search filter icon componentconst SearchFilterIcon = ({ isActive }) => (- <SearchOutlined className={isActive ? "search-filter-icon-active" : ""} />+ <Search className={isActive ? "search-filter-icon-active" : ""} />);SearchFilterIcon.propTypes = {@@ -59,7 +57,7 @@ const LogsTable = ({sorter: true,render: (_, record) => (<Tooltip title={record.executedAtWithSeconds}>- {record.executedAt}+ <span>{record.executedAt}</span></Tooltip>),},@@ -108,14 +106,12 @@ const LogsTable = ({<span><Tooltip title="Successful files"><span className="status-container">- <InfoCircleFilled className="gen-index-success" />{" "}- {record?.successfulFiles}+ <Info className="gen-index-success" /> {record?.successfulFiles}</span></Tooltip><Tooltip title="Failed files"><span className="status-container">- <CloseCircleFilled className="gen-index-fail" />{" "}- {record?.failedFiles}+ <CircleX className="gen-index-fail" /> {record?.failedFiles}</span></Tooltip><Tooltip title="Queued files">@@ -123,7 +119,7 @@ const LogsTable = ({(record?.successfulFiles + record?.failedFiles) >0 && (<span className="status-container">- <HourglassOutlined className="gen-index-progress" />{" "}+ <Hourglass className="gen-index-progress" />{" "}{record?.totalFiles -(record?.successfulFiles + record?.failedFiles)}</span>diff --git a/frontend/src/components/logs-and-notifications/DisplayLogsAndNotifications.css b/frontend/src/components/logs-and-notifications/DisplayLogsAndNotifications.cssindex 7588948db..78b848245 100644--- a/frontend/src/components/logs-and-notifications/DisplayLogsAndNotifications.css+++ b/frontend/src/components/logs-and-notifications/DisplayLogsAndNotifications.css@@ -3,8 +3,8 @@bottom: 0;left: 0;right: 0;- background-color: #fff;- border-top: 1px solid #ccc;+ background-color: var(--card);+ border-top: 1px solid var(--border);box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);display: flex;flex-direction: column;@@ -14,8 +14,8 @@.logs-handle {height: 40px;- background-color: #fff;- border-bottom: 1px solid #ccc;+ background-color: var(--card);+ border-bottom: 1px solid var(--border);cursor: ns-resize;user-select: none;font-weight: bold;@@ -36,20 +36,22 @@.tool-logs-table .ant-table {font-family: Consolas, "Courier New", monospace;- font-size: 14px !important;- background-color: #fff;+ font-size: 13px !important;+ background-color: var(--card);}.tool-logs-table .ant-table-thead > tr > th {- background-color: #ffffff;+ background-color: var(--card);font-weight: 600;}+/* A light red wash for error logs. Mixed off --destructive so it tracks the+ * theme instead of staying a light-mode-only #fff1f0. */.tool-logs-table .ant-table-tbody > tr.display-logs-error-bg > td {- background-color: #fff1f0; /* a light red for error logs */+ background-color: color-mix(in srgb, var(--destructive) 8%, var(--card));}.display-logs-md {- font-size: 14px;+ font-size: 13px;padding-left: 5px;}diff --git a/frontend/src/components/logs-and-notifications/LogsAndNotificationsTable.jsx b/frontend/src/components/logs-and-notifications/LogsAndNotificationsTable.jsxindex 01d5bfc78..917624b3e 100644--- a/frontend/src/components/logs-and-notifications/LogsAndNotificationsTable.jsx+++ b/frontend/src/components/logs-and-notifications/LogsAndNotificationsTable.jsx@@ -1,7 +1,7 @@-import { Table } from "antd";import { uniqueId } from "lodash";import PropTypes from "prop-types";import { useEffect, useMemo, useRef } from "react";+import { Table } from "@/components/ui/shims/antd-structure";import { useSocketLogsStore } from "../../store/socket-logs-store";import "./DisplayLogsAndNotifications.css";import { getDateTimeString } from "../../helpers/GetStaticData";diff --git a/frontend/src/components/logs-and-notifications/LogsHeader.jsx b/frontend/src/components/logs-and-notifications/LogsHeader.jsxindex 94c1e3133..f020b2617 100644--- a/frontend/src/components/logs-and-notifications/LogsHeader.jsx+++ b/frontend/src/components/logs-and-notifications/LogsHeader.jsx@@ -1,7 +1,10 @@-import { CloseOutlined, DownOutlined, UpOutlined } from "@ant-design/icons";-import { Button, Space, Tag, Typography } from "antd";+import { ChevronDown, ChevronUp, X } from "lucide-react";import PropTypes from "prop-types";import { memo } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Space } from "@/components/ui/shims/antd-layout";+import { Tag } from "@/components/ui/shims/antd-leaves";+import { Typography } from "@/components/ui/shims/antd-typography";export const LogsHeader = memo(function LogsHeader({isMinimized,@@ -10,9 +13,9 @@ export const LogsHeader = memo(function LogsHeader({onToggleExpand,onMinimize,}) {- const expandCollapseIcon = isFull ? <DownOutlined /> : <UpOutlined />;+ const expandCollapseIcon = isFull ? <ChevronDown /> : <ChevronUp />;- const minimizeIcon = <CloseOutlined />;+ const minimizeIcon = <X />;return (<div className="logs-header-container">diff --git a/frontend/src/components/metrics-dashboard/LLMUsageTable.jsx b/frontend/src/components/metrics-dashboard/LLMUsageTable.jsxindex 0a7bbbcc2..e0ac4f6d7 100644--- a/frontend/src/components/metrics-dashboard/LLMUsageTable.jsx+++ b/frontend/src/components/metrics-dashboard/LLMUsageTable.jsx@@ -1,29 +1,16 @@-import {- CheckCircleOutlined,- CloseCircleOutlined,- InfoCircleOutlined,-} from "@ant-design/icons";-import {- Alert,- Card,- Empty,- Spin,- Table,- Tabs,- Tag,- Tooltip,- Typography,-} from "antd";+import { CircleCheck, CircleX, Info } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Alert, Empty, Spin, Tag } from "@/components/ui/shims/antd-leaves";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Card, Table, Tabs } from "@/components/ui/shims/antd-structure";+import { Text } from "@/components/ui/shims/antd-typography";import { ApiDeployments, ETLIcon, Task, Workflows } from "../../assets/index";import { useDeploymentUsage } from "../../hooks/useMetricsData";import "./MetricsDashboard.css";-const { Text } = Typography;-/*** Format large numbers with K/M/B suffixes.* Shows full value on hover via Tooltip.@@ -55,7 +42,7 @@ const columns = [<span>Tokens{" "}<Tooltip title="Total LLM tokens consumed by this deployment">- <InfoCircleOutlined className="llm-usage-info-icon" />+ <Info className="llm-usage-info-icon" /></Tooltip></span>),@@ -65,7 +52,7 @@ const columns = [defaultSortOrder: "descend",render: (value) => (<Tooltip title={(value || 0).toLocaleString()}>- {formatCompactNumber(value)}+ <span>{formatCompactNumber(value)}</span></Tooltip>),width: 120,@@ -95,12 +82,12 @@ const columns = [<span>{total.toLocaleString()}</span>{completed > 0 && (<span className="execution-success">- <CheckCircleOutlined /> {formatCompactNumber(completed)}+ <CircleCheck /> {formatCompactNumber(completed)}</span>)}{failed > 0 && (<span className="execution-error">- <CloseCircleOutlined /> {formatCompactNumber(failed)}+ <CircleX /> {formatCompactNumber(failed)}</span>)}</span>@@ -137,7 +124,11 @@ const columns = [},];-function DeploymentUsageTable({ startDate, endDate, refetchRef }) {+function DeploymentUsageTable({+ startDate = null,+ endDate = null,+ refetchRef = null,+}) {const [activeType, setActiveType] = useState("API");const { data, loading, error, refetch } = useDeploymentUsage(@@ -269,10 +260,4 @@ DeploymentUsageTable.propTypes = {refetchRef: PropTypes.shape({ current: PropTypes.func }),};-DeploymentUsageTable.defaultProps = {- startDate: null,- endDate: null,- refetchRef: null,-};-export { DeploymentUsageTable };diff --git a/frontend/src/components/metrics-dashboard/MetricsChart.jsx b/frontend/src/components/metrics-dashboard/MetricsChart.jsxindex 8da895326..32ef611aa 100644--- a/frontend/src/components/metrics-dashboard/MetricsChart.jsx+++ b/frontend/src/components/metrics-dashboard/MetricsChart.jsx@@ -1,5 +1,4 @@-import { FilterOutlined } from "@ant-design/icons";-import { Button, Card, Dropdown, Empty, Spin } from "antd";+import { Filter } from "lucide-react";import PropTypes from "prop-types";import { useMemo, useState } from "react";import {@@ -14,6 +13,10 @@ import {XAxis,YAxis,} from "recharts";+import { Button } from "@/components/ui/shims/antd-button";+import { Empty, Spin } from "@/components/ui/shims/antd-leaves";+import { Dropdown } from "@/components/ui/shims/antd-overlays";+import { Card } from "@/components/ui/shims/antd-structure";import "./MetricsDashboard.css";@@ -49,11 +52,11 @@ function formatDate(dateStr) {/*** Format a number for display in tooltips.*- * @param {number} value - Number to format+ * @param {number|null|undefined} value - Number to format* @return {string} Formatted number*/function formatValue(value) {- if (value === null || value === undefined) {+ if (value == null) {return "0";}if (value >= 1000000) {@@ -328,7 +331,7 @@ function TrendAnalysisChart({ data, loading }) {}}trigger={["click"]}>- <Button icon={<FilterOutlined />} size="small">+ <Button icon={<Filter />} size="small">Filter</Button></Dropdown>diff --git a/frontend/src/components/metrics-dashboard/MetricsDashboard.css b/frontend/src/components/metrics-dashboard/MetricsDashboard.cssindex d3d38fe16..ca4a09eff 100644--- a/frontend/src/components/metrics-dashboard/MetricsDashboard.css+++ b/frontend/src/components/metrics-dashboard/MetricsDashboard.css@@ -2,7 +2,7 @@.metrics-dashboard {padding: 12px;- background-color: var(--page-bg-2);+ background-color: var(--background);flex: 1;overflow: hidden;display: flex;@@ -10,7 +10,7 @@}.metrics-dashboard-container {- background-color: var(--page-bg-1);+ background-color: var(--card);flex: 1;min-height: 0;overflow-y: auto;@@ -71,6 +71,11 @@.summary-card-icon span {font-size: 24px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 24px;+ height: 24px;}.summary-card-content {@@ -79,7 +84,7 @@}.summary-card-label {- font-size: 14px;+ font-size: 13px;color: #666;margin-bottom: 4px;white-space: nowrap;@@ -119,11 +124,16 @@display: flex;align-items: center;gap: 8px;- font-size: 14px;+ font-size: 13px;}.metric-icon {font-size: 16px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 16px;+ height: 16px;}.metric-count {@@ -168,7 +178,7 @@}.metrics-empty-state-text {- font-size: 14px;+ font-size: 13px;line-height: 22px;max-width: 360px;margin-bottom: 24px;@@ -283,6 +293,11 @@.recent-activity-info {font-size: 11px;+ /* width/height, not font-size alone: these classes sit on lucide SVGs,+ * which ignore font-size and fall back to their own 24px default. The+ * antd originals were an icon FONT, where font-size was the size. */+ width: 11px;+ height: 11px;color: #8c8c8c;cursor: help;}@@ -315,7 +330,7 @@}.subscription-plan-pages {- font-size: 14px;+ font-size: 13px;color: #595959;}@@ -361,7 +376,7 @@}.subscription-plan-total-label {- font-size: 14px;+ font-size: 13px;color: #8c8c8c;}@@ -376,8 +391,8 @@.subscription-upgrade-btn {align-self: flex-start;margin-top: 4px;- color: #52c41a;- border-color: #52c41a;+ color: var(--success);+ border-color: var(--success);}.subscription-upgrade-btn:hover {@@ -395,7 +410,12 @@.subscription-stat-icon {font-size: 16px;- color: #1890ff;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 16px;+ height: 16px;+ color: var(--primary);margin-bottom: 6px;}@@ -420,7 +440,7 @@.subscription-chart-card .ant-card-head-title,.subscription-table-card .ant-card-head-title {- font-size: 14px;+ font-size: 13px;font-weight: 600;}@@ -470,7 +490,7 @@}.execution-success {- color: #52c41a;+ color: var(--success);font-size: 12px;}@@ -516,7 +536,7 @@.llm-usage-table .ant-table-tbody > tr > td {color: #434343;- font-size: 14px;+ font-size: 13px;}.llm-usage-table .ant-table-tbody > tr:hover > td {@@ -543,4 +563,9 @@.llm-usage-info-icon {color: #8c8c8c;font-size: 12px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 12px;+ height: 12px;}diff --git a/frontend/src/components/metrics-dashboard/MetricsDashboard.jsx b/frontend/src/components/metrics-dashboard/MetricsDashboard.jsxindex 3a5354a43..3e814bf02 100644--- a/frontend/src/components/metrics-dashboard/MetricsDashboard.jsx+++ b/frontend/src/components/metrics-dashboard/MetricsDashboard.jsx@@ -1,25 +1,21 @@-import {- CreditCardOutlined,- DashboardOutlined,- FileSearchOutlined,- ReloadOutlined,- RocketOutlined,- SlackOutlined,- ThunderboltOutlined,-} from "@ant-design/icons";-import {- Alert,- Button,- Col,- DatePicker,- Row,- Space,- Tabs,- Typography,-} from "antd";import dayjs from "dayjs";+import {+ CreditCard,+ FileSearch,+ Gauge,+ MessagesSquare,+ Rocket,+ RotateCw,+ Zap,+} from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { DatePicker } from "@/components/ui/shims/antd-datetime";+import { Col, Row, Space } from "@/components/ui/shims/antd-layout";+import { Alert } from "@/components/ui/shims/antd-leaves";+import { Tabs } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { EmptyPlaceholder } from "../../assets";import { evictExpiredCache } from "../../helpers/metricsCache";@@ -65,7 +61,7 @@ function DashboardButtons() {return (<Space><Button- icon={<FileSearchOutlined />}+ icon={<FileSearch />}type="link"onClick={() =>window.open(@@ -79,7 +75,7 @@ function DashboardButtons() {Documentation</Button><Button- icon={<SlackOutlined />}+ icon={<MessagesSquare />}type="link"onClick={() =>window.open(@@ -195,7 +191,7 @@ function MetricsDashboard() {key: "overview",label: (<span>- <DashboardOutlined /> Overview+ <Gauge /> Overview</span>),children: hasNoData ? (@@ -213,7 +209,7 @@ function MetricsDashboard() {<Space className="metrics-empty-state-actions"><Buttontype="primary"- icon={<RocketOutlined />}+ icon={<Rocket />}onClick={() => navigate(`/${orgName}/workflows`)}>Create Workflow@@ -249,7 +245,7 @@ function MetricsDashboard() {key: "llm-usage",label: (<span>- <ThunderboltOutlined /> Usage by Deployment+ <Zap /> Usage by Deployment</span>),children: (@@ -272,7 +268,7 @@ function MetricsDashboard() {key: "subscription",label: (<span>- <CreditCardOutlined /> Subscription+ <CreditCard /> Subscription</span>),children: (@@ -338,7 +334,7 @@ function MetricsDashboard() {]}/>)}- <Button icon={<ReloadOutlined />} onClick={handleRefresh} />+ <Button icon={<RotateCw />} onClick={handleRefresh} /></Space>}/>diff --git a/frontend/src/components/metrics-dashboard/MetricsSummary.jsx b/frontend/src/components/metrics-dashboard/MetricsSummary.jsxindex 756c96827..69b4e768d 100644--- a/frontend/src/components/metrics-dashboard/MetricsSummary.jsx+++ b/frontend/src/components/metrics-dashboard/MetricsSummary.jsx@@ -1,15 +1,16 @@import {- ApiOutlined,- CheckCircleOutlined,- DollarOutlined,- EyeOutlined,- FileTextOutlined,- RocketOutlined,- ThunderboltOutlined,- WarningOutlined,-} from "@ant-design/icons";-import { Col, Empty, Row, Spin } from "antd";+ CircleCheck,+ DollarSign,+ Eye,+ FileText,+ Plug,+ Rocket,+ TriangleAlert,+ Zap,+} from "lucide-react";import PropTypes from "prop-types";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Empty, Spin } from "@/components/ui/shims/antd-leaves";import "./MetricsDashboard.css";@@ -17,7 +18,7 @@ import "./MetricsDashboard.css";const METRIC_CONFIG = {pages_processed: {label: "Pages Processed",- icon: <FileTextOutlined />,+ icon: <FileText />,bgColor: "#e8f5e9",iconBg: "#c8e6c9",iconColor: "#2e7d32",@@ -25,7 +26,7 @@ const METRIC_CONFIG = {},documents_processed: {label: "Documents Processed",- icon: <FileTextOutlined />,+ icon: <FileText />,bgColor: "#fff3e0",iconBg: "#ffe0b2",iconColor: "#e65100",@@ -33,7 +34,7 @@ const METRIC_CONFIG = {},llm_calls: {label: "LLM Calls",- icon: <ApiOutlined />,+ icon: <Plug />,bgColor: "#e0f2f1",iconBg: "#b2dfdb",iconColor: "#00695c",@@ -41,7 +42,7 @@ const METRIC_CONFIG = {},prompt_executions: {label: "Prompt Executions",- icon: <ThunderboltOutlined />,+ icon: <Zap />,bgColor: "#ede7f6",iconBg: "#d1c4e9",iconColor: "#4527a0",@@ -49,7 +50,7 @@ const METRIC_CONFIG = {},deployed_api_requests: {label: "API Requests",- icon: <RocketOutlined />,+ icon: <Rocket />,bgColor: "#e3f2fd",iconBg: "#bbdefb",iconColor: "#1565c0",@@ -57,7 +58,7 @@ const METRIC_CONFIG = {},llm_usage: {label: "LLM Usage Cost",- icon: <DollarOutlined />,+ icon: <DollarSign />,bgColor: "#fce4ec",iconBg: "#f8bbd9",iconColor: "#c2185b",@@ -67,7 +68,7 @@ const METRIC_CONFIG = {},etl_pipeline_executions: {label: "ETL Executions",- icon: <RocketOutlined />,+ icon: <Rocket />,bgColor: "#ffebee",iconBg: "#ffcdd2",iconColor: "#c62828",@@ -75,7 +76,7 @@ const METRIC_CONFIG = {},challenges: {label: "Challenges",- icon: <ThunderboltOutlined />,+ icon: <Zap />,bgColor: "#fce4ec",iconBg: "#f8bbd9",iconColor: "#ad1457",@@ -83,7 +84,7 @@ const METRIC_CONFIG = {},summarization_calls: {label: "Summarizations",- icon: <ThunderboltOutlined />,+ icon: <Zap />,bgColor: "#e0f7fa",iconBg: "#b2ebf2",iconColor: "#00838f",@@ -91,7 +92,7 @@ const METRIC_CONFIG = {},failed_pages: {label: "Failed Pages",- icon: <WarningOutlined />,+ icon: <TriangleAlert />,bgColor: "#fff1f0",iconBg: "#ffccc7",iconColor: "#cf1322",@@ -99,7 +100,7 @@ const METRIC_CONFIG = {},hitl_reviews: {label: "HITL Reviews",- icon: <EyeOutlined />,+ icon: <Eye />,bgColor: "#f3e8ff",iconBg: "#e0cffc",iconColor: "#6d28d9",@@ -107,7 +108,7 @@ const METRIC_CONFIG = {},hitl_completions: {label: "HITL Completions",- icon: <CheckCircleOutlined />,+ icon: <CircleCheck />,bgColor: "#ecfdf5",iconBg: "#d1fae5",iconColor: "#059669",@@ -131,12 +132,12 @@ const METRIC_PRIORITY = [/*** Format large numbers for display.*- * @param {number} value - The number to format+ * @param {number|null|undefined} value - The number to format* @param {number} precision - Decimal precision (default 0)* @return {string} Formatted number string*/function formatValue(value, precision = 0) {- if (value === null || value === undefined) {+ if (value == null) {return "0";}if (precision > 0) {@@ -148,7 +149,7 @@ function formatValue(value, precision = 0) {return Math.round(value).toLocaleString();}-function MetricsSummary({ data, loading }) {+function MetricsSummary({ data = null, loading = false }) {if (loading) {return (<div className="metrics-loading">@@ -189,7 +190,7 @@ function MetricsSummary({ data, loading }) {{sortedMetrics.map((metric) => {const config = METRIC_CONFIG[metric.metric_name] || {label: metric.metric_name,- icon: <ApiOutlined />,+ icon: <Plug />,bgColor: "#f5f5f5",iconBg: "#e0e0e0",iconColor: "#616161",@@ -247,9 +248,4 @@ MetricsSummary.propTypes = {loading: PropTypes.bool,};-MetricsSummary.defaultProps = {- data: null,- loading: false,-};-export { MetricsSummary };diff --git a/frontend/src/components/metrics-dashboard/RecentActivity.jsx b/frontend/src/components/metrics-dashboard/RecentActivity.jsxindex f21053f25..80fff6359 100644--- a/frontend/src/components/metrics-dashboard/RecentActivity.jsx+++ b/frontend/src/components/metrics-dashboard/RecentActivity.jsx@@ -1,46 +1,47 @@-import {- ApiOutlined,- BranchesOutlined,- CheckCircleOutlined,- ClockCircleOutlined,- CloseCircleOutlined,- InfoCircleOutlined,- PlayCircleOutlined,- SyncOutlined,-} from "@ant-design/icons";-import { Card, Empty, List, Spin, Tag, Tooltip, Typography } from "antd";import dayjs from "dayjs";import relativeTime from "dayjs/plugin/relativeTime";+import {+ CircleCheck,+ CirclePlay,+ CircleX,+ Clock,+ GitBranch,+ Info,+ Plug,+ RefreshCw,+} from "lucide-react";import PropTypes from "prop-types";import { useNavigate } from "react-router-dom";+import { Empty, Spin, Tag } from "@/components/ui/shims/antd-leaves";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Card, List } from "@/components/ui/shims/antd-structure";+import { Text } from "@/components/ui/shims/antd-typography";import { useSessionStore } from "../../store/session-store";import "./MetricsDashboard.css";dayjs.extend(relativeTime);-const { Text } = Typography;-// Status configuration with colors and iconsconst STATUS_CONFIG = {COMPLETED: {color: "success",- icon: <CheckCircleOutlined />,+ icon: <CircleCheck />,label: "Completed",},RUNNING: {color: "processing",- icon: <SyncOutlined spin />,+ icon: <RefreshCw spin />,label: "Processing",},QUEUED: {color: "default",- icon: <ClockCircleOutlined />,+ icon: <Clock />,label: "Queued",},ERROR: {color: "error",- icon: <CloseCircleOutlined />,+ icon: <CircleX />,label: "Failed",},};@@ -49,19 +50,19 @@ const STATUS_CONFIG = {const TYPE_CONFIG = {etl: {label: "ETL Pipeline",- icon: <BranchesOutlined />,+ icon: <GitBranch />,color: "#722ed1",logType: "ETL",},api: {label: "API Request",- icon: <ApiOutlined />,+ icon: <Plug />,color: "#1890ff",logType: "API",},workflow: {label: "Workflow",- icon: <PlayCircleOutlined />,+ icon: <CirclePlay />,color: "#52c41a",logType: "WF",},@@ -73,7 +74,7 @@ const TYPE_CONFIG = {** @return {JSX.Element} The rendered recent activity component.*/-function RecentActivity({ data, loading }) {+function RecentActivity({ data = null, loading = false }) {const navigate = useNavigate();const { sessionDetails } = useSessionStore();const orgName = sessionDetails?.orgName;@@ -151,7 +152,7 @@ function RecentActivity({ data, loading }) {<Text type="secondary" className="recent-activity-meta"><span>{item.total_tokens.toLocaleString()} tokens</span><Tooltip title="Total LLM tokens used to process this file">- <InfoCircleOutlined className="recent-activity-info" />+ <Info className="recent-activity-info" /></Tooltip></Text>)}@@ -186,9 +187,4 @@ RecentActivity.propTypes = {loading: PropTypes.bool,};-RecentActivity.defaultProps = {- data: null,- loading: false,-};-export { RecentActivity };diff --git a/frontend/src/components/navigations/side-nav-bar/SideNavBar.css b/frontend/src/components/navigations/side-nav-bar/SideNavBar.cssindex d45c10070..44d31b9d6 100644--- a/frontend/src/components/navigations/side-nav-bar/SideNavBar.css+++ b/frontend/src/components/navigations/side-nav-bar/SideNavBar.css@@ -1,5 +1,24 @@+/*+ * The sidebar is a LIGHT surface.+ *+ * It has been three colours: a hardcoded #0d3a63 navy, then `var(--primary)`+ * violet (which it shared with the top nav). The Figma design puts the nav on+ * the same white plane as the rest of the shell and keeps the brand violet for+ * the ACTIVE item only, so this is now `--sidebar` -- the token that exists for+ * exactly this surface and that follows light/dark on its own.+ *+ * Every rule below is therefore written for a light surface: `--sidebar-+ * foreground` text, `--sidebar-border` hairlines, and icons tinted through+ * `currentColor`. Putting the background back to a dark value without also+ * reverting those would leave dark-on-dark text.+ */.side-bar {- background-color: #0d3a63 !important;+ background-color: var(--sidebar);+ /*+ * The nav and the content area are both white now. Without this hairline the+ * boundary between them only exists where an active pill happens to sit.+ */+ border-inline-end: 1px solid var(--sidebar-border);overflow: hidden;height: 100%;}@@ -25,9 +44,18 @@display: none;}-/* Hide scrollbar when sidebar is collapsed */+/*+ * The collapsed rail scrolls too.+ *+ * This rule used to set `overflow-y: hidden`, and its comment said "hide+ * scrollbar" — but the scrollbar is already hidden by `scrollbar-width: none`+ * and the ::-webkit-scrollbar rule above. Setting `hidden` did not hide a+ * scrollbar, it disabled SCROLLING: the collapsed rail needs 929px for its+ * icons in a 668px viewport, so the bottom entries were unreachable on any+ * window shorter than ~1000px.+ */.side-bar.ant-layout-sider-collapsed .sidebar-content-wrapper {- overflow-y: hidden;+ overflow-y: auto;}/* Toggle container - fixed at bottom */@@ -38,7 +66,7 @@padding: 8px;height: auto;border: none;- border-top: 1px solid rgba(255, 255, 255, 0.1);+ border-top: 1px solid var(--sidebar-border);border-radius: 0;flex-shrink: 0;background: transparent;@@ -46,17 +74,28 @@}.sidebar-toggle-container.ant-btn:hover {- background: rgba(255, 255, 255, 0.1);+ background: var(--sidebar-accent);}.sidebar-toggle-icon {- color: rgba(255, 255, 255, 0.6);- font-size: 14px;+ color: var(--muted-foreground);+ font-size: 13px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 13px;+ height: 13px;transition: color 0.2s;}+/*+ * The pinned state just needs to read as "on" against the muted rest colour+ * above. It has been #1890ff (antd's default blue) and then #ffffff for the+ * violet bar; on a light surface the brand violet is both on-palette and the+ * same accent the active item uses, so the two agree.+ */.sidebar-toggle-icon.pinned {- color: #1890ff;+ color: var(--sidebar-primary);}.secondary-list-wrapper {@@ -74,23 +113,49 @@width: 100%;}+/*+ * The menu icons are single-colour SVGs with `fill="#90A4B7"` baked in -- a+ * slate picked for the old navy sidebar. They arrive as a per-item `src`, so+ * `color` cannot reach them; the file used to recolour them wholesale with+ * `filter: brightness(0) invert(1)` to force them white for the dark surface.+ *+ * That filter can reach black or white but not an arbitrary hue, and the+ * design needs the ACTIVE icon violet. So the SVG is used as a MASK over a+ * `currentColor` fill instead: the icon takes whatever colour its row already+ * has, which lets the active rule below tint label and icon in one+ * declaration. `--menu-item-icon` is set per item in SideNavBar.jsx.+ */.side-bar .menu-item-icon {- margin-top: 1;- height: auto;+ /*+ * Was `width: 25px; height: auto` on an <img>. A masked span has no+ * intrinsic size, so the height must be stated; `contain` keeps the 20px+ * artwork at 20px inside the 25px column the collapsed rail is spaced for.+ */+ /*+ * `display` is load-bearing: this replaced an <img>, where width/height+ * apply intrinsically. A <span> is inline by default, so both were ignored+ * and the icon collapsed to a 0x0 box (present, masked, and invisible).+ */+ display: inline-block;width: 25px;-}--.space-styles-active .menu-item-icon,-.space-styles:hover .menu-item-icon {- filter: brightness(0) invert(1);+ height: 20px;+ flex-shrink: 0;+ background-color: currentColor;+ mask: var(--menu-item-icon) no-repeat center / contain;+ -webkit-mask: var(--menu-item-icon) no-repeat center / contain;}.sidebar-footer-icons {- color: white;+ color: var(--sidebar-foreground);font-size: 20px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 20px;+ height: 20px;}.sidebar-footer-text {- color: white;+ color: var(--sidebar-foreground);padding-left: 10px;}@@ -99,34 +164,76 @@padding: 10px 8px;border-radius: 8px;width: 100%;+ /* Sets `currentColor` for the masked icon as well as the label. */+ color: var(--sidebar-foreground);}-.space-styles-active,+/*+ * Hover and active are washes of the brand colour rather than named tints:+ * `color-mix` tracks `--primary` in both light and dark, the same reasoning+ * that made the violet sidebar use rgba(255,255,255,.16) instead of naming a+ * second colour. Deliberately NOT `--sidebar-accent`, which is a neutral grey+ * and would drop the violet the design puts on the selected item.+ */.space-styles:hover {- background: #005b82;+ background: color-mix(in srgb, var(--primary) 8%, transparent);+}++/*+ * `--primary` itself (#6f5cef) measures 4.04:1 on this wash -- under AA for+ * the 13px label. `--violet-600` is the palette's own next step down, still+ * reads as the same accent, and clears it at 5.2:1.+ *+ * Dark mode needs the opposite direction, not the same value: there the wash+ * sits on a near-black sidebar, so a DARKER violet would be worse. Hence the+ * override rather than one theme-agnostic colour.+ */+.space-styles-active,+.space-styles-active:hover {+ background: color-mix(in srgb, var(--primary) 12%, transparent);+ color: var(--violet-600);+}++.dark .space-styles-active,+.dark .space-styles-active:hover {+ color: var(--violet-300);}.space-styles-disable {cursor: not-allowed;}+/* Section labels (BUILD / MANAGE / REVIEW) are secondary to the items. */.sidebar-main-heading {- color: white;+ color: var(--muted-foreground);font-weight: 600;font-size: 15px;}+/*+ * Was rgba(255,255,255,.85) for the violet surface. antd's Typography sets its+ * own colour, so this is stated rather than inherited from `.space-styles`;+ * the active override below then has to be stated too.+ */.sidebar-item-text {- color: #b4c2cf;+ color: var(--sidebar-foreground);text-align: left;}+/* `currentColor` so the label follows the row's per-theme active colour+ * above instead of restating it twice. */.space-styles-active .sidebar-item-text {- color: white;+ color: currentColor;}-.space-styles:hover .sidebar-item-text {- color: white;+/*+ * The 0.8 wash reads fine for the description on the plain surface (9.2:1),+ * but on the active row's violet it falls to 2.97:1. 11px is normal text for+ * WCAG, so it gets no large-text exemption -- the active row states it at+ * full strength.+ */+.space-styles-active .fs-11 {+ opacity: 1;}.slider-wrap {@@ -141,8 +248,9 @@width: 240px;}+/* Name kept (used by SideNavBar.jsx); the value follows the 13px body size. */.fs-14 {- font-size: 14px;+ font-size: 13px;}.fs-11 {@@ -157,24 +265,22 @@}.sidebar-divider {- background-color: rgba(255, 255, 255, 0.3);+ background-color: var(--sidebar-border);+ border-color: var(--sidebar-border);margin: 10px 0;}+/* A lucide SVG (stroke: currentColor), so it follows the row like the masked+ * icons do -- no separate active/hover rules needed. */.sidebar-antd-icon {font-size: 22px;- color: #b4c2cf;+ color: inherit;width: 25px;display: flex;align-items: center;justify-content: center;}-.space-styles-active .sidebar-antd-icon,-.space-styles:hover .sidebar-antd-icon {- color: white;-}-.sidebar-menu-tag {margin-left: 6px;font-size: 10px;diff --git a/frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx b/frontend/src/components/navigations/side-nav-bar/SideNavBar.jsxindex 799ce3c61..cfa789c94 100644--- a/frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx+++ b/frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx@@ -1,22 +1,13 @@-import {- BranchesOutlined,- DoubleRightOutlined,- FileProtectOutlined,-} from "@ant-design/icons";-import {- Button,- Divider,- Image,- Layout,- Popover,- Space,- Tag,- Tooltip,- Typography,-} from "antd";+import { ChevronsRight, FileCheck, GitBranch } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useMemo, useRef, useState } from "react";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Space } from "@/components/ui/shims/antd-layout";+import { Divider, Tag } from "@/components/ui/shims/antd-leaves";+import { Popover, Tooltip } from "@/components/ui/shims/antd-overlays";+import { Layout } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import apiDeploy from "../../../assets/api-deployments.svg";import ConnectorsIcon from "../../../assets/connectors.svg";import CustomTools from "../../../assets/custom-tools-icon.svg";@@ -176,7 +167,9 @@ const getActiveSettingsKey = () => {if (currentPath.includes("/settings/review")) {return "review";}- return "platform";+ // See getActiveHITLKey: no key rather than defaulting to the first entry,+ // which otherwise looks selected from everywhere in the app.+ return null;};const SettingsPopoverContent = ({ orgName, navigate, isAdmin }) => {@@ -188,11 +181,12 @@ const SettingsPopoverContent = ({ orgName, navigate, isAdmin }) => {};return (- <nav className="settings-sidebar-popover">+ <nav className="settings-sidebar-popover" data-testid="platform-menu">{settingsMenuItems.map((menuItem) => (<buttonkey={menuItem.key}type="button"+ data-testid={`platform-menu-item-${menuItem.key}`}className={`settings-menu-item ${currentActiveKey === menuItem.key ? "active" : ""}`}@@ -253,7 +247,10 @@ const getActiveHITLKey = (orgName) => {if (currentPath.startsWith(base)) {return "review";}- return "review";+ // No key when the current route is not under HITL at all. Falling back to+ // "review" painted the first entry as selected from every other page in the+ // app, which reads as "you are here" when you are not.+ return null;};const HITLPopoverContent = ({ orgName, role, navigate }) => {@@ -261,11 +258,12 @@ const HITLPopoverContent = ({ orgName, role, navigate }) => {const currentActiveKey = getActiveHITLKey(orgName);return (- <nav className="settings-sidebar-popover">+ <nav className="settings-sidebar-popover" data-testid="hitl-menu">{hitlMenuItems.map((menuItem) => (<buttonkey={menuItem.key}type="button"+ data-testid={`hitl-menu-item-${menuItem.key}`}className={`settings-menu-item ${currentActiveKey === menuItem.key ? "active" : ""}`}@@ -370,7 +368,7 @@ const SideNavBar = ({ collapsed, setCollapsed }) => {id: 1.3,title: "Workflows",description: "Build no-code data workflows for unstructured data",- icon: BranchesOutlined,+ icon: GitBranch,image: Workflows,path: `/${orgName}/workflows`,active: globalThis.location.pathname.startsWith(@@ -425,7 +423,7 @@ const SideNavBar = ({ collapsed, setCollapsed }) => {id: 3.1,title: "LLMs",description: "Setup platform wide access to Large Language Models",- icon: BranchesOutlined,+ icon: GitBranch,image: LlmIcon,path: `/${orgName}/settings/llms`,active: globalThis.location.pathname.startsWith(@@ -639,7 +637,7 @@ const SideNavBar = ({ collapsed, setCollapsed }) => {?.toLowerCase()?.replaceAll(/\s+/g, "-")}`}>- <FileProtectOutlined className="sidebar-antd-icon" />+ <FileCheck className="sidebar-antd-icon" />{!collapsed && (<div><Typography className="sidebar-item-text fs-14">@@ -697,11 +695,13 @@ const SideNavBar = ({ collapsed, setCollapsed }) => {?.toLowerCase()?.replaceAll(/\s+/g, "-")}`}>- <Image- src={el.image}- alt="side_icon"+ <spanclassName="menu-item-icon"- preview={false}+ style={{+ "--menu-item-icon": `url("${el.image}")`,+ }}+ role="img"+ aria-label="side_icon"/>{!collapsed && (<div>@@ -757,11 +757,13 @@ const SideNavBar = ({ collapsed, setCollapsed }) => {?.toLowerCase()?.replaceAll(/\s+/g, "-")}`}>- <Image- src={el.image}- alt="side_icon"+ <spanclassName="menu-item-icon"- preview={false}+ style={{+ "--menu-item-icon": `url("${el.image}")`,+ }}+ role="img"+ aria-label="side_icon"/>{!collapsed && (<div>@@ -802,7 +804,7 @@ const SideNavBar = ({ collapsed, setCollapsed }) => {aria-pressed={isPinned}aria-label={isPinned ? "Unpin sidebar" : "Pin sidebar"}icon={- <DoubleRightOutlined+ <ChevronsRightclassName={`sidebar-toggle-icon${isPinned ? " pinned" : ""}`}/>}diff --git a/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.css b/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.cssindex d808e438b..1d2682351 100644--- a/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.css+++ b/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.css@@ -6,9 +6,9 @@justify-content: space-between;gap: 12px;padding: 8px 12px 8px 20px;- background-color: var(--page-bg-1, #f5f7f9);+ background-color: var(--card);box-shadow: 0 1px 3px 0 rgba(24, 50, 71, 0.08);- border-bottom: 1px solid var(--border-color-1, #dce4e4);+ border-bottom: 1px solid var(--border);}.tool-nav-bar__left {@@ -62,7 +62,7 @@}.tool-nav-bar__title {- font-size: var(--font-size-16, 16px);+ font-size: 1rem;}.tool-nav-bar .tool-nav-bar__subtitle {@@ -82,5 +82,5 @@}.tool-nav-bar__edit-icon.ant-btn:hover {- color: var(--ant-color-primary, #1677ff);+ color: var(--ant-color-primary, var(--primary));}diff --git a/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.jsx b/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.jsxindex 1a979eb6c..cb138897f 100644--- a/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.jsx+++ b/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.jsx@@ -1,9 +1,12 @@-import { ArrowLeftOutlined, EditOutlined } from "@ant-design/icons";-import { Button, Segmented, Typography } from "antd";-import Search from "antd/es/input/Search";import { debounce } from "lodash";+import { ArrowLeft, Pencil } from "lucide-react";import PropTypes from "prop-types";+import { useEffect, useMemo, useRef } from "react";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Segmented } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "./ToolNavBar.css";@@ -26,9 +29,27 @@ function ToolNavBar({searchPlaceholder = "Search by name",}) {const navigate = useNavigate();- const onSearchDebounce = debounce(({ target: { value } }) => {- onSearch(value, setSearchList);- }, 600);++ /*+ * Built inline, `debounce(...)` was a fresh instance on every render, so each+ * keystroke started a new 600ms timer on a new closure and nothing was ever+ * coalesced — the search ran per keypress. Memoised with no deps it is+ * created once; the ref is what keeps that single instance calling the+ * CURRENT onSearch/setSearchList props rather than the ones from mount.+ */+ const searchRef = useRef({ onSearch, setSearchList });+ useEffect(() => {+ searchRef.current = { onSearch, setSearchList };+ });+ const onSearchDebounce = useMemo(+ () =>+ debounce((value) => {+ searchRef.current.onSearch?.(value, searchRef.current.setSearchList);+ }, 600),+ [],+ );+ // A pending timer firing after unmount would setState on a dead component.+ useEffect(() => () => onSearchDebounce.cancel(), [onSearchDebounce]);const handleBack = () => {if (onNavigateBack) {@@ -45,7 +66,8 @@ function ToolNavBar({<Buttontype="text"shape="circle"- icon={<ArrowLeftOutlined />}+ icon={<ArrowLeft />}+ data-testid="tool-nav-bar-back-btn"onClick={handleBack}/>)}@@ -61,7 +83,7 @@ function ToolNavBar({<Buttontype="text"size="small"- icon={<EditOutlined />}+ icon={<Pencil />}className="tool-nav-bar__edit-icon"onClick={onEditTitle}aria-label="Edit title"@@ -85,17 +107,19 @@ function ToolNavBar({options={segmentOptions}value={segmentValue}onChange={segmentFilter}+ data-testid="tool-nav-bar-segment"className="tool-nav-bar__segment"/>)}</div><div className="tool-nav-bar__right">{enableSearch && (- <Search+ <Input.Searchkey={searchKey}className="tool-nav-bar__search"placeholder={searchPlaceholder}- onChange={onSearchDebounce}+ data-testid="tool-nav-bar-search"+ onChange={(event) => onSearchDebounce(event.target.value)}allowClear/>)}diff --git a/frontend/src/components/navigations/top-nav-bar/TopNavBar.css b/frontend/src/components/navigations/top-nav-bar/TopNavBar.cssindex a50738d1e..dd0ab75d8 100644--- a/frontend/src/components/navigations/top-nav-bar/TopNavBar.css+++ b/frontend/src/components/navigations/top-nav-bar/TopNavBar.css@@ -6,7 +6,10 @@display: flex;align-items: center;justify-content: center;- background-color: #184772;+ /* Was #184772 -- a navy chip left over from the navy top bar, and already+ * an orphan colour once that bar went violet. On the light bar it needs to+ * be the one that carries white initials, so it tracks the brand token. */+ background-color: var(--primary);border-radius: 5px;cursor: pointer;}@@ -81,13 +84,14 @@background-color: rgba(0, 0, 0, 0.04);}+/* White read against the old violet bar; the bar is now `--card`. */.page-identifier {vertical-align: super;- color: white;+ color: var(--foreground);}.page-heading {- color: white;+ color: var(--foreground);font-size: 16px;font-weight: 600;margin-left: 10px;diff --git a/frontend/src/components/navigations/top-nav-bar/TopNavBar.jsx b/frontend/src/components/navigations/top-nav-bar/TopNavBar.jsxindex e8f82e72c..f01cfa4a5 100644--- a/frontend/src/components/navigations/top-nav-bar/TopNavBar.jsx+++ b/frontend/src/components/navigations/top-nav-bar/TopNavBar.jsx@@ -1,30 +1,20 @@-import {- LoginOutlined,- LogoutOutlined,- SettingOutlined,- UserOutlined,- UserSwitchOutlined,-} from "@ant-design/icons";-import {- Alert,- Button,- Col,- Dropdown,- Image,- Row,- Space,- Typography,-} from "antd";import axios from "axios";+import { LogIn, LogOut, Settings, User, UserRoundCog } from "lucide-react";import PropTypes from "prop-types";import { useCallback, useEffect, useMemo, useState } from "react";import { useLocation, useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Col, Row, Space } from "@/components/ui/shims/antd-layout";+import { Alert, Image } from "@/components/ui/shims/antd-leaves";+import { Dropdown } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";-import { UnstractLogo } from "../../../assets/index.js";+import { UnstractBlackLogo, UnstractLogo } from "../../../assets/index.js";import {getBaseUrl,homePagePath,onboardCompleted,+ THEME,} from "../../../helpers/GetStaticData.js";import useLogout from "../../../hooks/useLogout.js";import "../../../layouts/page-layout/PageLayout.css";@@ -67,14 +57,22 @@ try {}let WhispererLogo;+let WhispererDarkLogo;try {const mod = await import("../../../plugins/assets/llmWhisperer/index.js");WhispererLogo = mod.WhispererLogo;+ WhispererDarkLogo = mod.LlmWhispererLogo;} catch {// Ignore if hook not available}-const CustomLogo = ({ onClick, className }) => {+/*+ * `Logo` is injected rather than hardcoded: the top bar is a light surface in+ * light mode and a dark one under `.dark`, and each product ships two marks+ * (white ink / dark ink) instead of one recolourable SVG -- the brand accent+ * dots are baked in, so a blanket `fill` override would flatten them.+ */+const CustomLogo = ({ onClick, className, Logo }) => {// Use Ant Design Image and config.logoUrlif (config.logoUrl) {return (@@ -100,12 +98,17 @@ const CustomLogo = ({ onClick, className }) => {/>);}- return <UnstractLogo className={className} onClick={onClick} />;+ return <Logo className={className} onClick={onClick} />;};+// `APIHubLogo`/`WhispererLogo` are the WHITE-ink marks (named for the dark bar+// they were drawn for); `APIHubDarkLogo`/`LlmWhispererLogo` are the dark-ink+// ones. Both are pulled so the bar can pick by theme.let APIHubLogo;+let APIHubDarkLogo;try {const mod = await import("../../../plugins/assets/verticals/index.js");APIHubLogo = mod.APIHubLogo;+ APIHubDarkLogo = mod.APIHubDarkLogo;} catch {// Ignore if hook not available}@@ -178,6 +181,15 @@ function TopNavBar({ isSimpleLayout, topNavBarOptions }) {const isStaff = sessionDetails?.isStaff || sessionDetails?.is_staff;const isOpenSource = orgName === "mock_org";+ // `.topNav` is `--card`: white in light mode, near-black under `.dark`.+ // `sessionDetails.currentTheme` is the app's single source of truth for the+ // theme (App.jsx only mirrors it onto next-themes), so the mark follows it.+ // In OSS the two plugin logos are undefined either way; the render guards.+ const isDarkTheme = sessionDetails?.currentTheme === THEME.DARK;+ const ProductLogo = isDarkTheme ? UnstractLogo : UnstractBlackLogo;+ const APIHubBarLogo = isDarkTheme ? APIHubLogo : APIHubDarkLogo;+ const WhispererBarLogo = isDarkTheme ? WhispererLogo : WhispererDarkLogo;+// Check user role and whether the onboarding is incompleteuseEffect(() => {const { role } = sessionDetails;@@ -266,7 +278,7 @@ function TopNavBar({ isSimpleLayout, topNavBarOptions }) {};const handleClick = isLoggedIn ? logout : handleLogin;- const icon = isLoggedIn ? <LogoutOutlined /> : <LoginOutlined />;+ const icon = isLoggedIn ? <LogOut /> : <LogIn />;const label = isLoggedIn ? "Logout" : "Login";return [@@ -281,7 +293,7 @@ function TopNavBar({ isSimpleLayout, topNavBarOptions }) {disabled={shouldDisableRouting}type="text">- <UserOutlined /> Profile+ <User /> Profile</Button>),},@@ -300,7 +312,7 @@ function TopNavBar({ isSimpleLayout, topNavBarOptions }) {placement="left"><div className="ant-dropdown-trigger">- <UserSwitchOutlined /> Switch Org+ <UserRoundCog /> Switch Org</div></Dropdown>),@@ -324,7 +336,7 @@ function TopNavBar({ isSimpleLayout, topNavBarOptions }) {className="logout-button"type="text">- <SettingOutlined /> Custom Plans+ <Settings /> Custom Plans</Button>),},@@ -368,14 +380,15 @@ function TopNavBar({ isSimpleLayout, topNavBarOptions }) {{isUnstract ? (<CustomLogoclassName="topbar-logo cursor-pointer"+ Logo={ProductLogo}onClick={() =>navigate(`/${sessionDetails?.orgName}/${homePagePath}`)}/>) : isAPIHub ? (- APIHubLogo && <APIHubLogo className="topbar-logo" />+ APIHubBarLogo && <APIHubBarLogo className="topbar-logo" />) : (- WhispererLogo && <WhispererLogo className="topbar-logo" />+ WhispererBarLogo && <WhispererBarLogo className="topbar-logo" />)}{reviewPageHeader && (<span className="page-identifier">@@ -451,6 +464,7 @@ TopNavBar.propTypes = {CustomLogo.propTypes = {onClick: PropTypes.func.isRequired,className: PropTypes.string.isRequired,+ Logo: PropTypes.elementType.isRequired,};export { TopNavBar };diff --git a/frontend/src/components/notification/NotificationClearAll.jsx b/frontend/src/components/notification/NotificationClearAll.jsxnew file mode 100644index 000000000..adbeeedc5--- /dev/null+++ b/frontend/src/components/notification/NotificationClearAll.jsx@@ -0,0 +1,41 @@+import { X } from "lucide-react";+import { useSonner } from "sonner";+import { Button } from "@/components/ui/button";+import { dismissAppToast } from "@/hooks/useAppToast";++/**+ * "Clear all" affordance for the toast stack.+ *+ * Error alerts are sticky (`duration: 0`, see `useExceptionHandler`) so the+ * user can read and copy the Request ID. That is deliberate, but it means a+ * repeated failure leaves a pile of toasts that each need their own close+ * button. This clears the pile in one click.+ *+ * Sits in the band that `<Toaster offset>` reserves above the stack in+ * App.jsx — the two values are a pair, so changing one means changing the+ * other. Rendered only when there is more than one toast, since a single+ * toast's own close button is already a one-click dismiss.+ */+function NotificationClearAll() {+ const { toasts } = useSonner();++ if (toasts.length < 2) {+ return null;+ }++ return (+ <div className="notification-clear-all">+ <Button+ variant="secondary"+ size="xs"+ onClick={() => dismissAppToast()}+ aria-label={`Clear all ${toasts.length} notifications`}+ >+ <X />+ Clear all ({toasts.length})+ </Button>+ </div>+ );+}++export { NotificationClearAll };diff --git a/frontend/src/components/notification/NotificationIdLine.jsx b/frontend/src/components/notification/NotificationIdLine.jsxindex 7e7739ddf..bf4c5eddd 100644--- a/frontend/src/components/notification/NotificationIdLine.jsx+++ b/frontend/src/components/notification/NotificationIdLine.jsx@@ -1,5 +1,5 @@-import { Typography } from "antd";import PropTypes from "prop-types";+import { Typography } from "@/components/ui/shims/antd-typography";function NotificationIdLine({ label, value, stacked = false }) {if (!value) {diff --git a/frontend/src/components/notification/toast-through-modal.test.jsx b/frontend/src/components/notification/toast-through-modal.test.jsxnew file mode 100644index 000000000..1304ef7a6--- /dev/null+++ b/frontend/src/components/notification/toast-through-modal.test.jsx@@ -0,0 +1,122 @@+import fs from "node:fs";+import path from "node:path";+import {+ act,+ fireEvent,+ render,+ screen,+ waitFor,+} from "@testing-library/react";+import { DismissableLayer } from "radix-ui/internal";+import { toast } from "sonner";+import { afterEach, describe, expect, it, vi } from "vitest";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Toaster } from "@/components/ui/sonner";++/**+ * A toast raised BY an open modal has to stay usable THROUGH it.+ *+ * Reported against the Workflows page: "New Workflow" with a duplicate name+ * toasts the backend error and the toast's close button then does nothing.+ * Two independent mechanisms conspire, so both halves are pinned here:+ *+ * 1. Radix sets `pointer-events: none` on <body> for a modal Dialog. Sonner's+ * viewport is an ordinary body-level element, so it inherits that and the+ * toasts stop taking clicks at all. Fixed by `[data-sonner-toaster]` in+ * index.css — asserted statically, since vitest runs with `css: false`.+ * 2. Once the clicks land, Radix reads them as an interaction OUTSIDE the+ * dialog and dismisses it — closing the form the user was mid-way through+ * correcting. Fixed by the DismissableLayer.Branch wrap in App.jsx.+ */++function Harness({ onCancel }) {+ return (+ <>+ <button type="button" data-testid="outside">+ elsewhere on the page+ </button>+ <Modal open title="New Workflow" onCancel={onCancel} footer={null}>+ <p>workflow form</p>+ </Modal>+ <DismissableLayer.Branch>+ <Toaster position="top-right" offset={56} closeButton richColors />+ </DismissableLayer.Branch>+ </>+ );+}++async function openModalWithToast(onCancel) {+ render(<Harness onCancel={onCancel} />);+ await screen.findByText("workflow form");+ act(() => {+ toast.error("workflow_name: A workflow with this name already exists.");+ });+ await screen.findByText(+ "workflow_name: A workflow with this name already exists.",+ );+ // Radix arms its outside-pointerdown listener in a queued task; without+ // waiting for it the "outside" control below passes vacuously.+ await waitFor(() => {+ expect(document.body.style.pointerEvents).toBe("none");+ });+ await act(async () => {+ await new Promise((resolve) => setTimeout(resolve, 0));+ });+}++describe("toast stack raised by an open modal", () => {+ afterEach(() => {+ act(() => {+ toast.dismiss();+ });+ document.body.style.pointerEvents = "";+ });++ it("keeps the dialog open when its own toast is dismissed", async () => {+ const onCancel = vi.fn();+ await openModalWithToast(onCancel);++ const closeToast = screen.getByLabelText("Close toast");+ fireEvent.pointerDown(closeToast, { button: 0 });+ fireEvent.click(closeToast);++ expect(onCancel).not.toHaveBeenCalled();+ expect(screen.getByText("workflow form")).toBeInTheDocument();+ await waitFor(() => {+ expect(+ screen.queryByText(+ "workflow_name: A workflow with this name already exists.",+ ),+ ).not.toBeInTheDocument();+ });+ });++ it("still closes on a genuine click outside the dialog", async () => {+ const onCancel = vi.fn();+ await openModalWithToast(onCancel);++ // Dialog runs with `deferPointerDownOutside`, so it is the CLICK that+ // dismisses, not the pointerdown — fire the pair the toast case fires.+ const outside = screen.getByTestId("outside");+ fireEvent.pointerDown(outside, { button: 0 });+ fireEvent.click(outside);++ await waitFor(() => {+ expect(onCancel).toHaveBeenCalled();+ });+ });++ it("re-enables pointer events on sonner's viewport", () => {+ const css = fs.readFileSync(+ path.resolve(import.meta.dirname, "../../index.css"),+ "utf-8",+ );+ const rule = css.match(/\[data-sonner-toaster\]\s*\{([^}]*)\}/);++ expect(+ rule,+ "index.css must re-enable pointer events on the toaster",+ ).not.toBeNull();+ expect(rule[1]).toMatch(/pointer-events:\s*auto/);+ });+});diff --git a/frontend/src/components/oauth-ds/google/GoogleOAuthButton.jsx b/frontend/src/components/oauth-ds/google/GoogleOAuthButton.jsxindex ec5122e37..7983d9956 100644--- a/frontend/src/components/oauth-ds/google/GoogleOAuthButton.jsx+++ b/frontend/src/components/oauth-ds/google/GoogleOAuthButton.jsx@@ -1,7 +1,7 @@-import { Typography } from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";import { GoogleLoginButton } from "react-social-login-buttons";+import { Typography } from "@/components/ui/shims/antd-typography";import "./GoogleOAuthButton.css";diff --git a/frontend/src/components/oauth-ds/microsoft/MicrosoftOAuthButton.jsx b/frontend/src/components/oauth-ds/microsoft/MicrosoftOAuthButton.jsxindex 1f332b37c..0444cfb3c 100644--- a/frontend/src/components/oauth-ds/microsoft/MicrosoftOAuthButton.jsx+++ b/frontend/src/components/oauth-ds/microsoft/MicrosoftOAuthButton.jsx@@ -1,7 +1,7 @@-import { Typography } from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";import { MicrosoftLoginButton } from "react-social-login-buttons";+import { Typography } from "@/components/ui/shims/antd-typography";import "./MicrosoftOAuthButton.css";diff --git a/frontend/src/components/oauth-ds/oauth-ds/OAuthDs.jsx b/frontend/src/components/oauth-ds/oauth-ds/OAuthDs.jsxindex a52ee6847..cc40c50bb 100644--- a/frontend/src/components/oauth-ds/oauth-ds/OAuthDs.jsx+++ b/frontend/src/components/oauth-ds/oauth-ds/OAuthDs.jsx@@ -1,6 +1,6 @@-import { Typography } from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Typography } from "@/components/ui/shims/antd-typography";import { getBaseUrl, O_AUTH_PROVIDERS } from "../../../helpers/GetStaticData";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate.js";diff --git a/frontend/src/components/oauth-ds/oauth-status/OAuthStatus.jsx b/frontend/src/components/oauth-ds/oauth-status/OAuthStatus.jsxindex 6edb9e729..7d1c44dcd 100644--- a/frontend/src/components/oauth-ds/oauth-status/OAuthStatus.jsx+++ b/frontend/src/components/oauth-ds/oauth-status/OAuthStatus.jsx@@ -1,5 +1,5 @@-import { Typography } from "antd";import { useLocation } from "react-router-dom";+import { Typography } from "@/components/ui/shims/antd-typography";import "./OAuthStatus.css";diff --git a/frontend/src/components/onboard/OnBoard.jsx b/frontend/src/components/onboard/OnBoard.jsxindex 8b138d3f1..5f89757db 100644--- a/frontend/src/components/onboard/OnBoard.jsx+++ b/frontend/src/components/onboard/OnBoard.jsx@@ -1,7 +1,10 @@-import { CheckCircleFilled } from "@ant-design/icons";-import { Button, Card, Col, Layout, Row, Space, Typography } from "antd";+import { CircleCheck } from "lucide-react";import { useEffect, useState } from "react";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Col, Row, Space } from "@/components/ui/shims/antd-layout";+import { Card, Layout } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import ConnectEmbedding from "../../assets/connect_embedding.svg";import ConnectLLM from "../../assets/connect_llm.svg";import ConnectVectorDb from "../../assets/connect_vector_db.svg";@@ -12,6 +15,7 @@ import { useSessionStore } from "../../store/session-store.js";import { AddSourceModal } from "../input-output/add-source-modal/AddSourceModal.jsx";import { CustomButton } from "../widgets/custom-button/CustomButton.jsx";import "./onBoard.css";+const { Content } = Layout;function OnBoard() {@@ -111,7 +115,7 @@ function OnBoard() {<Col span={4} align="center" justify="center">{adaptersList?.includes(step.type) ? (<div>- <CheckCircleFilled className="configured-icon" />+ <CircleCheck className="configured-icon" /><span className="configured-text">Configured</span></div>) : (diff --git a/frontend/src/components/onboard/onBoard.css b/frontend/src/components/onboard/onBoard.cssindex 6bc5801a9..57cd3b565 100644--- a/frontend/src/components/onboard/onBoard.css+++ b/frontend/src/components/onboard/onBoard.css@@ -117,8 +117,13 @@}.configured-icon {- color: #52c41a;+ color: var(--success);font-size: 24px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 24px;+ height: 24px;vertical-align: middle;}diff --git a/frontend/src/components/pipelines-or-deployments/delete-modal/DeleteModal.jsx b/frontend/src/components/pipelines-or-deployments/delete-modal/DeleteModal.jsxindex d852bfaf6..545ae68e9 100644--- a/frontend/src/components/pipelines-or-deployments/delete-modal/DeleteModal.jsx+++ b/frontend/src/components/pipelines-or-deployments/delete-modal/DeleteModal.jsx@@ -1,5 +1,5 @@-import { Modal } from "antd";import PropTypes from "prop-types";+import { Modal } from "@/components/ui/shims/antd-overlays";const DeleteModal = ({ open, setOpen, deleteRecord }) => {return (diff --git a/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsx b/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsxindex a6330bdb2..7bfbd6517 100644--- a/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsx+++ b/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsx@@ -1,8 +1,13 @@-import { ClockCircleOutlined, ScheduleOutlined } from "@ant-design/icons";-import { Button, Form, Input, Modal, Select, Space, Typography } from "antd";import cronstrue from "cronstrue";+import { CalendarClock, Clock } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Form } from "@/components/ui/shims/antd-form";+import { Input, Select } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate.js";import { useAlertStore } from "../../../store/alert-store";@@ -329,7 +334,7 @@ const EtlTaskDeploy = ({}help={getBackendErrorDetail("workflow", backendErrors)}>- <Select>+ <Select showSearch>{workflowList.map((workflow) => {return (<Option value={workflow.id} key={workflow.workflow_name}>@@ -357,14 +362,14 @@ const EtlTaskDeploy = ({<Buttontype="primary"onClick={showCronGenerator}- icon={<ScheduleOutlined />}+ icon={<CalendarClock />}className="cron-string-btn"/></div></Form.Item><Space><div className="cron-summary-div">- <ClockCircleOutlined />+ <Clock /></div><div><Typography.Text className="summary-text">diff --git a/frontend/src/components/pipelines-or-deployments/file-history-modal/FileHistoryModal.css b/frontend/src/components/pipelines-or-deployments/file-history-modal/FileHistoryModal.cssindex 814c87901..869f66195 100644--- a/frontend/src/components/pipelines-or-deployments/file-history-modal/FileHistoryModal.css+++ b/frontend/src/components/pipelines-or-deployments/file-history-modal/FileHistoryModal.css@@ -118,5 +118,5 @@}.warning-icon {- color: #faad14;+ color: var(--warning);}diff --git a/frontend/src/components/pipelines-or-deployments/file-history-modal/FileHistoryModal.jsx b/frontend/src/components/pipelines-or-deployments/file-history-modal/FileHistoryModal.jsxindex 6dfbde0d2..4c076cdfe 100644--- a/frontend/src/components/pipelines-or-deployments/file-history-modal/FileHistoryModal.jsx+++ b/frontend/src/components/pipelines-or-deployments/file-history-modal/FileHistoryModal.jsx@@ -1,37 +1,31 @@import {- ClearOutlined,- CopyOutlined,- DeleteOutlined,- ExclamationCircleFilled,- FilterOutlined,- ReloadOutlined,-} from "@ant-design/icons";+ CircleAlert,+ Copy,+ Eraser,+ Filter,+ RotateCw,+ Trash2,+} from "lucide-react";+import PropTypes from "prop-types";+import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Input, InputNumber, Select } from "@/components/ui/shims/antd-inputs";+import { Col, Row, Space } from "@/components/ui/shims/antd-layout";+import { Tag } from "@/components/ui/shims/antd-leaves";import {- Button,- Col,- Input,- InputNumber,Modal,- message,Popconfirm,- Row,- Select,- Space,- Table,- Tag,Tooltip,- Typography,-} from "antd";-import PropTypes from "prop-types";-import { useEffect, useState } from "react";+} from "@/components/ui/shims/antd-overlays";+import { Table } from "@/components/ui/shims/antd-structure";+import { Text, Typography } from "@/components/ui/shims/antd-typography";+import { message } from "@/hooks/useAppToast";import { copyToClipboard } from "../../../helpers/GetStaticData";import { useExceptionHandler } from "../../../hooks/useExceptionHandler.jsx";import { useAlertStore } from "../../../store/alert-store.js";import { workflowService } from "../../workflows/workflow/workflow-service.js";import "./FileHistoryModal.css";-const { Text } = Typography;-const MAX_BULK_DELETE = 100;const FileHistoryModal = ({ open, setOpen, workflowId, workflowName }) => {@@ -385,7 +379,7 @@ const FileHistoryModal = ({ open, setOpen, workflowId, workflowName }) => {<Buttontype="text"size="small"- icon={<CopyOutlined />}+ icon={<Copy />}onClick={(e) => {e.stopPropagation();handleCopy(text, "File path");@@ -467,7 +461,7 @@ const FileHistoryModal = ({ open, setOpen, workflowId, workflowName }) => {<Buttontype="text"size="small"- icon={<CopyOutlined />}+ icon={<Copy />}onClick={(e) => {e.stopPropagation();handleCopy(error, "Error message");@@ -491,7 +485,7 @@ const FileHistoryModal = ({ open, setOpen, workflowId, workflowName }) => {okText="Yes"cancelText="No">- <Button type="link" danger icon={<DeleteOutlined />} size="small">+ <Button type="link" danger icon={<Trash2 />} size="small">Delete</Button></Popconfirm>@@ -575,14 +569,14 @@ const FileHistoryModal = ({ open, setOpen, workflowId, workflowName }) => {<Space size="small" className="full-width"><Buttontype="primary"- icon={<FilterOutlined />}+ icon={<Filter />}onClick={handleApplyFilters}className="flex-button">{hasUnappliedChanges ? "Apply *" : "Apply"}</Button><Button- icon={<ReloadOutlined />}+ icon={<RotateCw />}onClick={handleResetFilters}className="flex-button">@@ -606,7 +600,7 @@ const FileHistoryModal = ({ open, setOpen, workflowId, workflowName }) => {><Buttondanger- icon={<DeleteOutlined />}+ icon={<Trash2 />}disabled={selectedRowKeys.length === 0}>Delete Selected ({selectedRowKeys.length})@@ -614,7 +608,7 @@ const FileHistoryModal = ({ open, setOpen, workflowId, workflowName }) => {</Popconfirm><Button- icon={<ClearOutlined />}+ icon={<Eraser />}onClick={handlePrepareBulkClear}loading={fetchingCount}disabled={!hasAppliedFilters || pagination.total === 0}@@ -626,7 +620,7 @@ const FileHistoryModal = ({ open, setOpen, workflowId, workflowName }) => {<Modaltitle={<Space>- <ExclamationCircleFilled className="warning-icon" />+ <CircleAlert className="warning-icon" /><span>Clear with filters</span></Space>}@@ -654,7 +648,7 @@ const FileHistoryModal = ({ open, setOpen, workflowId, workflowName }) => {</Modal><Button- icon={<ReloadOutlined />}+ icon={<RotateCw />}onClick={() =>fetchFileHistories(pagination.current, pagination.pageSize)}diff --git a/frontend/src/components/pipelines-or-deployments/log-modal/LogsModal.jsx b/frontend/src/components/pipelines-or-deployments/log-modal/LogsModal.jsxindex 9ab7e69f3..e010a6321 100644--- a/frontend/src/components/pipelines-or-deployments/log-modal/LogsModal.jsx+++ b/frontend/src/components/pipelines-or-deployments/log-modal/LogsModal.jsx@@ -1,6 +1,8 @@-import { Button, Modal, Table } from "antd";import PropTypes from "prop-types";import { useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Modal } from "@/components/ui/shims/antd-overlays";+import { Table } from "@/components/ui/shims/antd-structure";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate.js";import { useExceptionHandler } from "../../../hooks/useExceptionHandler.jsx";import { useAlertStore } from "../../../store/alert-store.js";diff --git a/frontend/src/components/pipelines-or-deployments/notification-modal/CreateNotification.jsx b/frontend/src/components/pipelines-or-deployments/notification-modal/CreateNotification.jsxindex 21d274687..5ed4382b1 100644--- a/frontend/src/components/pipelines-or-deployments/notification-modal/CreateNotification.jsx+++ b/frontend/src/components/pipelines-or-deployments/notification-modal/CreateNotification.jsx@@ -1,6 +1,9 @@-import { Button, Checkbox, Form, Input, Select, Space } from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Form } from "@/components/ui/shims/antd-form";+import { Checkbox, Input, Select } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";import { getBackendErrorDetail } from "../../../helpers/GetStaticData";const DEFAULT_FORM_DETAILS = {diff --git a/frontend/src/components/pipelines-or-deployments/notification-modal/DisplayNotifications.jsx b/frontend/src/components/pipelines-or-deployments/notification-modal/DisplayNotifications.jsxindex d504f5563..cbc3bfd56 100644--- a/frontend/src/components/pipelines-or-deployments/notification-modal/DisplayNotifications.jsx+++ b/frontend/src/components/pipelines-or-deployments/notification-modal/DisplayNotifications.jsx@@ -1,6 +1,10 @@-import { DeleteOutlined, EditOutlined, PlusOutlined } from "@ant-design/icons";-import { Button, Space, Switch, Table, Tooltip } from "antd";+import { Pencil, Plus, Trash2 } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";+import { Switch } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Table } from "@/components/ui/shims/antd-structure";import { ConfirmModal } from "../../widgets/confirm-modal/ConfirmModal";import SpaceWrapper from "../../widgets/space-wrapper/SpaceWrapper";import { SpinnerLoader } from "../../widgets/spinner-loader/SpinnerLoader";@@ -47,7 +51,7 @@ function DisplayNotifications({<Buttontype="text"size="small"- icon={<EditOutlined />}+ icon={<Pencil />}onClick={() => handleEdit(record)}/></Tooltip>@@ -56,7 +60,7 @@ function DisplayNotifications({handleConfirm={() => handleDelete(record?.id, record?.name)}content="Are you sure you want to delete?">- <Button type="text" size="small" icon={<DeleteOutlined />} />+ <Button type="text" size="small" icon={<Trash2 />} /></ConfirmModal></Tooltip></Space>@@ -72,11 +76,7 @@ function DisplayNotifications({return (<SpaceWrapper><div className="display-flex-right">- <Button- type="primary"- icon={<PlusOutlined />}- onClick={() => setIsForm(true)}- >+ <Button type="primary" icon={<Plus />} onClick={() => setIsForm(true)}>Create Notification</Button></div>diff --git a/frontend/src/components/pipelines-or-deployments/notification-modal/NotificationModal.jsx b/frontend/src/components/pipelines-or-deployments/notification-modal/NotificationModal.jsxindex 61a2e9392..e94ae6143 100644--- a/frontend/src/components/pipelines-or-deployments/notification-modal/NotificationModal.jsx+++ b/frontend/src/components/pipelines-or-deployments/notification-modal/NotificationModal.jsx@@ -1,6 +1,6 @@-import { Modal } from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Modal } from "@/components/ui/shims/antd-overlays";import { useExceptionHandler } from "../../../hooks/useExceptionHandler";import { useAlertStore } from "../../../store/alert-store";import { pipelineService } from "../pipeline-service";diff --git a/frontend/src/components/pipelines-or-deployments/pipelines/PipelineCardConfig.jsx b/frontend/src/components/pipelines-or-deployments/pipelines/PipelineCardConfig.jsxindex 2125041df..9dfa69a97 100644--- a/frontend/src/components/pipelines-or-deployments/pipelines/PipelineCardConfig.jsx+++ b/frontend/src/components/pipelines-or-deployments/pipelines/PipelineCardConfig.jsx@@ -1,21 +1,25 @@-import {- AppstoreOutlined,- CalendarOutlined,- CheckCircleFilled,- ClearOutlined,- CloseCircleFilled,- CloudDownloadOutlined,- FileSearchOutlined,- HistoryOutlined,- KeyOutlined,- NotificationOutlined,- ScheduleOutlined,- SyncOutlined,-} from "@ant-design/icons";-import { Avatar, Flex, Space, Switch, Tag, Tooltip, Typography } from "antd";import cronstrue from "cronstrue";+import {+ Bell,+ Calendar,+ CalendarClock,+ CircleCheck,+ CircleX,+ CloudDownload,+ Eraser,+ FileSearch,+ History,+ Key,+ LayoutGrid,+ RefreshCw,+} from "lucide-react";import PropTypes from "prop-types";import { useLocation, useNavigate } from "react-router-dom";+import { Switch } from "@/components/ui/shims/antd-inputs";+import { Flex, Space } from "@/components/ui/shims/antd-layout";+import { Avatar, Tag } from "@/components/ui/shims/antd-leaves";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Typography } from "@/components/ui/shims/antd-typography";import { formattedDateTime } from "../../../helpers/GetStaticData";import { useSessionStore } from "../../../store/session-store";import {@@ -111,10 +115,10 @@ function StatusPills({{hasFileCounts && (<Space size={12} className="status-tooltip-counts"><Typography.Text className="status-tooltip-count success">- <CheckCircleFilled /> {run.successful_files}+ <CircleCheck /> {run.successful_files}</Typography.Text><Typography.Text className="status-tooltip-count error">- <CloseCircleFilled /> {run.failed_files}+ <CircleX /> {run.failed_files}</Typography.Text></Space>)}@@ -189,12 +193,7 @@ function ConnectorFieldRow({ label, icon, instanceName, connectorName }) {{label}</Typography.Text><Space size={10} className="card-list-field-value">- <Avatar- src={icon}- size={32}- shape="square"- icon={<AppstoreOutlined />}- />+ <Avatar src={icon} size={32} shape="square" icon={<LayoutGrid />} /><Flex vertical gap={2} className="card-list-field-text"><Typography.Text className="card-list-field-instance-name">{instanceName || connectorName}@@ -266,19 +265,19 @@ function createPipelineCardConfig({items: [{key: "view-logs",- icon: <FileSearchOutlined />,+ icon: <FileSearch />,label: "View Logs",onClick: () => onViewLogs?.(pipeline),},{key: "file-history",- icon: <HistoryOutlined />,+ icon: <History />,label: "View File History",onClick: () => onViewFileHistory?.(pipeline),},{key: "clear-history",- icon: <ClearOutlined />,+ icon: <Eraser />,label: isClearingFileHistory ? "Clearing..." : "Clear File History",disabled: isClearingFileHistory,onClick: () => onClearFileHistory?.(pipeline),@@ -286,27 +285,27 @@ function createPipelineCardConfig({{ type: "divider" },{key: "sync-now",- icon: <SyncOutlined />,+ icon: <RefreshCw />,label: "Sync Now",onClick: () => onSyncNow?.(pipeline),},{ type: "divider" },{key: "manage-keys",- icon: <KeyOutlined />,+ icon: <Key />,label: "Manage Keys",onClick: () => onManageKeys?.(pipeline),},{key: "notifications",- icon: <NotificationOutlined />,+ icon: <Bell />,label: "Notifications",onClick: () => onSetupNotifications?.(pipeline),},{ type: "divider" },{key: "download-postman",- icon: <CloudDownloadOutlined />,+ icon: <CloudDownload />,label: "Download Postman Collection",onClick: () => onDownloadPostman?.(pipeline),},@@ -330,6 +329,7 @@ function createPipelineCardConfig({<Switchsize="small"checked={pipeline.active}+ data-testid={`pipeline-toggle-${pipeline.id}`}onChange={(checked, e) => {e.stopPropagation();handleEnablePipeline(checked, pipeline.id);@@ -338,6 +338,7 @@ function createPipelineCardConfig({</Tooltip><CardActionBoxitem={pipeline}+ testIdPrefix="pipeline"setSelectedItem={setSelectedPorD}onEdit={onEdit}onShare={onShare}@@ -387,7 +388,7 @@ function createPipelineCardConfig({Next Run At</Typography.Text><Space size={10} className="card-list-field-value">- <ScheduleOutlined />+ <CalendarClock /><Typography.Text>{formattedDateTime(pipeline.next_run_time)}</Typography.Text>@@ -407,7 +408,7 @@ function createPipelineCardConfig({{/* Footer: Schedule | Total Runs */}<Flex align="center" gap={32} className="card-list-footer-row"><Space size={10} className="card-list-footer-item">- <CalendarOutlined />+ <Calendar /><Typography.Texttype="secondary"className="card-list-footer-label"@@ -417,7 +418,7 @@ function createPipelineCardConfig({<Typography.Text>{scheduleDisplay}</Typography.Text></Space><Space size={10} className="card-list-footer-item">- <SyncOutlined />+ <RefreshCw /><Typography.Texttype="secondary"className="card-list-footer-label"diff --git a/frontend/src/components/profile/Profile.css b/frontend/src/components/profile/Profile.cssindex d4794058c..5ed2abba8 100644--- a/frontend/src/components/profile/Profile.css+++ b/frontend/src/components/profile/Profile.css@@ -1,5 +1,5 @@.profile-page {- background-color: var(--page-bg-2);+ background-color: var(--background);min-height: 100%;padding: 0;}@@ -70,7 +70,7 @@justify-content: center;align-items: center;min-height: 300px;- background-color: var(--white);+ background-color: var(--card);border-radius: 14px;}@@ -157,7 +157,7 @@}.profile-card .field-label {- font-size: 14px;+ font-size: 13px;color: #6a7282;font-weight: 500;line-height: 14px;@@ -178,7 +178,7 @@.profile-card .field-value {/* Our desired styles */- font-size: 14px;+ font-size: 13px;color: #101828;overflow: hidden;text-overflow: ellipsis;@@ -200,7 +200,12 @@.profile-card .field-icon {color: #9ca3af;- font-size: 14px;+ font-size: 13px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 13px;+ height: 13px;flex-shrink: 0;}@@ -228,8 +233,8 @@}.copy-button:hover {- color: var(--primary-color, #1890ff);- border-color: var(--primary-color, #1890ff);+ color: var(--primary-color, var(--primary));+ border-color: var(--primary-color, var(--primary));}/* Role badge */@@ -250,4 +255,9 @@.role-badge .anticon {font-size: 12px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 12px;+ height: 12px;}diff --git a/frontend/src/components/profile/Profile.jsx b/frontend/src/components/profile/Profile.jsxindex aedf755e4..7cd55b689 100644--- a/frontend/src/components/profile/Profile.jsx+++ b/frontend/src/components/profile/Profile.jsx@@ -1,13 +1,12 @@-import {- ArrowLeftOutlined,- CheckCircleOutlined,- CopyOutlined,- MailOutlined,- UserOutlined,-} from "@ant-design/icons";-import { Button, Card, Col, Row, Space, Spin, Tooltip, Typography } from "antd";+import { ArrowLeft, CircleCheck, Copy, Mail, User } from "lucide-react";import { useEffect, useState } from "react";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Col, Row, Space } from "@/components/ui/shims/antd-layout";+import { Spin } from "@/components/ui/shims/antd-leaves";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Card } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "./Profile.css";import { OrganizationIcon } from "../../assets";@@ -80,7 +79,7 @@ function Profile() {<div className="profile-secondary-header"><Buttontype="text"- icon={<ArrowLeftOutlined />}+ icon={<ArrowLeft />}onClick={() => navigate(-1)}/><Typography.Text strong className="profile-header-title">@@ -106,11 +105,7 @@ function Profile() {<div className="profile-page">{/* Secondary header bar - outside white container */}<div className="profile-secondary-header">- <Button- type="text"- icon={<ArrowLeftOutlined />}- onClick={() => navigate(-1)}- />+ <Button type="text" icon={<ArrowLeft />} onClick={() => navigate(-1)} /><Typography.Text strong className="profile-header-title">Profile</Typography.Text>@@ -124,7 +119,7 @@ function Profile() {<Card className="profile-card"><Space size={12} className="card-header"><div className="card-icon-circle user-icon">- <UserOutlined />+ <User /></div><Space direction="vertical" size={0}><Typography.Text strong className="card-title">@@ -148,7 +143,7 @@ function Profile() {<Typography.Text className="field-value">{userName}</Typography.Text>- <UserOutlined className="field-icon" />+ <User className="field-icon" /></div></div><div className="field-group">@@ -159,7 +154,7 @@ function Profile() {<Typography.Text className="field-value">{email}</Typography.Text>- <MailOutlined className="field-icon" />+ <Mail className="field-icon" /></div></div></Space>@@ -216,7 +211,7 @@ function Profile() {><Buttontype="text"- icon={<CopyOutlined />}+ icon={<Copy />}className="copy-button"onClick={() => handleCopy(orgId, "Organization ID")}disabled={!orgId}@@ -230,7 +225,7 @@ function Profile() {Your Role</Typography.Text><Typography.Text strong className="role-badge">- <CheckCircleOutlined />+ <CircleCheck />{role}</Typography.Text></div>diff --git a/frontend/src/components/rjsf-custom-widgets/alt-date-time-widget/AltDateTimeWidget.jsx b/frontend/src/components/rjsf-custom-widgets/alt-date-time-widget/AltDateTimeWidget.jsxindex 3a20feb3a..dcf61c839 100644--- a/frontend/src/components/rjsf-custom-widgets/alt-date-time-widget/AltDateTimeWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/alt-date-time-widget/AltDateTimeWidget.jsx@@ -1,6 +1,6 @@-import { DatePicker, TimePicker } from "antd";import moment from "moment";import PropTypes from "prop-types";+import { DatePicker, TimePicker } from "@/components/ui/shims/antd-datetime";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/alt-date-widget/AltDateWidget.jsx b/frontend/src/components/rjsf-custom-widgets/alt-date-widget/AltDateWidget.jsxindex d683ed55d..2d1108db7 100644--- a/frontend/src/components/rjsf-custom-widgets/alt-date-widget/AltDateWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/alt-date-widget/AltDateWidget.jsx@@ -1,6 +1,6 @@-import { DatePicker } from "antd";import moment from "moment";import PropTypes from "prop-types";+import { DatePicker } from "@/components/ui/shims/antd-datetime";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/array-field/ArrayField.jsx b/frontend/src/components/rjsf-custom-widgets/array-field/ArrayField.jsxindex bc91174c7..ae76993be 100644--- a/frontend/src/components/rjsf-custom-widgets/array-field/ArrayField.jsx+++ b/frontend/src/components/rjsf-custom-widgets/array-field/ArrayField.jsx@@ -1,6 +1,6 @@-import { Select } from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Select } from "@/components/ui/shims/antd-inputs";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/checkbox-widget/CheckboxWidget.jsx b/frontend/src/components/rjsf-custom-widgets/checkbox-widget/CheckboxWidget.jsxindex d598d4e46..7bfee4ee2 100644--- a/frontend/src/components/rjsf-custom-widgets/checkbox-widget/CheckboxWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/checkbox-widget/CheckboxWidget.jsx@@ -1,5 +1,7 @@-import { Checkbox, Space, Typography } from "antd";import PropTypes from "prop-types";+import { Checkbox } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Typography } from "@/components/ui/shims/antd-typography";import "./CheckboxWidget.css";import CustomMarkdown from "../../helpers/custom-markdown/CustomMarkdown";diff --git a/frontend/src/components/rjsf-custom-widgets/checkboxes-widget/CheckboxesWidget.jsx b/frontend/src/components/rjsf-custom-widgets/checkboxes-widget/CheckboxesWidget.jsxindex 8e6b21634..09d364373 100644--- a/frontend/src/components/rjsf-custom-widgets/checkboxes-widget/CheckboxesWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/checkboxes-widget/CheckboxesWidget.jsx@@ -1,5 +1,5 @@-import { Checkbox } from "antd";import PropTypes from "prop-types";+import { Checkbox } from "@/components/ui/shims/antd-inputs";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/color-widget/ColorWidget.jsx b/frontend/src/components/rjsf-custom-widgets/color-widget/ColorWidget.jsxindex e59f5dd9f..6907e4646 100644--- a/frontend/src/components/rjsf-custom-widgets/color-widget/ColorWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/color-widget/ColorWidget.jsx@@ -1,5 +1,5 @@-import { Input } from "antd";import PropTypes from "prop-types";+import { Input } from "@/components/ui/shims/antd-inputs";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/date-time-widget/DateTimeWidget.jsx b/frontend/src/components/rjsf-custom-widgets/date-time-widget/DateTimeWidget.jsxindex 74d28bc99..57db9293b 100644--- a/frontend/src/components/rjsf-custom-widgets/date-time-widget/DateTimeWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/date-time-widget/DateTimeWidget.jsx@@ -1,6 +1,6 @@-import { DatePicker } from "antd";import moment from "moment";import PropTypes from "prop-types";+import { DatePicker } from "@/components/ui/shims/antd-datetime";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/date-widget/DateWidget.jsx b/frontend/src/components/rjsf-custom-widgets/date-widget/DateWidget.jsxindex 5e4e5cd11..5c96477c6 100644--- a/frontend/src/components/rjsf-custom-widgets/date-widget/DateWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/date-widget/DateWidget.jsx@@ -1,6 +1,6 @@-import { DatePicker } from "antd";import moment from "moment";import PropTypes from "prop-types";+import { DatePicker } from "@/components/ui/shims/antd-datetime";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/email-widget/EmailWidget.jsx b/frontend/src/components/rjsf-custom-widgets/email-widget/EmailWidget.jsxindex 183e0c0b7..d8fd05db3 100644--- a/frontend/src/components/rjsf-custom-widgets/email-widget/EmailWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/email-widget/EmailWidget.jsx@@ -1,5 +1,5 @@-import { Input } from "antd";import PropTypes from "prop-types";+import { Input } from "@/components/ui/shims/antd-inputs";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/file-widget/FileWidget.jsx b/frontend/src/components/rjsf-custom-widgets/file-widget/FileWidget.jsxindex 9a43dcaaa..bdda6faa5 100644--- a/frontend/src/components/rjsf-custom-widgets/file-widget/FileWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/file-widget/FileWidget.jsx@@ -1,6 +1,10 @@-import { UploadOutlined } from "@ant-design/icons";-import { Button, Upload } from "antd";+// Aliased: antd's `Upload` component (still in use until P3) would otherwise be+// shadowed by the lucide icon of the same name.++import { Upload as UploadIcon } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";+import { Upload } from "@/components/ui/shims/antd-structure";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";@@ -20,7 +24,7 @@ const FileWidget = ({ id, onChange, label, schema, required, readonly }) => {required={required}><Upload id={id} onChange={handleFileChange} disabled={readonly}>- <Button icon={<UploadOutlined />}>Upload File</Button>+ <Button icon={<UploadIcon className="size-4" />}>Upload File</Button></Upload></RjsfWidgetLayout>);diff --git a/frontend/src/components/rjsf-custom-widgets/password-widget/PasswordWidget.jsx b/frontend/src/components/rjsf-custom-widgets/password-widget/PasswordWidget.jsxindex b21d5339a..fc7957a8b 100644--- a/frontend/src/components/rjsf-custom-widgets/password-widget/PasswordWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/password-widget/PasswordWidget.jsx@@ -1,5 +1,5 @@-import { Input } from "antd";import PropTypes from "prop-types";+import { Input } from "@/components/ui/shims/antd-inputs";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/select-widget/SelectWidget.jsx b/frontend/src/components/rjsf-custom-widgets/select-widget/SelectWidget.jsxindex 6540dfdab..7f29c3a52 100644--- a/frontend/src/components/rjsf-custom-widgets/select-widget/SelectWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/select-widget/SelectWidget.jsx@@ -1,5 +1,8 @@-import { Form, Select, Space, Typography } from "antd";import PropTypes from "prop-types";+import { Form } from "@/components/ui/shims/antd-form";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Typography } from "@/components/ui/shims/antd-typography";import CustomMarkdown from "../../helpers/custom-markdown/CustomMarkdown";diff --git a/frontend/src/components/rjsf-custom-widgets/text-widget/TextWidget.jsx b/frontend/src/components/rjsf-custom-widgets/text-widget/TextWidget.jsxindex 30017f32b..d3fc0e4d8 100644--- a/frontend/src/components/rjsf-custom-widgets/text-widget/TextWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/text-widget/TextWidget.jsx@@ -1,5 +1,5 @@-import { Input } from "antd";import PropTypes from "prop-types";+import { Input } from "@/components/ui/shims/antd-inputs";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/time-widget/TimeWidget.jsx b/frontend/src/components/rjsf-custom-widgets/time-widget/TimeWidget.jsxindex 81c371c76..5df0884f4 100644--- a/frontend/src/components/rjsf-custom-widgets/time-widget/TimeWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/time-widget/TimeWidget.jsx@@ -1,6 +1,6 @@-import { TimePicker } from "antd";import moment from "moment";import PropTypes from "prop-types";+import { TimePicker } from "@/components/ui/shims/antd-datetime";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/up-down-widget/UpDownWidget.jsx b/frontend/src/components/rjsf-custom-widgets/up-down-widget/UpDownWidget.jsxindex e33f8b0ae..a27be4966 100644--- a/frontend/src/components/rjsf-custom-widgets/up-down-widget/UpDownWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/up-down-widget/UpDownWidget.jsx@@ -1,5 +1,5 @@-import { InputNumber } from "antd";import PropTypes from "prop-types";+import { InputNumber } from "@/components/ui/shims/antd-inputs";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx";diff --git a/frontend/src/components/rjsf-custom-widgets/url-widget/URLWidget.jsx b/frontend/src/components/rjsf-custom-widgets/url-widget/URLWidget.jsxindex 4b501203e..fb22cdad3 100644--- a/frontend/src/components/rjsf-custom-widgets/url-widget/URLWidget.jsx+++ b/frontend/src/components/rjsf-custom-widgets/url-widget/URLWidget.jsx@@ -1,5 +1,5 @@-import { Input } from "antd";import PropTypes from "prop-types";+import { Input } from "@/components/ui/shims/antd-inputs";import { RjsfWidgetLayout } from "../../../layouts/rjsf-widget-layout/RjsfWidgetLayout";diff --git a/frontend/src/components/set-org/SetOrg.css b/frontend/src/components/set-org/SetOrg.cssindex bb63c5ef5..125f0e877 100644--- a/frontend/src/components/set-org/SetOrg.css+++ b/frontend/src/components/set-org/SetOrg.css@@ -98,7 +98,7 @@}.org-card-container .ant-card-meta-title {- color: #0d3a63;+ color: var(--foreground);font-weight: 700;font-size: 20px;text-overflow: ellipsis;diff --git a/frontend/src/components/set-org/SetOrg.jsx b/frontend/src/components/set-org/SetOrg.jsxindex bb2c00943..25f8585c4 100644--- a/frontend/src/components/set-org/SetOrg.jsx+++ b/frontend/src/components/set-org/SetOrg.jsx@@ -1,7 +1,8 @@-import { Button, Card } from "antd";import Cookies from "js-cookie";import { useEffect, useState } from "react";import { useLocation, useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Card } from "@/components/ui/shims/antd-structure";import "./SetOrg.css"; // Import your CSS file for stylingimport axios from "axios";import Proptypes from "prop-types";diff --git a/frontend/src/components/settings/api-key-manager/ApiKeyManager.css b/frontend/src/components/settings/api-key-manager/ApiKeyManager.cssindex fe2081a45..06f08e595 100644--- a/frontend/src/components/settings/api-key-manager/ApiKeyManager.css+++ b/frontend/src/components/settings/api-key-manager/ApiKeyManager.css@@ -27,7 +27,11 @@}.api-key-manager__copy-icon {- font-size: 12px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. */+ width: 12px;+ height: 12px;color: var(--ant-color-text-tertiary, rgba(0, 0, 0, 0.45));}diff --git a/frontend/src/components/settings/api-key-manager/ApiKeyManager.jsx b/frontend/src/components/settings/api-key-manager/ApiKeyManager.jsxindex fc77ba5ea..3d2c26542 100644--- a/frontend/src/components/settings/api-key-manager/ApiKeyManager.jsx+++ b/frontend/src/components/settings/api-key-manager/ApiKeyManager.jsx@@ -1,24 +1,13 @@-import {- ArrowLeftOutlined,- CopyOutlined,- DeleteOutlined,- EditOutlined,- PlusOutlined,- SyncOutlined,-} from "@ant-design/icons";-import {- Button,- Form,- Input,- Modal,- Switch,- Table,- Tooltip,- Typography,-} from "antd";+import { ArrowLeft, Copy, Pencil, Plus, RotateCw, Trash2 } from "lucide-react";import PropTypes from "prop-types";import { useCallback, useEffect, useState } from "react";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Form } from "@/components/ui/shims/antd-form";+import { Input, Switch } from "@/components/ui/shims/antd-inputs";+import { Modal, Tooltip } from "@/components/ui/shims/antd-overlays";+import { Table } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useCopyToClipboard } from "../../../hooks/useCopyToClipboard";@@ -288,7 +277,7 @@ function ApiKeyManager({<Typography.Text className="api-key-manager__key-text">{record?.key}</Typography.Text>- <CopyOutlined className="api-key-manager__copy-icon" />+ <Copy className="api-key-manager__copy-icon" /></Button></Tooltip>),@@ -334,13 +323,13 @@ function ApiKeyManager({okText="Rotate"><Tooltip title="Rotate key">- <Button size="small" icon={<SyncOutlined />} />+ <Button size="small" icon={<RotateCw />} /></Tooltip></ConfirmModal><Tooltip title="Edit"><Buttonsize="small"- icon={<EditOutlined />}+ icon={<Pencil />}onClick={() => openEditModal(record)}/></Tooltip>@@ -351,7 +340,7 @@ function ApiKeyManager({okText="Delete"><Tooltip title="Delete">- <Button size="small" danger icon={<DeleteOutlined />} />+ <Button size="small" danger icon={<Trash2 />} /></Tooltip></ConfirmModal></div>@@ -370,7 +359,7 @@ function ApiKeyManager({navigate(`/${sessionDetails?.orgName}/settings/platform`)}>- <ArrowLeftOutlined />+ <ArrowLeft /></Button><Typography.Text className="plt-set-head-typo">{title}@@ -382,7 +371,7 @@ function ApiKeyManager({<div className="api-key-manager__header-actions"><Buttontype="primary"- icon={<PlusOutlined />}+ icon={<Plus />}onClick={() => setIsCreateModalOpen(true)}>New Keydiff --git a/frontend/src/components/settings/default-triad/DefaultTriad.jsx b/frontend/src/components/settings/default-triad/DefaultTriad.jsxindex 4496f3faf..d7d1a5675 100644--- a/frontend/src/components/settings/default-triad/DefaultTriad.jsx+++ b/frontend/src/components/settings/default-triad/DefaultTriad.jsx@@ -1,7 +1,9 @@-import { ArrowLeftOutlined } from "@ant-design/icons";-import { Button, Select, Typography } from "antd";+import { ArrowLeft } from "lucide-react";import { useEffect, useState } from "react";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Typography } from "@/components/ui/shims/antd-typography";import { fetchAllPages } from "../../../helpers/pagination";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";@@ -176,7 +178,7 @@ function DefaultTriad() {type="text"onClick={() => navigate(`/${sessionDetails?.orgName}/tools`)}>- <ArrowLeftOutlined />+ <ArrowLeft /></Button><Typography.Text className="plt-set-head-typo">Default LLM Profile@@ -194,6 +196,7 @@ function DefaultTriad() {{labelMap[type]}</Typography><Select+ showSearchplaceholder={`Select ${labelMap[type]}`}value={selectedValues[type] || undefined}onChange={(value) => handleDropdownChange(type, value)}diff --git a/frontend/src/components/settings/global-api-deployment-keys/GlobalApiDeploymentKeys.jsx b/frontend/src/components/settings/global-api-deployment-keys/GlobalApiDeploymentKeys.jsxindex 1b0326fe0..dacdfbbb3 100644--- a/frontend/src/components/settings/global-api-deployment-keys/GlobalApiDeploymentKeys.jsx+++ b/frontend/src/components/settings/global-api-deployment-keys/GlobalApiDeploymentKeys.jsx@@ -1,6 +1,9 @@-import { Checkbox, Form, Select, Tag, Tooltip } from "antd";import PropTypes from "prop-types";import { useCallback, useEffect, useState } from "react";+import { Form } from "@/components/ui/shims/antd-form";+import { Checkbox, Select } from "@/components/ui/shims/antd-inputs";+import { Tag } from "@/components/ui/shims/antd-leaves";+import { Tooltip } from "@/components/ui/shims/antd-overlays";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { useExceptionHandler } from "../../../hooks/useExceptionHandler.jsx";@@ -9,7 +12,10 @@ import { useSessionStore } from "../../../store/session-store";import { ApiKeyManager } from "../api-key-manager/ApiKeyManager.jsx";function DeploymentScopeFields({ form, deployments }) {- const allowAll = Form.useWatch("allow_all_deployments", form);+ // Seeded `false` to match the Form.Item below: the checks here read+ // `=== false` to mean "explicitly unchecked", so an undefined first render+ // would disable the picker and drop its required-rule for that frame.+ const allowAll = Form.useWatch("allow_all_deployments", form, false);return (<><Form.Itemdiff --git a/frontend/src/components/settings/invite/InviteEditUser.jsx b/frontend/src/components/settings/invite/InviteEditUser.jsxindex 334426e47..a62ee67bf 100644--- a/frontend/src/components/settings/invite/InviteEditUser.jsx+++ b/frontend/src/components/settings/invite/InviteEditUser.jsx@@ -1,6 +1,7 @@-import { Form, Input, Select } from "antd";import { useEffect, useState } from "react";import { useLocation, useNavigate } from "react-router-dom";+import { Form } from "@/components/ui/shims/antd-form";+import { Input, Select } from "@/components/ui/shims/antd-inputs";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { IslandLayout } from "../../../layouts/island-layout/IslandLayout.jsx";diff --git a/frontend/src/components/settings/platform-api-keys/PlatformApiKeys.jsx b/frontend/src/components/settings/platform-api-keys/PlatformApiKeys.jsxindex d7bac1316..05c0c5a1e 100644--- a/frontend/src/components/settings/platform-api-keys/PlatformApiKeys.jsx+++ b/frontend/src/components/settings/platform-api-keys/PlatformApiKeys.jsx@@ -1,4 +1,6 @@-import { Form, Select, Tag } from "antd";+import { Form } from "@/components/ui/shims/antd-form";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Tag } from "@/components/ui/shims/antd-leaves";import { ApiKeyManager } from "../api-key-manager/ApiKeyManager.jsx";diff --git a/frontend/src/components/settings/platform/PlatformSettings.css b/frontend/src/components/settings/platform/PlatformSettings.cssindex da0da7931..3a8576b85 100644--- a/frontend/src/components/settings/platform/PlatformSettings.css+++ b/frontend/src/components/settings/platform/PlatformSettings.css@@ -2,7 +2,7 @@.plt-set-layout {height: calc(100vh - 60px);- background-color: var(--page-bg-3);+ background-color: var(--muted);}.plt-set-layout-2 {@@ -10,10 +10,10 @@}.plt-set-head {- background-color: var(--white);+ background-color: var(--card);padding: 14px;height: 60px;- border-bottom: 1px solid var(--border-color-1);+ border-bottom: 1px solid var(--border);}.plt-set-head-typo {diff --git a/frontend/src/components/settings/platform/PlatformSettings.jsx b/frontend/src/components/settings/platform/PlatformSettings.jsxindex 80893e5da..51131c115 100644--- a/frontend/src/components/settings/platform/PlatformSettings.jsx+++ b/frontend/src/components/settings/platform/PlatformSettings.jsx@@ -1,22 +1,12 @@-import {- ArrowLeftOutlined,- CopyOutlined,- DeleteOutlined,-} from "@ant-design/icons";-import {- Button,- Col,- Divider,- Input,- InputNumber,- Row,- Switch,- Tag,- Typography,-} from "antd";+import { ArrowLeft, Copy, Trash2 } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useState } from "react";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Input, InputNumber, Switch } from "@/components/ui/shims/antd-inputs";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Divider, Tag } from "@/components/ui/shims/antd-leaves";+import { Typography } from "@/components/ui/shims/antd-typography";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";import { IslandLayout } from "../../../layouts/island-layout/IslandLayout.jsx";@@ -467,7 +457,7 @@ function PlatformSettings() {type="text"onClick={() => navigate(`/${sessionDetails?.orgName}/tools`)}>- <ArrowLeftOutlined />+ <ArrowLeft /></Button><Typography.Text className="plt-set-head-typo">Platform Settings@@ -515,7 +505,7 @@ function PlatformSettings() {size="small"value={keys[keyIndex].key}suffix={- <CopyOutlined+ <CopyonClick={() =>copyText(keys[keyIndex].key)}@@ -543,7 +533,7 @@ function PlatformSettings() {><Buttonsize="small"- icon={<DeleteOutlined />}+ icon={<Trash2 />}disabled={keyDetails?.id === null}loading={isDeletingIndex === keyIndex}/>diff --git a/frontend/src/components/settings/settings/Settings.css b/frontend/src/components/settings/settings/Settings.cssindex d89b9291b..3fd037766 100644--- a/frontend/src/components/settings/settings/Settings.css+++ b/frontend/src/components/settings/settings/Settings.css@@ -3,7 +3,7 @@.settings-container {position: relative;height: 100%;- background-color: var(--page-bg-2);+ background-color: var(--background);}.settings-sidebar {@@ -20,7 +20,7 @@.settings-menu-item {padding: 12px 16px;- font-size: 14px;+ font-size: 13px;cursor: pointer;color: #000;transition: all 0.2s;@@ -62,6 +62,12 @@flex-direction: column;}+/* antd nested `.ant-popover-inner` inside the overlay element; the shim puts+ * both class names on ONE element, so the descendant form matched nothing and+ * the panel kept shadcn's `p-4`. That doubled the padding to 16px and made the+ * fly-out taller than it needed to be. `&` covers the merged element, the+ * descendant form the nested case, so this holds either way. */+.settings-popover-overlay.ant-popover-inner,.settings-popover-overlay .ant-popover-inner {padding: 8px;border-radius: 8px;diff --git a/frontend/src/components/settings/users/Users.css b/frontend/src/components/settings/users/Users.cssindex 728683b84..5fd5273be 100644--- a/frontend/src/components/settings/users/Users.css+++ b/frontend/src/components/settings/users/Users.css@@ -1,5 +1,5 @@.user-bg-col {- background-color: var(--page-bg-2);+ background-color: var(--background);height: 100%;}diff --git a/frontend/src/components/settings/users/Users.jsx b/frontend/src/components/settings/users/Users.jsxindex 4d8dc1af9..da91c0582 100644--- a/frontend/src/components/settings/users/Users.jsx+++ b/frontend/src/components/settings/users/Users.jsx@@ -1,13 +1,11 @@-import {- DeleteOutlined,- EditOutlined,- EllipsisOutlined,- PlusOutlined,- ReloadOutlined,-} from "@ant-design/icons";-import { Button, Dropdown, Modal, Space, Table, Typography } from "antd";+import { Ellipsis, Pencil, Plus, RotateCw, Trash2 } from "lucide-react";import { useEffect, useState } from "react";import { useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Space } from "@/components/ui/shims/antd-layout";+import { Dropdown, Modal } from "@/components/ui/shims/antd-overlays";+import { Table } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "./Users.css";import { useAxiosPrivate } from "../../../hooks/useAxiosPrivate";@@ -99,47 +97,61 @@ function Users() {const isSsoLocalAuthz =!!sessionDetails?.provider && !!sessionDetails?.disableSsoIdpAuthorization;- const editItem = {- key: "1",- label: (- <Space- direction="horizontal"- className="action-items"- onClick={() =>- navigate(`/${sessionDetails?.orgName}/users/edit`, {- state: selectedUserEmail,- })- }- >- <div>- <EditOutlined />- </div>- <div>- <Typography.Text>Edit</Typography.Text>- </div>- </Space>- ),- };+ /*+ * The row each entry acts on is bound HERE, in the render closure, rather+ * than recorded by an onClick on the kebab itself. The menu opens on+ * pointerdown and then pins `pointer-events: none` on <body> while it is+ * open, so the click that would have followed on the kebab never lands: the+ * row stayed unrecorded, Edit navigated to /users/edit with no state, and+ * the page bounced to the dashboard. The Delete modal named no user for the+ * same reason.+ */+ const getActionItems = (record) => {+ const editItem = {+ key: "1",+ label: (+ <Space+ direction="horizontal"+ className="action-items"+ onClick={() =>+ navigate(`/${sessionDetails?.orgName}/users/edit`, {+ state: record,+ })+ }+ >+ <div>+ <Pencil />+ </div>+ <div>+ <Typography.Text>Edit</Typography.Text>+ </div>+ </Space>+ ),+ };- const deleteItem = {- key: "2",- label: (- <Space- direction="horizontal"- className="action-items"- onClick={showModal}- >- <div>- <DeleteOutlined />- </div>- <div>- <Typography.Text>Delete</Typography.Text>- </div>- </Space>- ),- };+ const deleteItem = {+ key: "2",+ label: (+ <Space+ direction="horizontal"+ className="action-items"+ onClick={() => {+ setSelectedUserEmail(record);+ showModal();+ }}+ >+ <div>+ <Trash2 />+ </div>+ <div>+ <Typography.Text>Delete</Typography.Text>+ </div>+ </Space>+ ),+ };- const actionItems = isSsoLocalAuthz ? [editItem] : [editItem, deleteItem];+ return isSsoLocalAuthz ? [editItem] : [editItem, deleteItem];+ };const baseColumns = [{@@ -157,15 +169,11 @@ function Users() {align: "center",render: (_, record) => (<Dropdown- menu={{ items: actionItems }}+ menu={{ items: getActionItems(record) }}trigger={["click"]}placement="bottomLeft">- <EllipsisOutlined- rotate={90}- style={{ cursor: "pointer" }}- onClick={() => setSelectedUserEmail(record)}- />+ <Ellipsis rotate={90} style={{ cursor: "pointer" }} /></Dropdown>),};@@ -205,7 +213,7 @@ function Users() {{!sessionDetails?.provider && (<CustomButtontype="primary"- icon={<PlusOutlined />}+ icon={<Plus />}onClick={handleInviteUsers}>Invite User@@ -213,7 +221,7 @@ function Users() {)}<Buttonshape="circle"- icon={<ReloadOutlined />}+ icon={<RotateCw />}onClick={getAllUsers}className="user-reload-button"/>diff --git a/frontend/src/components/settings/users/Users.test.jsx b/frontend/src/components/settings/users/Users.test.jsxnew file mode 100644index 000000000..c51e58318--- /dev/null+++ b/frontend/src/components/settings/users/Users.test.jsx@@ -0,0 +1,111 @@+import { fireEvent, render, screen, waitFor } from "@testing-library/react";+import { MemoryRouter } from "react-router-dom";+import { beforeEach, describe, expect, it, vi } from "vitest";++/**+ * Manage Users' kebab menu, and which ROW its entries act on.+ *+ * The row used to be recorded by an `onClick` on the kebab icon itself — the+ * Dropdown's trigger. Radix opens the menu on POINTERDOWN and pins+ * `pointer-events: none` on <body> for as long as it is open, so the click+ * that would have followed never lands and the handler never runs. Edit+ * therefore navigated to /users/edit carrying `state: undefined`, and+ * InviteEditUser bounces a stateless edit straight to the dashboard: the Edit+ * action looked like it did nothing but log you out of the page. Delete's+ * confirmation named no user at all.+ *+ * jsdom does no hit-testing, so it would dispatch that swallowed click+ * happily — which is exactly why these tests drive the MENU ENTRY rather than+ * the icon. Reaching the entry is the part a real browser allows; binding the+ * row to it is the part under test.+ */+const navigate = vi.fn();++vi.mock("react-router-dom", async () => {+ const actual = await vi.importActual("react-router-dom");+ return { ...actual, useNavigate: () => navigate };+});++const MEMBERS = [+ { id: "1", email: "[email protected]", role: "unstract_admin" },+ { id: "2", email: "[email protected]", role: "unstract_user" },+];++vi.mock("../../../hooks/useAxiosPrivate", () => ({+ useAxiosPrivate: () => () => Promise.resolve({ data: { members: MEMBERS } }),+}));++vi.mock("../../../hooks/useExceptionHandler.jsx", () => ({+ useExceptionHandler: () => (err, fallback) => ({ content: fallback }),+}));++vi.mock("../../../hooks/usePostHogEvents.js", () => ({+ default: () => ({ setPostHogCustomEvent: () => undefined }),+}));++vi.mock("../../../store/alert-store", () => ({+ useAlertStore: () => ({ setAlertDetails: () => undefined }),+}));++vi.mock("../../../store/session-store", () => ({+ useSessionStore: () => ({+ sessionDetails: { orgId: "org-1", orgName: "my-org", csrfToken: "tok" },+ }),+}));++const { Users } = await import("./Users.jsx");++/** Opens the kebab on the given row and returns the menu entry by name. */+async function openRowMenu(rowEmail, entry) {+ render(+ <MemoryRouter>+ <Users />+ </MemoryRouter>,+ );+ await screen.findByText(rowEmail);++ const row = screen.getByText(rowEmail).closest("tr");+ // Radix's trigger toggles on pointerdown, not click — as in the browser.+ fireEvent.pointerDown(row.querySelector(".ant-dropdown-trigger"), {+ button: 0,+ ctrlKey: false,+ pointerType: "mouse",+ });++ return await screen.findByText(entry);+}++describe("Manage Users kebab menu", () => {+ beforeEach(() => {+ navigate.mockReset();+ });++ it("sends the clicked row to the edit page", async () => {+ fireEvent.click(await openRowMenu("[email protected]", "Edit"));++ expect(navigate).toHaveBeenCalledWith("/my-org/users/edit", {+ state: expect.objectContaining({+ email: "[email protected]",+ role: "unstract_user",+ }),+ });+ });++ it("edits the row whose kebab was opened, not the first one", async () => {+ fireEvent.click(await openRowMenu("[email protected]", "Edit"));++ expect(navigate).toHaveBeenCalledWith("/my-org/users/edit", {+ state: expect.objectContaining({ email: "[email protected]" }),+ });+ });++ it("names the clicked row in the delete confirmation", async () => {+ fireEvent.click(await openRowMenu("[email protected]", "Delete"));++ await waitFor(() =>+ expect(screen.getByText("Delete User")).toBeInTheDocument(),+ );+ // The row's email appears twice once the modal is up: table cell + modal.+ expect(screen.getAllByText("[email protected]").length).toBeGreaterThan(1);+ });+});diff --git a/frontend/src/components/tool-settings/list-of-items/ListOfItems.jsx b/frontend/src/components/tool-settings/list-of-items/ListOfItems.jsxindex 829c86a29..14cbfc20f 100644--- a/frontend/src/components/tool-settings/list-of-items/ListOfItems.jsx+++ b/frontend/src/components/tool-settings/list-of-items/ListOfItems.jsx@@ -1,6 +1,8 @@-import { DeleteOutlined, EditOutlined, MoreOutlined } from "@ant-design/icons";-import { Card, Dropdown, Image } from "antd";+import { EllipsisVertical, Pencil, Trash2 } from "lucide-react";import PropTypes from "prop-types";+import { Image } from "@/components/ui/shims/antd-leaves";+import { Dropdown } from "@/components/ui/shims/antd-overlays";+import { Card } from "@/components/ui/shims/antd-structure";import { ConfirmModal } from "../../widgets/confirm-modal/ConfirmModal";import { EmptyState } from "../../widgets/empty-state/EmptyState";@@ -47,7 +49,7 @@ function ListOfItems({{label: "Edit",key: "edit",- icon: <EditOutlined />,+ icon: <Pencil />,onClick: () => setEditItemId(item?.id),},{@@ -60,14 +62,14 @@ function ListOfItems({</ConfirmModal>),key: "delete",- icon: <DeleteOutlined />,+ icon: <Trash2 />,},],}}trigger={["click"]}placement="bottomRight">- <MoreOutlined />+ <EllipsisVertical /></Dropdown>}>diff --git a/frontend/src/components/tool-settings/tool-settings/ToolSettings.css b/frontend/src/components/tool-settings/tool-settings/ToolSettings.cssindex c129f40c6..44f35d9c1 100644--- a/frontend/src/components/tool-settings/tool-settings/ToolSettings.css+++ b/frontend/src/components/tool-settings/tool-settings/ToolSettings.css@@ -1,7 +1,7 @@/* Styles for ToolSettings */.plt-tool-settings-layout {- background-color: var(--page-bg-2);+ background-color: var(--background);height: 100%;display: flex;flex-direction: column;diff --git a/frontend/src/components/tool-settings/tool-settings/ToolSettings.jsx b/frontend/src/components/tool-settings/tool-settings/ToolSettings.jsxindex 67c256388..bfad3a663 100644--- a/frontend/src/components/tool-settings/tool-settings/ToolSettings.jsx+++ b/frontend/src/components/tool-settings/tool-settings/ToolSettings.jsx@@ -1,4 +1,4 @@-import { PlusOutlined } from "@ant-design/icons";+import { Plus } from "lucide-react";import PropTypes from "prop-types";import { useCallback, useEffect, useMemo, useRef, useState } from "react";@@ -35,9 +35,9 @@ const titles = {};const btnText = {- llm: "New LLM Profile",- vector_db: "New Vector DB Profile",- embedding: "New Embedding Profile",+ llm: "New LLM",+ vector_db: "New Vector DB",+ embedding: "New Embedding",x2text: "New Text Extractor",ocr: "New OCR",};@@ -361,10 +361,13 @@ function ToolSettings({ type }) {searchKey={type}onSearch={(value) => handleSearch(value)}customButtons={+ // The label is `btnText[type]` — "New LLM" on one route and+ // "New Text Extractor" on another — so it is not a stable handle.<CustomButtontype="primary"+ data-testid={`${type}-adapter-add-btn`}onClick={handleOpenAddSourceModal}- icon={<PlusOutlined />}+ icon={<Plus />}>{btnText[type]}</CustomButton>@@ -393,6 +396,7 @@ function ToolSettings({ type }) {)}{!loadError && displayList?.length > 0 && (<ResourceTable+ testIdPrefix="adapter-list"dataSource={displayList}loading={isLoading}pagination={pagination}diff --git a/frontend/src/components/ui/__fixtures__/jsx-in-js-probe.js b/frontend/src/components/ui/__fixtures__/jsx-in-js-probe.jsnew file mode 100644index 000000000..c7128e234--- /dev/null+++ b/frontend/src/components/ui/__fixtures__/jsx-in-js-probe.js@@ -0,0 +1,10 @@+/*+ * Fixture for jsx-in-js.test.jsx. Deliberately a `.js` file containing JSX+ * with NO `import React` — exactly how the cloud plugin tree writes it.+ *+ * Do not "fix" the extension or add a React import: being written this way IS+ * the thing under test. Renaming it to .jsx makes the guard vacuous.+ */+export function JsxInJsProbe() {+ return <div data-testid="jsx-in-js-probe">ok</div>;+}diff --git a/frontend/src/components/ui/accordion.tsx b/frontend/src/components/ui/accordion.tsxnew file mode 100644index 000000000..6178d89e9--- /dev/null+++ b/frontend/src/components/ui/accordion.tsx@@ -0,0 +1,55 @@+import { ChevronDown } from "lucide-react";+import { Accordion as AccordionPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Accordion = AccordionPrimitive.Root;++const AccordionItem = React.forwardRef<+ React.ComponentRef<typeof AccordionPrimitive.Item>,+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>+>(({ className, ...props }, ref) => (+ <AccordionPrimitive.Item+ ref={ref}+ className={cn("border-b", className)}+ {...props}+ />+));+AccordionItem.displayName = "AccordionItem";++const AccordionTrigger = React.forwardRef<+ React.ComponentRef<typeof AccordionPrimitive.Trigger>,+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>+>(({ className, children, ...props }, ref) => (+ <AccordionPrimitive.Header className="flex">+ <AccordionPrimitive.Trigger+ ref={ref}+ className={cn(+ "flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",+ className,+ )}+ {...props}+ >+ {children}+ <ChevronDown className="h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />+ </AccordionPrimitive.Trigger>+ </AccordionPrimitive.Header>+));+AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;++const AccordionContent = React.forwardRef<+ React.ComponentRef<typeof AccordionPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>+>(({ className, children, ...props }, ref) => (+ <AccordionPrimitive.Content+ ref={ref}+ className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"+ {...props}+ >+ <div className={cn("pb-4 pt-0", className)}>{children}</div>+ </AccordionPrimitive.Content>+));+AccordionContent.displayName = AccordionPrimitive.Content.displayName;++export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };diff --git a/frontend/src/components/ui/alert-dialog.tsx b/frontend/src/components/ui/alert-dialog.tsxnew file mode 100644index 000000000..6664848d6--- /dev/null+++ b/frontend/src/components/ui/alert-dialog.tsx@@ -0,0 +1,147 @@+import { AlertDialog as AlertDialogPrimitive } from "radix-ui";+import * as React from "react";+import { buttonVariants } from "@/components/ui/button";+import { cn } from "@/lib/utils";++const AlertDialog = AlertDialogPrimitive.Root;++const AlertDialogTrigger = AlertDialogPrimitive.Trigger;++const AlertDialogPortal = AlertDialogPrimitive.Portal;++/*+ * z-[1100], not shadcn's stock z-50: this app predates the Tailwind z scale and+ * still has chrome parked in the hundreds/thousands (`.logs-container` is 999,+ * the agency canvas and settings rail are 1000), so a z-50 overlay left the+ * Logs footer painting bright over the dimmed page. Sits above that legacy band+ * but below `[data-radix-popper-content-wrapper]` (1500, so a Select opened+ * inside a modal still clears it) and `.fullscreen-loader` (2000) — see+ * index.css.+ */+const AlertDialogOverlay = React.forwardRef<+ React.ComponentRef<typeof AlertDialogPrimitive.Overlay>,+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>+>(({ className, ...props }, ref) => (+ <AlertDialogPrimitive.Overlay+ className={cn(+ "fixed inset-0 z-[1100] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",+ className,+ )}+ {...props}+ ref={ref}+ />+));+AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;++const AlertDialogContent = React.forwardRef<+ React.ComponentRef<typeof AlertDialogPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>+>(({ className, ...props }, ref) => (+ <AlertDialogPortal>+ <AlertDialogOverlay />+ <AlertDialogPrimitive.Content+ ref={ref}+ className={cn(+ "fixed left-[50%] top-[50%] z-[1100] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-card p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",+ className,+ )}+ {...props}+ />+ </AlertDialogPortal>+));+AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;++const AlertDialogHeader = ({+ className,+ ...props+}: React.HTMLAttributes<HTMLDivElement>) => (+ <div+ className={cn(+ "flex flex-col space-y-2 text-center sm:text-left",+ className,+ )}+ {...props}+ />+);+AlertDialogHeader.displayName = "AlertDialogHeader";++const AlertDialogFooter = ({+ className,+ ...props+}: React.HTMLAttributes<HTMLDivElement>) => (+ <div+ className={cn(+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",+ className,+ )}+ {...props}+ />+);+AlertDialogFooter.displayName = "AlertDialogFooter";++const AlertDialogTitle = React.forwardRef<+ React.ComponentRef<typeof AlertDialogPrimitive.Title>,+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>+>(({ className, ...props }, ref) => (+ <AlertDialogPrimitive.Title+ ref={ref}+ className={cn("text-lg font-semibold", className)}+ {...props}+ />+));+AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;++const AlertDialogDescription = React.forwardRef<+ React.ComponentRef<typeof AlertDialogPrimitive.Description>,+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>+>(({ className, ...props }, ref) => (+ <AlertDialogPrimitive.Description+ ref={ref}+ className={cn("text-sm text-muted-foreground", className)}+ {...props}+ />+));+AlertDialogDescription.displayName =+ AlertDialogPrimitive.Description.displayName;++const AlertDialogAction = React.forwardRef<+ React.ComponentRef<typeof AlertDialogPrimitive.Action>,+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>+>(({ className, ...props }, ref) => (+ <AlertDialogPrimitive.Action+ ref={ref}+ className={cn(buttonVariants(), className)}+ {...props}+ />+));+AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;++const AlertDialogCancel = React.forwardRef<+ React.ComponentRef<typeof AlertDialogPrimitive.Cancel>,+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>+>(({ className, ...props }, ref) => (+ <AlertDialogPrimitive.Cancel+ ref={ref}+ className={cn(+ buttonVariants({ variant: "outline" }),+ "mt-2 sm:mt-0",+ className,+ )}+ {...props}+ />+));+AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;++export {+ AlertDialog,+ AlertDialogAction,+ AlertDialogCancel,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogOverlay,+ AlertDialogPortal,+ AlertDialogTitle,+ AlertDialogTrigger,+};diff --git a/frontend/src/components/ui/alert.tsx b/frontend/src/components/ui/alert.tsxnew file mode 100644index 000000000..acc82d11c--- /dev/null+++ b/frontend/src/components/ui/alert.tsx@@ -0,0 +1,59 @@+import { cva, type VariantProps } from "class-variance-authority";+import * as React from "react";++import { cn } from "@/lib/utils";++const alertVariants = cva(+ "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",+ {+ variants: {+ variant: {+ default: "bg-background text-foreground",+ destructive:+ "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",+ },+ },+ defaultVariants: {+ variant: "default",+ },+ },+);++const Alert = React.forwardRef<+ HTMLDivElement,+ React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>+>(({ className, variant, ...props }, ref) => (+ <div+ ref={ref}+ role="alert"+ className={cn(alertVariants({ variant }), className)}+ {...props}+ />+));+Alert.displayName = "Alert";++const AlertTitle = React.forwardRef<+ HTMLHeadingElement,+ React.HTMLAttributes<HTMLHeadingElement>+>(({ className, ...props }, ref) => (+ <h5+ ref={ref}+ className={cn("mb-1 font-medium leading-none tracking-tight", className)}+ {...props}+ />+));+AlertTitle.displayName = "AlertTitle";++const AlertDescription = React.forwardRef<+ HTMLDivElement,+ React.HTMLAttributes<HTMLDivElement>+>(({ className, ...props }, ref) => (+ <div+ ref={ref}+ className={cn("text-sm [&_p]:leading-relaxed", className)}+ {...props}+ />+));+AlertDescription.displayName = "AlertDescription";++export { Alert, AlertDescription, AlertTitle };diff --git a/frontend/src/components/ui/avatar.tsx b/frontend/src/components/ui/avatar.tsxnew file mode 100644index 000000000..d30fd7a8e--- /dev/null+++ b/frontend/src/components/ui/avatar.tsx@@ -0,0 +1,50 @@+"use client";++import { Avatar as AvatarPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Avatar = React.forwardRef<+ React.ComponentRef<typeof AvatarPrimitive.Root>,+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>+>(({ className, ...props }, ref) => (+ <AvatarPrimitive.Root+ ref={ref}+ className={cn(+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",+ className,+ )}+ {...props}+ />+));+Avatar.displayName = AvatarPrimitive.Root.displayName;++const AvatarImage = React.forwardRef<+ React.ComponentRef<typeof AvatarPrimitive.Image>,+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>+>(({ className, ...props }, ref) => (+ <AvatarPrimitive.Image+ ref={ref}+ className={cn("aspect-square h-full w-full", className)}+ {...props}+ />+));+AvatarImage.displayName = AvatarPrimitive.Image.displayName;++const AvatarFallback = React.forwardRef<+ React.ComponentRef<typeof AvatarPrimitive.Fallback>,+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>+>(({ className, ...props }, ref) => (+ <AvatarPrimitive.Fallback+ ref={ref}+ className={cn(+ "flex h-full w-full items-center justify-center rounded-full bg-muted",+ className,+ )}+ {...props}+ />+));+AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;++export { Avatar, AvatarFallback, AvatarImage };diff --git a/frontend/src/components/ui/badge.tsx b/frontend/src/components/ui/badge.tsxnew file mode 100644index 000000000..eff361d61--- /dev/null+++ b/frontend/src/components/ui/badge.tsx@@ -0,0 +1,51 @@+import { cva, type VariantProps } from "class-variance-authority";+import * as React from "react";++import { cn } from "@/lib/utils";++const badgeVariants = cva(+ "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",+ {+ variants: {+ variant: {+ default:+ "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",+ secondary:+ "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",+ destructive:+ "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",+ outline: "text-foreground",+ // P0-13: status variants for the "Done" / "In Process" / "Enabled"+ // badges used throughout the app. Backed by the --success / --warning+ // tokens added to the Midnight Bloom palette (§2.5.1).+ success:+ "border-transparent bg-success text-white shadow hover:bg-success/80",+ warning:+ "border-transparent bg-warning text-white shadow hover:bg-warning/80",+ },+ },+ defaultVariants: {+ variant: "default",+ },+ },+);++/*+ * forwardRef so the ref is part of the declared surface — the antd `Tag` shim+ * renders Badge with one. As with `Label`, React 19 would carry the ref+ * through the props spread at runtime either way; declaring it keeps the type+ * honest about what the component accepts.+ */+const Badge = React.forwardRef<+ HTMLDivElement,+ React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof badgeVariants>+>(({ className, variant, ...props }, ref) => (+ <div+ ref={ref}+ className={cn(badgeVariants({ variant }), className)}+ {...props}+ />+));+Badge.displayName = "Badge";++export { Badge, badgeVariants };diff --git a/frontend/src/components/ui/button.tsx b/frontend/src/components/ui/button.tsxnew file mode 100644index 000000000..324d01f5d--- /dev/null+++ b/frontend/src/components/ui/button.tsx@@ -0,0 +1,100 @@+import { cva, type VariantProps } from "class-variance-authority";+import { Slot } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++/*+ * `cursor-pointer` is explicit because Tailwind v4 dropped the preflight rule+ * that gave `<button>` a hand cursor in v3. antd set it on every button, so+ * losing it made the whole app feel inert on hover — the effect was app-wide,+ * not confined to one screen. `disabled:pointer-events-none` still wins for+ * disabled buttons, so they keep the default arrow.+ */+const buttonVariants = cva(+ "inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ {+ variants: {+ variant: {+ default: "bg-primary text-primary-foreground hover:bg-primary/90",+ destructive:+ "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",+ outline:+ "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",+ secondary:+ "bg-secondary text-secondary-foreground hover:bg-secondary/80",+ ghost:+ "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",+ link: "text-primary underline-offset-4 hover:underline",+ },+ size: {+ /*+ * Heights match the antd reference exactly: 32 / 24 / 40 for+ * default / sm / lg. shadcn ships 36 / 32 / 40, which put every+ * default control 4px taller than the app it is replacing and+ * collapsed the visual gap between default and small.+ */+ default: "h-8 px-4 py-2 has-[>svg]:px-3",+ xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",+ /* Same 24px height as `xs`, which is intended: antd has no size below+ * `small`, so the two coincide on height and differ only in type size+ * and padding. The antd shim maps `size="small"` here. */+ sm: "h-6 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",+ icon: "size-9",+ "icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",+ "icon-sm": "size-8",+ "icon-lg": "size-10",+ },+ },+ defaultVariants: {+ variant: "default",+ size: "default",+ },+ },+);++/**+ * forwardRef matters here: this Button is rendered as the child of Radix+ * triggers (Dropdown, Popover, Tooltip) via `asChild`, which attaches its+ * handlers through a ref. Without it those triggers are silently inert —+ * the Prompt Studio Export menu never opened and fired no request at all.+ */+/*+ * Typed because the antd-* shims wrap this component: without a props type+ * here, TypeScript cannot verify that a shim passes a real `variant`/`size`,+ * and the whole point of typing the shim layer is to make those boundaries+ * checkable.+ */+export interface ButtonProps+ extends React.ButtonHTMLAttributes<HTMLButtonElement>,+ VariantProps<typeof buttonVariants> {+ /** Render the child element instead of a <button> (Radix `asChild`). */+ asChild?: boolean;+}++const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(+ {+ className,+ variant = "default",+ size = "default",+ asChild = false,+ ...props+ },+ ref,+) {+ const Comp = asChild ? Slot.Root : "button";++ return (+ <Comp+ ref={ref}+ data-slot="button"+ data-variant={variant}+ data-size={size}+ className={cn(buttonVariants({ variant, size, className }))}+ {...props}+ />+ );+});++export { Button, buttonVariants };diff --git a/frontend/src/components/ui/calendar.tsx b/frontend/src/components/ui/calendar.tsxnew file mode 100644index 000000000..801e02522--- /dev/null+++ b/frontend/src/components/ui/calendar.tsx@@ -0,0 +1,155 @@+import {+ ChevronDown,+ ChevronLeft,+ ChevronRight,+ ChevronUp,+} from "lucide-react";+import * as React from "react";+import { DayPicker } from "react-day-picker";++import { cn } from "@/lib/utils";++/**+ * shadcn-style Calendar over react-day-picker v10.+ *+ * v10 ships NO stylesheet — it emits semantic class slots and expects the app+ * to supply the look. That suits us: every colour below is a Midnight Bloom+ * token, so the calendar tracks light/dark with everything else rather than+ * carrying a second palette the way antd's did.+ *+ * Slot names come from the library's `UI` / `DayFlag` / `SelectionState`+ * enums, so they are checked against the installed version rather than being+ * guessed strings.+ */+export type CalendarProps = React.ComponentProps<typeof DayPicker>;++function Calendar({+ className,+ classNames,+ showOutsideDays = true,+ ...props+}: CalendarProps) {+ return (+ <DayPicker+ showOutsideDays={showOutsideDays}+ className={cn("p-3", className)}+ classNames={{+ // Row, not `sm:flex-row`. Tailwind breakpoints measure the VIEWPORT,+ // and this renders inside a popover whose own width is what matters —+ // on a wide screen the months still stacked, making the popover 250px+ // wide and ~700px tall, which ran off the bottom of the window.+ /*+ * `relative` here, NOT on `month`. react-day-picker renders ONE nav for+ * the whole calendar, so anchoring the absolute prev/next buttons to+ * `.month` pinned both of them to the FIRST month — with+ * `numberOfMonths={2}` the "next" arrow landed mid-popover instead of+ * at the right edge. antd puts one pair at each outer edge.+ */+ months: "relative flex flex-row gap-4",+ month: "flex flex-col gap-4",+ /*+ * `px-8` clears the nav arrows. They are absolutely positioned at the+ * calendar's outer edges (below) while the caption centres itself in+ * the month, so a wide caption slid straight under them.+ */+ month_caption: "flex h-7 items-center justify-center px-8",+ caption_label: "inline-flex items-center gap-1 text-sm font-medium",+ /*+ * `captionLayout="dropdown"` swaps the caption for month/year selects+ * (antd's clickable month and year buttons). react-day-picker ships no+ * styles, so without these the selects render as raw browser controls.+ *+ * The shape it renders is a <select> AND a visible `caption_label`+ * span holding the same text — the select is meant to lie invisibly+ * over the span and take the clicks. Styling the SELECT as the visible+ * control instead drew both, so every caption read "August August ›"+ * and "2026 2026 ›" across two boxes and ran under the arrows.+ *+ * So: the root is the control users see, the select is a transparent+ * overlay on top of it, and the span supplies the text.+ */+ dropdowns: "flex items-center gap-1 text-sm font-medium",+ dropdown_root: cn(+ "relative inline-flex items-center rounded-md border border-input",+ "bg-transparent px-2 py-0.5",+ "hover:bg-accent",+ // The focus ring belongs to the border the user sees, but focus+ // lands on the invisible <select> inside it.+ "has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-ring",+ ),+ dropdown: cn(+ "absolute inset-0 size-full cursor-pointer opacity-0",+ // Safari renders a zero-opacity select as unclickable unless it is+ // still laid out as a control.+ "appearance-none bg-transparent",+ ),+ nav: "flex items-center gap-1",+ button_previous: cn(+ "absolute left-0 top-0 z-10 inline-flex size-7 items-center justify-center",+ "rounded-md border border-input bg-transparent",+ "opacity-50 hover:opacity-100 hover:bg-accent hover:text-accent-foreground",+ "disabled:pointer-events-none disabled:opacity-25",+ ),+ button_next: cn(+ "absolute right-0 top-0 z-10 inline-flex size-7 items-center justify-center",+ "rounded-md border border-input bg-transparent",+ "opacity-50 hover:opacity-100 hover:bg-accent hover:text-accent-foreground",+ "disabled:pointer-events-none disabled:opacity-25",+ ),+ month_grid: "w-full border-collapse space-y-1",+ weekdays: "flex",+ weekday:+ "w-8 rounded-md text-[0.8rem] font-normal text-muted-foreground",+ week: "mt-2 flex w-full",+ day: cn(+ "relative p-0 text-center text-sm",+ // Range middle needs a continuous band, so the rounding is applied+ // to the ends only (below) rather than to every cell.+ "focus-within:relative focus-within:z-20",+ "[&:has([aria-selected])]:bg-accent",+ "[&:has([aria-selected].day-range-end)]:rounded-r-md",+ "[&:has([aria-selected].day-range-start)]:rounded-l-md",+ ),+ day_button: cn(+ "inline-flex size-8 cursor-pointer items-center justify-center rounded-md p-0",+ "font-normal aria-selected:opacity-100 disabled:cursor-not-allowed",+ "hover:bg-accent hover:text-accent-foreground",+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",+ ),+ range_start:+ "day-range-start rounded-l-md bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",+ range_end:+ "day-range-end rounded-r-md bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",+ range_middle:+ "rounded-none bg-accent text-accent-foreground hover:bg-accent hover:text-accent-foreground",+ selected:+ "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",+ today: "bg-accent text-accent-foreground",+ outside: "text-muted-foreground opacity-50",+ disabled: "text-muted-foreground opacity-50",+ hidden: "invisible",+ ...classNames,+ }}+ components={{+ /*+ * react-day-picker asks for four orientations, not two: the nav arrows+ * are left/right, but the dropdown captions ask for "down". Falling+ * through to ChevronRight gave the month and year controls a+ * rightward chevron, so neither read as a dropdown.+ */+ Chevron: ({ orientation, ...rest }) => {+ const Icon = {+ left: ChevronLeft,+ right: ChevronRight,+ up: ChevronUp,+ down: ChevronDown,+ }[orientation ?? "right"];+ return <Icon className="size-4" {...rest} />;+ },+ }}+ {...props}+ />+ );+}++export { Calendar };diff --git a/frontend/src/components/ui/card.tsx b/frontend/src/components/ui/card.tsxnew file mode 100644index 000000000..5e1902cc9--- /dev/null+++ b/frontend/src/components/ui/card.tsx@@ -0,0 +1,83 @@+import * as React from "react";++import { cn } from "@/lib/utils";++const Card = React.forwardRef<+ HTMLDivElement,+ React.HTMLAttributes<HTMLDivElement>+>(({ className, ...props }, ref) => (+ <div+ ref={ref}+ className={cn(+ "rounded-xl border bg-card text-card-foreground shadow",+ className,+ )}+ {...props}+ />+));+Card.displayName = "Card";++const CardHeader = React.forwardRef<+ HTMLDivElement,+ React.HTMLAttributes<HTMLDivElement>+>(({ className, ...props }, ref) => (+ <div+ ref={ref}+ className={cn("flex flex-col space-y-1.5 p-6", className)}+ {...props}+ />+));+CardHeader.displayName = "CardHeader";++const CardTitle = React.forwardRef<+ HTMLDivElement,+ React.HTMLAttributes<HTMLDivElement>+>(({ className, ...props }, ref) => (+ <div+ ref={ref}+ className={cn("font-semibold leading-none tracking-tight", className)}+ {...props}+ />+));+CardTitle.displayName = "CardTitle";++const CardDescription = React.forwardRef<+ HTMLDivElement,+ React.HTMLAttributes<HTMLDivElement>+>(({ className, ...props }, ref) => (+ <div+ ref={ref}+ className={cn("text-sm text-muted-foreground", className)}+ {...props}+ />+));+CardDescription.displayName = "CardDescription";++const CardContent = React.forwardRef<+ HTMLDivElement,+ React.HTMLAttributes<HTMLDivElement>+>(({ className, ...props }, ref) => (+ <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />+));+CardContent.displayName = "CardContent";++const CardFooter = React.forwardRef<+ HTMLDivElement,+ React.HTMLAttributes<HTMLDivElement>+>(({ className, ...props }, ref) => (+ <div+ ref={ref}+ className={cn("flex items-center p-6 pt-0", className)}+ {...props}+ />+));+CardFooter.displayName = "CardFooter";++export {+ Card,+ CardContent,+ CardDescription,+ CardFooter,+ CardHeader,+ CardTitle,+};diff --git a/frontend/src/components/ui/cascade-and-affordances.test.jsx b/frontend/src/components/ui/cascade-and-affordances.test.jsxnew file mode 100644index 000000000..775b1bb2f--- /dev/null+++ b/frontend/src/components/ui/cascade-and-affordances.test.jsx@@ -0,0 +1,487 @@+import fs from "node:fs";+import path from "node:path";+import { render, screen } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { describe, expect, it } from "vitest";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { Popover, Tooltip } from "@/components/ui/shims/antd-overlays";+import { Textarea } from "@/components/ui/textarea";++/**+ * Guards for defects that jsdom cannot see directly.+ *+ * Two of these are cascade/affordance bugs that shipped to users and were+ * reported twice, but neither is observable through rendered geometry: jsdom+ * has no cascade-layer resolution and no cursor. So they are asserted the same+ * way `no-antd.test.js` asserts its invariant — against the source text and+ * the emitted class list.+ */+describe("cascade and affordance guards", () => {+ describe("default border colour stays inside @layer base", () => {+ const css = fs.readFileSync(+ path.join(process.cwd(), "src/index.css"),+ "utf8",+ );++ it("wraps the universal border-color rule in @layer base", () => {+ // Unlayered CSS outranks EVERY layered rule regardless of specificity.+ // Outside a layer this selector beat Tailwind's `utilities` layer and+ // repainted `border-input`, so form controls silently rendered with+ // --border (#e5e5e5) instead of --input (#d3d3d3).+ const match = css.match(+ /@layer base\s*\{[\s\S]*?::file-selector-button\s*\{[^}]*border-color:\s*var\(--border\)/,+ );+ expect(+ match,+ "the `*, ::after, ::before…{border-color}` rule must live in @layer base, or it overrides every border-* utility",+ ).toBeTruthy();+ });++ /*+ * A Tailwind colour utility only exists if the token is registered in+ * `@theme inline`. `divide-separator` (the antd-matching list hairline)+ * would otherwise compile to nothing and the rows would lose their rule+ * silently — no error, no failing test, just a visual regression.+ */+ it("exposes --separator to Tailwind for both themes", () => {+ expect(+ css,+ "--color-separator must be in @theme inline or `divide-separator` does not exist",+ ).toMatch(+ /@theme inline\s*\{[\s\S]*?--color-separator:\s*var\(--separator\)/,+ );+ // Declared for light...+ expect(css).toMatch(/:root\s*\{[\s\S]*?--separator:/);+ // ...and dark, or dark mode falls back to the light hairline.+ expect(css).toMatch(/\.dark\s*\{[\s\S]*?--separator:/);+ });++ it("form controls ask for --input, not the generic --border", () => {+ // If a text control ever drops to a bare `border`, it renders a+ // different grey from its neighbours — worse than the original bug.+ render(<Input />);+ expect(screen.getByRole("textbox").className).toContain("border-input");+ });++ it("textarea matches the input's border token", () => {+ render(<Textarea />);+ expect(screen.getByRole("textbox").className).toContain("border-input");+ });+ });++ describe("pointer cursor (Tailwind v4 dropped the preflight)", () => {+ it("buttons carry cursor-pointer", () => {+ render(<Button>Click</Button>);+ expect(screen.getByRole("button").className).toContain("cursor-pointer");+ });++ it("dialog and sheet close buttons carry cursor-pointer", () => {+ // Radix renders these as bare <button>s inside the primitive, so they+ // never pass through the Button variants that supply the cursor.+ const dialog = fs.readFileSync(+ path.join(process.cwd(), "src/components/ui/dialog.tsx"),+ "utf8",+ );+ const sheet = fs.readFileSync(+ path.join(process.cwd(), "src/components/ui/sheet.tsx"),+ "utf8",+ );+ for (const [name, src] of [+ ["dialog", dialog],+ ["sheet", sheet],+ ]) {+ const close = src.match(/\.Close className="([^"]*)"/);+ expect(+ close,+ `${name} should render a .Close with a className`,+ ).toBeTruthy();+ expect(+ close[1],+ `the ${name} close button needs cursor-pointer — Tailwind v4 dropped the preflight`,+ ).toContain("cursor-pointer");+ }+ });++ /*+ * antd shipped an icon FONT, so `font-size` sized its icons. lucide ships+ * SVGs, which ignore font-size entirely and fall back to their own 24px+ * default — every such rule silently renders its icon oversized.+ *+ * Matching on selector NAMES (icon|svg|anticon…) was the first version of+ * this guard and it missed the real ones: `.prompt-card-actions-head`+ * carries eight lucide icons and has no icon-ish word in its name, so the+ * whole prompt-card action row rendered 16px against the reference's 12.+ *+ * So this reads the JSX instead: collect every class applied to a lucide+ * component (they are PascalCase imports from lucide-react), then flag any+ * CSS rule that sizes one of those classes with font-size alone.+ */+ it("classes on lucide icons set explicit dimensions, not just font-size", () => {+ const iconClasses = new Set();+ const cssRules = [];++ const walk = (dir) => {+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {+ const full = path.join(dir, entry.name);+ if (entry.isDirectory()) {+ if (entry.name !== "node_modules") walk(full);+ continue;+ }+ const txt = fs.readFileSync(full, "utf8");++ if (/\.(jsx|tsx)$/.test(entry.name)) {+ // Only files that actually import icons from lucide-react.+ const imports = txt.match(+ /import\s*\{([^}]*)\}\s*from\s*"lucide-react"/,+ );+ if (!imports) continue;+ const names = imports[1]+ .split(",")+ .map((n) =>+ n+ .trim()+ .split(/\s+as\s+/)+ .pop()+ .trim(),+ )+ .filter(Boolean);+ for (const name of names) {+ const re = new RegExp(+ `<${name}\\b[^>]*className=[{"]\`?([^"\`}]*)`,+ "g",+ );+ for (const m of txt.matchAll(re)) {+ for (const cls of m[1].split(/\s+/)) {+ // Skip template holes and Tailwind utilities.+ if (cls && !cls.includes("$") && !cls.includes("-[")) {+ iconClasses.add(cls);+ }+ }+ }+ }+ continue;+ }++ if (!entry.name.endsWith(".css")) continue;+ for (const m of txt.matchAll(/([^{}]*)\{([^}]*)\}/g)) {+ const sel = m[1].trim().split("\n").pop().trim();+ const body = m[2];+ if (!/font-size:\s*\d+px/.test(body)) continue;+ if (/width|height/.test(body)) continue;+ cssRules.push({+ file: path.relative(process.cwd(), full),+ sel,+ classes: [...sel.matchAll(/\.([a-zA-Z][\w-]*)/g)].map(+ (c) => c[1],+ ),+ });+ }+ }+ };+ walk(path.join(process.cwd(), "src"));++ const offenders = cssRules+ .filter((r) => r.classes.some((c) => iconClasses.has(c)))+ .map((r) => `${r.file}: ${r.sel}`);++ expect(+ offenders,+ "these rules size a lucide SVG with font-size, which does nothing — set width/height",+ ).toEqual([]);+ });++ it("keeps the not-allowed affordance for disabled buttons", () => {+ render(<Button disabled>Nope</Button>);+ // `disabled:pointer-events-none` suppresses the hand; the class list+ // still carries the base cursor, so assert the disabled rule survives.+ expect(screen.getByRole("button").className).toContain(+ "disabled:pointer-events-none",+ );+ });+ });++ describe("antd Popover shim", () => {+ it("supplies onOpenChange even when the call-site passes none", () => {+ // antd call-sites drive `open` from their own trigger and pass no+ // change handler. Radix reads a bare `open` as fully controlled, so+ // without a supplied handler Esc and outside-click cannot close it.+ const { container } = render(+ <Popover open content={<span>body</span>}>+ <button type="button">trigger</button>+ </Popover>,+ );+ expect(screen.getByText("body")).toBeInTheDocument();+ expect(container).toBeTruthy();+ });++ /*+ * `trigger="hover"` was destructured and then ignored, so the sidebar's+ * HITL and Platform fly-out menus never opened on hover — Radix Popover+ * is click-only. A dropped prop like this raises no error and no warning,+ * which is why it needs a behavioural test rather than a class check.+ */+ it("opens on hover when the call-site asks for trigger='hover'", async () => {+ const user = userEvent.setup();+ render(+ <Popover trigger="hover" content={<span>fly-out</span>}>+ <button type="button">Platform</button>+ </Popover>,+ );+ expect(screen.queryByText("fly-out")).not.toBeInTheDocument();+ await user.hover(screen.getByRole("button", { name: "Platform" }));+ expect(await screen.findByText("fly-out")).toBeInTheDocument();+ });++ /*+ * The sidebar's real shape, and why the first hover fix did not work.+ *+ * Every sidebar item wraps its content in a Tooltip, so the Popover's+ * `asChild` trigger merges the hover handlers onto the TOOLTIP, not a DOM+ * node. The Tooltip shim then either returned `children` raw (when there+ * is no title — the expanded sidebar) or spread the props onto the tooltip+ * BUBBLE, so the handlers never reached the element under the cursor.+ *+ * Both variants are asserted because the collapsed sidebar has a title and+ * the expanded one does not — the earlier flat test passed while the real+ * nesting stayed broken.+ */+ it.each([+ ["without a tooltip title (expanded sidebar)", ""],+ ["with a tooltip title (collapsed sidebar)", "Platform"],+ ])("opens on hover through a nested Tooltip %s", async (_label, title) => {+ const user = userEvent.setup();+ render(+ <Popover trigger="hover" content={<span>sub-menu</span>}>+ <Tooltip title={title}>+ <button type="button">Platform</button>+ </Tooltip>+ </Popover>,+ );+ expect(screen.queryByText("sub-menu")).not.toBeInTheDocument();+ await user.hover(screen.getByRole("button", { name: "Platform" }));+ expect(await screen.findByText("sub-menu")).toBeInTheDocument();+ });++ it("stays click-only when no trigger is given", async () => {+ const user = userEvent.setup();+ render(+ <Popover content={<span>clicky</span>}>+ <button type="button">Open</button>+ </Popover>,+ );+ await user.hover(screen.getByRole("button", { name: "Open" }));+ expect(screen.queryByText("clicky")).not.toBeInTheDocument();+ });++ it("does not leak antd-only props onto the DOM", () => {+ render(+ <Popover open trigger="click" arrow={false} content={<span>c</span>}>+ <button type="button">t</button>+ </Popover>,+ );+ // `trigger` and `arrow` are antd's API, not Radix's; React would warn+ // and the attributes would land on the element.+ const trigger = screen.getByText("t");+ expect(trigger.getAttribute("trigger")).toBeNull();+ expect(trigger.getAttribute("arrow")).toBeNull();+ });+ });+ /**+ * The "left and right borders are missing" report, three rounds running.+ * The borders were always drawn; `shadow-sm` (a vertical-only offset)+ * reinforced the top and bottom edges so the bare 1px sides looked absent+ * beside them. The antd reference computes `box-shadow: none`.+ */+ describe("form controls draw an even border on all four sides", () => {+ it("Input carries no vertical-offset shadow", () => {+ render(<Input />);+ expect(screen.getByRole("textbox").className).not.toContain("shadow-sm");+ });++ it("Textarea carries no vertical-offset shadow", () => {+ render(<Textarea />);+ expect(screen.getByRole("textbox").className).not.toContain("shadow-sm");+ });+ });+ /**+ * React 19 stopped applying `defaultProps` to FUNCTION components — the+ * declaration is simply ignored, so every default silently becomes+ * undefined. That is the same silent-prop-drop class that produced the+ * Save-does-nothing bug, so it is guarded rather than trusted.+ *+ * Class components still honour defaultProps, which is why ErrorBoundary+ * is allowed to keep its block.+ */+ it("no function component relies on defaultProps (React 19)", () => {+ const SRC = path.join(process.cwd(), "src");+ const offenders = [];+ const walk = (dir) => {+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {+ const full = path.join(dir, entry.name);+ if (entry.isDirectory()) {+ if (entry.name !== "node_modules") {+ walk(full);+ }+ continue;+ }+ // .tsx too — a `.jsx`-only filter would stop checking each shim as it+ // converts to TypeScript, and this guard would pass over less and less.+ if (!/\.[jt]sx$/.test(entry.name) || entry.name.includes(".test.")) {+ continue;+ }+ const src = fs.readFileSync(full, "utf8");+ const m = src.match(/^(\w+)\.defaultProps\s*=/m);+ if (m && !new RegExp(`class\\s+${m[1]}\\s+extends`).test(src)) {+ offenders.push(`${path.relative(SRC, full)} (${m[1]})`);+ }+ }+ };+ walk(SRC);+ expect(+ offenders,+ "React 19 ignores defaultProps on function components — use default parameters instead",+ ).toEqual([]);+ });++ /*+ * antd's Tooltip accepts any child, including a bare string. Ours renders a+ * Radix TooltipTrigger with `asChild`, which slots onto a single ELEMENT and+ * throws "Primitive.button failed to slot onto its children" on text — the+ * route-level error boundary then turns that into "Couldn't load this page".+ *+ * A source scan, not a render test, because these live inside table column+ * `render()` callbacks: they only execute when a row exists, so an+ * empty-list smoke test walks straight past them. That is exactly how one+ * shipped in ResourceTable and another in LogsTable.+ */+ it("no <Tooltip> wraps a bare value instead of an element", () => {+ const SRC = path.join(process.cwd(), "src");+ const offenders = [];+ /*+ * `[^>]*` for the attributes would be wrong: `title={a > b}` and any+ * multi-line prop containing `>` (a `.map()` arrow, a comparison) end the+ * match early and make the REST of the attribute list look like the child.+ * Match balanced braces instead, so the open tag ends at the real `>`.+ */+ const TOOLTIP =+ /<Tooltip\b(?:[^>{]|\{(?:[^{}]|\{[^{}]*\})*\})*>\s*([\s\S]*?)\s*<\/Tooltip>/g;++ const walk = (dir) => {+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {+ const full = path.join(dir, entry.name);+ if (entry.isDirectory()) {+ if (entry.name !== "node_modules") {+ walk(full);+ }+ continue;+ }+ if (!/\.[jt]sx$/.test(entry.name) || entry.name.includes(".test.")) {+ continue;+ }+ const src = fs.readFileSync(full, "utf8");+ for (const m of src.matchAll(TOOLTIP)) {+ const child = m[1].trim();+ // An element child is fine; so is a comment (the JSX below it is the+ // real child) and a conditional whose branches render elements.+ if (child.startsWith("<") || child.startsWith("{/*")) {+ continue;+ }+ // `{cond && <El/>}` / `{cond ? <El/> : <El/>}` — the value that+ // reaches Radix is still an element.+ if (/[&?]{1,2}\s*\(?\s*</.test(child)) {+ continue;+ }+ // `{content}` where the same file does `const content = (<span…`.+ // Narrow on purpose: only a local binding whose initialiser is+ // literal JSX counts, so an imported or computed value still fails.+ const ident = child.match(/^\{\s*([A-Za-z_$][\w$]*)\s*\}$/)?.[1];+ if (+ ident &&+ new RegExp(`const\\s+${ident}\\s*=\\s*\\(?\\s*<`).test(src)+ ) {+ continue;+ }+ const line = src.slice(0, m.index).split("\n").length;+ offenders.push(+ `${path.relative(SRC, full)}:${line} → ${child.slice(0, 60)}`,+ );+ }+ }+ };+ walk(SRC);++ expect(+ offenders,+ "Radix slots onto a single element child — wrap the value in a <span>",+ ).toEqual([]);+ });+ /*+ * Tailwind v3 let you name a custom property bare inside an arbitrary+ * value, with no var() around it. v4 removed that shorthand and emits the+ * value verbatim, so the browser sees a property name where a value should+ * be, drops the declaration, and the utility silently does nothing.+ * Nothing errors: not the build, not the linter, not jsdom.+ *+ * NB: the examples above are described rather than written out, because+ * Tailwind scans this file too — spelling the broken form here would emit+ * the very dead rule the build-level `grep` for it is meant to catch.+ *+ * That is how SelectContent lost its max-height in the migration — the+ * Prompt Studio LLM dropdown grew to the full option-list height and ran+ * off the bottom of a scroll-locked page with no way to reach the rest.+ * Four `origin-` utilities on popover/tooltip/dropdown-menu were dead the+ * same way, which is why this guards the pattern rather than the one class.+ */+ describe("no Tailwind v3 bare-custom-property shorthand", () => {+ it("wraps every arbitrary custom-property value in var()", () => {+ const SRC = path.join(process.cwd(), "src");+ // `-[--name]` and nothing else inside the brackets. Deliberately does+ // NOT match `data-[state=open]`, `[&_svg]`, `max-h-[var(--x)]`, or v4+ // arbitrary *properties* like `[--x:red]` (those carry a `:`).+ const V3_SHORTHAND = /[a-z0-9]-\[--[a-zA-Z][\w-]*\]/g;+ const offenders = [];++ const walk = (dir) => {+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {+ const full = path.join(dir, entry.name);+ if (entry.isDirectory()) {+ if (entry.name !== "node_modules") walk(full);+ continue;+ }+ // Skip test files — this guard's own regex literal would match.+ if (!/\.[jt]sx?$/.test(entry.name) || entry.name.includes(".test.")) {+ continue;+ }+ const src = fs.readFileSync(full, "utf8");+ for (const m of src.matchAll(V3_SHORTHAND)) {+ const line = src.slice(0, m.index).split("\n").length;+ offenders.push(`${path.relative(SRC, full)}:${line} → ${m[0]}`);+ }+ }+ };+ walk(SRC);++ expect(+ offenders,+ "Tailwind v4 removed `util-[--var]`; these compile to an invalid " ++ "declaration the browser discards. Write `util-[var(--var)]`.",+ ).toEqual([]);+ });++ /*+ * Guards against "fixing" a future failure of the test above by deleting+ * the utility instead of repairing it. Without a max-height the dropdown+ * grows to the full option list and runs off the bottom of the page.+ */+ it("SelectContent still declares a max-height", () => {+ const src = fs.readFileSync(+ path.join(process.cwd(), "src/components/ui/select.tsx"),+ "utf8",+ );+ expect(src).toMatch(+ /max-h-\[[^\]]*--radix-select-content-available-height[^\]]*\]/,+ );+ });+ });+});diff --git a/frontend/src/components/ui/checkbox.tsx b/frontend/src/components/ui/checkbox.tsxnew file mode 100644index 000000000..f342db599--- /dev/null+++ b/frontend/src/components/ui/checkbox.tsx@@ -0,0 +1,30 @@+"use client";++import { Check } from "lucide-react";+import { Checkbox as CheckboxPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Checkbox = React.forwardRef<+ React.ComponentRef<typeof CheckboxPrimitive.Root>,+ React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>+>(({ className, ...props }, ref) => (+ <CheckboxPrimitive.Root+ ref={ref}+ className={cn(+ "grid place-content-center peer h-4 w-4 shrink-0 cursor-pointer rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",+ className,+ )}+ {...props}+ >+ <CheckboxPrimitive.Indicator+ className={cn("grid place-content-center text-current")}+ >+ <Check className="h-4 w-4" />+ </CheckboxPrimitive.Indicator>+ </CheckboxPrimitive.Root>+));+Checkbox.displayName = CheckboxPrimitive.Root.displayName;++export { Checkbox };diff --git a/frontend/src/components/ui/collapsible.tsx b/frontend/src/components/ui/collapsible.tsxnew file mode 100644index 000000000..d7684c9c9--- /dev/null+++ b/frontend/src/components/ui/collapsible.tsx@@ -0,0 +1,11 @@+"use client";++import { Collapsible as CollapsiblePrimitive } from "radix-ui";++const Collapsible = CollapsiblePrimitive.Root;++const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;++const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;++export { Collapsible, CollapsibleContent, CollapsibleTrigger };diff --git a/frontend/src/components/ui/css-collisions.test.js b/frontend/src/components/ui/css-collisions.test.jsnew file mode 100644index 000000000..ab597be29--- /dev/null+++ b/frontend/src/components/ui/css-collisions.test.js@@ -0,0 +1,94 @@+import fs from "node:fs";+import path from "node:path";+import { describe, expect, it } from "vitest";++/**+ * antd's Modal wrapper is statically positioned, so app CSS could set+ * `top: 20px` on a modal root and get "20px from the top of the viewport".+ *+ * The shadcn Dialog is `position: fixed` and centres itself with+ * `top: 50%` + `translateY(-50%)`. The same rule now overrides the centring,+ * and the transform pulls the dialog ABOVE the viewport — the header ends up+ * clipped off-screen. That is exactly what happened to `.prompt-studio-modal`,+ * and it was invisible in jsdom because there is no layout engine.+ *+ * This guards the whole stylesheet set rather than the one rule that bit us.+ */++const CSS_ROOT = path.resolve(import.meta.dirname, "../..");++function collectCssFiles(dir, acc = []) {+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {+ const full = path.join(dir, entry.name);+ if (entry.isDirectory()) {+ if (entry.name === "node_modules") {+ continue;+ }+ collectCssFiles(full, acc);+ continue;+ }+ if (entry.name.endsWith(".css")) {+ acc.push(full);+ }+ }+ return acc;+}++/**+ * Selectors that target a modal/dialog ROOT — not an element inside one.+ * `.foo-modal` and `.foo-modal.bar` count; `.foo-modal__body` and+ * `.foo-modal .thing` do not, since those are children and cannot fight the+ * root's positioning.+ */+function isModalRootSelector(selector) {+ const trimmed = selector.trim();+ if (/\s/.test(trimmed)) {+ return false;+ }+ if (trimmed.includes("__") || trimmed.includes(">")) {+ return false;+ }+ if (trimmed.includes(".ant-")) {+ return false;+ }+ return /modal|dialog/i.test(trimmed);+}++describe("CSS that would fight the Dialog's centring", () => {+ const files = collectCssFiles(CSS_ROOT);++ it("finds stylesheets to check", () => {+ expect(files.length).toBeGreaterThan(0);+ });++ it("no modal root sets `top`, `bottom` or `transform`", () => {+ const offenders = [];++ for (const file of files) {+ const css = fs.readFileSync(file, "utf8");+ for (const match of css.matchAll(/([^{}]+)\{([^}]*)\}/g)) {+ const [, rawSelector, body] = match;+ for (const selector of rawSelector.split(",")) {+ if (!isModalRootSelector(selector)) {+ continue;+ }+ const bad = body.match(/(^|;)\s*(top|bottom|transform)\s*:[^;]*/i);+ if (bad) {+ offenders.push(+ `${path.basename(file)} ${selector.trim()} {${bad[0].trim()}}`,+ );+ }+ }+ }+ }++ expect(+ offenders,+ "These rules position a modal ROOT. The Dialog centres itself with " ++ "top:50% + translateY(-50%), so they override the centring and push " ++ "the dialog off-screen. Move the offset to an inner element, or drop " ++ "it and let the component centre.\n " ++ offenders.join("\n "),+ ).toEqual([]);+ });+});diff --git a/frontend/src/components/ui/debounced-handlers.test.jsx b/frontend/src/components/ui/debounced-handlers.test.jsxnew file mode 100644index 000000000..6f939f1cd--- /dev/null+++ b/frontend/src/components/ui/debounced-handlers.test.jsx@@ -0,0 +1,174 @@+import { act, fireEvent, render, screen } from "@testing-library/react";+import { MemoryRouter } from "react-router-dom";+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++/**+ * Search handlers built on `lodash/debounce` must survive a re-render.+ *+ * Each of these components declared its handler inline in the component body —+ * `const onSearchDebounce = debounce(fn, 600)`. That is a NEW debounced+ * instance every render, so a render between two keystrokes orphans the armed+ * timer instead of resetting it: both eventually fire and the "debounce"+ * degrades to one call per keystroke. SonarCloud flags it as javascript:S9114.+ *+ * THE RE-RENDER IS THE WHOLE TEST. These inputs are uncontrolled, so typing on+ * its own does not re-render the component and even the inline version looks+ * correctly debounced — which is why a naive test passes against the bug. In+ * the app the re-render arrives from somewhere else (the parent committing the+ * previous result, a context update, a sibling's state), so these tests supply+ * it explicitly with `rerender`. Drop that and they stop discriminating.+ *+ * Guard the other half of the fix too: memoising with the wrong deps silences+ * Sonar while pinning the closure to its mount-time props, so one case checks+ * the handler still sees the CURRENT data.+ */++const navigate = vi.fn();+vi.mock("react-router-dom", async () => {+ const actual = await vi.importActual("react-router-dom");+ return { ...actual, useNavigate: () => navigate };+});++// Imported after the mock is registered.+const { TopBar } = await import("@/components/widgets/top-bar/TopBar");+const { ListOfSources } = await import(+ "@/components/input-output/list-of-sources/ListOfSources"+);++beforeEach(() => {+ vi.useFakeTimers({ shouldAdvanceTime: true });+});++afterEach(() => {+ vi.useRealTimers();+ vi.clearAllMocks();+});++/**+ * Type `text` one character at a time, re-rendering between keystrokes and+ * never pausing long enough to close the debounce window.+ */+function typeThrough(input, text, rerender, makeTree) {+ let sofar = "";+ for (const ch of text) {+ sofar += ch;+ act(() => {+ fireEvent.change(input, { target: { value: sofar } });+ });+ // A FRESH element every time: re-rendering the same element object is a+ // referential no-op that React skips, which silently defeats this test.+ rerender(makeTree());+ }+}++describe("debounced search handlers survive a re-render", () => {+ it("TopBar filters once for a burst of keystrokes, not once per key", () => {+ const setFilteredUserList = vi.fn();+ const searchData = [+ { email: "[email protected]" },+ { email: "[email protected]" },+ ];+ const makeTree = () => (+ <MemoryRouter>+ <TopBar+ title="Users"+ enableSearch+ searchData={searchData}+ setFilteredUserList={setFilteredUserList}+ />+ </MemoryRouter>+ );++ const { rerender } = render(makeTree());+ typeThrough(+ screen.getByTestId("top-bar-search"),+ "ada",+ rerender,+ makeTree,+ );++ // Still inside the 600ms window.+ expect(setFilteredUserList).not.toHaveBeenCalled();++ act(() => {+ vi.advanceTimersByTime(600);+ });++ // ONE call for three keystrokes. With the handler rebuilt each render this+ // was three, each firing with its own orphaned timer.+ expect(setFilteredUserList).toHaveBeenCalledTimes(1);+ expect(setFilteredUserList).toHaveBeenCalledWith([+ { email: "[email protected]" },+ ]);+ });++ it("TopBar filters against the CURRENT searchData, not the mount-time list", () => {+ const setFilteredUserList = vi.fn();+ const treeWith = (searchData) => (+ <MemoryRouter>+ <TopBar+ title="Users"+ enableSearch+ searchData={searchData}+ setFilteredUserList={setFilteredUserList}+ />+ </MemoryRouter>+ );++ const { rerender } = render(treeWith([{ email: "[email protected]" }]));++ // The users load after mount — the case a `useMemo(..., [])` would break.+ const loaded = [+ { email: "[email protected]" },+ { email: "[email protected]" },+ ];+ rerender(treeWith(loaded));++ typeThrough(screen.getByTestId("top-bar-search"), "ada", rerender, () =>+ treeWith(loaded),+ );+ act(() => {+ vi.advanceTimersByTime(600);+ });++ expect(setFilteredUserList).toHaveBeenCalledTimes(1);+ expect(setFilteredUserList).toHaveBeenCalledWith(loaded);+ });++ it("ListOfSources holds one 300ms window open across a burst of keystrokes", () => {+ const sourcesList = [{ id: "1", name: "Google Drive" }];+ const makeTree = () => (+ <ListOfSources+ setSelectedSourceId={vi.fn()}+ sourcesList={sourcesList}+ type="input"+ isConnector={false}+ connectorMode={null}+ />+ );+ const { rerender } = render(makeTree());+ const input = screen.getByPlaceholderText(/search/i);++ // Four keystrokes 100ms apart: 400ms of wall clock but no 300ms GAP, so a+ // correctly debounced handler has not fired and the row is still listed.+ // Rebuilt per render, the first keystroke's orphaned timer has already+ // elapsed and filtered "Google Drive" away.+ let sofar = "";+ for (const ch of "zzzz") {+ sofar += ch;+ act(() => {+ fireEvent.change(input, { target: { value: sofar } });+ vi.advanceTimersByTime(100);+ });+ rerender(makeTree());+ }+ expect(screen.getByText("Google Drive")).toBeInTheDocument();++ // Let the window actually elapse: "zzzz" matches nothing, so the row goes.+ // This is what proves the handler ran at all rather than never firing.+ act(() => {+ vi.advanceTimersByTime(300);+ });+ expect(screen.queryByText("Google Drive")).not.toBeInTheDocument();+ });+});diff --git a/frontend/src/components/ui/dialog.tsx b/frontend/src/components/ui/dialog.tsxnew file mode 100644index 000000000..042d69792--- /dev/null+++ b/frontend/src/components/ui/dialog.tsx@@ -0,0 +1,129 @@+import { X } from "lucide-react";+import { Dialog as DialogPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Dialog = DialogPrimitive.Root;++const DialogTrigger = DialogPrimitive.Trigger;++const DialogPortal = DialogPrimitive.Portal;++const DialogClose = DialogPrimitive.Close;++/*+ * z-[1100], not shadcn's stock z-50: this app predates the Tailwind z scale and+ * still has chrome parked in the hundreds/thousands (`.logs-container` is 999,+ * the agency canvas and settings rail are 1000), so a z-50 overlay left the+ * Logs footer painting bright over the dimmed page. Sits above that legacy band+ * but below `[data-radix-popper-content-wrapper]` (1500, so a Select opened+ * inside a modal still clears it) and `.fullscreen-loader` (2000) — see+ * index.css.+ */+const DialogOverlay = React.forwardRef<+ React.ComponentRef<typeof DialogPrimitive.Overlay>,+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>+>(({ className, ...props }, ref) => (+ <DialogPrimitive.Overlay+ ref={ref}+ className={cn(+ "fixed inset-0 z-[1100] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",+ className,+ )}+ {...props}+ />+));+DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;++const DialogContent = React.forwardRef<+ React.ComponentRef<typeof DialogPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>+>(({ className, children, ...props }, ref) => (+ <DialogPortal>+ <DialogOverlay />+ <DialogPrimitive.Content+ ref={ref}+ className={cn(+ "fixed left-[50%] top-[50%] z-[1100] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-card p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",+ className,+ )}+ {...props}+ >+ {children}+ <DialogPrimitive.Close className="absolute right-4 top-4 cursor-pointer rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">+ <X className="h-4 w-4" />+ <span className="sr-only">Close</span>+ </DialogPrimitive.Close>+ </DialogPrimitive.Content>+ </DialogPortal>+));+DialogContent.displayName = DialogPrimitive.Content.displayName;++const DialogHeader = ({+ className,+ ...props+}: React.HTMLAttributes<HTMLDivElement>) => (+ <div+ className={cn(+ "flex flex-col space-y-1.5 text-center sm:text-left",+ className,+ )}+ {...props}+ />+);+DialogHeader.displayName = "DialogHeader";++const DialogFooter = ({+ className,+ ...props+}: React.HTMLAttributes<HTMLDivElement>) => (+ <div+ className={cn(+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",+ className,+ )}+ {...props}+ />+);+DialogFooter.displayName = "DialogFooter";++const DialogTitle = React.forwardRef<+ React.ComponentRef<typeof DialogPrimitive.Title>,+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>+>(({ className, ...props }, ref) => (+ <DialogPrimitive.Title+ ref={ref}+ className={cn(+ "text-lg font-semibold leading-none tracking-tight",+ className,+ )}+ {...props}+ />+));+DialogTitle.displayName = DialogPrimitive.Title.displayName;++const DialogDescription = React.forwardRef<+ React.ComponentRef<typeof DialogPrimitive.Description>,+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>+>(({ className, ...props }, ref) => (+ <DialogPrimitive.Description+ ref={ref}+ className={cn("text-sm text-muted-foreground", className)}+ {...props}+ />+));+DialogDescription.displayName = DialogPrimitive.Description.displayName;++export {+ Dialog,+ DialogClose,+ DialogContent,+ DialogDescription,+ DialogFooter,+ DialogHeader,+ DialogOverlay,+ DialogPortal,+ DialogTitle,+ DialogTrigger,+};diff --git a/frontend/src/components/ui/dropdown-menu.tsx b/frontend/src/components/ui/dropdown-menu.tsxnew file mode 100644index 000000000..dd464ade0--- /dev/null+++ b/frontend/src/components/ui/dropdown-menu.tsx@@ -0,0 +1,204 @@+"use client";++import { Check, ChevronRight, Circle } from "lucide-react";+import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const DropdownMenu = DropdownMenuPrimitive.Root;++const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;++const DropdownMenuGroup = DropdownMenuPrimitive.Group;++const DropdownMenuPortal = DropdownMenuPrimitive.Portal;++const DropdownMenuSub = DropdownMenuPrimitive.Sub;++const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;++const DropdownMenuSubTrigger = React.forwardRef<+ React.ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {+ /** shadcn addition: indents to align with items that have icons. */+ inset?: boolean;+ }+>(({ className, inset, children, ...props }, ref) => (+ <DropdownMenuPrimitive.SubTrigger+ ref={ref}+ className={cn(+ "flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",+ inset && "pl-8",+ className,+ )}+ {...props}+ >+ {children}+ <ChevronRight className="ml-auto" />+ </DropdownMenuPrimitive.SubTrigger>+));+DropdownMenuSubTrigger.displayName =+ DropdownMenuPrimitive.SubTrigger.displayName;++const DropdownMenuSubContent = React.forwardRef<+ React.ComponentRef<typeof DropdownMenuPrimitive.SubContent>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>+>(({ className, ...props }, ref) => (+ <DropdownMenuPrimitive.SubContent+ ref={ref}+ className={cn(+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-dropdown-menu-content-transform-origin)]",+ className,+ )}+ {...props}+ />+));+DropdownMenuSubContent.displayName =+ DropdownMenuPrimitive.SubContent.displayName;++const DropdownMenuContent = React.forwardRef<+ React.ComponentRef<typeof DropdownMenuPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>+>(({ className, sideOffset = 4, ...props }, ref) => (+ <DropdownMenuPrimitive.Portal>+ <DropdownMenuPrimitive.Content+ ref={ref}+ sideOffset={sideOffset}+ className={cn(+ "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-dropdown-menu-content-transform-origin)]",+ className,+ )}+ {...props}+ />+ </DropdownMenuPrimitive.Portal>+));+DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;++const DropdownMenuItem = React.forwardRef<+ React.ComponentRef<typeof DropdownMenuPrimitive.Item>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {+ /** shadcn addition: indents to align with items that have icons. */+ inset?: boolean;+ }+>(({ className, inset, ...props }, ref) => (+ <DropdownMenuPrimitive.Item+ ref={ref}+ className={cn(+ "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",+ inset && "pl-8",+ className,+ )}+ {...props}+ />+));+DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;++const DropdownMenuCheckboxItem = React.forwardRef<+ React.ComponentRef<typeof DropdownMenuPrimitive.CheckboxItem>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>+>(({ className, children, checked, ...props }, ref) => (+ <DropdownMenuPrimitive.CheckboxItem+ ref={ref}+ className={cn(+ "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ className,+ )}+ checked={checked}+ {...props}+ >+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">+ <DropdownMenuPrimitive.ItemIndicator>+ <Check className="h-4 w-4" />+ </DropdownMenuPrimitive.ItemIndicator>+ </span>+ {children}+ </DropdownMenuPrimitive.CheckboxItem>+));+DropdownMenuCheckboxItem.displayName =+ DropdownMenuPrimitive.CheckboxItem.displayName;++const DropdownMenuRadioItem = React.forwardRef<+ React.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>+>(({ className, children, ...props }, ref) => (+ <DropdownMenuPrimitive.RadioItem+ ref={ref}+ className={cn(+ "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ className,+ )}+ {...props}+ >+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">+ <DropdownMenuPrimitive.ItemIndicator>+ <Circle className="h-2 w-2 fill-current" />+ </DropdownMenuPrimitive.ItemIndicator>+ </span>+ {children}+ </DropdownMenuPrimitive.RadioItem>+));+DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;++const DropdownMenuLabel = React.forwardRef<+ React.ComponentRef<typeof DropdownMenuPrimitive.Label>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {+ /** shadcn addition: indents to align with items that have icons. */+ inset?: boolean;+ }+>(({ className, inset, ...props }, ref) => (+ <DropdownMenuPrimitive.Label+ ref={ref}+ className={cn(+ "px-2 py-1.5 text-sm font-semibold",+ inset && "pl-8",+ className,+ )}+ {...props}+ />+));+DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;++const DropdownMenuSeparator = React.forwardRef<+ React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>+>(({ className, ...props }, ref) => (+ <DropdownMenuPrimitive.Separator+ ref={ref}+ className={cn("-mx-1 my-1 h-px bg-muted", className)}+ {...props}+ />+));+DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;++const DropdownMenuShortcut = ({+ className,+ ...props+}: React.HTMLAttributes<HTMLSpanElement>) => {+ return (+ <span+ className={cn("ml-auto text-xs tracking-widest opacity-60", className)}+ {...props}+ />+ );+};+DropdownMenuShortcut.displayName = "DropdownMenuShortcut";++export {+ DropdownMenu,+ DropdownMenuCheckboxItem,+ DropdownMenuContent,+ DropdownMenuGroup,+ DropdownMenuItem,+ DropdownMenuLabel,+ DropdownMenuPortal,+ DropdownMenuRadioGroup,+ DropdownMenuRadioItem,+ DropdownMenuSeparator,+ DropdownMenuShortcut,+ DropdownMenuSub,+ DropdownMenuSubContent,+ DropdownMenuSubTrigger,+ DropdownMenuTrigger,+};diff --git a/frontend/src/components/ui/form.tsx b/frontend/src/components/ui/form.tsxnew file mode 100644index 000000000..ea10bbb82--- /dev/null+++ b/frontend/src/components/ui/form.tsx@@ -0,0 +1,184 @@+import { Slot as SlotPrimitive } from "radix-ui";+import * as React from "react";+import {+ Controller,+ type ControllerProps,+ type FieldPath,+ type FieldValues,+ FormProvider,+ useFormContext,+} from "react-hook-form";+import { Label } from "@/components/ui/label";+import { cn } from "@/lib/utils";++const Form = FormProvider;++/*+ * The generics are react-hook-form's own: `TFieldValues` is the shape of the+ * form and `TName` a valid path into it. Carrying them through means+ * `<FormField name="…">` only accepts fields that actually exist on the form+ * — a typo in a field name becomes a compile error rather than a control that+ * silently never binds.+ */+type FormFieldContextValue<+ TFieldValues extends FieldValues = FieldValues,+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,+> = {+ name: TName;+};++const FormFieldContext = React.createContext<FormFieldContextValue | null>(+ null,+);++const FormField = <+ TFieldValues extends FieldValues = FieldValues,+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,+>(+ props: ControllerProps<TFieldValues, TName>,+) => {+ return (+ <FormFieldContext.Provider value={{ name: props.name }}>+ <Controller {...props} />+ </FormFieldContext.Provider>+ );+};++const useFormField = () => {+ const fieldContext = React.useContext(FormFieldContext);+ const itemContext = React.useContext(FormItemContext);+ const { getFieldState, formState } = useFormContext();++ if (!fieldContext) {+ throw new Error("useFormField should be used within <FormField>");+ }++ if (!itemContext) {+ throw new Error("useFormField should be used within <FormItem>");+ }++ const fieldState = getFieldState(fieldContext.name, formState);++ const { id } = itemContext;++ return {+ id,+ name: fieldContext.name,+ formItemId: `${id}-form-item`,+ formDescriptionId: `${id}-form-item-description`,+ formMessageId: `${id}-form-item-message`,+ ...fieldState,+ };+};++type FormItemContextValue = {+ id: string;+};++const FormItemContext = React.createContext<FormItemContextValue | null>(null);++const FormItem = React.forwardRef<+ HTMLDivElement,+ React.HTMLAttributes<HTMLDivElement>+>(({ className, ...props }, ref) => {+ const id = React.useId();++ return (+ <FormItemContext.Provider value={{ id }}>+ <div ref={ref} className={cn("space-y-2", className)} {...props} />+ </FormItemContext.Provider>+ );+});+FormItem.displayName = "FormItem";++const FormLabel = React.forwardRef<+ React.ComponentRef<typeof Label>,+ React.ComponentPropsWithoutRef<typeof Label>+>(({ className, ...props }, ref) => {+ const { error, formItemId } = useFormField();++ return (+ <Label+ ref={ref}+ className={cn(error && "text-destructive", className)}+ htmlFor={formItemId}+ {...props}+ />+ );+});+FormLabel.displayName = "FormLabel";++const FormControl = React.forwardRef<+ React.ComponentRef<typeof SlotPrimitive.Slot>,+ React.ComponentPropsWithoutRef<typeof SlotPrimitive.Slot>+>(({ ...props }, ref) => {+ const { error, formItemId, formDescriptionId, formMessageId } =+ useFormField();++ return (+ <SlotPrimitive.Slot+ ref={ref}+ id={formItemId}+ aria-describedby={+ !error+ ? `${formDescriptionId}`+ : `${formDescriptionId} ${formMessageId}`+ }+ aria-invalid={!!error}+ {...props}+ />+ );+});+FormControl.displayName = "FormControl";++const FormDescription = React.forwardRef<+ HTMLParagraphElement,+ React.HTMLAttributes<HTMLParagraphElement>+>(({ className, ...props }, ref) => {+ const { formDescriptionId } = useFormField();++ return (+ <p+ ref={ref}+ id={formDescriptionId}+ className={cn("text-[0.8rem] text-muted-foreground", className)}+ {...props}+ />+ );+});+FormDescription.displayName = "FormDescription";++const FormMessage = React.forwardRef<+ HTMLParagraphElement,+ React.HTMLAttributes<HTMLParagraphElement>+>(({ className, children, ...props }, ref) => {+ const { error, formMessageId } = useFormField();+ const body = error ? String(error?.message ?? "") : children;++ if (!body) {+ return null;+ }++ return (+ <p+ ref={ref}+ id={formMessageId}+ className={cn("text-[0.8rem] font-medium text-destructive", className)}+ {...props}+ >+ {body}+ </p>+ );+});+FormMessage.displayName = "FormMessage";++export {+ Form,+ FormControl,+ FormDescription,+ FormField,+ FormItem,+ FormLabel,+ FormMessage,+ useFormField,+};diff --git a/frontend/src/components/ui/input.tsx b/frontend/src/components/ui/input.tsxnew file mode 100644index 000000000..5537af0a0--- /dev/null+++ b/frontend/src/components/ui/input.tsx@@ -0,0 +1,38 @@+import * as React from "react";++import { cn } from "@/lib/utils";++/*+ * No `shadow-sm` — that was the "left and right borders are missing" bug.+ *+ * Tailwind's `shadow-sm` is `0 1px 3px` + `0 1px 2px`: a purely VERTICAL+ * offset. It lays a dark smudge immediately below the top and bottom edges+ * and contributes nothing to the sides, so the horizontals read as a firm+ * line while the verticals are left as a bare 1px hairline at ~1.2 contrast.+ * The asymmetry is what the eye picks up — the side borders are drawn, they+ * just look absent next to shadow-reinforced top and bottom edges.+ *+ * The antd reference computes `box-shadow: none` on its inputs, so dropping+ * it matches the reference and makes all four sides read equally. Removed+ * from Textarea and the Select trigger too, or those controls would keep the+ * asymmetry while sitting next to a fixed Input in the same form.+ */+const Input = React.forwardRef<+ HTMLInputElement,+ React.InputHTMLAttributes<HTMLInputElement>+>(({ className, type, ...props }, ref) => {+ return (+ <input+ type={type}+ className={cn(+ "flex h-8 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",+ className,+ )}+ ref={ref}+ {...props}+ />+ );+});+Input.displayName = "Input";++export { Input };diff --git a/frontend/src/components/ui/jsx-in-js.test.jsx b/frontend/src/components/ui/jsx-in-js.test.jsxnew file mode 100644index 000000000..02cb0d869--- /dev/null+++ b/frontend/src/components/ui/jsx-in-js.test.jsx@@ -0,0 +1,33 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, it } from "vitest";++import { JsxInJsProbe } from "./__fixtures__/jsx-in-js-probe.js";++/**+ * Guards the JSX-in-`.js` transform, which exists for the cloud plugin tree.+ *+ * Two failures shipped from this one line of config, and NEITHER failed the+ * build — both produced a green `vite build` and HTTP 200:+ *+ * 1. No transform at all. Removing Vite's `esbuild: { loader: "jsx" }`+ * override was safe for OSS (its JSX-bearing .js files were renamed to+ * .jsx) but broke the Docker image, which also compiles src/plugins/+ * copied in from the unstract-cloud repo — nine of those files put JSX+ * in .js. That one at least failed the cloud build loudly.+ * 2. The WRONG transform. Restoring it via a standalone+ * `transformWithEsbuild` call defaulted to the CLASSIC JSX runtime,+ * emitting `React.createElement(...)`. Those plugin files use JSX+ * without importing React, so the app threw+ * `ReferenceError: React is not defined` while rendering the router and+ * showed a blank white page. The build was green throughout.+ *+ * The fixture deliberately mirrors the cloud files: JSX in a `.js` file with+ * NO React import. Rendering it is what distinguishes a correct transform+ * from one that merely compiles.+ */+describe("JSX in .js files (the cloud plugin tree depends on this)", () => {+ it("renders a .js module that uses JSX without importing React", () => {+ render(<JsxInJsProbe />);+ expect(screen.getByTestId("jsx-in-js-probe")).toHaveTextContent("ok");+ });+});diff --git a/frontend/src/components/ui/kbd.tsx b/frontend/src/components/ui/kbd.tsxnew file mode 100644index 000000000..1d6bb3cb5--- /dev/null+++ b/frontend/src/components/ui/kbd.tsx@@ -0,0 +1,22 @@+import { cn } from "@/lib/utils";++/**+ * Keyboard key hint (e.g. ⌘ K in the search bar). Hand-written: shadcn has no+ * registry entry, but the Midnight Bloom mockups use it in the command/search+ * affordance.+ */+function Kbd({ className, ...props }: React.HTMLAttributes<HTMLElement>) {+ return (+ <kbd+ className={cn(+ "pointer-events-none inline-flex h-5 select-none items-center gap-1",+ "rounded border border-border bg-muted px-1.5",+ "font-mono text-[10px] font-medium text-muted-foreground",+ className,+ )}+ {...props}+ />+ );+}++export { Kbd };diff --git a/frontend/src/components/ui/label.tsx b/frontend/src/components/ui/label.tsxnew file mode 100644index 000000000..fa8384621--- /dev/null+++ b/frontend/src/components/ui/label.tsx@@ -0,0 +1,35 @@+import { Label as LabelPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++/*+ * forwardRef rather than a plain function, so the ref is part of the declared+ * type. `FormLabel` renders this with a `ref`; as a plain function component+ * that did not TYPE-check, because `ComponentPropsWithoutRef` (as the name+ * says) has no `ref`.+ *+ * At runtime it worked either way — React 19 treats `ref` as an ordinary prop+ * for function components, so the `{...props}` spread carried it through to+ * LabelPrimitive.Root. Verified directly rather than assumed: a plain function+ * component that only spreads props does receive a working ref under React 19.+ * So this is a typing correction, not a bug fix — worth making because the+ * declared surface should say what the component accepts.+ */+const Label = React.forwardRef<+ React.ComponentRef<typeof LabelPrimitive.Root>,+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>+>(({ className, ...props }, ref) => (+ <LabelPrimitive.Root+ ref={ref}+ data-slot="label"+ className={cn(+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",+ className,+ )}+ {...props}+ />+));+Label.displayName = LabelPrimitive.Root.displayName;++export { Label };diff --git a/frontend/src/components/ui/no-antd.test.js b/frontend/src/components/ui/no-antd.test.jsnew file mode 100644index 000000000..ab888c9cf--- /dev/null+++ b/frontend/src/components/ui/no-antd.test.js@@ -0,0 +1,96 @@+import fs from "node:fs";+import path from "node:path";+import { describe, expect, it } from "vitest";++/**+ * antd is gone. This keeps it gone.+ *+ * A one-time grep proves today's tree is clean; it does nothing about the next+ * dependency bump. antd survived the entire migration as a TRANSITIVE+ * dependency — every plan task about removing it checked source imports and+ * `package.json`, and all of them passed while a 58MB copy of antd sat in+ * node_modules because `react-js-cron` depended on it. Nothing failed, so+ * nothing surfaced it.+ *+ * These checks cover all three ways it can come back: a direct dependency, a+ * transitive one, and a stray import.+ */++const FRONTEND = path.resolve(import.meta.dirname, "../../..");+const BANNED = [/^antd$/, /^@ant-design\//];++function readJson(file) {+ return JSON.parse(fs.readFileSync(path.join(FRONTEND, file), "utf8"));+}++describe("antd must not return", () => {+ it("is not a declared dependency", () => {+ const pkg = readJson("package.json");+ const declared = [+ ...Object.keys(pkg.dependencies ?? {}),+ ...Object.keys(pkg.devDependencies ?? {}),+ ];+ const offenders = declared.filter((name) =>+ BANNED.some((re) => re.test(name)),+ );+ expect(+ offenders,+ `These are declared in package.json: ${offenders.join(", ")}`,+ ).toEqual([]);+ });++ /**+ * The one that actually caught it. `react-js-cron` never appeared in any+ * source file's imports, so only the resolved tree revealed antd.+ */+ it("is not reachable transitively", () => {+ const lock = fs.readFileSync(path.join(FRONTEND, "bun.lock"), "utf8");+ // Lockfile entries are quoted package specifiers, e.g. "antd" or+ // "@ant-design/icons". Match the key form so a substring like+ // "antd-overlays" in a path cannot produce a false positive.+ const hits = [...lock.matchAll(/"(antd|@ant-design\/[^"@]+)"\s*:/g)].map(+ (m) => m[1],+ );+ expect(+ [...new Set(hits)],+ "antd is back in the resolved dependency tree. Something depends on it — " ++ "run `npm ls antd` to find what.",+ ).toEqual([]);+ });++ it("is not imported anywhere in src", () => {+ const offenders = [];+ const walk = (dir) => {+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {+ const full = path.join(dir, entry.name);+ if (entry.isDirectory()) {+ if (entry.name === "node_modules") {+ continue;+ }+ walk(full);+ continue;+ }+ if (!/\.(jsx?|tsx?)$/.test(entry.name)) {+ continue;+ }+ // Strip comments first — otherwise a doc comment naming the banned+ // import counts as a call-site, including this file's own.+ const src = fs+ .readFileSync(full, "utf8")+ .replace(/\/\*[\s\S]*?\*\//g, "")+ .replace(/^\s*\/\/.*$/gm, "");+ // Real imports only. Our own `@/components/ui/shims/antd-*` shims keep the+ // antd NAME deliberately while running on shadcn, so they must not+ // match: the pattern anchors on the exact specifier.+ if (/from\s+["']antd["']|from\s+["']@ant-design\//.test(src)) {+ offenders.push(path.relative(FRONTEND, full));+ }+ }+ };+ walk(path.join(FRONTEND, "src"));+ expect(+ offenders,+ `These import antd directly:\n ${offenders.join("\n ")}`,+ ).toEqual([]);+ });+});diff --git a/frontend/src/components/ui/pagination.tsx b/frontend/src/components/ui/pagination.tsxnew file mode 100644index 000000000..3bf3cb97d--- /dev/null+++ b/frontend/src/components/ui/pagination.tsx@@ -0,0 +1,119 @@+import type { VariantProps } from "class-variance-authority";+import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";+import * as React from "react";+import { buttonVariants } from "@/components/ui/button";+import { cn } from "@/lib/utils";++const Pagination = ({+ className,+ ...props+}: React.ComponentPropsWithoutRef<"nav">) => (+ <nav+ role="navigation"+ aria-label="pagination"+ className={cn("mx-auto flex w-full justify-center", className)}+ {...props}+ />+);+Pagination.displayName = "Pagination";++const PaginationContent = React.forwardRef<+ HTMLUListElement,+ React.ComponentPropsWithoutRef<"ul">+>(({ className, ...props }, ref) => (+ <ul+ ref={ref}+ className={cn("flex flex-row items-center gap-1", className)}+ {...props}+ />+));+PaginationContent.displayName = "PaginationContent";++const PaginationItem = React.forwardRef<+ HTMLLIElement,+ React.ComponentPropsWithoutRef<"li">+>(({ className, ...props }, ref) => (+ <li ref={ref} className={cn("", className)} {...props} />+));+PaginationItem.displayName = "PaginationItem";++const PaginationLink = ({+ className,+ isActive,+ size = "icon",+ ...props+}: React.ComponentPropsWithoutRef<"a"> & {+ /** Marks the current page; also switches the button variant. */+ isActive?: boolean;+ size?: VariantProps<typeof buttonVariants>["size"];+}) => (+ <a+ aria-current={isActive ? "page" : undefined}+ className={cn(+ buttonVariants({+ variant: isActive ? "outline" : "ghost",+ size,+ }),+ className,+ )}+ {...props}+ />+);+PaginationLink.displayName = "PaginationLink";++const PaginationPrevious = ({+ className,+ ...props+}: React.ComponentPropsWithoutRef<typeof PaginationLink>) => (+ <PaginationLink+ aria-label="Go to previous page"+ size="default"+ className={cn("gap-1 pl-2.5", className)}+ {...props}+ >+ <ChevronLeft className="h-4 w-4" />+ <span>Previous</span>+ </PaginationLink>+);+PaginationPrevious.displayName = "PaginationPrevious";++const PaginationNext = ({+ className,+ ...props+}: React.ComponentPropsWithoutRef<typeof PaginationLink>) => (+ <PaginationLink+ aria-label="Go to next page"+ size="default"+ className={cn("gap-1 pr-2.5", className)}+ {...props}+ >+ <span>Next</span>+ <ChevronRight className="h-4 w-4" />+ </PaginationLink>+);+PaginationNext.displayName = "PaginationNext";++const PaginationEllipsis = ({+ className,+ ...props+}: React.ComponentPropsWithoutRef<"span">) => (+ <span+ aria-hidden+ className={cn("flex h-9 w-9 items-center justify-center", className)}+ {...props}+ >+ <MoreHorizontal className="h-4 w-4" />+ <span className="sr-only">More pages</span>+ </span>+);+PaginationEllipsis.displayName = "PaginationEllipsis";++export {+ Pagination,+ PaginationContent,+ PaginationEllipsis,+ PaginationItem,+ PaginationLink,+ PaginationNext,+ PaginationPrevious,+};diff --git a/frontend/src/components/ui/popover-in-dialog-wheel.test.jsx b/frontend/src/components/ui/popover-in-dialog-wheel.test.jsxnew file mode 100644index 000000000..d44035524--- /dev/null+++ b/frontend/src/components/ui/popover-in-dialog-wheel.test.jsx@@ -0,0 +1,98 @@+import { render, screen, waitFor } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { describe, expect, it } from "vitest";++import {+ Popover,+ PopoverContent,+ PopoverTrigger,+} from "@/components/ui/popover";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Modal } from "@/components/ui/shims/antd-overlays";++/**+ * Wheel-scrolling a popover that is open inside a Modal.+ *+ * Radix's Dialog locks scrolling with react-remove-scroll, which listens for+ * `wheel` on `document` and preventDefaults any event whose target is neither+ * inside the lock nor inside one of its shards (the dialog content). Popover+ * content is portalled to `document.body`, so it is outside both — leaving+ * popover lists scrollable by dragging the scrollbar (a pointer interaction,+ * never a wheel event) but dead to the mouse wheel.+ *+ * Radix's own Select and DropdownMenu are not affected: their content carries+ * its own RemoveScroll, which takes over the lock stack while open. Only+ * Popover-based surfaces need this, so the assertion is on PopoverContent.+ */+function wheelOver(element) {+ const event = new WheelEvent("wheel", {+ deltaY: 100,+ bubbles: true,+ cancelable: true,+ });+ element.dispatchEvent(event);+ return event;+}++describe("popover wheel scrolling inside a Modal", () => {+ it("does not let the dialog's scroll lock cancel the wheel", async () => {+ const user = userEvent.setup();++ render(+ <Modal open title="Adapters">+ <Popover>+ <PopoverTrigger>open</PopoverTrigger>+ <PopoverContent>+ <div data-testid="scroller">content</div>+ </PopoverContent>+ </Popover>+ </Modal>,+ );++ await user.click(screen.getByText("open"));+ const event = wheelOver(await screen.findByTestId("scroller"));++ await waitFor(() => expect(event.defaultPrevented).toBe(false));+ });++ it("keeps a searchable Select's option list wheel-scrollable", async () => {+ const user = userEvent.setup();++ render(+ <Modal open title="Adapters">+ <Select+ showSearch+ placeholder="Select an LLM adapter"+ options={Array.from({ length: 40 }, (_, i) => ({+ value: `a${i}`,+ label: `adapter-${i}`,+ }))}+ />+ </Modal>,+ );++ await user.click(screen.getByRole("combobox"));+ const event = wheelOver(await screen.findByRole("listbox"));++ await waitFor(() => expect(event.defaultPrevented).toBe(false));+ });++ it("still calls a caller-supplied onWheel", async () => {+ const user = userEvent.setup();+ let seen = 0;++ render(+ <Popover>+ <PopoverTrigger>open</PopoverTrigger>+ <PopoverContent onWheel={() => seen++}>+ <div data-testid="scroller">content</div>+ </PopoverContent>+ </Popover>,+ );++ await user.click(screen.getByText("open"));+ wheelOver(await screen.findByTestId("scroller"));++ await waitFor(() => expect(seen).toBe(1));+ });+});diff --git a/frontend/src/components/ui/popover.tsx b/frontend/src/components/ui/popover.tsxnew file mode 100644index 000000000..0b12ea305--- /dev/null+++ b/frontend/src/components/ui/popover.tsx@@ -0,0 +1,46 @@+import { Popover as PopoverPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Popover = PopoverPrimitive.Root;++const PopoverTrigger = PopoverPrimitive.Trigger;++const PopoverAnchor = PopoverPrimitive.Anchor;++const PopoverContent = React.forwardRef<+ React.ComponentRef<typeof PopoverPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>+>(({ className, align = "center", sideOffset = 4, onWheel, ...props }, ref) => (+ <PopoverPrimitive.Portal>+ <PopoverPrimitive.Content+ ref={ref}+ align={align}+ sideOffset={sideOffset}+ // A popover open inside a Modal is portalled to `document.body`, so it+ // sits outside both Radix's scroll lock and the dialog content it+ // shards — and react-remove-scroll cancels every `wheel` it sees on+ // `document` from anywhere else. That left popover lists scrollable by+ // dragging the scrollbar but dead to the mouse wheel. Its listener is+ // on `document` and not capturing, so stopping propagation here keeps+ // it from ever running; the browser still scrolls natively.+ onWheel={(event) => {+ onWheel?.(event);+ event.stopPropagation();+ }}+ className={cn(+ // `max-h` + scroll: Radix measures the space actually available on+ // the chosen side and exposes it as this variable. Without it a tall+ // popover (the 456px emoji picker, anchored low in a modal) simply+ // overflows the viewport and its bottom rows are unreachable.+ "z-50 max-h-[var(--radix-popover-content-available-height)] w-72 overflow-y-auto rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-popover-content-transform-origin)]",+ className,+ )}+ {...props}+ />+ </PopoverPrimitive.Portal>+));+PopoverContent.displayName = PopoverPrimitive.Content.displayName;++export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };diff --git a/frontend/src/components/ui/progress.tsx b/frontend/src/components/ui/progress.tsxnew file mode 100644index 000000000..89ea434a5--- /dev/null+++ b/frontend/src/components/ui/progress.tsx@@ -0,0 +1,26 @@+import { Progress as ProgressPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Progress = React.forwardRef<+ React.ComponentRef<typeof ProgressPrimitive.Root>,+ React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>+>(({ className, value, ...props }, ref) => (+ <ProgressPrimitive.Root+ ref={ref}+ className={cn(+ "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",+ className,+ )}+ {...props}+ >+ <ProgressPrimitive.Indicator+ className="h-full w-full flex-1 bg-primary transition-all"+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}+ />+ </ProgressPrimitive.Root>+));+Progress.displayName = ProgressPrimitive.Root.displayName;++export { Progress };diff --git a/frontend/src/components/ui/radio-group.tsx b/frontend/src/components/ui/radio-group.tsxnew file mode 100644index 000000000..20a7dc56f--- /dev/null+++ b/frontend/src/components/ui/radio-group.tsx@@ -0,0 +1,44 @@+"use client";++import { Circle } from "lucide-react";+import { RadioGroup as RadioGroupPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const RadioGroup = React.forwardRef<+ React.ComponentRef<typeof RadioGroupPrimitive.Root>,+ React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>+>(({ className, ...props }, ref) => {+ return (+ <RadioGroupPrimitive.Root+ className={cn("grid gap-2", className)}+ {...props}+ ref={ref}+ />+ );+});+RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;++const RadioGroupItem = React.forwardRef<+ React.ComponentRef<typeof RadioGroupPrimitive.Item>,+ React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>+>(({ className, ...props }, ref) => {+ return (+ <RadioGroupPrimitive.Item+ ref={ref}+ className={cn(+ "cursor-pointer aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",+ className,+ )}+ {...props}+ >+ <RadioGroupPrimitive.Indicator className="flex items-center justify-center">+ <Circle className="h-3.5 w-3.5 fill-primary" />+ </RadioGroupPrimitive.Indicator>+ </RadioGroupPrimitive.Item>+ );+});+RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;++export { RadioGroup, RadioGroupItem };diff --git a/frontend/src/components/ui/ref-forwarding.test.jsx b/frontend/src/components/ui/ref-forwarding.test.jsxnew file mode 100644index 000000000..b2fe28755--- /dev/null+++ b/frontend/src/components/ui/ref-forwarding.test.jsx@@ -0,0 +1,102 @@+import { fireEvent, render, screen, waitFor } from "@testing-library/react";+import { describe, expect, it } from "vitest";+import { Button } from "@/components/ui/button";+import { Label } from "@/components/ui/label";+import { Dropdown } from "@/components/ui/shims/antd-overlays";+import { CustomButton } from "@/components/widgets/custom-button/CustomButton";++/**+ * Regression: Prompt Studio's Export button did nothing — no menu, no network+ * request. It is a `<Dropdown>` child, and Radix's trigger renders with+ * `asChild`, attaching its handlers through a ref. Neither CustomButton nor+ * the base shadcn Button forwarded refs, so the trigger was silently inert.+ *+ * A ref that goes nowhere throws no error and logs nothing, which is why this+ * survived every other test.+ */+describe("ref forwarding through the trigger chain", () => {+ it("the base Button forwards its ref to a DOM node", () => {+ let node = null;+ render(+ <Button+ ref={(n) => {+ node = n;+ }}+ >+ base+ </Button>,+ );+ expect(node).toBeInstanceOf(HTMLElement);+ expect(node.tagName).toBe("BUTTON");+ });++ it("CustomButton forwards its ref through to the DOM node", () => {+ let node = null;+ render(+ <CustomButton+ ref={(n) => {+ node = n;+ }}+ >+ custom+ </CustomButton>,+ );+ expect(node).toBeInstanceOf(HTMLElement);+ expect(node.tagName).toBe("BUTTON");+ });++ it("a Dropdown wrapping CustomButton wires up its trigger", () => {+ render(+ <Dropdown menu={{ items: [{ key: "a", label: "Export as Tool" }] }}>+ <CustomButton type="primary">Export</CustomButton>+ </Dropdown>,+ );+ const trigger = screen.getByRole("button", { name: "Export" });+ // Radix marks a wired-up trigger with aria-haspopup + its own state attr.+ expect(trigger.getAttribute("aria-haspopup")).toBe("menu");+ expect(trigger.getAttribute("data-state")).toBe("closed");+ });++ it("that Dropdown actually opens on click", async () => {+ render(+ <Dropdown menu={{ items: [{ key: "a", label: "Export as Tool" }] }}>+ <CustomButton type="primary">Export</CustomButton>+ </Dropdown>,+ );+ fireEvent.pointerDown(screen.getByRole("button", { name: "Export" }), {+ button: 0,+ ctrlKey: false,+ pointerType: "mouse",+ });+ await waitFor(() =>+ expect(screen.getByText("Export as Tool")).toBeInTheDocument(),+ );+ });++ /*+ * `FormLabel` renders `Label` with a ref, so assert it arrives.+ *+ * This one is a guard, not a caught bug: Label was a plain function+ * component before being typed, and under React 19 `ref` is an ordinary+ * prop, so the `{...props}` spread already carried it through. What this+ * catches is a future refactor that stops spreading — destructuring the+ * props it uses and dropping the rest silently detaches FormLabel's ref+ * with no warning, which is exactly how the Export-button bug above+ * shipped.+ */+ it("Label forwards its ref (FormLabel renders it with one)", () => {+ let node = null;+ render(+ <Label+ ref={(n) => {+ node = n;+ }}+ htmlFor="field"+ >+ label+ </Label>,+ );+ expect(node).toBeInstanceOf(HTMLElement);+ expect(node.tagName).toBe("LABEL");+ });+});diff --git a/frontend/src/components/ui/scroll-area.tsx b/frontend/src/components/ui/scroll-area.tsxnew file mode 100644index 000000000..fd1d2649e--- /dev/null+++ b/frontend/src/components/ui/scroll-area.tsx@@ -0,0 +1,48 @@+"use client";++import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const ScrollArea = React.forwardRef<+ React.ComponentRef<typeof ScrollAreaPrimitive.Root>,+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>+>(({ className, children, ...props }, ref) => (+ <ScrollAreaPrimitive.Root+ ref={ref}+ className={cn("relative overflow-hidden", className)}+ {...props}+ >+ <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">+ {children}+ </ScrollAreaPrimitive.Viewport>+ <ScrollBar />+ <ScrollAreaPrimitive.Corner />+ </ScrollAreaPrimitive.Root>+));+ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;++const ScrollBar = React.forwardRef<+ React.ComponentRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>+>(({ className, orientation = "vertical", ...props }, ref) => (+ <ScrollAreaPrimitive.ScrollAreaScrollbar+ ref={ref}+ orientation={orientation}+ className={cn(+ "flex touch-none select-none transition-colors",+ orientation === "vertical" &&+ "h-full w-2.5 border-l border-l-transparent p-[1px]",+ orientation === "horizontal" &&+ "h-2.5 flex-col border-t border-t-transparent p-[1px]",+ className,+ )}+ {...props}+ >+ <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />+ </ScrollAreaPrimitive.ScrollAreaScrollbar>+));+ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;++export { ScrollArea, ScrollBar };diff --git a/frontend/src/components/ui/select.tsx b/frontend/src/components/ui/select.tsxnew file mode 100644index 000000000..196e61a25--- /dev/null+++ b/frontend/src/components/ui/select.tsx@@ -0,0 +1,204 @@+import { Check, ChevronDown, ChevronUp } from "lucide-react";+import { Select as SelectPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Select = SelectPrimitive.Root;++const SelectGroup = SelectPrimitive.Group;++const SelectValue = SelectPrimitive.Value;++/**+ * Shared so the searchable variant of the antd Select shim — which cannot use+ * this Trigger, because it is anchored to a Popover rather than a Select —+ * still renders a byte-identical control. Two hand-copied class strings would+ * drift the moment either is restyled.+ */+const selectTriggerClassName =+ "flex h-8 w-full cursor-pointer items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1";++/** Likewise shared: the popup surface, so both variants sit on the same card. */+const selectContentClassName =+ "relative z-50 max-h-[min(16rem,var(--radix-select-content-available-height))] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-select-content-transform-origin)]";++/** And the row, so a filtered option highlights exactly like an unfiltered one. */+const selectItemClassName =+ "relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";++const SelectTrigger = React.forwardRef<+ React.ComponentRef<typeof SelectPrimitive.Trigger>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>+>(({ className, children, ...props }, ref) => (+ <SelectPrimitive.Trigger+ ref={ref}+ className={cn(selectTriggerClassName, className)}+ {...props}+ >+ {children}+ <SelectPrimitive.Icon asChild>+ <ChevronDown className="h-4 w-4 opacity-50" />+ </SelectPrimitive.Icon>+ </SelectPrimitive.Trigger>+));+SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;++const SelectScrollUpButton = React.forwardRef<+ React.ComponentRef<typeof SelectPrimitive.ScrollUpButton>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>+>(({ className, ...props }, ref) => (+ <SelectPrimitive.ScrollUpButton+ ref={ref}+ className={cn(+ "flex cursor-default items-center justify-center py-1",+ className,+ )}+ {...props}+ >+ <ChevronUp className="h-4 w-4" />+ </SelectPrimitive.ScrollUpButton>+));+SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;++const SelectScrollDownButton = React.forwardRef<+ React.ComponentRef<typeof SelectPrimitive.ScrollDownButton>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>+>(({ className, ...props }, ref) => (+ <SelectPrimitive.ScrollDownButton+ ref={ref}+ className={cn(+ "flex cursor-default items-center justify-center py-1",+ className,+ )}+ {...props}+ >+ <ChevronDown className="h-4 w-4" />+ </SelectPrimitive.ScrollDownButton>+));+SelectScrollDownButton.displayName =+ SelectPrimitive.ScrollDownButton.displayName;++const SelectContent = React.forwardRef<+ React.ComponentRef<typeof SelectPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>+>(({ className, children, position = "popper", ...props }, ref) => (+ <SelectPrimitive.Portal>+ <SelectPrimitive.Content+ ref={ref}+ /*+ * `max-h` is load-bearing, and the way it is written matters.+ *+ * Upstream shadcn writes this cap with Tailwind v3's shorthand, where+ * the custom property sits bare inside the arbitrary value with no+ * var() around it. v4 removed that shorthand and emits the value+ * verbatim, so the browser got an invalid max-height, discarded the+ * declaration, and every dropdown in the app lost its cap — the Prompt+ * Studio LLM list grew past the bottom of a scroll-locked page with no+ * way to reach the rest. Nothing errors on this: not the build, not the+ * linter, not jsdom. The custom property MUST be wrapped in var().+ * Guarded by cascade-and-affordances.test.jsx.+ *+ * The 16rem cap is antd's `listHeight` default, which is what these+ * dropdowns looked like before the migration; `min()` keeps Radix's+ * collision-aware shrinking when the trigger sits near the window edge.+ *+ * Do NOT add `flex flex-col` here. Radix already sets+ * `display:flex; flex-direction:column` as an INLINE style, which+ * outranks any utility class — that flex layout, plus the Viewport's+ * inline `flex: 1`, is what makes the Viewport the scroller once this+ * cap exists, and what makes the scroll chevrons appear.+ */+ className={cn(+ selectContentClassName,+ position === "popper" &&+ "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",+ className,+ )}+ position={position}+ {...props}+ >+ <SelectScrollUpButton />+ <SelectPrimitive.Viewport+ /*+ * Upstream also sets `h-[var(--radix-select-trigger-height)]` here.+ * It has never done anything: Radix gives this element an inline+ * `flex: 1` (so `flex-basis: 0%`), and on a column flex item+ * `flex-basis` supersedes `height` on the main axis. Dropped rather+ * than kept, because if Radix ever stopped setting `flex: 1` the+ * declaration would come alive and clamp every dropdown to a single+ * 32px row. Height here is for flex to decide, bounded by the+ * Content's `max-h` above.+ */+ className={cn(+ "p-1",+ position === "popper" &&+ "w-full min-w-[var(--radix-select-trigger-width)]",+ )}+ >+ {children}+ </SelectPrimitive.Viewport>+ <SelectScrollDownButton />+ </SelectPrimitive.Content>+ </SelectPrimitive.Portal>+));+SelectContent.displayName = SelectPrimitive.Content.displayName;++const SelectLabel = React.forwardRef<+ React.ComponentRef<typeof SelectPrimitive.Label>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>+>(({ className, ...props }, ref) => (+ <SelectPrimitive.Label+ ref={ref}+ className={cn("px-2 py-1.5 text-sm font-semibold", className)}+ {...props}+ />+));+SelectLabel.displayName = SelectPrimitive.Label.displayName;++const SelectItem = React.forwardRef<+ React.ComponentRef<typeof SelectPrimitive.Item>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>+>(({ className, children, ...props }, ref) => (+ <SelectPrimitive.Item+ ref={ref}+ className={cn(selectItemClassName, className)}+ {...props}+ >+ <span className="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">+ <SelectPrimitive.ItemIndicator>+ <Check className="h-4 w-4" />+ </SelectPrimitive.ItemIndicator>+ </span>+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>+ </SelectPrimitive.Item>+));+SelectItem.displayName = SelectPrimitive.Item.displayName;++const SelectSeparator = React.forwardRef<+ React.ComponentRef<typeof SelectPrimitive.Separator>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>+>(({ className, ...props }, ref) => (+ <SelectPrimitive.Separator+ ref={ref}+ className={cn("-mx-1 my-1 h-px bg-muted", className)}+ {...props}+ />+));+SelectSeparator.displayName = SelectPrimitive.Separator.displayName;++export {+ Select,+ SelectContent,+ selectContentClassName,+ selectItemClassName,+ selectTriggerClassName,+ SelectGroup,+ SelectItem,+ SelectLabel,+ SelectScrollDownButton,+ SelectScrollUpButton,+ SelectSeparator,+ SelectTrigger,+ SelectValue,+};diff --git a/frontend/src/components/ui/separator.tsx b/frontend/src/components/ui/separator.tsxnew file mode 100644index 000000000..6a7834270--- /dev/null+++ b/frontend/src/components/ui/separator.tsx@@ -0,0 +1,29 @@+import { Separator as SeparatorPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Separator = React.forwardRef<+ React.ComponentRef<typeof SeparatorPrimitive.Root>,+ React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>+>(+ (+ { className, orientation = "horizontal", decorative = true, ...props },+ ref,+ ) => (+ <SeparatorPrimitive.Root+ ref={ref}+ decorative={decorative}+ orientation={orientation}+ className={cn(+ "shrink-0 bg-border",+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",+ className,+ )}+ {...props}+ />+ ),+);+Separator.displayName = SeparatorPrimitive.Root.displayName;++export { Separator };diff --git a/frontend/src/components/ui/sheet.tsx b/frontend/src/components/ui/sheet.tsxnew file mode 100644index 000000000..fc4a49d2b--- /dev/null+++ b/frontend/src/components/ui/sheet.tsx@@ -0,0 +1,160 @@+"use client";+import { cva, type VariantProps } from "class-variance-authority";+import { X } from "lucide-react";+import { Dialog as SheetPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Sheet = SheetPrimitive.Root;++const SheetTrigger = SheetPrimitive.Trigger;++const SheetClose = SheetPrimitive.Close;++const SheetPortal = SheetPrimitive.Portal;++/*+ * z-[1100], not shadcn's stock z-50: this app predates the Tailwind z scale and+ * still has chrome parked in the hundreds/thousands (`.logs-container` is 999,+ * the agency canvas and settings rail are 1000), so a z-50 overlay left the+ * Logs footer painting bright over the dimmed page. Sits above that legacy band+ * but below `[data-radix-popper-content-wrapper]` (1500, so a Select opened+ * inside a modal still clears it) and `.fullscreen-loader` (2000) — see+ * index.css.+ */+const SheetOverlay = React.forwardRef<+ React.ComponentRef<typeof SheetPrimitive.Overlay>,+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>+>(({ className, ...props }, ref) => (+ <SheetPrimitive.Overlay+ className={cn(+ "fixed inset-0 z-[1100] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",+ className,+ )}+ {...props}+ ref={ref}+ />+));+SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;++const sheetVariants = cva(+ "fixed z-[1100] gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",+ {+ variants: {+ side: {+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",+ bottom:+ "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",+ right:+ "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",+ },+ },+ defaultVariants: {+ side: "right",+ },+ },+);++const SheetContent = React.forwardRef<+ React.ComponentRef<typeof SheetPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> &+ VariantProps<typeof sheetVariants> & {+ /**+ * Renders the stock top-right close button. Opt out when the panel+ * supplies its own close affordance — antd's `<Drawer closable={false}>`+ * does exactly that, and without this the two buttons stack in the same+ * corner.+ */+ showClose?: boolean;+ }+>(+ (+ { side = "right", className, children, showClose = true, ...props },+ ref,+ ) => (+ <SheetPortal>+ <SheetOverlay />+ <SheetPrimitive.Content+ ref={ref}+ className={cn(sheetVariants({ side }), className)}+ {...props}+ >+ {showClose ? (+ <SheetPrimitive.Close className="absolute right-4 top-4 z-10 cursor-pointer rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">+ <X className="h-4 w-4" />+ <span className="sr-only">Close</span>+ </SheetPrimitive.Close>+ ) : null}+ {children}+ </SheetPrimitive.Content>+ </SheetPortal>+ ),+);+SheetContent.displayName = SheetPrimitive.Content.displayName;++const SheetHeader = ({+ className,+ ...props+}: React.HTMLAttributes<HTMLDivElement>) => (+ <div+ className={cn(+ "flex flex-col space-y-2 text-center sm:text-left",+ className,+ )}+ {...props}+ />+);+SheetHeader.displayName = "SheetHeader";++const SheetFooter = ({+ className,+ ...props+}: React.HTMLAttributes<HTMLDivElement>) => (+ <div+ className={cn(+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",+ className,+ )}+ {...props}+ />+);+SheetFooter.displayName = "SheetFooter";++const SheetTitle = React.forwardRef<+ React.ComponentRef<typeof SheetPrimitive.Title>,+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>+>(({ className, ...props }, ref) => (+ <SheetPrimitive.Title+ ref={ref}+ className={cn("text-lg font-semibold text-foreground", className)}+ {...props}+ />+));+SheetTitle.displayName = SheetPrimitive.Title.displayName;++const SheetDescription = React.forwardRef<+ React.ComponentRef<typeof SheetPrimitive.Description>,+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>+>(({ className, ...props }, ref) => (+ <SheetPrimitive.Description+ ref={ref}+ className={cn("text-sm text-muted-foreground", className)}+ {...props}+ />+));+SheetDescription.displayName = SheetPrimitive.Description.displayName;++export {+ Sheet,+ SheetClose,+ SheetContent,+ SheetDescription,+ SheetFooter,+ SheetHeader,+ SheetOverlay,+ SheetPortal,+ SheetTitle,+ SheetTrigger,+};diff --git a/frontend/src/components/ui/shims/antd-button.test.jsx b/frontend/src/components/ui/shims/antd-button.test.jsxnew file mode 100644index 000000000..6a19081b2--- /dev/null+++ b/frontend/src/components/ui/shims/antd-button.test.jsx@@ -0,0 +1,83 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, it } from "vitest";++import { Button } from "@/components/ui/shims/antd-button";++describe("antd-compatible Button shim (P1-04)", () => {+ it("renders children in a real <button>", () => {+ render(<Button>Save</Button>);+ expect(screen.getByRole("button", { name: "Save" })).toBeInTheDocument();+ });++ it("defaults to DOM type=button so it never submits a form by accident", () => {+ render(<Button>x</Button>);+ expect(screen.getByRole("button").getAttribute("type")).toBe("button");+ });++ it("maps htmlType onto the DOM type attribute", () => {+ render(<Button htmlType="submit">go</Button>);+ expect(screen.getByRole("button").getAttribute("type")).toBe("submit");+ });++ // The behaviours that made a find-and-replace unsafe:++ it("disables the button while loading, as antd does", () => {+ render(<Button loading>saving</Button>);+ expect(screen.getByRole("button")).toBeDisabled();+ });++ it("shows a spinner when loading and hides the supplied icon", () => {+ render(+ <Button loading icon={<span data-testid="icon" />}>+ saving+ </Button>,+ );+ expect(screen.queryByTestId("icon")).not.toBeInTheDocument();+ expect(screen.getByRole("button").querySelector("svg")).toBeTruthy();+ });++ it("renders the icon when not loading", () => {+ render(<Button icon={<span data-testid="icon" />}>with icon</Button>);+ expect(screen.getByTestId("icon")).toBeInTheDocument();+ });++ it("keeps an explicitly disabled button disabled", () => {+ render(<Button disabled>nope</Button>);+ expect(screen.getByRole("button")).toBeDisabled();+ });++ it("applies destructive styling for danger", () => {+ render(<Button danger>del</Button>);+ expect(screen.getByRole("button").className).toContain("destructive");+ });++ it("treats danger + text as a ghost button with destructive text", () => {+ render(+ <Button danger type="text">+ del+ </Button>,+ );+ expect(screen.getByRole("button").className).toContain("text-destructive");+ });++ it("makes block buttons full width", () => {+ render(<Button block>wide</Button>);+ expect(screen.getByRole("button").className).toContain("w-full");+ });++ it("rounds circle/round shapes", () => {+ render(<Button shape="circle">o</Button>);+ expect(screen.getByRole("button").className).toContain("rounded-full");+ });++ it("forwards onClick and arbitrary props", () => {+ let clicked = false;+ render(+ <Button data-testid="probe" onClick={() => (clicked = true)}>+ c+ </Button>,+ );+ screen.getByTestId("probe").click();+ expect(clicked).toBe(true);+ });+});diff --git a/frontend/src/components/ui/shims/antd-button.tsx b/frontend/src/components/ui/shims/antd-button.tsxnew file mode 100644index 000000000..83e92a734--- /dev/null+++ b/frontend/src/components/ui/shims/antd-button.tsx@@ -0,0 +1,146 @@+import { Loader2 } from "lucide-react";+import * as React from "react";++import { Button as ShadcnButton } from "@/components/ui/button";+import { cn } from "@/lib/utils";++/**+ * antd-compatible `Button` (P1-04), built on the shadcn primitive.+ *+ * Same reasoning as the Typography shim: antd's Button carries behaviour that+ * shadcn's does not, so a bare find-and-replace would quietly change what the+ * UI does rather than only how it looks (C4). Specifically:+ *+ * - `loading` — swaps in a spinner AND disables the button (234 usages)+ * - `icon` — renders a leading icon slot (106 usages)+ * - `danger` — destructive styling, orthogonal to `type` (12 usages)+ * - `htmlType` — maps to the DOM `type` attribute, since antd claims `type`+ * for its visual variant+ *+ * Presenting antd's API here turns 70 call-site files into an import swap and+ * keeps the JSX untouched. Per D9/§5.0 it lives in OSS so cloud plugins use+ * the same component.+ *+ * New code should prefer `@/components/ui/button` directly; this exists to+ * carry the existing call-sites across without behaviour drift.+ */++/**+ * The antd Button surface this shim accepts.+ *+ * Typing the PROPS is the point of converting this file: the bugs this layer+ * has produced were all silent prop-drops — a prop the call-site passes, the+ * shim never destructures, and `...props` swallows without a warning+ * (`showCount`, `onValuesChange`, `setFields`, `validateStatus`). An explicit+ * surface turns the next one into a compile error at the call-site.+ */+type AntdButtonType = "primary" | "default" | "dashed" | "text" | "link";+type AntdButtonSize = "small" | "middle" | "large";++interface AntdButtonProps+ extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type"> {+ /** antd's visual variant. It claims `type`, so the DOM attribute moves to+ * `htmlType`. */+ type?: AntdButtonType;+ danger?: boolean;+ size?: AntdButtonSize;+ /** Shows a spinner AND disables the button, as antd does. */+ loading?: boolean;+ icon?: React.ReactNode;+ /** The real DOM `type` attribute. */+ htmlType?: "button" | "submit" | "reset";+ block?: boolean;+ shape?: "default" | "circle" | "round";+}++/** antd `type` (+ `danger`) → shadcn variant. */+function toVariant(+ type: AntdButtonType | undefined,+ danger: boolean | undefined,+) {+ if (danger) {+ return type === "text" || type === "link" ? "ghost" : "destructive";+ }+ switch (type) {+ case "primary":+ return "default";+ case "link":+ return "link";+ case "text":+ return "ghost";+ case "dashed":+ case "default":+ default:+ return "outline";+ }+}++/** antd `size` → shadcn size. antd's default sits between sm and lg. */+function toSize(size: AntdButtonSize | undefined, hasOnlyIcon: boolean) {+ if (hasOnlyIcon) {+ return "icon";+ }+ switch (size) {+ case "small":+ return "sm";+ case "large":+ return "lg";+ default:+ return "default";+ }+}++const Button = React.forwardRef<HTMLButtonElement, AntdButtonProps>(+ function Button(+ {+ type,+ danger,+ size,+ loading,+ icon,+ htmlType,+ block,+ shape,+ disabled,+ className,+ children,+ ...props+ },+ ref,+ ) {+ const hasOnlyIcon = Boolean(icon) && !children;++ return (+ <ShadcnButton+ ref={ref}+ variant={toVariant(type, danger)}+ size={toSize(size, hasOnlyIcon)}+ // antd disables the button while loading; preserve that.+ disabled={disabled || Boolean(loading)}+ type={htmlType || "button"}+ className={cn(+ // .ant-btn is targeted by ~9 existing CSS rules (sizing, padding).+ "ant-btn",+ type === "text" && "ant-btn-text",+ block && "w-full",+ shape === "circle" && "rounded-full",+ shape === "round" && "rounded-full",+ // antd's text/link buttons carry no border.+ (type === "text" || type === "link") && "border-0",+ danger && (type === "text" || type === "link") && "text-destructive",+ className,+ )}+ {...props}+ >+ {loading ? (+ <Loader2 className="size-4 animate-spin" aria-hidden="true" />+ ) : (+ icon+ )}+ {children}+ </ShadcnButton>+ );+ },+);++export { Button };diff --git a/frontend/src/components/ui/shims/antd-datetime.integration.test.jsx b/frontend/src/components/ui/shims/antd-datetime.integration.test.jsxnew file mode 100644index 000000000..4da420e4e--- /dev/null+++ b/frontend/src/components/ui/shims/antd-datetime.integration.test.jsx@@ -0,0 +1,182 @@+import { fireEvent, render, screen } from "@testing-library/react";+import dayjs from "dayjs";+import { describe, expect, it, vi } from "vitest";+import { RangePicker } from "@/components/ui/shims/antd-datetime";++// End-to-end through the EXACT props MetricsDashboard passes.+describe("MetricsDashboard integration shape", () => {+ it("opens, shows presets + two months, and drives a 7-day range", async () => {+ const onChange = vi.fn();+ const now = dayjs("2026-07-28T10:00:00");+ render(+ <RangePicker+ value={[now.subtract(30, "day"), now]}+ onChange={onChange}+ disabledDate={(current) => current && current > now}+ allowClear={false}+ size="middle"+ presets={[+ { label: "Last 7 Days", value: [now.subtract(7, "day"), now] },+ { label: "Last 30 Days", value: [now.subtract(30, "day"), now] },+ { label: "Last 90 Days", value: [now.subtract(90, "day"), now] },+ ]}+ />,+ );++ // Trigger shows the current range.+ const trigger = screen.getByRole("button", {+ name: /2026-06-28.*2026-07-28/,+ });+ fireEvent.click(trigger);++ // Two months render.+ expect((await screen.findAllByRole("grid")).length).toBe(2);+ // Preset sidebar renders.+ for (const l of ["Last 7 Days", "Last 30 Days", "Last 90 Days"]) {+ expect(screen.getByRole("button", { name: l })).toBeInTheDocument();+ }++ fireEvent.click(screen.getByRole("button", { name: "Last 7 Days" }));+ const [pair] = onChange.mock.calls.at(-1);+ expect(dayjs.isDayjs(pair[0])).toBe(true);+ expect(pair[1].diff(pair[0], "day")).toBe(7);+ });+});++/**+ * jsdom has no layout engine, so it cannot catch "the popover ran off the+ * bottom of the screen". What it CAN pin is the cause: `sm:` variants track+ * the VIEWPORT, but this content lives inside a popover whose own width is+ * what matters. On a wide screen the months still stacked, leaving a 250px+ * by ~700px column that overflowed the window.+ *+ * Asserting the class contract is the cheapest guard available here; the+ * geometry itself was checked in a real browser.+ */+describe("popover layout must not depend on viewport breakpoints", () => {+ it("lays the months out in a row unconditionally", async () => {+ render(+ <RangePicker+ value={[dayjs("2026-03-01"), dayjs("2026-03-31")]}+ presets={[{ label: "Last 7 Days", value: [dayjs(), dayjs()] }]}+ />,+ );+ fireEvent.click(screen.getAllByRole("button")[0]);+ await screen.findAllByRole("grid");++ expect(document.querySelector(".flex.flex-row.gap-4")).toBeTruthy();+ // A viewport-conditional row is the bug, not the fix.+ expect(document.body.innerHTML).not.toContain("sm:flex-row");+ expect(document.body.innerHTML).not.toContain("sm:flex-col");+ });++ /*+ * react-day-picker renders ONE nav for the whole calendar. Anchoring the+ * absolute prev/next buttons to `.month` pinned both to the FIRST month, so+ * with `numberOfMonths={2}` the "next" arrow sat mid-popover instead of at+ * the right edge. The positioning context has to be the months ROW.+ */+ it("anchors the nav arrows to the months row, not one month", async () => {+ render(<RangePicker value={[dayjs("2026-03-01"), dayjs("2026-03-31")]} />);+ fireEvent.click(screen.getAllByRole("button")[0]);+ await screen.findAllByRole("grid");++ const monthsRow = document.querySelector(".flex.flex-row.gap-4");+ expect(monthsRow.className).toContain("relative");+ // Each month must NOT create its own positioning context.+ for (const m of monthsRow.children) {+ expect(m.className).not.toContain("relative");+ }+ });++ /*+ * With `showTime` the label carries full timestamps+ * ("2026-07-02T00:00 → 2026-08-01T23:59"). A nowrap span with no min-width+ * floor forced the trigger past its container, and the Logs filter row broke+ * apart as soon as a range was picked.+ */+ it("truncates a showTime label instead of forcing the row wider", () => {+ render(+ <RangePicker+ showTime={{ format: "YYYY-MM-DDTHH:mm:ssZ[Z]" }}+ value={[dayjs("2026-07-02T00:00"), dayjs("2026-08-01T23:59")]}+ />,+ );+ const trigger = screen.getAllByRole("button")[0];+ expect(trigger.className).toContain("max-w-full");++ const label = trigger.querySelector("span:not(.shrink-0)");+ expect(label.className).toContain("truncate");+ expect(label.className).toContain("min-w-0");+ expect(label.className).not.toContain("whitespace-nowrap");+ });++ /*+ * antd's header offers a year jump (`super-prev`/`super-next` plus clickable+ * month and year buttons). The arrows here stepped by month only, so a date+ * a year away took twelve clicks.+ */+ it("offers month AND year selection, like antd's header", async () => {+ render(<RangePicker value={[dayjs("2026-03-01"), dayjs("2026-03-31")]} />);+ fireEvent.click(screen.getAllByRole("button")[0]);+ await screen.findAllByRole("grid");++ const selects = document.querySelectorAll("select");+ expect(selects.length).toBeGreaterThanOrEqual(2);+ const names = [...selects].map((s) => s.getAttribute("aria-label") || "");+ expect(names.some((n) => /month/i.test(n))).toBe(true);+ expect(names.some((n) => /year/i.test(n))).toBe(true);+ });++ /*+ * react-day-picker renders a dropdown caption as a <select> PLUS a visible+ * label span carrying the same text; the select is meant to lie invisibly+ * over the span and take the clicks. Styling the select as the visible+ * control drew both, so the header read "August August › 2026 2026 ›" and+ * the doubled width slid under the nav arrows.+ */+ it("draws each dropdown caption once, not twice", async () => {+ render(<RangePicker value={[dayjs("2026-03-01"), dayjs("2026-03-31")]} />);+ fireEvent.click(screen.getAllByRole("button")[0]);+ await screen.findAllByRole("grid");++ const monthSelect = document.querySelector("select");+ // Invisible, but still stacked over the label so it keeps the clicks.+ expect(monthSelect.className).toContain("opacity-0");+ expect(monthSelect.className).toContain("absolute");++ // The caption text appears once per month, in the label the select covers.+ const root = monthSelect.parentElement;+ const label = root.querySelector("span[aria-hidden]");+ expect(label.textContent).toBe("March");+ expect(root.className).toContain("border");+ });++ it("points a dropdown's chevron down and a nav arrow sideways", async () => {+ render(<RangePicker value={[dayjs("2026-03-01"), dayjs("2026-03-31")]} />);+ fireEvent.click(screen.getAllByRole("button")[0]);+ await screen.findAllByRole("grid");++ const dir = (el) =>+ el.getAttribute("class").match(/lucide-chevron-(\w+)/)?.[1] ?? "";+ const chevrons = [...document.querySelectorAll("svg.rdp-chevron")];+ // Four captions (month + year, twice) all point down; the two nav arrows+ // point left and right. Falling through to a default gave every caption a+ // rightward chevron, so none of them read as a dropdown.+ const dirs = chevrons.map(dir);+ expect(dirs.filter((d) => d === "down")).toHaveLength(4);+ expect(dirs).toContain("left");+ expect(dirs).toContain("right");+ });++ it("keeps the caption clear of the nav arrows", async () => {+ render(<RangePicker value={[dayjs("2026-03-01"), dayjs("2026-03-31")]} />);+ fireEvent.click(screen.getAllByRole("button")[0]);+ await screen.findAllByRole("grid");++ // The arrows are absolutely positioned at the calendar's outer edges, so+ // the caption reserves room for them rather than centring into them.+ const caption = document.querySelector("select").closest(".justify-center");+ expect(caption.className).toContain("px-8");+ });+});diff --git a/frontend/src/components/ui/shims/antd-datetime.test.jsx b/frontend/src/components/ui/shims/antd-datetime.test.jsxnew file mode 100644index 000000000..9bd634dd9--- /dev/null+++ b/frontend/src/components/ui/shims/antd-datetime.test.jsx@@ -0,0 +1,407 @@+import { fireEvent, render, screen } from "@testing-library/react";+import dayjs from "dayjs";+import moment from "moment";+import { describe, expect, it, vi } from "vitest";++import {+ DatePicker,+ RangePicker,+ TimePicker,+} from "@/components/ui/shims/antd-datetime";++/**+ * D7 is the reason these tests exist. Call-sites are written against antd's+ * moment contract:+ *+ * value={value ? moment(value) : null}+ * onChange={(date) => onChange(date?.toISOString())}+ *+ * If the shim handed back a Date or a string, `date?.toISOString()` would+ * either throw or silently produce a different value — and timezone/DST+ * behaviour would shift, which D7 says must not happen in this phase.+ */+/**+ * RangePicker is now a popover calendar rather than two native inputs, so the+ * tests drive it the way a user does: open the trigger, click days. The+ * BEHAVIOURAL assertions below are unchanged — the tuple contract, allowClear,+ * onOk and date-library preservation are what the call-sites depend on, and+ * they have to survive the UI swap.+ */+async function openRangeCalendar() {+ // The trigger carries the calendar icon and the range label; before the+ // popover mounts it is the only button in the tree.+ const trigger = screen.getAllByRole("button")[0];+ fireEvent.click(trigger);+ // Two months are shown, so there are two grids — wait for at least one.+ await screen.findAllByRole("grid");+}++/**+ * Find a day cell by date. react-day-picker labels days+ * "Sunday, March 1st, 2026".+ *+ * Two months are rendered, and each grid also paints the adjacent month's+ * overflow days — so a single date can appear TWICE in the DOM. Take the cell+ * that is not an outside day, which is the one a user would read as belonging+ * to that month.+ */+async function pickDayButton(dateLike) {+ const d = moment(dateLike.valueOf ? dateLike.valueOf() : dateLike);+ // Match month/day/year so the ordinal suffix does not matter.+ const pattern = new RegExp(+ `${d.format("MMMM")}\\s+${d.date()}(st|nd|rd|th),\\s+${d.year()}`,+ );+ const matches = await screen.findAllByRole("button", { name: pattern });+ const owned = matches.filter(+ (el) => !el.closest("td")?.className.includes("outside"),+ );+ return owned[0] ?? matches[0];+}++/** Click a day by ISO date. */+async function pickDay(iso) {+ const button = await pickDayButton(moment(iso));+ fireEvent.click(button);+ return button;+}++describe("antd-compatible date/time shims (P3-04, D7)", () => {+ it("renders a date input for DatePicker", () => {+ const { container } = render(<DatePicker />);+ expect(container.querySelector("input").getAttribute("type")).toBe("date");+ });++ it("switches to datetime-local when showTime is set", () => {+ const { container } = render(<DatePicker showTime />);+ expect(container.querySelector("input").getAttribute("type")).toBe(+ "datetime-local",+ );+ });++ it("accepts a moment value and displays it", () => {+ const { container } = render(<DatePicker value={moment("2026-03-14")} />);+ expect(container.querySelector("input").value).toBe("2026-03-14");+ });++ /**+ * `moment(dayjsInstance)` does not understand dayjs. It does not throw and+ * does not report invalid — it quietly returns a moment for TODAY. So every+ * dayjs-valued field rendered today's date, with nothing anywhere to+ * indicate it. MetricsDashboard holds dayjs, and its "from" field showed+ * today instead of 30 days ago.+ *+ * Uses a fixed past date so a regression cannot coincidentally look right.+ */+ it("displays a dayjs value as its own date, not today", () => {+ const { container } = render(<DatePicker value={dayjs("2026-03-14")} />);+ expect(container.querySelector("input").value).toBe("2026-03-14");+ });++ it("displays a dayjs RangePicker tuple as its own dates", () => {+ render(<RangePicker value={[dayjs("2026-03-01"), dayjs("2026-03-31")]} />);+ expect(+ screen.getByRole("button", { name: /2026-03-01.*2026-03-31/ }),+ ).toBeInTheDocument();+ });++ it("displays a plain Date value correctly too", () => {+ const { container } = render(+ <DatePicker value={new Date(2026, 2, 14)} />, // month is 0-based+ );+ expect(container.querySelector("input").value).toBe("2026-03-14");+ });++ it("accepts an ISO string value too", () => {+ const { container } = render(<DatePicker value="2026-03-14T00:00:00Z" />);+ expect(container.querySelector("input").value).toBeTruthy();+ });++ it("renders empty for a null value rather than 'Invalid date'", () => {+ const { container } = render(<DatePicker value={null} />);+ expect(container.querySelector("input").value).toBe("");+ });++ it("ignores an unparseable value instead of rendering NaN", () => {+ const { container } = render(<DatePicker value="not-a-date" />);+ expect(container.querySelector("input").value).toBe("");+ });++ // The load-bearing assertion for D7.+ it("hands onChange a MOMENT, so `date?.toISOString()` keeps working", () => {+ const onChange = vi.fn();+ const { container } = render(<DatePicker onChange={onChange} />);+ fireEvent.change(container.querySelector("input"), {+ target: { value: "2026-03-14" },+ });++ expect(onChange).toHaveBeenCalled();+ const arg = onChange.mock.calls[0][0];+ expect(moment.isMoment(arg)).toBe(true);+ expect(typeof arg.toISOString()).toBe("string");+ });++ it("hands onChange null when the field is cleared", () => {+ const onChange = vi.fn();+ const { container } = render(+ <DatePicker value={moment("2026-03-14")} onChange={onChange} />,+ );+ fireEvent.change(container.querySelector("input"), {+ target: { value: "" },+ });+ expect(onChange.mock.calls.at(-1)[0]).toBeNull();+ });++ it("renders a time input for TimePicker", () => {+ const { container } = render(<TimePicker />);+ expect(container.querySelector("input").getAttribute("type")).toBe("time");+ });++ it("formats a moment value as HH:mm:ss for TimePicker", () => {+ const { container } = render(+ <TimePicker value={moment("2026-03-14T13:45:30")} />,+ );+ expect(container.querySelector("input").value).toBe("13:45:30");+ });++ it("RangePicker shows both ends of the range on its trigger", () => {+ render(+ <RangePicker value={[moment("2026-03-01"), moment("2026-03-31")]} />,+ );+ expect(+ screen.getByRole("button", { name: /2026-03-01.*2026-03-31/ }),+ ).toBeInTheDocument();+ });++ it("RangePicker prompts when it has no value", () => {+ render(<RangePicker value={[null, null]} />);+ expect(+ screen.getByRole("button", { name: /Select date range/ }),+ ).toBeInTheDocument();+ });++ it("RangePicker emits a tuple of moments when days are picked", async () => {+ const onChange = vi.fn();+ render(+ <RangePicker+ value={[null, null]}+ onChange={onChange}+ defaultMonth={new Date(2026, 2, 1)}+ />,+ );++ await openRangeCalendar();+ await pickDay("2026-03-01");++ const pair = onChange.mock.calls[0][0];+ expect(Array.isArray(pair)).toBe(true);+ expect(moment.isMoment(pair[0])).toBe(true);+ });++ it("exposes RangePicker as DatePicker.RangePicker, as antd does", () => {+ expect(DatePicker.RangePicker).toBe(RangePicker);+ });++ it("passes disabled through", () => {+ const { container } = render(<DatePicker disabled />);+ expect(container.querySelector("input")).toBeDisabled();+ });++ /**+ * These props were accepted-and-ignored by the first version of the shim.+ * Ignoring them is invisible in a screenshot but changes what the control+ * DOES, so each one gets a test that fails if it silently stops working.+ */+ describe("RangePicker props the call-sites depend on", () => {+ it("renders preset buttons and applies the range when one is clicked", async () => {+ const onChange = vi.fn();+ const preset = [moment("2026-03-01"), moment("2026-03-08")];+ render(+ <RangePicker+ value={[null, null]}+ onChange={onChange}+ presets={[{ label: "Last 7 Days", value: preset }]}+ />,+ );++ await openRangeCalendar();+ fireEvent.click(screen.getByRole("button", { name: "Last 7 Days" }));++ const [pair] = onChange.mock.calls[0];+ expect(pair[0].toISOString()).toBe(preset[0].toISOString());+ expect(pair[1].toISOString()).toBe(preset[1].toISOString());+ });++ it("renders no preset sidebar when presets are not supplied", async () => {+ render(<RangePicker value={[null, null]} />);+ await openRangeCalendar();+ expect(+ screen.queryByRole("button", { name: /Last \d+ Days/ }),+ ).not.toBeInTheDocument();+ });++ // MetricsDashboard blocks future dates. A calendar can grey out individual+ // days, which is what antd's per-date predicate actually means — the old+ // native-input version could only approximate it with a min/max bound.+ it("disables future days for a no-future-dates disabledDate", async () => {+ render(+ <RangePicker+ value={[null, null]}+ disabledDate={(current) => current && current > moment()}+ />,+ );+ await openRangeCalendar();++ const tomorrow = await pickDayButton(moment().add(1, "day"));+ expect(tomorrow).toBeDisabled();+ const today = await pickDayButton(moment());+ expect(today).not.toBeDisabled();+ });++ // The predicate is the caller's own code, so it must be handed the+ // caller's own date type. MetricsDashboard's reads `current > dayjs()`;+ // a moment compares fine by coercion, which is exactly why passing the+ // wrong type here goes unnoticed until a predicate calls a dayjs-only+ // method. Assert the type the predicate actually receives.+ it("hands disabledDate the caller's date library", async () => {+ const seen = [];+ render(+ <RangePicker+ value={[dayjs("2026-03-01"), null]}+ defaultMonth={new Date(2026, 2, 1)}+ disabledDate={(current) => {+ seen.push(current);+ return false;+ }}+ />,+ );+ await openRangeCalendar();++ expect(seen.length).toBeGreaterThan(0);+ expect(seen.every((d) => dayjs.isDayjs(d))).toBe(true);+ expect(seen.some((d) => moment.isMoment(d))).toBe(false);+ });++ it("leaves every day selectable when no disabledDate is given", async () => {+ render(+ <RangePicker+ value={[null, null]}+ defaultMonth={new Date(2026, 2, 1)}+ />,+ );+ await openRangeCalendar();+ const day = await pickDayButton(moment("2026-03-15"));+ expect(day).not.toBeDisabled();+ });++ // antd reports a fully-cleared range as null. MetricsDashboard's handler+ // ignores anything that is not a complete pair, so emitting null with+ // allowClear={false} would strand the dashboard on a stale range.+ // antd reports a fully-cleared range as null. MetricsDashboard's handler+ // ignores anything that is not a complete pair, so emitting null with+ // allowClear={false} would strand the dashboard on a stale range.+ //+ // The clear path is react-day-picker handing back an empty selection.+ // There is no "clear" affordance to click, so it is driven straight+ // through the Calendar's onSelect — the same call the library makes.+ // Reach the live Calendar's onSelect by opening the popover and invoking+ // the handler react-day-picker would call. Going through the React tree+ // keeps this honest: if the shim stopped wiring onSelect, this breaks.+ const clearViaCalendar = async () => {+ await openRangeCalendar();+ const grid = screen.getAllByRole("grid")[0];+ const fiberKey = Object.keys(grid).find((k) =>+ k.startsWith("__reactFiber$"),+ );+ let node = grid[fiberKey];+ while (node && typeof node.memoizedProps?.onSelect !== "function") {+ node = node.return;+ }+ node.memoizedProps.onSelect(undefined, undefined);+ };++ it("suppresses the cleared-range emit when allowClear is false", async () => {+ const onChange = vi.fn();+ render(+ <RangePicker+ allowClear={false}+ value={[moment("2026-03-01"), moment("2026-03-05")]}+ onChange={onChange}+ />,+ );+ await clearViaCalendar();+ expect(onChange.mock.calls.filter((c) => c[0] === null)).toHaveLength(0);+ });++ it("emits null for a cleared range when allowClear is default", async () => {+ const onChange = vi.fn();+ render(+ <RangePicker+ value={[moment("2026-03-01"), moment("2026-03-05")]}+ onChange={onChange}+ />,+ );+ await clearViaCalendar();+ expect(onChange).toHaveBeenCalledWith(null, ["", ""]);+ });++ it("fires onOk once the range becomes complete", async () => {+ const onOk = vi.fn();+ render(+ <RangePicker+ value={[null, null]}+ onOk={onOk}+ defaultMonth={new Date(2026, 2, 1)}+ />,+ );+ await openRangeCalendar();+ await pickDay("2026-03-01");+ expect(onOk).not.toHaveBeenCalled();+ await pickDay("2026-03-31");+ expect(onOk).toHaveBeenCalledTimes(1);+ });++ // MetricsDashboard holds dayjs; ExecutionLogs holds moment. Handing back+ // the wrong one is a type the call-site never opted into.+ //+ // Tested against the REAL dayjs, not a stand-in. An earlier version of+ // this test used a hand-written stub whose constructor accepted a date+ // string — so it passed while the shim was doing+ // `new sample.constructor(iso)`, which dayjs silently ignores (returning+ // TODAY) and moment turns into an object that throws on .format().+ // The stub tested itself; only the real library catches that.+ it("echoes back the caller's date library rather than forcing moment", async () => {+ const onChange = vi.fn();+ render(+ <RangePicker+ value={[dayjs("2026-03-01"), null]}+ onChange={onChange}+ defaultMonth={new Date(2026, 2, 1)}+ />,+ );+ await openRangeCalendar();+ await pickDay("2026-03-31");++ const pair = onChange.mock.calls.at(-1)[0];+ const emitted = pair[1] ?? pair[0];+ expect(dayjs.isDayjs(emitted)).toBe(true);+ expect(moment.isMoment(emitted)).toBe(false);+ });++ it("preserves moment for callers that hold moment", async () => {+ const onChange = vi.fn();+ render(+ <RangePicker+ value={[moment("2026-03-01"), null]}+ onChange={onChange}+ defaultMonth={new Date(2026, 2, 1)}+ />,+ );+ await openRangeCalendar();+ await pickDay("2026-03-31");++ const pair = onChange.mock.calls.at(-1)[0];+ const emitted = pair[1] ?? pair[0];+ expect(moment.isMoment(emitted)).toBe(true);+ });+ });+});diff --git a/frontend/src/components/ui/shims/antd-datetime.tsx b/frontend/src/components/ui/shims/antd-datetime.tsxnew file mode 100644index 000000000..79444421e--- /dev/null+++ b/frontend/src/components/ui/shims/antd-datetime.tsx@@ -0,0 +1,554 @@+import { Calendar as CalendarIcon } from "lucide-react";+import moment from "moment";+import * as React from "react";++import { Calendar } from "@/components/ui/calendar";+import { Input } from "@/components/ui/input";+import {+ Popover,+ PopoverContent,+ PopoverTrigger,+} from "@/components/ui/popover";+import { cn } from "@/lib/utils";++/**+ * antd-compatible `DatePicker` / `TimePicker` / `RangePicker` (P3-04).+ *+ * Built on native `<input type="date|datetime-local|time">` rather than+ * `react-day-picker`: every call-site here is a plain date/time field, not a+ * calendar surface, so a full calendar component would be more machinery than+ * the UI actually uses.+ *+ * ## The behavioural contract (D7)+ *+ * antd's pickers exchange **moment objects**, and call-sites depend on that:+ *+ * value={value ? moment(value) : null}+ * onChange={(date) => onChange(date?.toISOString())}+ *+ * `moment` is still a direct dependency, so rather than change every call-site+ * to a different date type — which is the behaviour-affecting half of D7 —+ * these components keep exchanging moment objects. That confines the swap to+ * the widget layer and leaves timezone/DST handling exactly as it was.+ *+ * Removing moment itself is deliberately NOT bundled in here: it changes+ * timezone semantics and deserves its own reviewed change (D7 says as much).+ */++/**+ * The antd date/time surface these shims accept.+ *+ * These deliberately exchange MOMENT objects rather than Dates or strings+ * (D7): call-sites hold moments, and converting the date type would change+ * timezone/DST behaviour, which belongs in its own reviewed change. The value+ * types below say so explicitly.+ *+ * `MomentLike` is structural on purpose — anything exposing `valueOf()` (a+ * moment, a dayjs instance, a Date) is normalised through the epoch instant.+ * That normalisation exists because `moment(dayjsInstance)` silently returns+ * TODAY and reports `isValid() === true`, so the wrong date rendered with no+ * error anywhere.+ */+interface MomentLike {+ valueOf: () => number;+ format?: (pattern?: string) => string;+ toDate?: () => Date;+ isValid?: () => boolean;+ clone?: () => MomentLike;+}++/** What the pickers accept as a value: a moment/dayjs/Date, or an ISO string. */+type DateValue = MomentLike | Date | string | null | undefined;++interface DatePickerProps+ extends Omit<+ React.InputHTMLAttributes<HTMLInputElement>,+ "value" | "onChange" | "size"+ > {+ value?: DateValue;+ /** antd hands back (moment, isoString), matching what call-sites destructure. */+ onChange?: (value: MomentLike | null, dateString: string) => void;+ showTime?: boolean;+ /** Display pattern. The native control renders it, so this is accepted, not applied. */+ format?: string;+ size?: "small" | "middle" | "large";+}++interface TimePickerProps+ extends Omit<+ React.InputHTMLAttributes<HTMLInputElement>,+ "value" | "onChange" | "size"+ > {+ value?: DateValue;+ onChange?: (value: MomentLike | null, timeString: string) => void;+ format?: string;+ size?: "small" | "middle" | "large";+}++/** antd's range value is a [start, end] tuple. */+type RangeValue = [MomentLike | null, MomentLike | null] | null;++interface RangePickerProps+ extends Omit<+ React.HTMLAttributes<HTMLDivElement>,+ "value" | "onChange" | "defaultValue"+ > {+ value?: RangeValue;+ onChange?: (value: RangeValue, dateStrings: [string, string]) => void;+ /** Fired once the range is complete, as antd does. */+ onOk?: (value: RangeValue) => void;+ showTime?: boolean;+ disabled?: boolean;+ /** Quick-select shortcuts shown beside the calendar. */+ presets?: Array<{ label: React.ReactNode; value: RangeValue }>;+ disabledDate?: (current: MomentLike) => boolean;+ allowClear?: boolean;+ /** Month the calendar opens on. */+ defaultMonth?: Date;+ format?: string;+ size?: "small" | "middle" | "large";+}++/** ISO → the value shape a native input expects. */+function toInputValue(+ value: DateValue,+ type: "date" | "time" | "datetime-local",+): string {+ if (!value) {+ return "";+ }+ // `moment(dayjsInstance)` does NOT understand dayjs: it returns a moment for+ // TODAY and reports isValid() === true, so the wrong date renders with no+ // error anywhere. MetricsDashboard holds dayjs, which is why its start field+ // showed today instead of 30 days ago. Anything exposing valueOf() (dayjs,+ // moment, Date) is normalised through the epoch instant first.+ const normalised: number | string | Date =+ !moment.isMoment(value) && typeof value?.valueOf === "function"+ ? value.valueOf()+ : (value as string | Date);+ const m = moment.isMoment(value) ? value : moment(normalised);+ if (!m.isValid()) {+ return "";+ }+ if (type === "time") {+ return m.format("HH:mm:ss");+ }+ if (type === "datetime-local") {+ return m.format("YYYY-MM-DDTHH:mm:ss");+ }+ return m.format("YYYY-MM-DD");+}++/**+ * antd `<DatePicker showTime value onChange>`.+ * `onChange` receives a moment (or null), matching antd.+ */+const DatePickerBase = React.forwardRef<HTMLInputElement, DatePickerProps>(+ function DatePicker(+ {+ value,+ onChange,+ showTime,+ disabled,+ placeholder,+ format: _format,+ size: _size,+ className,+ ...props+ },+ ref,+ ) {+ const type = showTime ? "datetime-local" : "date";+ return (+ <Input+ ref={ref}+ type={type}+ disabled={disabled}+ placeholder={placeholder}+ value={toInputValue(value, type)}+ className={cn("w-auto", className)}+ onChange={(e) => {+ const raw = e.target.value;+ onChange?.(raw ? moment(raw) : null, raw);+ }}+ {...props}+ />+ );+ },+);++/** antd `<TimePicker value onChange>`. */+const TimePicker = React.forwardRef<HTMLInputElement, TimePickerProps>(+ function TimePicker(+ {+ value,+ onChange,+ disabled,+ placeholder,+ format: _format,+ size: _size,+ className,+ ...props+ },+ ref,+ ) {+ return (+ <Input+ ref={ref}+ type="time"+ step="1"+ disabled={disabled}+ placeholder={placeholder}+ value={toInputValue(value, "time")}+ className={cn("w-auto", className)}+ onChange={(e) => {+ const raw = e.target.value;+ onChange?.(raw ? moment(raw, "HH:mm:ss") : null, raw);+ }}+ {...props}+ />+ );+ },+);++/**+ * Rebuild a date in whatever library the CALLER is using.+ *+ * ExecutionLogs passes moment objects; MetricsDashboard passes dayjs. Both+ * expose the same `.clone()`/`.toISOString()` surface, so hardcoding moment+ * on the way out handed MetricsDashboard a moment where its state held dayjs.+ * Nothing crashed — the two APIs overlap where that code touches them — but+ * it is a type the call-site never opted into, and it silently reverses D7's+ * promise that the widget layer does not change what flows through it.+ *+ * `sample` is a value we already received from the caller, so cloning it+ * keeps their library, its locale and its timezone config.+ */+function likeSample(+ sample: MomentLike | Date | string | null | undefined,+ isoish?: string | null,+): MomentLike | null {+ if (!isoish) {+ return null;+ }+ const millis = moment(isoish).valueOf();+ if (Number.isNaN(millis)) {+ return null;+ }++ // NOT `new sample.constructor(isoish)`. That looks right and is wrong for+ // both libraries actually in use: dayjs's internal constructor takes a+ // config OBJECT, so handed a string it ignores it and silently returns+ // today; moment's returns an object that throws on .format(). Either way+ // the caller gets a confidently-wrong date.+ //+ // `.clone()` then re-point the instant. Both libraries expose clone(), and+ // dayjs's immutable setters return a new instance while moment's mutate in+ // place and return this — assigning the result covers both.+ const cloneable =+ sample && typeof sample === "object" && "clone" in sample+ ? (sample as MomentLike)+ : null;+ if (typeof cloneable?.clone === "function") {+ try {+ const moved = applyInstant(cloneable.clone(), millis);+ if (moved?.isValid?.() && moved.valueOf() === millis) {+ return moved;+ }+ } catch {+ // Fall through to moment below.+ }+ }+ return moment(isoish);+}++/**+ * Re-point a cloned date instance at `millis`, tolerating both the mutable+ * (moment) and immutable (dayjs) setter conventions.+ */+function applyInstant(clone: MomentLike, millis: number): MomentLike | null {+ const base = moment(millis);+ const parts: Array<[string, number]> = [+ ["year", base.year()],+ ["month", base.month()],+ ["date", base.date()],+ ["hour", base.hour()],+ ["minute", base.minute()],+ ["second", base.second()],+ ["millisecond", base.millisecond()],+ ];+ let current: MomentLike | null = clone;+ for (const [unit, value] of parts) {+ // moment and dayjs both expose year()/month()/date()/… but share no type,+ // so this read is reflection by nature. Cast here, at the probe, rather+ // than widening MomentLike — which would stop moment.Moment satisfying it.+ const setter = (current as unknown as Record<string, unknown>)[unit];+ if (typeof setter !== "function") {+ return null;+ }+ current = ((setter as (v: number) => MomentLike | undefined).call(+ current,+ value,+ ) ?? current) as MomentLike;+ }+ return current;+}++/**+ * antd `<DatePicker.RangePicker value={[start, end]} onChange>`.+ * Call-sites read `value?.[0]` / `value?.[1]`, so the tuple shape is kept.+ *+ * Native inputs rather than a calendar popup (see the module note), but the+ * props below are honoured because dropping them changes BEHAVIOUR, not just+ * appearance:+ *+ * - `presets` — MetricsDashboard's "Last 7/30/90 Days" buttons. These+ * are the primary way the range is set; without them the+ * control looks complete while its main affordance is+ * missing.+ * - `disabledDate` — bounds the pickable range. MetricsDashboard uses it to+ * block future dates; ignoring it let users query+ * tomorrow. Mapped onto the inputs' min/max, which is+ * what a native input can enforce.+ * - `allowClear` — antd defaults to true. MetricsDashboard passes false+ * because its handler ignores anything that is not a+ * complete pair, so a cleared range would freeze the UI.+ * - `onOk` — antd fires this on the popup's confirm button. There is+ * no popup here, so it fires when a range becomes+ * complete, which is when the call-site expects it.+ */+const RangePicker = React.forwardRef<HTMLDivElement, RangePickerProps>(+ function RangePicker(+ {+ value,+ onChange,+ onOk,+ showTime,+ disabled,+ presets,+ disabledDate,+ allowClear = true,+ className,+ defaultMonth,+ format: _format,+ size: _size,+ ...props+ },+ ref,+ ) {+ const type = showTime ? "datetime-local" : "date";+ const [start, end] = value ?? [null, null];+ const sample = start ?? end ?? presets?.[0]?.value?.[0] ?? null;++ const emit = (nextStart: MomentLike | null, nextEnd: MomentLike | null) => {+ const cleared = !nextStart && !nextEnd;+ // antd reports a cleared range as null. With allowClear={false} the+ // call-site never wants that, so hold the previous pair instead.+ if (cleared && !allowClear) {+ return;+ }+ const pair: RangeValue = cleared ? null : [nextStart, nextEnd];+ onChange?.(pair, [+ toInputValue(nextStart, type),+ toInputValue(nextEnd, type),+ ]);+ if (nextStart && nextEnd) {+ onOk?.([nextStart, nextEnd]);+ }+ };++ /**+ * antd's `disabledDate(current)` answers per-date, and so does the+ * calendar's `disabled` — so the predicate maps straight across. The earlier+ * native-input version had to probe outward for a min/max bound because an+ * `<input type=date>` only understands those two attributes; a calendar can+ * grey out individual days, which is what the prop actually means.+ */+ const isDayDisabled = React.useMemo(() => {+ if (typeof disabledDate !== "function") {+ return undefined;+ }+ return (day: Date) => {+ try {+ const probe = likeSample(sample, day.toISOString());+ return probe ? Boolean(disabledDate(probe)) : false;+ } catch {+ // A predicate that cannot cope with the probe must not take the+ // calendar down with it; treat the day as selectable.+ return false;+ }+ };+ }, [disabledDate, sample]);++ type Preset = NonNullable<RangePickerProps["presets"]>[number];++ const applyPreset = (preset: Preset) => {+ const [presetStart, presetEnd] = preset.value ?? [null, null];+ onChange?.(+ [presetStart, presetEnd],+ [toInputValue(presetStart, type), toInputValue(presetEnd, type)],+ );+ if (presetStart && presetEnd) {+ onOk?.([presetStart, presetEnd]);+ }+ };++ const [open, setOpen] = React.useState(false);++ /** The calendar speaks native Date; the call-sites speak moment/dayjs. */+ const selectedRange = React.useMemo(() => {+ const from = start+ ? new Date(moment(start.valueOf()).valueOf())+ : undefined;+ const to = end ? new Date(moment(end.valueOf()).valueOf()) : undefined;+ return from || to ? { from, to } : undefined;+ }, [start, end]);++ /**+ * Tracks which end the next click fills.+ *+ * react-day-picker reports `{from, to}` with BOTH set to the clicked day on+ * every click — it does not distinguish "started a range" from "finished+ * one". Taken at face value that makes each click look like a complete+ * range, so `onOk` would fire on the first click and the second click would+ * start over instead of closing the range. antd treats the first click as+ * the start and the second as the end, so the anchor is tracked here.+ */+ const [anchor, setAnchor] = React.useState<MomentLike | null>(null);++ const handleSelect = (+ range: { from?: Date; to?: Date } | undefined,+ clickedDay?: Date,+ ) => {+ const day = clickedDay ?? range?.to ?? range?.from;+ if (!day) {+ // Deselect: react-day-picker clears the range.+ setAnchor(null);+ emit(null, null);+ return;+ }++ const picked = likeSample(sample, day.toISOString());++ if (!anchor) {+ // First click: open a new range. Report the half-filled pair the way+ // antd does, so a call-site watching onChange sees the start land.+ setAnchor(picked);+ emit(picked, null);+ return;+ }++ // Second click: close the range, ordering the ends so a backwards+ // selection still yields start <= end.+ if (!picked) {+ return;+ }+ const [from, to] =+ picked.valueOf() < anchor.valueOf()+ ? [picked, anchor]+ : [anchor, picked];+ setAnchor(null);+ emit(from, to);+ setOpen(false);+ };++ const label =+ start || end+ ? `${toInputValue(start, type) || "…"} → ${toInputValue(end, type) || "…"}`+ : "Select date range";++ return (+ <span+ ref={ref}+ className={cn("inline-flex items-center", className)}+ {...props}+ >+ <Popover open={open} onOpenChange={setOpen}>+ <PopoverTrigger asChild>+ <button+ type="button"+ disabled={disabled}+ className={cn(+ "ant-picker ant-picker-range inline-flex h-9 max-w-full cursor-pointer items-center gap-2",+ "rounded-md border border-input bg-transparent px-3 py-1",+ "text-sm shadow-sm transition-colors",+ "hover:bg-accent hover:text-accent-foreground",+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",+ "disabled:cursor-not-allowed disabled:opacity-50",+ !start && !end && "text-muted-foreground",+ )}+ >+ <CalendarIcon className="size-4 shrink-0" aria-hidden="true" />+ {/*+ * `min-w-0` + `truncate`, not a bare `whitespace-nowrap`. With+ * `showTime` the label carries full timestamps+ * ("2026-07-02T00:00 → 2026-08-01T23:59"), and a nowrap span+ * with no min-width floor forces the button past its container —+ * the Logs filter row broke apart as soon as a range was picked.+ */}+ <span className="min-w-0 truncate">{label}</span>+ </button>+ </PopoverTrigger>+ <PopoverContent className="w-auto p-0" align="end">+ <div className="flex flex-row">+ {presets?.length ? (+ <div+ className={cn(+ // Not `sm:` variants: those track the viewport, but this+ // sits inside a popover and stacked into a tall narrow+ // column that overflowed the window.+ "flex w-40 shrink-0 flex-col gap-1 border-r border-border p-2",+ )}+ >+ {presets.map((preset) => (+ <button+ // Safe as a key because every call-site in both repos+ // labels presets with a plain string ("Last 7 Days" &c.).+ // Two ELEMENT labels would both stringify to+ // "[object Object]" and collide.+ key={String(preset.label)}+ type="button"+ onClick={() => {+ applyPreset(preset);+ setOpen(false);+ }}+ className={cn(+ "cursor-pointer whitespace-nowrap rounded-md px-2 py-1.5 text-left text-sm",+ "hover:bg-accent hover:text-accent-foreground",+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",+ )}+ >+ {preset.label}+ </button>+ ))}+ </div>+ ) : null}+ <Calendar+ mode="range"+ numberOfMonths={2}+ defaultMonth={defaultMonth ?? selectedRange?.from}+ selected={selectedRange}+ onSelect={handleSelect}+ disabled={isDayDisabled}+ /*+ * antd's header offers a YEAR jump as well as a month one: a+ * `super-prev`/`super-next` pair plus clickable month and year+ * buttons. The arrows here step by month only, so picking a+ * date a year out meant twelve clicks. Dropdown captions give+ * back the direct month AND year selection.+ */+ captionLayout="dropdown"+ startMonth={new Date(new Date().getFullYear() - 5, 0)}+ endMonth={new Date(new Date().getFullYear() + 5, 11)}+ />+ </div>+ </PopoverContent>+ </Popover>+ </span>+ );+ },+);++const DatePicker = Object.assign(DatePickerBase, { RangePicker });++export { DatePicker, RangePicker, TimePicker };diff --git a/frontend/src/components/ui/shims/antd-form.test.jsx b/frontend/src/components/ui/shims/antd-form.test.jsxnew file mode 100644index 000000000..5e7d90bd7--- /dev/null+++ b/frontend/src/components/ui/shims/antd-form.test.jsx@@ -0,0 +1,494 @@+import { fireEvent, render, screen, waitFor } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import * as React from "react";+import { describe, expect, it, vi } from "vitest";+import { Input } from "@/components/ui/input";+import { Form } from "@/components/ui/shims/antd-form";++function Harness({ onReady, onFinish }) {+ const [form] = Form.useForm();+ onReady?.(form);+ return (+ <Form form={form} layout="vertical" onFinish={onFinish}>+ <Form.Item+ label="Name"+ name="name"+ rules={[{ required: true, message: "Group name is required" }]}+ >+ <Input />+ </Form.Item>+ <Form.Item label="Description" name="description">+ <Input />+ </Form.Item>+ <button type="submit">Save</button>+ </Form>+ );+}++describe("antd-compatible Form shim (P3)", () => {+ it("renders labels and inputs", () => {+ render(<Harness />);+ expect(screen.getByText("Name")).toBeInTheDocument();+ expect(screen.getByText("Description")).toBeInTheDocument();+ });++ it("setFieldsValue populates inputs, as edit-mode modals rely on", async () => {+ let form;+ render(<Harness onReady={(f) => (form = f)} />);+ form.setFieldsValue({ name: "Engineering", description: "team" });+ await waitFor(() =>+ expect(screen.getByDisplayValue("Engineering")).toBeInTheDocument(),+ );+ });++ it("getFieldsValue reads current values back", async () => {+ let form;+ render(<Harness onReady={(f) => (form = f)} />);+ form.setFieldsValue({ name: "Ops" });+ await waitFor(() => expect(form.getFieldsValue().name).toBe("Ops"));+ });++ // The critical behaviour: antd REJECTS on invalid, and call-sites do+ // `await form.validateFields().catch(() => null)` to bail out. If this+ // resolved instead, invalid forms would submit.++ it("validateFields rejects when a required field is empty", async () => {+ let form;+ render(<Harness onReady={(f) => (form = f)} />);+ const values = await form.validateFields().catch(() => null);+ expect(values).toBeNull();+ });++ it("validateFields resolves with values once valid", async () => {+ let form;+ render(<Harness onReady={(f) => (form = f)} />);+ form.setFieldsValue({ name: "Filled" });+ await waitFor(async () => {+ const values = await form.validateFields().catch(() => null);+ expect(values?.name).toBe("Filled");+ });+ });++ it("shows the rule's message inline when validation fails", async () => {+ let form;+ render(<Harness onReady={(f) => (form = f)} />);+ await form.validateFields().catch(() => null);+ await waitFor(() =>+ expect(screen.getByText("Group name is required")).toBeInTheDocument(),+ );+ });++ it("resetFields clears the inputs", async () => {+ let form;+ render(<Harness onReady={(f) => (form = f)} />);+ form.setFieldsValue({ name: "Temp" });+ await waitFor(() => screen.getByDisplayValue("Temp"));+ form.resetFields();+ await waitFor(() =>+ expect(screen.queryByDisplayValue("Temp")).not.toBeInTheDocument(),+ );+ });++ it("accepts typed input and submits via onFinish", async () => {+ const user = userEvent.setup();+ const onFinish = vi.fn();+ render(<Harness onFinish={onFinish} />);+ await user.type(screen.getAllByRole("textbox")[0], "Typed");+ await user.click(screen.getByRole("button", { name: "Save" }));+ await waitFor(() => expect(onFinish).toHaveBeenCalled());+ expect(onFinish.mock.calls[0][0].name).toBe("Typed");+ });++ it("blocks onFinish while a required field is empty", async () => {+ const user = userEvent.setup();+ const onFinish = vi.fn();+ render(<Harness onFinish={onFinish} />);+ await user.click(screen.getByRole("button", { name: "Save" }));+ await waitFor(() =>+ expect(screen.getByText("Group name is required")).toBeInTheDocument(),+ );+ expect(onFinish).not.toHaveBeenCalled();+ });++ it("renders a name-less Form.Item as plain layout", () => {+ render(+ <Form>+ <Form.Item label="Static">+ <span>content</span>+ </Form.Item>+ </Form>,+ );+ expect(screen.getByText("content")).toBeInTheDocument();+ expect(screen.getByText("Static")).toBeInTheDocument();+ });+});++/**+ * antd's NamePath allows arrays. react-hook-form's Controller calls+ * `.split(".")` on the name, so an array crashed with+ * "TypeError: s.split is not a function" — taking down the whole route, not+ * just the field. InviteEditUser uses `name={["email"]}`; the cloud+ * StripeProductForm uses nested `name={["tier1", "up_to"]}`.+ */+describe("Form.Item accepts antd's array NamePath", () => {+ it("renders a single-element array name without crashing", () => {+ render(+ <Form>+ <Form.Item name={["email"]} label="Email">+ <input />+ </Form.Item>+ </Form>,+ );+ expect(screen.getByLabelText("Email")).toBeInTheDocument();+ });++ it("treats a nested array name as a dotted path", async () => {+ const onFinish = vi.fn();+ render(+ <Form onFinish={onFinish}>+ <Form.Item name={["tier1", "up_to"]} label="Up to">+ <input />+ </Form.Item>+ <button type="submit">Save</button>+ </Form>,+ );++ fireEvent.change(screen.getByLabelText("Up to"), {+ target: { value: "42" },+ });+ fireEvent.click(screen.getByRole("button", { name: "Save" }));++ await waitFor(() => expect(onFinish).toHaveBeenCalled());+ // The nested shape antd would have produced.+ expect(onFinish.mock.calls[0][0]).toMatchObject({ tier1: { up_to: "42" } });+ });+ /**+ * These four antd APIs were all missing, and together they broke every+ * create/edit modal in the app: the Save button appeared to do nothing.+ *+ * onValuesChange -> never fired, so call-sites mirroring the form into+ * component state kept their initial (empty) value and+ * submitted an empty body+ * setFields -> the handler those call-sites run on each keystroke+ * validateStatus+ * + help -> how the backend's 400 is surfaced per field; the+ * call-sites deliberately do NOT validate client-side+ */+ describe("antd Form APIs the create/edit modals depend on", () => {+ it("fires onValuesChange with the changed field and all values", async () => {+ const onValuesChange = vi.fn();+ render(+ <Form layout="vertical" onValuesChange={onValuesChange}>+ <Form.Item label="Name" name="tool_name">+ <Input />+ </Form.Item>+ </Form>,+ );++ fireEvent.change(screen.getByRole("textbox"), {+ target: { value: "abc" },+ });++ await waitFor(() => expect(onValuesChange).toHaveBeenCalled());+ const [changed, all] = onValuesChange.mock.calls.at(-1);+ expect(changed).toMatchObject({ tool_name: "abc" });+ expect(all).toMatchObject({ tool_name: "abc" });+ });++ it("seeds fields from initialValues", () => {+ render(+ <Form layout="vertical" initialValues={{ tool_name: "seeded" }}>+ <Form.Item label="Name" name="tool_name">+ <Input />+ </Form.Item>+ </Form>,+ );+ expect(screen.getByRole("textbox")).toHaveValue("seeded");+ });++ it("ignores later initialValues changes, as antd does", () => {+ // The call-sites pass initialValues={state} AND write that state from+ // onValuesChange. Re-seeding on change would clobber typing.+ const { rerender } = render(+ <Form layout="vertical" initialValues={{ tool_name: "first" }}>+ <Form.Item label="Name" name="tool_name">+ <Input />+ </Form.Item>+ </Form>,+ );+ fireEvent.change(screen.getByRole("textbox"), {+ target: { value: "typed" },+ });+ rerender(+ <Form layout="vertical" initialValues={{ tool_name: "second" }}>+ <Form.Item label="Name" name="tool_name">+ <Input />+ </Form.Item>+ </Form>,+ );+ expect(screen.getByRole("textbox")).toHaveValue("typed");+ });++ it("keeps values set before the Form mounted, as antd does", async () => {+ // Agentic Table Settings (and its sibling modals) fetch first and render+ // a spinner meanwhile, so setFieldsValue lands while the <Form> is still+ // unmounted. Seeding initialValues ON TOP of that write wiped it: the+ // saved Lite LLM adapter came back blank on every reopen.+ function LoadThenMount() {+ const [form] = Form.useForm();+ const [loading, setLoading] = React.useState(true);++ React.useEffect(() => {+ Promise.resolve({ tool_name: "saved" }).then((data) => {+ form.setFieldsValue(data);+ setLoading(false);+ });+ }, []);++ if (loading) {+ return <span>loading</span>;+ }+ return (+ <Form form={form} layout="vertical" initialValues={{ tool_name: "" }}>+ <Form.Item label="Name" name="tool_name">+ <Input />+ </Form.Item>+ </Form>+ );+ }++ render(<LoadThenMount />);+ await waitFor(() =>+ expect(screen.getByRole("textbox")).toHaveValue("saved"),+ );+ });++ it("renders the label tooltip antd's `tooltip` prop asks for", async () => {+ // Undeclared, `tooltip` fell into ...props and landed on the wrapper+ // div: the marker never rendered, so the Agentic Table settings fields+ // lost their hints and the object form leaked onto the DOM.+ render(+ <Form layout="vertical">+ <Form.Item+ label="Parallel Pages"+ name="parallel_pages"+ tooltip={{ title: "Pages processed in parallel." }}+ >+ <Input />+ </Form.Item>+ </Form>,+ );++ const trigger = screen.getByRole("button", { name: "More info" });+ expect(trigger).toBeInTheDocument();+ // The config object must not reach the DOM as an attribute.+ expect(document.querySelector("[tooltip]")).toBeNull();++ await userEvent.hover(trigger);+ await waitFor(() =>+ expect(+ screen.getAllByText("Pages processed in parallel.").length,+ ).toBeGreaterThan(0),+ );+ });++ it("accepts the bare-node tooltip form the rule editors use", () => {+ render(+ <Form layout="vertical">+ <Form.Item label="Percentage" name="pct" tooltip="0-100% of files">+ <Input />+ </Form.Item>+ </Form>,+ );+ expect(+ screen.getByRole("button", { name: "More info" }),+ ).toBeInTheDocument();+ });++ it("uses the icon a tooltip config supplies", () => {+ render(+ <Form layout="vertical">+ <Form.Item+ label="Start Page"+ name="start_page"+ tooltip={{ title: "1-indexed.", icon: <span>ICON</span> }}+ >+ <Input />+ </Form.Item>+ </Form>,+ );+ expect(screen.getByText("ICON")).toBeInTheDocument();+ });++ it("renders no marker when there is nothing to explain", () => {+ render(+ <Form layout="vertical">+ <Form.Item label="Name" name="tool_name">+ <Input />+ </Form.Item>+ </Form>,+ );+ expect(screen.queryByRole("button", { name: "More info" })).toBeNull();+ });++ it("exposes form.setFields for clearing and setting errors", async () => {+ let api;+ render(+ <Form layout="vertical" onValuesChange={vi.fn()}>+ <Form.Item label="Name" name="tool_name">+ <Input />+ </Form.Item>+ </Form>,+ );+ // The instance form: assert the method exists on a useForm() result.+ function Probe() {+ const [form] = Form.useForm();+ api = form;+ return null;+ }+ render(<Probe />);+ expect(typeof api.setFields).toBe("function");+ // Must not throw for either shape the call-sites use.+ expect(() =>+ api.setFields([{ name: "tool_name", errors: [] }]),+ ).not.toThrow();+ expect(() =>+ api.setFields([{ name: "tool_name", errors: ["Bad name"] }]),+ ).not.toThrow();+ });++ it("renders a backend error through validateStatus + help", () => {+ render(+ <Form layout="vertical">+ <Form.Item+ label="Name"+ name="tool_name"+ validateStatus="error"+ help="Tool name already exists"+ >+ <Input />+ </Form.Item>+ </Form>,+ );+ const msg = screen.getByText("Tool name already exists");+ expect(msg).toBeInTheDocument();+ expect(msg.className).toContain("text-destructive");+ expect(screen.getByRole("textbox").className).toContain(+ "border-destructive",+ );+ });++ it("does not leak validateStatus/help onto the DOM", () => {+ const { container } = render(+ <Form layout="vertical">+ <Form.Item name="x" validateStatus="error" help="msg">+ <Input />+ </Form.Item>+ </Form>,+ );+ const item = container.querySelector(".ant-form-item");+ expect(item.getAttribute("validateStatus")).toBeNull();+ expect(item.getAttribute("help")).toBeNull();+ });++ /*+ * `extra` is antd's static hint under a control — the token estimate under+ * Chunk Size, the slug rules under an API name. It used to fall into the+ * rest-props and land on the wrapper div as a stray attribute, so every+ * one of those hints rendered nowhere while looking wired up in the JSX.+ */+ it("renders extra as a hint rather than leaking it onto the DOM", () => {+ const { container } = render(+ <Form layout="vertical">+ <Form.Item label="Chunk Size" name="chunk_size" extra="~= 2k tokens">+ <Input />+ </Form.Item>+ </Form>,+ );+ const hint = screen.getByText("~= 2k tokens");+ expect(hint).toBeInTheDocument();+ expect(hint.className).toContain("text-muted-foreground");+ expect(+ container.querySelector(".ant-form-item").getAttribute("extra"),+ ).toBeNull();+ });++ // antd shows both at once, error first: the hint explains the field, the+ // message explains the rejection, and losing the hint on error is a+ // regression the "renders extra" case above cannot catch on its own.+ it("shows extra alongside an error message", () => {+ render(+ <Form layout="vertical">+ <Form.Item+ label="Chunk Size"+ name="chunk_size"+ validateStatus="error"+ help="Chunk size is too large"+ extra="~= 2k tokens"+ >+ <Input />+ </Form.Item>+ </Form>,+ );+ expect(screen.getByText("Chunk size is too large").className).toContain(+ "text-destructive",+ );+ expect(screen.getByText("~= 2k tokens").className).toContain(+ "text-muted-foreground",+ );+ });++ // The no-`name` branch is a separate return path in FormItem, and layout+ // Form.Items carry hints too.+ it("renders extra on a layout-only item with no name", () => {+ render(+ <Form layout="vertical">+ <Form.Item label="Standalone" extra="hint text">+ <Input />+ </Form.Item>+ </Form>,+ );+ expect(screen.getByText("hint text")).toBeInTheDocument();+ });+ });+});++describe("Form.useWatch", () => {+ // GlobalApiDeploymentKeys drives a whole fieldset off this: an "allow all+ // deployments" checkbox disables the deployment picker and drops its+ // required-rule. If useWatch never re-renders, the picker stays enabled and+ // the user can submit an incoherent scoped/unscoped pair.+ function WatchHarness() {+ const [form] = Form.useForm();+ // The instance is held HERE and the <Form> renders below, so there is no+ // FormProvider above this component — the arrangement every call-site uses.+ const allowAll = Form.useWatch("allowAll", form, false);+ return (+ <Form form={form} layout="vertical">+ <Form.Item name="allowAll" valuePropName="checked" initialValue={false}>+ <input type="checkbox" aria-label="Allow all" />+ </Form.Item>+ <span data-testid="watched">{String(allowAll)}</span>+ </Form>+ );+ }++ it("re-renders the watcher when the watched field changes", async () => {+ render(<WatchHarness />);+ expect(screen.getByTestId("watched")).toHaveTextContent("false");++ await userEvent.click(screen.getByLabelText("Allow all"));++ await waitFor(() =>+ expect(screen.getByTestId("watched")).toHaveTextContent("true"),+ );+ });++ it("returns undefined outside a Form instead of throwing", () => {+ function Bare() {+ return <span data-testid="bare">{String(Form.useWatch("nope"))}</span>;+ }+ render(<Bare />);+ expect(screen.getByTestId("bare")).toHaveTextContent("undefined");+ });+});diff --git a/frontend/src/components/ui/shims/antd-form.tsx b/frontend/src/components/ui/shims/antd-form.tsxnew file mode 100644index 000000000..2b72d32db--- /dev/null+++ b/frontend/src/components/ui/shims/antd-form.tsx@@ -0,0 +1,676 @@+import { CircleHelp } from "lucide-react";+import * as React from "react";+import {+ Controller,+ FormProvider,+ type UseFormReturn,+ useForm,+ useFormContext,+ useWatch,+} from "react-hook-form";++import { Label } from "@/components/ui/label";+import {+ Tooltip,+ TooltipContent,+ TooltipProvider,+ TooltipTrigger,+} from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";++/**+ * antd-compatible `Form` (P3-01/P3-02) implemented on react-hook-form.+ *+ * This is the highest-risk conversion in the migration: antd's Form bundles+ * validation, layout and state into one component, and the codebase drives it+ * imperatively through a form instance — `form.setFieldsValue()`,+ * `form.validateFields()`, `form.resetFields()` (14 `useForm()` sites, 102+ * `Form.Item`s). Rewriting each call-site by hand would mean 102 chances to+ * change submit or validation behaviour.+ *+ * So the antd surface is preserved:+ * - `Form.useForm()` returns a form instance exposing antd's imperative API+ * - `<Form form={} layout="vertical" onFinish={}>`+ * - `<Form.Item name label rules>` wrapping a single controlled child+ *+ * Under the hood it is react-hook-form, so the shadcn primitives receive the+ * usual `value`/`onChange` and validation state renders as inline messages,+ * exactly as antd did.+ */++/**+ * The antd Form surface these shims accept.+ *+ * This file is the strongest case for typing the layer. Four of these props+ * were MISSING and fell into `...props`, each failing silently:+ *+ * - `onValuesChange` — handlers mirroring the form into state never ran, so+ * Save posted an empty body and looked like it did nothing+ * - `setFields` — six modals called it and got+ * `TypeError: form.setFields is not a function` on the first keystroke+ * - `initialValues` — fields were never seeded+ * - `validateStatus` / `help` — the backend's 400 message landed on a DOM+ * div instead of being displayed+ *+ * Naming each one means the next omission is a compile error at the call-site,+ * not a defect a user has to report.+ */++/** antd's NamePath: a string, or an array for nested fields. */+type NamePath = string | Array<string | number>;++interface AntdRule {+ required?: boolean;+ message?: string;+ max?: number;+ min?: number;+ pattern?: RegExp;+ /** antd hands (rule, value); rejecting marks the field invalid. */+ validator?: (rule: unknown, value: unknown) => Promise<unknown> | unknown;+}++/** One entry of antd's `form.setFields([...])`. */+interface FieldData {+ name?: NamePath;+ value?: unknown;+ /** An empty array clears the error; a non-empty one sets it. */+ errors?: string[];+}++type FormValues = Record<string, unknown>;++/** The instance returned by `Form.useForm()`. */+interface FormInstance {+ /** Escape hatch to the underlying react-hook-form methods. */+ __methods: UseFormReturn<FormValues>;+ setFieldsValue: (values?: FormValues) => void;+ setFieldValue: (name: NamePath, value: unknown) => void;+ getFieldsValue: () => FormValues;+ getFieldValue: (name: NamePath) => unknown;+ /** Resolves with the values, REJECTS when invalid, as antd does. */+ validateFields: () => Promise<FormValues>;+ setFields: (fields?: FieldData[]) => void;+ resetFields: () => void;+ submit: () => void;+ isFieldsTouched: () => boolean;+ getFieldsError: () => Array<[string, unknown]>;+}++interface AntFormProps+ extends Omit<React.FormHTMLAttributes<HTMLFormElement>, "onSubmit"> {+ form?: FormInstance;+ layout?: "horizontal" | "vertical" | "inline";+ onFinish?: (values: FormValues) => void;+ onFinishFailed?: (errors: unknown) => void;+ /** Applied ON MOUNT ONLY, matching antd. */+ initialValues?: FormValues;+ onValuesChange?: (changed: FormValues, all: FormValues) => void;+}++interface FormItemProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {+ name?: NamePath;+ label?: React.ReactNode;+ rules?: AntdRule[];+ required?: boolean;+ /** `checked` for switches and checkboxes, `value` otherwise. */+ valuePropName?: string;+ /**+ * antd's per-item seed, the sibling of `<Form initialValues>`. Distinct from+ * "no value": a checkbox seeded `false` must read as `false`, because+ * call-sites branch on `=== false` to tell "unchecked" from "not yet loaded".+ */+ initialValue?: unknown;+ /**+ * antd's hint beside the label: a bare node, or `{ title, icon }` to pick a+ * different marker. Rendered as an icon that reveals `title` on hover/focus.+ */+ tooltip?:+ | React.ReactNode+ | { title?: React.ReactNode; icon?: React.ReactNode };+ /** antd's server-error channel, paired with `help`. */+ validateStatus?: "error" | "warning" | "success" | "validating";+ help?: React.ReactNode;+ /** antd's always-on hint below the control, independent of `help`. */+ extra?: React.ReactNode;+ children?: React.ReactNode;+}++/** Translate antd `rules` into RHF's validate/required options. */+function toRules(rules: AntdRule[] = [], label?: React.ReactNode) {+ const out: Record<string, unknown> = {};+ for (const rule of rules) {+ if (rule?.required) {+ out.required = rule.message ?? `${label ?? "This field"} is required`;+ }+ if (rule?.max != null) {+ out.maxLength = {+ value: rule.max,+ message: rule.message ?? `Max ${rule.max}`,+ };+ }+ if (rule?.min != null) {+ out.minLength = {+ value: rule.min,+ message: rule.message ?? `Min ${rule.min}`,+ };+ }+ if (rule?.pattern) {+ out.pattern = {+ value: rule.pattern,+ message: rule.message ?? "Invalid format",+ };+ }+ if (typeof rule?.validator === "function") {+ const validator = rule.validator;+ const existing = (out.validate ?? {}) as Record<string, unknown>;+ out.validate = {+ ...existing,+ [`custom${Object.keys(existing).length}`]: async (value: unknown) => {+ try {+ await validator({}, value);+ return true;+ } catch (e) {+ return (+ (e instanceof Error ? e.message : undefined) ??+ rule.message ??+ "Invalid value"+ );+ }+ },+ };+ }+ }+ return out;+}++/**+ * antd's `Form.useForm()`. Returns `[form]`, where `form` carries the+ * imperative methods the existing call-sites already use.+ */+function useAntdForm(): [FormInstance] {+ const methods = useForm({ mode: "onSubmit", shouldUnregister: false });++ const instance = React.useMemo(+ () => ({+ __methods: methods,++ /** antd: set one or many fields. */+ setFieldsValue: (values: FormValues = {}) => {+ for (const [k, v] of Object.entries(values)) {+ methods.setValue(k, v, { shouldDirty: false, shouldValidate: false });+ }+ },+ // These take a NamePath too, so they get the same normalisation the+ // Form.Item name does.+ setFieldValue: (name: NamePath, value: unknown) =>+ methods.setValue(toFieldName(name) as string, value, {+ shouldDirty: true,+ }),++ getFieldsValue: () => methods.getValues(),+ getFieldValue: (name: NamePath) =>+ methods.getValues(toFieldName(name) as string),++ /**+ * antd resolves with the values and REJECTS when invalid — call-sites do+ * `await form.validateFields().catch(() => null)`, so the rejection has+ * to be preserved or invalid forms would submit.+ */+ validateFields: async () => {+ const ok = await methods.trigger();+ if (!ok) {+ // antd rejects with an error carrying `errorFields`, and call-sites+ // read it, so the shape is declared rather than bolted on untyped.+ const err: Error & { errorFields?: unknown[] } = new Error(+ "Validation failed",+ );+ err.errorFields = Object.entries(methods.formState.errors).map(+ ([name, e]) => ({ name: [name], errors: [e?.message] }),+ );+ throw err;+ }+ return methods.getValues();+ },++ /**+ * antd's `setFields([{ name, errors, value }])`.+ *+ * Six modals call this from their `onValuesChange` handler to clear the+ * error on the field being edited — New Workflow, API Deployment (both+ * variants), ETL Task, Notifications, LLM Profile and the Prompt Studio+ * project modal. It was missing entirely, so those handlers would throw+ * `TypeError: form.setFields is not a function` on the first keystroke.+ */+ setFields: (fields: FieldData[] = []) => {+ for (const field of fields) {+ const name = toFieldName(field?.name);+ if (!name) {+ continue;+ }+ if ("value" in field) {+ methods.setValue(name, field.value, { shouldDirty: true });+ }+ // antd clears an error with `errors: []` and sets one with a+ // non-empty array.+ const errors = field?.errors;+ if (Array.isArray(errors)) {+ if (errors.length) {+ methods.setError(name, { type: "server", message: errors[0] });+ } else {+ methods.clearErrors(name);+ }+ }+ }+ },++ resetFields: () => methods.reset({}),+ submit: () => methods.handleSubmit(() => undefined)(),+ isFieldsTouched: () => methods.formState.isDirty,+ getFieldsError: () => Object.entries(methods.formState.errors),+ }),+ [methods],+ );++ return [instance];+}++/**+ * antd's seed order: `initialValues` first, then whatever the store already+ * holds on top. `undefined` entries are skipped so a field RHF has merely+ * registered — value not yet supplied — doesn't blank out its initial value.+ */+function mergeOverInitialValues(+ initialValues: FormValues,+ current: FormValues,+): FormValues {+ const merged: FormValues = { ...initialValues };+ for (const [key, value] of Object.entries(current ?? {})) {+ if (value !== undefined) {+ merged[key] = value;+ }+ }+ return merged;+}++/** antd `<Form form layout onFinish initialValues onValuesChange>`. */+const FormBase = React.forwardRef<HTMLFormElement, AntFormProps>(function Form(+ {+ form,+ layout = "horizontal",+ onFinish,+ onFinishFailed,+ initialValues,+ onValuesChange,+ name,+ className,+ children,+ ...props+ },+ ref,+) {+ // Support both a supplied instance and an uncontrolled form.+ const fallback = useAntdForm();+ const instance = form ?? fallback[0];+ const methods = instance.__methods;++ /*+ * antd seeds the fields from `initialValues` ON MOUNT ONLY and documents+ * that later changes are ignored.+ *+ * Matching that exactly is load-bearing here, not pedantry: the call-sites+ * pass `initialValues={formDetails}` AND write `formDetails` from+ * `onValuesChange`. Re-applying on every change would reset the form to the+ * value it just reported — an infinite loop that clobbers typing mid-+ * keystroke. The ref makes it run once per mount, and `destroyOnClose`+ * remounts the modal so reopening still re-seeds.+ *+ * The seed goes UNDERNEATH anything already in the store, which is what+ * antd does (`setValues({}, initialValues, this.store)` — the store wins).+ * Modals that fetch before they render the form rely on it: Agentic Table+ * Settings shows a spinner while it loads, calls `setFieldsValue(fetched)`+ * from the response, and only then renders the `<Form>`. A plain+ * `reset(initialValues)` discarded that write, so every reopen showed the+ * defaults and the saved Lite LLM adapter came back blank.+ */+ const seeded = React.useRef(false);+ if (!seeded.current && initialValues) {+ seeded.current = true;+ methods.reset(mergeOverInitialValues(initialValues, methods.getValues()), {+ keepDefaultValues: false,+ });+ }++ /*+ * antd calls `onValuesChange(changedValues, allValues)` on every edit. This+ * was dropped, so handlers that mirror the form into component state never+ * ran: the state kept its initial value and Save posted an empty body while+ * looking like it did nothing. RHF's `watch` callback is the equivalent+ * subscription, and it reports the name of the field that changed.+ */+ React.useEffect(() => {+ if (!onValuesChange) {+ return undefined;+ }+ const subscription = methods.watch((allValues, { name: changedName }) => {+ if (!changedName) {+ return;+ }+ onValuesChange({ [changedName]: allValues[changedName] }, allValues);+ });+ return () => subscription.unsubscribe();+ }, [methods, onValuesChange]);++ return (+ <FormProvider {...methods}>+ <form+ ref={ref}+ className={cn(+ layout === "vertical" ? "space-y-4" : "space-y-3",+ className,+ )}+ onSubmit={+ onFinish+ ? methods.handleSubmit(onFinish, onFinishFailed)+ : (e) => e.preventDefault()+ }+ {...props}+ >+ {children}+ </form>+ </FormProvider>+ );+});++/**+ * antd accepts a NamePath: a string, or an array for nested fields —+ * `name={["email"]}`, `name={["tier1", "up_to"]}`. react-hook-form only takes+ * a string and calls `.split(".")` on it, so an array threw+ * `TypeError: s.split is not a function` from inside Controller and took the+ * whole route down with it (Invite Users was a blank error page).+ *+ * The array form is antd's dotted path, so joining reproduces it exactly.+ */+function toFieldName(name?: NamePath): string | undefined {+ return Array.isArray(name) ? name.join(".") : name;+}++type ItemTooltip = FormItemProps["tooltip"];++/** antd's `{ title, icon }` config form, as opposed to a bare node. */+function isTooltipConfig(+ tooltip: ItemTooltip,+): tooltip is { title?: React.ReactNode; icon?: React.ReactNode } {+ return (+ typeof tooltip === "object" &&+ tooltip !== null &&+ !React.isValidElement(tooltip) &&+ ("title" in tooltip || "icon" in tooltip)+ );+}++/**+ * antd's `<Form.Item tooltip>`: a marker after the label text that reveals the+ * hint on hover or focus.+ *+ * It was not declared, so every use fell into `...props` and landed on the+ * wrapper div — the icon never rendered and the object form (`tooltip={{+ * title, icon }}`) reached the DOM as a stray attribute. The Agentic and+ * Table Extraction settings modals lost all eleven of their field hints that+ * way, and so did the manual-review rule editors.+ *+ * Focusable by keyboard, unlike a bare icon: Radix only opens on hover and+ * focus, so a non-focusable trigger hides the hint from keyboard users.+ */+function renderLabelContent(label: React.ReactNode, tooltip: ItemTooltip) {+ const title = isTooltipConfig(tooltip) ? tooltip.title : tooltip;+ if (!title) {+ return label;+ }+ const icon = isTooltipConfig(tooltip) ? tooltip.icon : undefined;++ return (+ <>+ {label}+ <TooltipProvider>+ <Tooltip>+ <TooltipTrigger+ type="button"+ // antd's marker is decorative next to a label that already names+ // the field; the accessible name says what activating it reveals.+ aria-label="More info"+ className="ant-form-item-tooltip ml-1 inline-flex cursor-help align-middle text-muted-foreground [&_svg]:size-3.5"+ >+ {icon ?? <CircleHelp />}+ </TooltipTrigger>+ <TooltipContent className="max-w-xs">{title}</TooltipContent>+ </Tooltip>+ </TooltipProvider>+ </>+ );+}++/**+ * antd `<Form.Item name label rules>`. Clones its single child and injects the+ * controlled `value`/`onChange`, which is how antd wires inputs too.+ */+function FormItem({+ name: rawName,+ label,+ rules,+ required,+ valuePropName = "value",+ initialValue,+ tooltip,+ /*+ * antd's server-error channel. The call-sites do NOT validate on the client+ * before submitting — they post, catch the 400, and feed the response into+ * `validateStatus="error"` + `help="<message>"` on the offending item.+ *+ * Both were falling into `...props` and landing on the wrapper div, so the+ * backend's message was never displayed (and React warned about unknown DOM+ * attributes). Submitting an invalid form therefore looked like the Save+ * button did nothing at all.+ */+ validateStatus,+ help,+ /*+ * antd's static hint, shown under the control whether or not the field is+ * errored — the token estimate under Chunk Size, the slug rules under an API+ * name. It was falling into `...props` and reaching the DOM as a stray+ * attribute on the wrapper div, so every one of these hints was invisible.+ */+ extra,+ className,+ children,+ ...props+}: FormItemProps) {+ const methods = useFormContext();+ const name = toFieldName(rawName);++ // Layout-only Form.Items (no `name`) just render their children.+ if (!name || !methods) {+ return (+ <div className={cn("space-y-2", className)} {...props}>+ {label ? <Label>{renderLabelContent(label, tooltip)}</Label> : null}+ {children}+ {help ? (+ <p+ className={cn(+ "text-sm",+ validateStatus === "error"+ ? "text-destructive"+ : "text-muted-foreground",+ )}+ >+ {help}+ </p>+ ) : null}+ {extra ? (+ <p className="ant-form-item-extra text-sm text-muted-foreground">+ {extra}+ </p>+ ) : null}+ </div>+ );+ }++ return (+ <Controller+ name={name}+ control={methods.control}+ // Only pass it through when the item actually declares one: RHF treats+ // an explicit `undefined` as "seed this field to undefined", which would+ // clobber a value already set via <Form initialValues> or setFieldsValue.+ {...(initialValue !== undefined ? { defaultValue: initialValue } : {})}+ rules={toRules(rules, label)}+ render={({ field, fieldState }) => {+ // The child is the control being wired. Narrowed to an element+ // because the injection below reads its existing id/onChange/onBlur+ // and hands them back so a child that sets its own keeps working.+ const child = React.Children.only(children) as React.ReactElement<{+ id?: string;+ className?: string;+ onChange?: (e: unknown) => void;+ onBlur?: (e: unknown) => void;+ }>;+ const injected = {+ // `<Label htmlFor={name}>` needs a matching id on the control, or+ // the label points at nothing — clicking it does not focus the+ // field and screen readers announce it unlabelled. antd wired this+ // for us; on the shim it has to be explicit. A child that sets its+ // own id keeps it.+ id: child.props.id ?? name,+ [valuePropName]:+ valuePropName === "checked"+ ? Boolean(field.value)+ : (field.value ?? ""),+ onChange: (e: unknown) => {+ // Works for both DOM events and value-first callbacks (Select).+ const target =+ e && typeof e === "object" && "target" in e+ ? (e as { target: HTMLInputElement }).target+ : null;+ const next = target+ ? valuePropName === "checked"+ ? target.checked+ : target.value+ : e;+ field.onChange(next);+ child.props.onChange?.(e);+ },+ onBlur: (e: unknown) => {+ field.onBlur();+ child.props.onBlur?.(e);+ },+ };++ // antd shows `help` in place of the rule message when it is set, and+ // `validateStatus` decides whether the control reads as errored.+ const hasError =+ validateStatus === "error" || Boolean(fieldState.error);+ const message = help ?? fieldState.error?.message;++ return (+ <div+ className={cn("ant-form-item space-y-2", className)}+ {...props}+ data-status={hasError ? "error" : undefined}+ >+ {label ? (+ <Label htmlFor={name}>+ {required ? <span className="text-destructive">* </span> : null}+ {renderLabelContent(label, tooltip)}+ </Label>+ ) : null}+ <div className="ant-form-item-control-input">+ {React.cloneElement(child, {+ ...injected,+ // Give the control itself the error ring, the way antd's+ // `validateStatus` does.+ ...(hasError+ ? {+ className: cn(+ child.props.className,+ "border-destructive focus-visible:ring-destructive",+ ),+ }+ : {}),+ })}+ </div>+ {message ? (+ <p+ className={cn(+ "text-sm",+ hasError ? "text-destructive" : "text-muted-foreground",+ )}+ >+ {message}+ </p>+ ) : null}+ {/* After the error message, the way antd orders explain > extra. */}+ {extra ? (+ <p className="ant-form-item-extra text-sm text-muted-foreground">+ {extra}+ </p>+ ) : null}+ </div>+ );+ }}+ />+ );+}++/**+ * antd's `Form.useWatch(name, form)` — subscribe to one field's value and+ * re-render on change.+ *+ * antd accepts the form instance as the second argument or, inside a Form,+ * omits it and reads context. Both are supported: the explicit instance wins,+ * context is the fallback, matching antd's own resolution order.+ *+ * The `control` is passed explicitly rather than relying on react-hook-form's+ * own context lookup, because the instance from `useForm()` is frequently held+ * by a parent that renders the `<Form>` further down the tree — there is no+ * FormProvider above the caller in that arrangement.+ *+ * `defaultValue` covers the first render specifically. A watcher above the+ * `<Form>` runs BEFORE the child `Form.Item`'s Controller registers, so a+ * per-item `initialValue` is not yet readable and the field would come back+ * `undefined` for one render. Call-sites that distinguish `=== false` from+ * "not set" (an unchecked box vs an unloaded form) take the wrong branch on+ * that render, so pass the item's own seed here as well.+ */+function useAntdWatch(+ name: NamePath,+ form?: FormInstance,+ defaultValue?: unknown,+): unknown {+ const context = useFormContext();+ const control = form?.__methods?.control ?? context?.control;+ // A private throwaway control keeps the hook call unconditional when there is+ // no form to read (a watcher rendered outside any Form). `disabled` is not+ // enough on its own: useWatch dereferences `control._getWatch` while mounting,+ // before it consults the flag, so a null control throws.+ const fallback = useForm();+ const watched = useWatch({+ control: control ?? fallback.control,+ name: toFieldName(name) as string,+ disabled: !control,+ defaultValue,+ });+ return control ? watched : undefined;+}++/** Namespace object, so `<Form.Item>` type-checks and shim-completeness+ * still finds the statics by value. */+const Form = Object.assign(FormBase, {+ Item: FormItem,+ useForm: useAntdForm,+ useWatch: useAntdWatch,+ List: function FormList({ children }: { children?: React.ReactNode }) {+ return children;+ },+});++export { Form };diff --git a/frontend/src/components/ui/shims/antd-inputs.select-controlled.test.jsx b/frontend/src/components/ui/shims/antd-inputs.select-controlled.test.jsxnew file mode 100644index 000000000..e87a96ff4--- /dev/null+++ b/frontend/src/components/ui/shims/antd-inputs.select-controlled.test.jsx@@ -0,0 +1,76 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, it, vi } from "vitest";++/**+ * Radix announces its own uncontrolled-to-controlled switch by calling+ * `onValueChange("")`.+ *+ * The shim's `toValue` maps antd's "nothing selected" (`""`/null) to+ * `undefined`, because Radix reserves the empty string and would otherwise+ * blank the trigger AND suppress the placeholder. That mapping leaves Radix+ * uncontrolled until a real value arrives — and when one does, Radix emits the+ * `""` above. Forwarding it wrote emptiness back over the value that had just+ * landed, so an antd form seeding a Select through `setFieldsValue` saw the+ * field wiped in the same tick. Prompt Studio's Limit-to Section rendered+ * blank on every edit for exactly this, despite the profile carrying+ * "Default".+ *+ * This lives in its own file because pinning the behaviour means intercepting+ * the callback the shim hands to Radix's Root, and that module mock would+ * otherwise apply to every Select test in the main file.+ *+ * jsdom does NOT reproduce the emission on its own — it warns about the+ * controlled switch but never invokes the callback, so driving this through a+ * rerender asserts nothing. Calling Radix's callback directly is what gives+ * the test teeth.+ */++const captured = { onValueChange: null };++vi.mock("@/components/ui/select", async () => {+ const actual = await vi.importActual("@/components/ui/select");+ return {+ ...actual,+ Select: ({ onValueChange, ...props }) => {+ captured.onValueChange = onValueChange;+ return <actual.Select onValueChange={onValueChange} {...props} />;+ },+ };+});++const { Select } = await import("@/components/ui/shims/antd-inputs");++describe("Select controlled/uncontrolled transition (Radix parity)", () => {+ it("drops the empty string Radix reports, keeping the seeded value", () => {+ const onChange = vi.fn();+ render(+ <Select+ options={[{ value: "Default" }]}+ value="Default"+ onChange={onChange}+ />,+ );++ captured.onValueChange("");++ expect(onChange).not.toHaveBeenCalled();+ expect(screen.getByText("Default")).toBeInTheDocument();+ });++ // The guard must not swallow real selections: Radix rejects a SelectItem+ // whose value is "", so every other value it reports IS a user choice.+ it("still forwards a real selection", () => {+ const onChange = vi.fn();+ render(+ <Select+ options={[{ value: "Default" }, { value: "Other" }]}+ value=""+ onChange={onChange}+ />,+ );++ captured.onValueChange("Other");++ expect(onChange).toHaveBeenCalledWith("Other", expect.anything());+ });+});diff --git a/frontend/src/components/ui/shims/antd-inputs.test.jsx b/frontend/src/components/ui/shims/antd-inputs.test.jsxnew file mode 100644index 000000000..2d83a1f94--- /dev/null+++ b/frontend/src/components/ui/shims/antd-inputs.test.jsx@@ -0,0 +1,1340 @@+import { fireEvent, render, screen } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { useState } from "react";+import { describe, expect, it, vi } from "vitest";++import {+ Checkbox,+ Input,+ InputNumber,+ Radio,+ Select,+ Switch,+} from "@/components/ui/shims/antd-inputs";++/**+ * The point of these tests is antd's onChange CONVENTIONS, which differ per+ * component and which Radix inverts in several cases. Call-sites are written+ * against antd's shapes, so a mismatch here breaks forms silently rather than+ * loudly.+ */+describe("antd-compatible input shims (P3-03)", () => {+ it("renders a text input and forwards typing as a DOM event", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<Input onChange={onChange} />);+ await user.type(screen.getByRole("textbox"), "hi");+ expect(onChange).toHaveBeenCalled();+ // antd hands Input an EVENT, so call-sites read e.target.value.+ expect(onChange.mock.calls[0][0].target).toBeDefined();+ });++ it("exposes Input.TextArea as a textarea", () => {+ render(<Input.TextArea rows={4} />);+ const el = screen.getByRole("textbox");+ expect(el.tagName).toBe("TEXTAREA");+ expect(el.getAttribute("rows")).toBe("4");+ });++ it("maps autoSize.minRows onto rows", () => {+ render(<Input.TextArea autoSize={{ minRows: 6 }} />);+ expect(screen.getByRole("textbox").getAttribute("rows")).toBe("6");+ });++ /*+ * antd's `autoSize` grows the field to fit its content. Only the OBJECT form+ * ({minRows}) was handled, so `autoSize={true}` — what EditableText passes+ * for every prompt value — fell through to the 3-row default and drew a 74px+ * box around a single line of text, repeated on every prompt card.+ */+ it("autoSize={true} starts at one row rather than the 3-row default", () => {+ render(<Input.TextArea autoSize />);+ expect(screen.getByRole("textbox").getAttribute("rows")).toBe("1");+ });++ it("autoSize={true} hides the scrollbar since the box tracks its content", () => {+ render(<Input.TextArea autoSize />);+ expect(screen.getByRole("textbox").className).toContain("overflow-hidden");+ });++ it("keeps the 3-row default when autoSize is absent", () => {+ render(<Input.TextArea />);+ expect(screen.getByRole("textbox").getAttribute("rows")).toBe("3");+ });++ /*+ * `size` is an antd prop with no `<textarea>` equivalent. It was not+ * destructured, so it rode `...props` onto the DOM and the field kept+ * shadcn's `min-h-[60px]` — every prompt value measured 60px against the+ * reference's 32px. A stray attribute is the tell for this whole class of+ * shim bug: it never throws, so only a DOM assertion catches it.+ */+ it("consumes antd's size instead of stamping it on the textarea", () => {+ render(<Input.TextArea size="small" autoSize />);+ const el = screen.getByRole("textbox");+ expect(el).not.toHaveAttribute("size");+ expect(el.className).toContain("text-sm");+ });++ it("drops the min-height floor when autoSize sizes the box", () => {+ render(<Input.TextArea autoSize />);+ const cls = screen.getByRole("textbox").className;+ expect(cls).toContain("min-h-0");+ expect(cls).not.toContain("min-h-[60px]");+ });++ /*+ * antd's small autoSize field computes `padding: 0` vertically and floors at+ * 32px. Removing shadcn's 60px floor without matching those two numbers+ * lands the box at 29px — close, but still off the reference.+ */+ it("matches antd's 32px floor and zero vertical padding when small", () => {+ render(<Input.TextArea size="small" autoSize />);+ const cls = screen.getByRole("textbox").className;+ expect(cls).toContain("min-h-8");+ expect(cls).toContain("py-0");+ expect(cls).not.toContain("min-h-[60px]");+ });++ /*+ * antd's `variant="borderless"` drops the border and background so the+ * field reads as plain text. EditableText swaps to it whenever a prompt+ * key/value is neither hovered nor edited; the prop was consumed but never+ * implemented, so prompt cards showed input chrome permanently.+ */+ it("renders a borderless Input without visible chrome", () => {+ render(<Input variant="borderless" />);+ expect(screen.getByRole("textbox").className).toContain(+ "border-transparent",+ );+ });++ it("renders a borderless TextArea without visible chrome", () => {+ render(<Input.TextArea variant="borderless" />);+ expect(screen.getByRole("textbox").className).toContain(+ "border-transparent",+ );+ });++ it("leaves an outlined Input with its border", () => {+ render(<Input variant="outlined" />);+ expect(screen.getByRole("textbox").className).not.toContain(+ "border-transparent",+ );+ });++ it("Input.Password masks by default and reveals on toggle", async () => {+ const user = userEvent.setup();+ const { container } = render(<Input.Password />);+ const field = container.querySelector("input");+ expect(field.getAttribute("type")).toBe("password");+ await user.click(screen.getByRole("button", { name: /show password/i }));+ expect(field.getAttribute("type")).toBe("text");+ });++ it("Input.Search fires onSearch on Enter", async () => {+ const user = userEvent.setup();+ const onSearch = vi.fn();+ render(<Input.Search onSearch={onSearch} />);+ await user.type(screen.getByRole("textbox"), "q{enter}");+ expect(onSearch).toHaveBeenCalled();+ });++ /*+ * Search does not delegate to InputBase, so it needed its own `allowClear`+ * binding — otherwise the prop reached the DOM and React warned on every+ * render of the HITL queue search box.+ */+ it("Input.Search keeps allowClear off the DOM and clears through onChange", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ const { container } = render(+ <Input.Search allowClear value="Amex" onChange={onChange} />,+ );+ expect(container.querySelector("[allowClear]")).toBeNull();++ await user.click(screen.getByRole("button", { name: "Clear" }));+ expect(onChange).toHaveBeenCalledWith(+ expect.objectContaining({ target: { value: "" } }),+ );+ });++ it("Input.Search hides the clear button when there is nothing to clear", () => {+ render(<Input.Search allowClear value="" onChange={() => {}} />);+ expect(screen.queryByRole("button", { name: "Clear" })).toBeNull();+ });++ // antd hands InputNumber a NUMBER, not an event.+ it("InputNumber calls onChange with a number, not an event", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<InputNumber onChange={onChange} />);+ await user.type(screen.getByRole("spinbutton"), "42");+ const last = onChange.mock.calls.at(-1)[0];+ expect(typeof last).toBe("number");+ });++ it("InputNumber emits null when cleared, not NaN", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<InputNumber value={5} onChange={onChange} />);+ const el = screen.getByRole("spinbutton");+ await user.clear(el);+ if (onChange.mock.calls.length) {+ expect(onChange.mock.calls.at(-1)[0]).toBeNull();+ }+ });++ // antd hands Checkbox an EVENT with target.checked; Radix gives a boolean.+ it("Checkbox onChange receives an event-shaped object with target.checked", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<Checkbox onChange={onChange}>Accept</Checkbox>);+ await user.click(screen.getByRole("checkbox"));+ expect(onChange).toHaveBeenCalled();+ expect(onChange.mock.calls[0][0].target.checked).toBe(true);+ });++ it("Checkbox renders its label text", () => {+ render(<Checkbox>Accept terms</Checkbox>);+ expect(screen.getByText("Accept terms")).toBeInTheDocument();+ });++ // antd hands Switch a BOOLEAN plus the originating click event.+ it("Switch onChange receives the boolean and the click event", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<Switch onChange={onChange} />);+ await user.click(screen.getByRole("switch"));+ expect(onChange).toHaveBeenCalledWith(true, expect.anything());+ expect(typeof onChange.mock.calls[0][1].stopPropagation).toBe("function");+ });++ /*+ * The card toggles (API Deployments, Pipelines) are written+ * `onChange={(checked, e) => { e.stopPropagation(); ... }}`. Dropping antd's+ * second argument made that throw before the handler's real work ran, so the+ * deployment never toggled and no request was sent.+ */+ it("Switch onChange lets a handler call stopPropagation on the event", async () => {+ const user = userEvent.setup();+ const onCardClick = vi.fn();+ const onToggle = vi.fn();+ render(+ <div onClick={onCardClick}>+ <Switch+ onChange={(checked, e) => {+ e.stopPropagation();+ onToggle(checked);+ }}+ />+ </div>,+ );+ await user.click(screen.getByRole("switch"));+ expect(onToggle).toHaveBeenCalledWith(true);+ expect(onCardClick).not.toHaveBeenCalled();+ });++ it("Switch still forwards a caller's own onClick", async () => {+ const user = userEvent.setup();+ const onClick = vi.fn();+ render(<Switch onClick={onClick} />);+ await user.click(screen.getByRole("switch"));+ expect(onClick).toHaveBeenCalledTimes(1);+ });++ /*+ * antd treats `value` as an alias for `checked` on Switch. The cloud+ * SummarizeManager writes `value={isContext}` for "Summarize Context";+ * reading only `checked` let it fall into ...props, land on the DOM, and the+ * switch never reflected its state.+ */+ it("Switch reflects state passed as antd's `value` alias", () => {+ render(<Switch value />);+ expect(screen.getByRole("switch")).toBeChecked();+ });++ it("Switch still prefers an explicit checked over value", () => {+ render(<Switch checked={false} value={true} />);+ expect(screen.getByRole("switch")).not.toBeChecked();+ });++ // Radix stamps its own value="on" (like a native checkbox), so the check is+ // that our boolean never reaches the DOM as value="true".+ it("does not leak the antd `value` boolean onto the DOM", () => {+ render(<Switch value />);+ expect(screen.getByRole("switch")).not.toHaveAttribute("value", "true");+ });++ it("Select renders options from the antd `options` data prop", () => {+ render(+ <Select+ options={[+ { value: "a", label: "Option A" },+ { value: "b", label: "Option B" },+ ]}+ placeholder="Pick one"+ />,+ );+ expect(screen.getByText("Pick one")).toBeInTheDocument();+ });++ /*+ * antd renders the VALUE when an option has no label. The prompt card's+ * enforce-type dropdown is built as `{ value: "text" }` with no label, so+ * rendering a bare `label` left the trigger showing an empty box where the+ * reference shows "text".+ */+ it("Select falls back to the option value when no label is given", () => {+ render(+ <Select options={[{ value: "text" }, { value: "json" }]} value="text" />,+ );+ expect(screen.getByText("text")).toBeInTheDocument();+ });++ /*+ * antd reads "" as "nothing selected" and still shows the placeholder.+ * Call-sites seed their state with `useState("")`, and Radix reserves the+ * empty string internally — passing it through left the trigger blank with+ * no placeholder at all.+ */+ it("Select shows the placeholder when the value is an empty string", () => {+ render(+ <Select+ options={[{ value: "a", label: "Option A" }]}+ value=""+ placeholder="Pick one"+ />,+ );+ expect(screen.getByText("Pick one")).toBeInTheDocument();+ });++ /*+ * antd's `mode="tags"` is a free-text multi-value chip editor. Radix's+ * Select is single-select over a fixed option list and cannot express it, so+ * `mode` was silently dropped: Custom Synonyms rendered a trigger that+ * opened an EMPTY dropdown with no text input, leaving the feature unusable+ * — a row could be added and its word typed, but never a synonym.+ */+ describe("Select mode='tags' (antd parity)", () => {+ it("renders existing values as chips", () => {+ render(<Select mode="tags" value={["alpha", "beta"]} />);+ expect(screen.getByText("alpha")).toBeInTheDocument();+ expect(screen.getByText("beta")).toBeInTheDocument();+ });++ it("lets the user type a new value and commit it with Enter", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<Select mode="tags" value={[]} onChange={onChange} />);+ await user.type(screen.getByRole("textbox"), "gamma{enter}");+ expect(onChange).toHaveBeenCalledWith(["gamma"]);+ });++ it("appends to the existing values rather than replacing them", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<Select mode="tags" value={["alpha"]} onChange={onChange} />);+ await user.type(screen.getByRole("textbox"), "beta{enter}");+ expect(onChange).toHaveBeenCalledWith(["alpha", "beta"]);+ });++ it("ignores blank entries and duplicates, as antd does", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<Select mode="tags" value={["alpha"]} onChange={onChange} />);+ const box = screen.getByRole("textbox");+ await user.type(box, " {enter}");+ await user.type(box, "alpha{enter}");+ expect(onChange).not.toHaveBeenCalled();+ });++ it("removes a chip via its remove button", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(+ <Select mode="tags" value={["alpha", "beta"]} onChange={onChange} />,+ );+ await user.click(screen.getByRole("button", { name: /remove alpha/i }));+ expect(onChange).toHaveBeenCalledWith(["beta"]);+ });++ it("shows the placeholder only while empty", () => {+ const { rerender } = render(+ <Select mode="tags" value={[]} placeholder="Please enter synonyms" />,+ );+ expect(+ screen.getByPlaceholderText("Please enter synonyms"),+ ).toBeInTheDocument();++ rerender(+ <Select+ mode="tags"+ value={["alpha"]}+ placeholder="Please enter synonyms"+ />,+ );+ expect(+ screen.queryByPlaceholderText("Please enter synonyms"),+ ).not.toBeInTheDocument();+ });++ /*+ * antd's tags mode drops down its `options` as well as taking free text,+ * and Configure Connector's "File types to process" is an enum the user is+ * meant to PICK from — its ArrayField drops anything typed that the enum+ * does not contain, so with the list hidden the field could not be filled+ * in at all. It rendered as bare text, which is also why the box is drawn+ * with the same border as a Select trigger.+ */+ it("drops down the options and adds the chosen one as a chip", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(+ <Select+ mode="tags"+ value={[]}+ onChange={onChange}+ options={[{ value: "pdf" }, { value: "txt" }]}+ placeholder="Please select"+ />,+ );+ await user.click(screen.getByPlaceholderText("Please select"));+ await user.click(screen.getByRole("option", { name: "pdf" }));+ expect(onChange).toHaveBeenCalledWith(["pdf"]);+ });++ it("filters the options by what has been typed", async () => {+ const user = userEvent.setup();+ render(+ <Select+ mode="tags"+ value={[]}+ onChange={vi.fn()}+ options={[{ value: "pdf" }, { value: "txt" }]}+ />,+ );+ await user.type(screen.getByRole("textbox"), "pd");+ expect(screen.getByRole("option", { name: "pdf" })).toBeInTheDocument();+ expect(screen.queryByRole("option", { name: "txt" })).toBeNull();+ });++ it("hides options that are already chosen", async () => {+ const user = userEvent.setup();+ render(+ <Select+ mode="tags"+ value={["pdf"]}+ onChange={vi.fn()}+ options={[{ value: "pdf" }, { value: "txt" }]}+ />,+ );+ await user.click(screen.getByRole("textbox"));+ expect(screen.getByRole("option", { name: "txt" })).toBeInTheDocument();+ expect(screen.queryByRole("option", { name: "pdf" })).toBeNull();+ });++ /*+ * Picking an option blurs the input, and the blur handler commits whatever+ * is in the box — so a filtered pick used to add the typed fragment as a+ * tag of its own alongside the option.+ */+ it("does not also commit the typed fragment when an option is picked", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(+ <Select+ mode="tags"+ value={[]}+ onChange={onChange}+ options={[{ value: "pdf" }, { value: "txt" }]}+ />,+ );+ await user.type(screen.getByRole("textbox"), "pd");+ await user.click(screen.getByRole("option", { name: "pdf" }));+ expect(onChange).toHaveBeenCalledTimes(1);+ expect(onChange).toHaveBeenCalledWith(["pdf"]);+ });++ /* The prompt card's Document Type passes `maxCount={1}` for "pick one". */+ it("stops accepting entries once maxCount is reached", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(+ <Select+ mode="tags"+ value={["pdf"]}+ onChange={onChange}+ options={[{ value: "pdf" }, { value: "txt" }]}+ maxCount={1}+ />,+ );+ await user.type(screen.getByRole("textbox"), "txt{enter}");+ expect(onChange).not.toHaveBeenCalled();+ });++ /* No options means no list to open — Custom Synonyms is free text only. */+ it("renders no dropdown when the call-site supplies no options", async () => {+ const user = userEvent.setup();+ render(<Select mode="tags" value={[]} onChange={vi.fn()} />);+ await user.click(screen.getByRole("textbox"));+ expect(screen.queryByRole("listbox")).toBeNull();+ });++ /*+ * antd's `multiple` is a FIXED-OPTION multi-select with no free text.+ * GroupMemberManager and FileHistoryModal use it to pick from a known+ * list, so routing it to the tag editor would replace a picker with an+ * arbitrary-text box and hide the options entirely.+ */+ it("does not route mode='multiple' to the free-text tag editor", () => {+ render(+ <Select+ mode="multiple"+ options={[{ value: "a", label: "Option A" }]}+ placeholder="Pick some"+ />,+ );+ expect(screen.queryByRole("textbox")).not.toBeInTheDocument();+ expect(screen.getByText("Pick some")).toBeInTheDocument();+ });++ /*+ * Custom Synonyms sits inside an antd Form; a bare Enter would submit it+ * and discard the pending entry.+ */+ it("does not let Enter bubble out and submit the surrounding form", async () => {+ const user = userEvent.setup();+ const onSubmit = vi.fn((e) => e.preventDefault());+ render(+ <form onSubmit={onSubmit}>+ <Select mode="tags" value={[]} onChange={vi.fn()} />+ </form>,+ );+ await user.type(screen.getByRole("textbox"), "gamma{enter}");+ expect(onSubmit).not.toHaveBeenCalled();+ });+ });++ /*+ * antd's `multiple`: a fixed-option multi-select whose value is an ARRAY.+ *+ * These guard a shape, not a look. Before MultiSelect existed the mode fell+ * through to the single-select path, which renders a perfectly usable-looking+ * control and calls onChange with ONE bare value — so Global API Deployment+ * Keys posted a string to a DRF `PrimaryKeyRelatedField(many=True)` and got+ * `Expected a list of items but got type "str"` back, with no way to pick a+ * second deployment either.+ */+ describe("Select mode='multiple'", () => {+ const OPTIONS = [+ { value: "a", label: "Alpha" },+ { value: "b", label: "Bravo" },+ ];++ it("hands the call-site an ARRAY, never a bare value", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(+ <Select+ mode="multiple"+ value={[]}+ onChange={onChange}+ options={OPTIONS}+ placeholder="Pick some"+ />,+ );+ await user.click(screen.getByRole("combobox"));+ await user.click(screen.getByRole("option", { name: "Alpha" }));+ expect(onChange).toHaveBeenCalledWith(+ ["a"],+ [{ value: "a", label: "Alpha" }],+ );+ });++ /* The single-select path closes on choose, which caps the mode at one. */+ it("keeps the dropdown open so a second option can be picked", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ function Harness() {+ const [value, setValue] = useState([]);+ return (+ <Select+ mode="multiple"+ value={value}+ onChange={(next) => {+ setValue(next);+ onChange(next);+ }}+ options={OPTIONS}+ />+ );+ }+ render(<Harness />);+ await user.click(screen.getByRole("combobox"));+ await user.click(screen.getByRole("option", { name: "Alpha" }));+ await user.click(screen.getByRole("option", { name: "Bravo" }));+ expect(onChange).toHaveBeenLastCalledWith(["a", "b"]);+ });++ it("deselects an option that is picked again", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(+ <Select+ mode="multiple"+ value={["a", "b"]}+ onChange={onChange}+ options={OPTIONS}+ />,+ );+ await user.click(screen.getByRole("combobox"));+ await user.click(screen.getByRole("option", { name: "Alpha" }));+ expect(onChange).toHaveBeenCalledWith(+ ["b"],+ [{ value: "b", label: "Bravo" }],+ );+ });++ it("shows the selection as chips and removes one without opening the list", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(+ <Select+ mode="multiple"+ value={["a", "b"]}+ onChange={onChange}+ options={OPTIONS}+ />,+ );+ expect(screen.getByText("Alpha")).toBeInTheDocument();+ await user.click(screen.getByRole("button", { name: "Remove Alpha" }));+ expect(onChange).toHaveBeenCalledWith(+ ["b"],+ [{ value: "b", label: "Bravo" }],+ );+ // The chip sits inside the popover trigger; the remove must not open it.+ expect(screen.queryByRole("listbox")).toBeNull();+ });++ /*+ * The shim compares on strings because ids arrive as both, but what goes+ * BACK must be the option's own value — an API told `"12"` where it+ * expects `12` fails the same way the bare-string bug did.+ */+ it("returns the option's original value type", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(+ <Select+ mode="multiple"+ value={[]}+ onChange={onChange}+ options={[{ value: 12, label: "Twelve" }]}+ />,+ );+ await user.click(screen.getByRole("combobox"));+ await user.click(screen.getByRole("option", { name: "Twelve" }));+ expect(onChange.mock.calls[0][0]).toEqual([12]);+ });++ /* Global API Deployment Keys builds its list as Select.Option children. */+ it("accepts Select.Option children and filters them by optionFilterProp", async () => {+ const user = userEvent.setup();+ render(+ <Select+ mode="multiple"+ value={[]}+ onChange={vi.fn()}+ showSearch+ optionFilterProp="children"+ >+ <Select.Option value="a">Alpha</Select.Option>+ <Select.Option value="b">Bravo</Select.Option>+ </Select>,+ );+ await user.click(screen.getByRole("combobox"));+ await user.type(screen.getByRole("searchbox"), "brav");+ expect(screen.getByRole("option", { name: "Bravo" })).toBeInTheDocument();+ expect(screen.queryByRole("option", { name: "Alpha" })).toBeNull();+ });++ it("clears the whole selection under allowClear", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(+ <Select+ mode="multiple"+ value={["a", "b"]}+ onChange={onChange}+ options={OPTIONS}+ allowClear+ />,+ );+ await user.click(screen.getByRole("button", { name: "Clear" }));+ expect(onChange).toHaveBeenCalledWith([], []);+ });++ /*+ * A <div> trigger has no `disabled` attribute, so this is the only thing+ * standing between a disabled picker and an open dropdown — the deployment+ * scope field disables itself whenever "allow all" is ticked.+ */+ it("does not open while disabled", async () => {+ const user = userEvent.setup();+ render(+ <Select+ mode="multiple"+ value={[]}+ onChange={vi.fn()}+ options={OPTIONS}+ disabled+ />,+ );+ await user.click(screen.getByRole("combobox"));+ expect(screen.queryByRole("listbox")).toBeNull();+ });+ });++ it("Select accepts Select.Option children as well as options data", () => {+ render(+ <Select placeholder="Choose">+ <Select.Option value="x">X</Select.Option>+ </Select>,+ );+ expect(screen.getByText("Choose")).toBeInTheDocument();+ });++ /*+ * antd lets a single option be disabled so an inaccessible value can still be+ * LABELLED without being re-selectable. Three call-sites depend on it — the+ * challenge-manager and agentic Settings dropdowns both surface an adapter+ * the viewer cannot use, and AddLlmProfile does the same for a profile.+ * Dropping the flag made those options freely selectable, and picking one+ * fails validation on save.+ */+ it("Select disables an option flagged in the `options` data prop", () => {+ render(+ <Select+ open+ options={[+ { value: "a", label: "Usable" },+ { value: "b", label: "Not shared with you", disabled: true },+ ]}+ />,+ );+ expect(+ screen.getByRole("option", { name: "Not shared with you" }),+ ).toHaveAttribute("aria-disabled", "true");+ expect(screen.getByRole("option", { name: "Usable" })).not.toHaveAttribute(+ "aria-disabled",+ "true",+ );+ });++ it("Select disables a Select.Option child flagged as disabled", () => {+ render(+ <Select open>+ <Select.Option value="a">Usable</Select.Option>+ <Select.Option value="b" disabled>+ Connector unavailable+ </Select.Option>+ </Select>,+ );+ expect(+ screen.getByRole("option", { name: "Connector unavailable" }),+ ).toHaveAttribute("aria-disabled", "true");+ expect(screen.getByRole("option", { name: "Usable" })).not.toHaveAttribute(+ "aria-disabled",+ "true",+ );+ });++ /*+ * antd's `dropdownRender` (renamed `popupRender` in 5.25) is how both+ * Configure Connector and the Lookup drawer pin a "create one" action under+ * the option list. The shim dropped the prop, so an org with no connectors+ * got an empty dropdown and no route to making one — the list is not the+ * only thing that prop carries.+ */+ describe("Select popupRender / dropdownRender (antd parity)", () => {+ const CONNECTORS = [+ { value: "gcs", label: "GCS Testing" },+ { value: "s3", label: "S3 Oct 6 2025" },+ ];++ it("renders the option list AND the call-site's footer", () => {+ render(+ <Select+ open+ options={CONNECTORS}+ popupRender={(menu) => (+ <>+ {menu}+ <button type="button">+ Add new connector</button>+ </>+ )}+ />,+ );+ expect(+ screen.getByRole("option", { name: "GCS Testing" }),+ ).toBeInTheDocument();+ expect(+ screen.getByRole("button", { name: "+ Add new connector" }),+ ).toBeInTheDocument();+ });++ it("honours the pre-5.25 `dropdownRender` spelling too", () => {+ render(+ <Select+ open+ options={CONNECTORS}+ dropdownRender={(menu) => (+ <>+ {menu}+ <button type="button">+ Add new connector</button>+ </>+ )}+ />,+ );+ expect(+ screen.getByRole("button", { name: "+ Add new connector" }),+ ).toBeInTheDocument();+ });++ it("fires the footer's own handler when it is clicked", async () => {+ const user = userEvent.setup();+ const onAddNew = vi.fn();+ render(+ <Select+ open+ options={CONNECTORS}+ dropdownRender={(menu) => (+ <>+ {menu}+ <button type="button" onClick={onAddNew}>+ + Add new connector+ </button>+ </>+ )}+ />,+ );+ await user.click(+ screen.getByRole("button", { name: "+ Add new connector" }),+ );+ expect(onAddNew).toHaveBeenCalledTimes(1);+ });++ /*+ * antd closes its dropdown as soon as focus leaves the select, so the+ * footer button closes it for free. Radix does not, and both call-sites+ * open a modal from that footer — an open popup would sit on top of it.+ */+ it("closes the popup once the footer has been clicked", async () => {+ const user = userEvent.setup();+ render(+ <Select+ options={CONNECTORS}+ dropdownRender={(menu) => (+ <>+ {menu}+ <button type="button">+ Add new connector</button>+ </>+ )}+ />,+ );+ // Keyboard, not click: jsdom has no pointer capture for Radix's trigger.+ fireEvent.keyDown(screen.getByRole("combobox"), { key: "Enter" });+ const footer = await screen.findByRole("button", {+ name: "+ Add new connector",+ });++ await user.click(footer);++ expect(+ screen.queryByRole("button", { name: "+ Add new connector" }),+ ).not.toBeInTheDocument();+ });+ });++ /*+ * `labelInValue` makes antd read AND write the selection as+ * `{ value, label }`. Configure Connector is written against it, so ignoring+ * the flag handed the call-site a bare string — `option?.value` came back+ * undefined and picking a connector did nothing.+ */+ describe("Select labelInValue (antd parity)", () => {+ const CONNECTORS = [+ { value: "gcs", label: "GCS Testing" },+ { value: "s3", label: "S3 Oct 6 2025" },+ ];++ it("hands onChange a { value, label } pair", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(+ <Select open labelInValue options={CONNECTORS} onChange={onChange} />,+ );+ await user.click(screen.getByRole("option", { name: "S3 Oct 6 2025" }));+ expect(onChange).toHaveBeenCalledWith(+ expect.objectContaining({ value: "s3", label: "S3 Oct 6 2025" }),+ expect.anything(),+ );+ });++ it("reads a controlled { value, label } back onto the trigger", () => {+ render(+ <Select+ labelInValue+ options={CONNECTORS}+ value={{ value: "gcs", label: "GCS Testing" }}+ placeholder="Select a connector"+ />,+ );+ // String()-ing the object would yield "[object Object]", matching no+ // option: the trigger went blank AND swallowed the placeholder.+ expect(screen.getByRole("combobox")).toHaveTextContent("GCS Testing");+ });++ it("still hands onChange a bare value without the flag", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<Select open options={CONNECTORS} onChange={onChange} />);+ await user.click(screen.getByRole("option", { name: "S3 Oct 6 2025" }));+ expect(onChange).toHaveBeenCalledWith("s3", expect.anything());+ });+ });++ /*+ * antd's `showSearch` filters the list as you type — 27 call-sites set it,+ * and the shim consumed the prop without ever rendering a search box, so+ * every one of them was a plain scroll-and-hunt dropdown.+ */+ describe("Select showSearch / filterOption (antd parity)", () => {+ const CONNECTORS = [+ { value: "gcs", label: "GCS Testing" },+ { value: "s3", label: "S3 Oct 6 2025" },+ { value: "az", label: "Unstract's Azure cloud storage" },+ ];++ const openSearch = async (user) => {+ await user.click(screen.getByRole("combobox"));+ return screen.getByRole("searchbox");+ };++ it("renders a search box and filters the options as you type", async () => {+ const user = userEvent.setup();+ render(<Select showSearch options={CONNECTORS} />);+ const box = await openSearch(user);++ expect(screen.getAllByRole("option")).toHaveLength(3);+ await user.type(box, "azure");++ expect(screen.getAllByRole("option")).toHaveLength(1);+ expect(+ screen.getByRole("option", { name: "Unstract's Azure cloud storage" }),+ ).toBeInTheDocument();+ });++ it("routes the query through the call-site's own filterOption", async () => {+ const user = userEvent.setup();+ const filterOption = vi.fn(+ (input, option) => option.value === "s3" && input === "x",+ );+ render(+ <Select showSearch options={CONNECTORS} filterOption={filterOption} />,+ );+ const box = await openSearch(user);+ await user.type(box, "x");++ expect(filterOption).toHaveBeenCalledWith("x", CONNECTORS[0]);+ expect(screen.getAllByRole("option")).toHaveLength(1);+ expect(+ screen.getByRole("option", { name: "S3 Oct 6 2025" }),+ ).toBeInTheDocument();+ });++ /*+ * Summarize Manager filters on `option.children`. Normalising the option+ * into `{ value, label }` left that undefined, and `.toLowerCase()` on it+ * throws on the FIRST keystroke — a crash, not a missing filter.+ */+ it("hands filterOption the <Select.Option> props, children included", async () => {+ const user = userEvent.setup();+ render(+ <Select+ showSearch+ filterOption={(input, option) =>+ option.children.toLowerCase().includes(input.toLowerCase())+ }+ >+ <Select.Option value="a">AzureOpenAI</Select.Option>+ <Select.Option value="b">Bedrock</Select.Option>+ </Select>,+ );+ const box = await openSearch(user);+ await user.type(box, "bed");++ expect(screen.getAllByRole("option")).toHaveLength(1);+ expect(+ screen.getByRole("option", { name: "Bedrock" }),+ ).toBeInTheDocument();+ });++ /*+ * Adapter Selection sets a STRING `label` next to a rich `children` node+ * and filters on the label. Display must still use the node.+ */+ it("keeps a string label alongside rich children", async () => {+ const user = userEvent.setup();+ render(+ <Select+ showSearch+ filterOption={(input, option) =>+ option.label?.toLowerCase().includes(input.toLowerCase())+ }+ >+ <Select.Option value="a" label="AzureOpenAI">+ <span>AzureOpenAI (azure|1234)</span>+ </Select.Option>+ <Select.Option value="b" label="Bedrock">+ <span>Bedrock (bedrock|5678)</span>+ </Select.Option>+ </Select>,+ );+ const box = await openSearch(user);+ await user.type(box, "azure");++ const options = screen.getAllByRole("option");+ expect(options).toHaveLength(1);+ // The NODE is what renders, not the label used for filtering.+ expect(options[0]).toHaveTextContent("AzureOpenAI (azure|1234)");+ });++ it("falls back to the option's own text when no filterOption is given", async () => {+ const user = userEvent.setup();+ render(+ <Select+ showSearch+ options={[+ // A label built as an element, as the connector list is.+ { value: "gcs", label: <span>GCS Testing</span> },+ { value: "s3", label: <span>S3 Oct 6 2025</span> },+ ]}+ />,+ );+ const box = await openSearch(user);+ await user.type(box, "gcs");++ expect(screen.getAllByRole("option")).toHaveLength(1);+ expect(+ screen.getByRole("option", { name: "GCS Testing" }),+ ).toBeInTheDocument();+ });++ /*+ * The prompt card's enforce-type list is built as `{ value: "text" }` with+ * no label at all, so the only thing left to match on is the value the+ * trigger is already showing.+ */+ it("filters on the value when an option carries no label", async () => {+ const user = userEvent.setup();+ render(+ <Select+ showSearch+ options={[+ { value: "text" },+ { value: "json" },+ { value: "agentic_table" },+ ]}+ />,+ );+ const box = await openSearch(user);+ await user.type(box, "table");++ expect(screen.getAllByRole("option")).toHaveLength(1);+ expect(+ screen.getByRole("option", { name: "agentic_table" }),+ ).toBeInTheDocument();+ });++ it("filters on optionFilterProp when told to", async () => {+ const user = userEvent.setup();+ render(+ <Select+ showSearch+ optionFilterProp="title"+ options={[+ { value: "a", label: "First", title: "alpha" },+ { value: "b", label: "Second", title: "beta" },+ ]}+ />,+ );+ const box = await openSearch(user);+ await user.type(box, "beta");++ expect(screen.getAllByRole("option")).toHaveLength(1);+ expect(+ screen.getByRole("option", { name: "Second" }),+ ).toBeInTheDocument();+ });++ it("shows every option when filterOption is false, as antd does", async () => {+ const user = userEvent.setup();+ render(<Select showSearch filterOption={false} options={CONNECTORS} />);+ const box = await openSearch(user);+ await user.type(box, "nothing matches this");++ expect(screen.getAllByRole("option")).toHaveLength(3);+ });++ it("renders notFoundContent when the query matches nothing", async () => {+ const user = userEvent.setup();+ render(+ <Select+ showSearch+ options={CONNECTORS}+ notFoundContent="No projects available"+ />,+ );+ const box = await openSearch(user);+ await user.type(box, "zzzz");++ expect(screen.queryAllByRole("option")).toHaveLength(0);+ expect(screen.getByText("No projects available")).toBeInTheDocument();+ });++ it("selects with the keyboard without leaving the search box", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<Select showSearch options={CONNECTORS} onChange={onChange} />);+ const box = await openSearch(user);++ await user.keyboard("{ArrowDown}{Enter}");++ expect(onChange).toHaveBeenCalledWith("s3", CONNECTORS[1]);+ expect(box).not.toBeInTheDocument();+ });++ it("selects by click and shows the choice on the trigger", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ const { rerender } = render(+ <Select showSearch options={CONNECTORS} onChange={onChange} />,+ );+ await openSearch(user);+ await user.click(screen.getByRole("option", { name: "GCS Testing" }));++ expect(onChange).toHaveBeenCalledWith("gcs", CONNECTORS[0]);++ rerender(+ <Select+ showSearch+ options={CONNECTORS}+ value="gcs"+ onChange={onChange}+ />,+ );+ expect(screen.getByRole("combobox")).toHaveTextContent("GCS Testing");+ });++ it("shows the placeholder until something is chosen", async () => {+ render(+ <Select+ showSearch+ options={CONNECTORS}+ placeholder="Select a connector"+ />,+ );+ expect(screen.getByRole("combobox")).toHaveTextContent(+ "Select a connector",+ );+ });++ /*+ * Configure Connector sets showSearch AND dropdownRender AND labelInValue+ * at once — the searchable path has to carry all three or the "+ Add new+ * connector" footer disappears again the moment search starts working.+ */+ it("keeps a dropdownRender footer below the filtered list", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(+ <Select+ showSearch+ labelInValue+ options={CONNECTORS}+ onChange={onChange}+ dropdownRender={(menu) => (+ <>+ {menu}+ <button type="button">+ Add new connector</button>+ </>+ )}+ />,+ );+ const box = await openSearch(user);+ expect(+ screen.getByRole("button", { name: "+ Add new connector" }),+ ).toBeInTheDocument();++ await user.type(box, "s3");+ expect(screen.getAllByRole("option")).toHaveLength(1);+ // Still pinned under the now-filtered list.+ expect(+ screen.getByRole("button", { name: "+ Add new connector" }),+ ).toBeInTheDocument();++ await user.click(screen.getByRole("option", { name: "S3 Oct 6 2025" }));+ expect(onChange).toHaveBeenCalledWith(+ expect.objectContaining({ value: "s3", label: "S3 Oct 6 2025" }),+ CONNECTORS[1],+ );+ });++ it("drops the query when the popup closes", async () => {+ const user = userEvent.setup();+ render(<Select showSearch options={CONNECTORS} />);+ const box = await openSearch(user);+ await user.type(box, "azure");+ expect(screen.getAllByRole("option")).toHaveLength(1);++ await user.keyboard("{Escape}");+ await user.click(screen.getByRole("combobox"));++ expect(screen.getAllByRole("option")).toHaveLength(3);+ });+ });++ it("Select renders each option through `optionRender` when given", () => {+ render(+ <Select+ open+ options={[{ value: "gcs", label: "GCS Testing", data: { icon: "x" } }]}+ optionRender={(option) => <span>icon {option.label}</span>}+ />,+ );+ expect(+ screen.getByRole("option", { name: "icon GCS Testing" }),+ ).toBeInTheDocument();+ });++ /*+ * antd allows a STANDALONE `<Radio checked onClick />` with no group — Manage+ * Documents and the LLM-profiles table each render one per row to mark the+ * active item. Radix's RadioGroupItem reads its group context and THROWS+ * without one ("`RadioGroupItemProvider` must be used within `RadioGroup`"),+ * which the error boundary turned into a dead route: clicking Settings or+ * Manage Documents showed "Couldn't load this page".+ */+ it("Radio renders standalone, outside any Radio.Group", () => {+ const onClick = vi.fn();+ // Would throw before the fix, failing the test at render.+ render(<Radio checked onClick={onClick} />);+ const radio = screen.getByRole("radio");+ expect(radio).toBeChecked();+ fireEvent.click(radio);+ expect(onClick).toHaveBeenCalled();+ });++ // PromptOutput drives its standalone radio with onChange, not onClick, so+ // both handlers have to reach the native input.+ it("Radio forwards onChange on a standalone radio", () => {+ const onChange = vi.fn();+ render(<Radio checked={false} onChange={onChange} />);+ fireEvent.click(screen.getByRole("radio"));+ expect(onChange).toHaveBeenCalled();+ });++ /*+ * The "Select Default" column renders one label-less radio per row and+ * centres it with `text-align: center` on the cell. A block-level `flex`+ * wrapper spans the whole cell and ignores that, pinning the radio to the+ * left edge — it measured 39px off its own centred column header. antd's+ * .ant-radio-wrapper is INLINE-flex, which respects text-align.+ */+ it("wraps a Radio in an inline-flex label so a cell can centre it", () => {+ const { container } = render(<Radio checked />);+ const wrapper = container.querySelector("label");+ expect(wrapper.className).toContain("inline-flex");+ expect(wrapper.className).not.toMatch(/(^|\s)flex(\s|$)/);+ });++ it("Radio reflects an unchecked standalone state", () => {+ render(<Radio checked={false} />);+ expect(screen.getByRole("radio")).not.toBeChecked();+ });++ it("Radio.Group renders its options and fires an event-shaped onChange", () => {+ const onChange = vi.fn();+ render(+ <Radio.Group+ onChange={onChange}+ options={[+ { value: "1", label: "One" },+ { value: "2", label: "Two" },+ ]}+ />,+ );+ expect(screen.getByText("One")).toBeInTheDocument();+ expect(screen.getByText("Two")).toBeInTheDocument();+ });++ /*+ * antd v5's `variant` ("borderless" | "filled" | "outlined") replaced+ * `bordered`. Custom Synonyms writes variant="borderless" on BOTH controls+ * in its row, so an unconsumed prop reaches the DOM as an unknown attribute.+ */+ it("keeps antd's `variant` off the DOM input", () => {+ render(<Input variant="borderless" />);+ expect(screen.getByRole("textbox")).not.toHaveAttribute("variant");+ });++ it("passes disabled through to the underlying control", () => {+ render(<Input disabled />);+ expect(screen.getByRole("textbox")).toBeDisabled();+ });++ /**+ * `showCount` was silently dropped: it fell into `...props`, so the three+ * modals using it (Prompt Studio description, both API-deployment name+ * fields) rendered no counter while `maxLength` still truncated typing.+ */+ describe("showCount (antd parity)", () => {+ it("renders the antd 'N / max' readout and tracks typing", async () => {+ const user = userEvent.setup();+ render(<Input.TextArea showCount maxLength={200} />);++ expect(screen.getByText("0 / 200")).toBeInTheDocument();+ await user.type(screen.getByRole("textbox"), "hello");+ expect(screen.getByText("5 / 200")).toBeInTheDocument();+ });++ it("still forwards the caller's onChange while counting", async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<Input showCount maxLength={30} onChange={onChange} />);++ await user.type(screen.getByRole("textbox"), "ab");+ expect(onChange).toHaveBeenCalledTimes(2);+ expect(screen.getByText("2 / 30")).toBeInTheDocument();+ });++ it("seeds the count from a controlled value and follows it", () => {+ const { rerender } = render(+ <Input showCount maxLength={30} value="abc" onChange={vi.fn()} />,+ );+ expect(screen.getByText("3 / 30")).toBeInTheDocument();++ rerender(+ <Input showCount maxLength={30} value="abcdef" onChange={vi.fn()} />,+ );+ expect(screen.getByText("6 / 30")).toBeInTheDocument();+ });++ it("renders no counter when showCount is absent", () => {+ render(<Input.TextArea maxLength={200} />);+ expect(screen.queryByText(/\/ 200/)).not.toBeInTheDocument();+ });+ });+});diff --git a/frontend/src/components/ui/shims/antd-inputs.tsx b/frontend/src/components/ui/shims/antd-inputs.tsxnew file mode 100644index 000000000..db7ff6799--- /dev/null+++ b/frontend/src/components/ui/shims/antd-inputs.tsx@@ -0,0 +1,2179 @@+import {+ Check,+ ChevronDown,+ Eye,+ EyeOff,+ Search as SearchIcon,+ X,+} from "lucide-react";+import * as React from "react";++import { Checkbox as ShadcnCheckbox } from "@/components/ui/checkbox";+import { Input as ShadcnInput } from "@/components/ui/input";+import { Label } from "@/components/ui/label";+import {+ Popover,+ PopoverAnchor,+ PopoverContent,+ PopoverTrigger,+} from "@/components/ui/popover";+import {+ RadioGroupItem,+ RadioGroup as ShadcnRadioGroup,+} from "@/components/ui/radio-group";+import {+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+ Select as ShadcnSelect,+ selectContentClassName,+ selectItemClassName,+ selectTriggerClassName,+} from "@/components/ui/select";+import { Switch as ShadcnSwitch } from "@/components/ui/switch";+import { Textarea } from "@/components/ui/textarea";+import { cn } from "@/lib/utils";++/**+ * antd-compatible data-entry controls (P3-03): Input (+ TextArea, Password,+ * Search), Select, Checkbox, Switch, Radio, InputNumber.+ *+ * Shim tier per docs/shim-convention.md. The behaviour that a prop swap would+ * lose:+ * - antd's onChange hands over a DOM event for Input but a raw VALUE for+ * Select/Switch/Checkbox. Radix inverts several of those. Call-sites are+ * written against antd's convention, so the shim adapts rather than+ * rewriting ~90 handlers.+ * - `Input.TextArea` (14 sites), `Input.Password`, `Input.Search` are+ * namespaced statics with no Radix equivalent.+ * - antd `Select` takes `options=[{label,value}]` data; Radix wants composed+ * children. `Select.Option` children (6 files) are supported too.+ */++/* ------------------------------------------------------------------ Input */++/**+ * antd's `showCount`: a live "N / max" readout under the control.+ *+ * Used on 3 modals (Prompt Studio project description, and both API+ * deployment name fields). Without this it fell into `...props` and vanished,+ * so those fields showed no counter at all while `maxLength` still silently+ * truncated typing — the user hit a limit with nothing telling them why.+ *+ * antd renders the count for both controlled and uncontrolled inputs, so the+ * length is read from `value`/`defaultValue` and kept in sync on change+ * rather than assuming a controlled parent.+ */++/**+ * The antd input surface these shims accept.+ *+ * `showCount` is why this matters and why it is spelled out first: it was+ * passed by call-sites, never destructured, and `...props` swallowed it with+ * no error — the counter simply never rendered. Enumerating the surface turns+ * the next one into a compile error at the call-site rather than a missing+ * feature nobody notices.+ */+type SizeToken = "small" | "middle" | "large";++/** antd hands its change handlers an event-like object, not Radix's value. */+type ChangeEventLike<T> = { target: { value: T } };+type CheckedEventLike = {+ target: { checked: boolean };+ stopPropagation: () => void;+};++interface CountProps {+ /** Renders a live character counter under the control. */+ showCount?: boolean;+ maxLength?: number;+}++interface AntInputProps+ extends Omit<+ React.InputHTMLAttributes<HTMLInputElement>,+ // `size` is a number on the DOM input and a token in antd; `prefix` is+ // the RDFa string attribute on HTMLAttributes and a ReactNode in antd.+ // Both must be dropped before being redeclared below.+ "size" | "prefix"+ >,+ CountProps {+ allowClear?: boolean;+ prefix?: React.ReactNode;+ suffix?: React.ReactNode;+ size?: SizeToken;+ status?: "error" | "warning";+ bordered?: boolean;+ /**+ * antd v5's replacement for `bordered` ("borderless" | "filled" |+ * "outlined"). Consumed so it cannot reach the DOM as an unknown attribute —+ * Custom Synonyms writes `variant="borderless"` on its word input.+ */+ variant?: string;+}++interface AntTextAreaProps+ extends React.TextareaHTMLAttributes<HTMLTextAreaElement>,+ CountProps {+ /** antd accepts `true` or a { minRows, maxRows } pair. */+ autoSize?: boolean | { minRows?: number; maxRows?: number };+ /** See AntInputProps.variant — EditableText drives prompt VALUES through this. */+ variant?: string;+ /**+ * antd's control size. `<textarea>` has no `size` attribute, so leaving this+ * in `...props` silently stamped `size="small"` on the DOM and the field kept+ * shadcn's 60px floor — 28px taller than the reference, on every prompt.+ */+ size?: "small" | "middle" | "large";+}++interface AntSearchProps+ extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {+ /** Not forwarded to the DOM: the native `size` is a character count. */+ /** Fired on Enter, with the current input value. */+ onSearch?: (value: string) => void;+ size?: SizeToken;+ /**+ * As on AntInputProps. Declared here too because Search does not delegate to+ * InputBase — without it `allowClear` reached the DOM and React warned on+ * every render of the HITL queue search box.+ */+ allowClear?: boolean;+}++interface AntInputNumberProps+ extends Omit<+ React.InputHTMLAttributes<HTMLInputElement>,+ "onChange" | "size"+ > {+ /** antd hands over the numeric VALUE, not the event; null when cleared. */+ onChange?: (value: number | null) => void;+ size?: SizeToken;+}++/** A `{ value, label }` pair, or a `<Select.Option>` supplying the same. */+interface SelectOption {+ value: string | number;+ label?: React.ReactNode;+ /** Renders the option unselectable — Select and Radio.Group both honour it. */+ disabled?: boolean;+}++interface LabelInValue {+ value: string | number;+ label?: React.ReactNode;+}++interface AntSelectProps {+ /** An array under `mode`; a single entry otherwise. */+ value?: string | number | LabelInValue | (string | number | LabelInValue)[];+ defaultValue?: string | number;+ /**+ * Receives the ORIGINAL option value, so non-string values survive — or a+ * `{ value, label }` pair when `labelInValue` is set, as antd does. Under+ * `mode="multiple"`/`"tags"` it is the whole selection as an array, which+ * is the shape every call-site of those modes stores and posts.+ */+ onChange?: (+ value: string | number | LabelInValue | (string | number | LabelInValue)[],+ option?: SelectOption | SelectOption[],+ ) => void;+ options?: SelectOption[];+ placeholder?: React.ReactNode;+ disabled?: boolean;+ allowClear?: boolean;+ /**+ * antd turns the selector into a text box and filters the list as you type.+ * Radix's Select cannot: its keyboard handling is a single-character+ * typeahead over focused items, and an <input> inside its content loses+ * focus the moment the pointer crosses an option. So a `showSearch` select+ * renders as a Popover-anchored combobox instead (see SearchableSelect).+ */+ showSearch?: boolean;+ /**+ * antd's own signature: `(input, option) => boolean`, receiving the OPTION+ * DATA — `{ value, label, ... }` for `options`, or the `<Select.Option>`+ * props for children. Call-sites read whatever field they built the option+ * from (`option.label`, `option.children`, `option.data.label`), so the+ * whole object has to survive: handing over a normalised `{ value, label }`+ * would have made `option.children.toLowerCase()` throw mid-keystroke.+ * `false` disables filtering, as antd allows.+ */+ filterOption?: boolean | ((input: string, option: SelectOption) => boolean);+ /** Which field the DEFAULT filter reads; antd's escape hatch for no filterOption. */+ optionFilterProp?: string;+ /** antd's empty state. Rendered when the search matches nothing. */+ notFoundContent?: React.ReactNode;+ /**+ * antd hands the selection over as `{ value, label }` instead of a bare+ * value, and reads the controlled `value` in that same shape. Configure+ * Connector is written against it — `onChange={(option) =>+ * handleConnectorSelect(option?.value)}` — so ignoring the flag handed that+ * call-site a bare string, `option?.value` came back undefined, and picking+ * a connector did nothing at all.+ */+ labelInValue?: boolean;+ /** Per-option renderer; antd falls back to the option's `label` without it. */+ optionRender?: (option: SelectOption) => React.ReactNode;+ /**+ * Wraps the option list so a call-site can pin its own content below it —+ * Configure Connector's "+ Add new connector" and the Lookup drawer's+ * "Create Lookup" are both rendered this way, and both are the ONLY route+ * to creating one. Dropping the prop left an org with no connectors staring+ * at an empty dropdown with no way out. `dropdownRender` is the pre-5.25+ * spelling of the same prop; the app still uses both.+ */+ popupRender?: (menu: React.ReactNode) => React.ReactNode;+ dropdownRender?: (menu: React.ReactNode) => React.ReactNode;+ /**+ * Both of antd's multi-value modes, neither of which Radix's single-select+ * can express — each renders a purpose-built control instead:+ *+ * - `tags` is BOTH a chip editor and a picker: the user types a value and+ * presses Enter, or takes one from the `options` dropdown, and either+ * way it becomes a removable chip (see TagsInput). Custom Synonyms was+ * unusable without it — the dropdown opened with no options and no way+ * to type.+ * - `multiple` is a fixed-option multi-select with no free text (see+ * MultiSelect).+ *+ * Both hand `onChange` an ARRAY. That is why neither can quietly fall+ * through to the single-select path: the control looks fine and the value+ * is the wrong shape.+ */+ mode?: "tags" | "multiple";+ /**+ * Caps how many entries the multi-value modes accept. The prompt card's+ * Document Type and Filter Strategy pass 1 to mean "pick exactly one from+ * the list".+ */+ maxCount?: number;+ variant?: string;+ /**+ * Forwarded to the TRIGGER, not to Radix's Root (which renders nothing).+ * Call-sites size these with `style={{ width: 200 }}`, and that was being+ * dropped on the floor.+ */+ style?: React.CSSProperties;+ size?: SizeToken;+ className?: string;+ children?: React.ReactNode;+ /**+ * Forwarded to the TRIGGER, for the same reason as `style` above: `...props`+ * lands on Radix's Root, which renders no DOM, so a test id written at a+ * call-site reached nothing at all.+ */+ "data-testid"?: string;+}++interface AntCheckboxProps {+ checked?: boolean;+ defaultChecked?: boolean;+ /** antd's call-sites read `e.target.checked`, so that shape is rebuilt. */+ onChange?: (e: CheckedEventLike) => void;+ disabled?: boolean;+ className?: string;+ children?: React.ReactNode;+}++interface AntSwitchProps {+ checked?: boolean;+ /**+ * antd accepts `value` as an alias for `checked` (it is what Form.Item+ * injects). SummarizeManager's "Summarize Context" toggle is written+ * `value={isContext}`, so reading only `checked` left the prop to fall into+ * `...props`, land on the DOM, and the switch never reflected its state.+ */+ value?: boolean;+ defaultChecked?: boolean;+ /**+ * antd hands over the new boolean AND the originating click event, unlike+ * Checkbox which hands over an event alone. Card toggles rely on the second+ * argument to stop the click reaching the card behind them.+ */+ onChange?: (+ checked: boolean,+ event: React.MouseEvent<HTMLButtonElement>,+ ) => void;+ disabled?: boolean;+ size?: "small" | "default";+ className?: string;+ onClick?: React.MouseEventHandler<HTMLButtonElement>;+}++interface AntRadioProps {+ value?: string | number;+ disabled?: boolean;+ className?: string;+ children?: React.ReactNode;+ /*+ * Standalone (ungrouped) radios are driven by these, as antd allows. Both+ * handlers are supported because the call-sites are split: Manage Documents+ * and ManageLlmProfiles use onClick, PromptOutput uses onChange.+ */+ checked?: boolean;+ onClick?: (e: React.MouseEvent<HTMLElement>) => void;+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;+ /**+ * Declared explicitly: React's `HTMLAttributes` does not carry `data-*` at+ * all — JSX lets them through on intrinsic elements only — so a call-site+ * passing one is a type error without this line.+ */+ "data-testid"?: string;+}++interface AntRadioGroupProps {+ value?: string | number;+ defaultValue?: string | number;+ onChange?: (e: ChangeEventLike<string>) => void;+ options?: SelectOption[];+ disabled?: boolean;+ className?: string;+ children?: React.ReactNode;+}++interface UseCountLabelArgs extends CountProps {+ value?: unknown;+ defaultValue?: unknown;+ onChange?: React.ChangeEventHandler<HTMLInputElement & HTMLTextAreaElement>;+}++function useCountLabel({+ showCount,+ maxLength,+ value,+ defaultValue,+ onChange,+}: UseCountLabelArgs) {+ const [len, setLen] = React.useState(+ String(value ?? defaultValue ?? "").length,+ );++ // A controlled parent can change `value` without an onChange we saw.+ React.useEffect(() => {+ if (value !== undefined) {+ setLen(String(value ?? "").length);+ }+ }, [value]);++ const handleChange = React.useCallback(+ (e: React.ChangeEvent<HTMLInputElement & HTMLTextAreaElement>) => {+ setLen(e.target.value.length);+ onChange?.(e);+ },+ [onChange],+ );++ if (!showCount) {+ return { onChange, label: null };+ }+ return {+ onChange: handleChange,+ label: (+ <div className="ant-input-show-count-suffix mt-1 text-right text-xs text-muted-foreground">+ {maxLength != null ? `${len} / ${maxLength}` : len}+ </div>+ ),+ };+}++const InputBase = React.forwardRef<HTMLInputElement, AntInputProps>(+ function Input(+ {+ allowClear,+ prefix,+ suffix,+ size,+ status,+ bordered,+ variant,+ showCount,+ className,+ ...props+ },+ ref,+ ) {+ const count = useCountLabel({ showCount, ...props });++ const control = (+ <ShadcnInput+ ref={ref}+ className={cn(+ "ant-input",+ size === "small" && "h-8 text-sm",+ size === "large" && "h-11",+ status === "error" && "border-destructive",+ /*+ * antd's `variant="borderless"` drops the border AND the background,+ * so the field reads as plain text until it is focused. EditableText+ * swaps to it whenever a prompt key/value is neither hovered nor+ * being edited — the prop was consumed but never implemented, so+ * every prompt card showed input chrome permanently.+ */+ variant === "borderless" &&+ "border-transparent bg-transparent shadow-none hover:border-input focus-visible:border-input",+ variant === "filled" && "border-transparent bg-muted",+ prefix && "pl-8",+ className,+ )}+ {...props}+ onChange={count.onChange}+ />+ );++ const affixed =+ !prefix && !suffix ? (+ control+ ) : (+ <div className="relative flex items-center">+ {prefix ? (+ <span className="absolute left-2 text-muted-foreground">+ {prefix}+ </span>+ ) : null}+ {control}+ {suffix ? (+ <span className="absolute right-2 cursor-pointer text-muted-foreground">+ {suffix}+ </span>+ ) : null}+ </div>+ );++ if (!count.label) {+ return affixed;+ }+ return (+ <div>+ {affixed}+ {count.label}+ </div>+ );+ },+);++/** antd `<Input.TextArea rows autoSize showCount />`. */+const TextArea = React.forwardRef<HTMLTextAreaElement, AntTextAreaProps>(+ function TextArea(+ { rows = 3, autoSize, showCount, variant, size, className, ...props },+ ref,+ ) {+ const count = useCountLabel({ showCount, ...props });++ /*+ * antd's `autoSize` grows the field to fit its content. Only the OBJECT+ * form ({minRows}) was handled, so `autoSize={true}` — what EditableText+ * passes for every prompt value — fell through to the 3-row default and+ * rendered a 74px box around a single line of text. That surplus repeated+ * per prompt card, which is most of why each cell was ~76px taller than+ * the reference.+ */+ const innerRef = React.useRef<HTMLTextAreaElement | null>(null);+ const setRefs = React.useCallback(+ (node: HTMLTextAreaElement | null) => {+ innerRef.current = node;+ if (typeof ref === "function") {+ ref(node);+ } else if (ref) {+ ref.current = node;+ }+ },+ [ref],+ );++ const autoSizing = autoSize === true || typeof autoSize === "object";+ const minRows =+ typeof autoSize === "object" ? (autoSize.minRows ?? 1) : rows;+ const maxRows = typeof autoSize === "object" ? autoSize.maxRows : undefined;++ const resize = React.useCallback(() => {+ const el = innerRef.current;+ if (!el || !autoSizing) {+ return;+ }+ // Collapse first so the scrollHeight reflects the CURRENT content.+ el.style.height = "auto";+ const line = parseFloat(getComputedStyle(el).lineHeight) || 22;+ const pad =+ parseFloat(getComputedStyle(el).paddingTop) ++ parseFloat(getComputedStyle(el).paddingBottom);+ const min = (typeof autoSize === "object" ? minRows : 1) * line + pad;+ const max = maxRows ? maxRows * line + pad : Infinity;+ el.style.height = `${Math.min(Math.max(el.scrollHeight, min), max)}px`;+ }, [autoSizing, autoSize, minRows, maxRows]);++ React.useLayoutEffect(resize, [resize, props.value]);++ const control = (+ <Textarea+ ref={setRefs}+ onInput={resize}+ rows={+ autoSize === true+ ? 1+ : typeof autoSize === "object"+ ? (autoSize.minRows ?? rows)+ : rows+ }+ className={cn(+ size === "small" && "px-2 py-1 text-sm",+ size === "large" && "px-3 py-2",+ /*+ * shadcn's Textarea carries `min-h-[60px]`, a CSS floor that beats+ * the inline height `resize()` computes, so a one-line prompt+ * measured 60px against the reference's 32px.+ *+ * antd's small autoSize field computes `padding: 0` vertically and+ * floors at 32px instead. Matching those two numbers — rather than+ * just removing the floor — is what puts the box on the reference's+ * height; `py-1` alone lands at 29px.+ */+ autoSizing && size === "small" && "min-h-8 py-0",+ autoSizing && size !== "small" && "min-h-0",+ // See the Input shim: EditableText renders prompt VALUES borderless+ // until they are hovered or edited.+ variant === "borderless" &&+ "border-transparent bg-transparent shadow-none hover:border-input focus-visible:border-input",+ variant === "filled" && "border-transparent bg-muted",+ // The box is sized to its content, so a scrollbar would be dead+ // chrome — unless maxRows caps it.+ autoSizing && !maxRows && "resize-none overflow-hidden",+ className,+ )}+ {...props}+ onChange={count.onChange}+ />+ );++ if (!count.label) {+ return control;+ }+ return (+ <div>+ {control}+ {count.label}+ </div>+ );+ },+);++/** antd `<Input.Password />` with the reveal toggle antd provides. */+const Password = React.forwardRef<+ HTMLInputElement,+ Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">+>(function Password({ className, ...props }, ref) {+ const [show, setShow] = React.useState(false);+ return (+ <div className="relative flex items-center">+ <ShadcnInput+ ref={ref}+ type={show ? "text" : "password"}+ className={cn("pr-9", className)}+ {...props}+ />+ <button+ type="button"+ aria-label={show ? "Hide password" : "Show password"}+ className="absolute right-2 cursor-pointer text-muted-foreground"+ onClick={() => setShow((s) => !s)}+ >+ {show ? <EyeOff className="size-4" /> : <Eye className="size-4" />}+ </button>+ </div>+ );+});++/** antd `<Input.Search onSearch allowClear />`. */+const Search = React.forwardRef<HTMLInputElement, AntSearchProps>(+ function Search(+ { onSearch, allowClear, className, size: _size, ...props },+ ref,+ ) {+ // antd only draws the clear affordance once there is something to clear.+ const showClear =+ allowClear && props.value !== undefined && props.value !== "";++ return (+ <div className="relative flex items-center">+ <SearchIcon className="absolute left-2 size-4 text-muted-foreground" />+ <ShadcnInput+ ref={ref}+ className={cn("pl-8", showClear && "pr-8", className)}+ onKeyDown={(e) => {+ if (e.key === "Enter") {+ onSearch?.((e.target as HTMLInputElement).value);+ }+ props.onKeyDown?.(e);+ }}+ {...props}+ />+ {showClear ? (+ <button+ type="button"+ aria-label="Clear"+ className="absolute right-2 cursor-pointer text-muted-foreground hover:text-foreground"+ onClick={() =>+ /*+ * `{ target: { value: "" } }` is the ChangeEventLike shape the+ * other controlled shims in this file emit — enough for a+ * handler reading e.target.value, which is what antd call-sites+ * do, without faking a whole SyntheticEvent.+ */+ props.onChange?.({+ target: { value: "" },+ } as React.ChangeEvent<HTMLInputElement>)+ }+ >+ <X className="size-4" />+ </button>+ ) : null}+ </div>+ );+ },+);++/*+ * Object.assign rather than `Input.TextArea = …`: the statics stay part of+ * the inferred type, so `<Input.TextArea>` type-checks and the+ * shim-completeness guard still finds them by value.+ */+const Input = Object.assign(InputBase, {+ TextArea,+ Password,+ Search,+});++/** antd `<InputNumber min max />`. */+const InputNumber = React.forwardRef<HTMLInputElement, AntInputNumberProps>(+ function InputNumber(+ { onChange, min, max, step, className, size: _size, ...props },+ ref,+ ) {+ return (+ <ShadcnInput+ ref={ref}+ type="number"+ min={min}+ max={max}+ step={step}+ className={className}+ // antd hands the numeric VALUE to onChange, not the event.+ onChange={(e) => {+ const raw = e.target.value;+ onChange?.(raw === "" ? null : Number(raw));+ }}+ {...props}+ />+ );+ },+);++/* ----------------------------------------------------------------- Select */++/**+ * antd `<Select mode="tags">` — a free-text, multi-value chip editor.+ *+ * Radix's Select is single-select over a fixed list of options, so there is no+ * way to express this by configuring it: with `mode` dropped, Custom Synonyms+ * rendered a trigger that opened an EMPTY dropdown with no text input, leaving+ * the feature unusable (a row could be added and its word typed, but never a+ * synonym). This is a purpose-built replacement rather than a Radix wrapper.+ *+ * antd's tags mode is a picker AS WELL as a text box — it still drops down its+ * `options` — and several call-sites lean on the list rather than on free text.+ * Configure Connector's "File types to process" is an enum the user is meant+ * to choose from, and its ArrayField silently drops anything typed that the+ * enum does not contain, so with the options hidden there was no way to fill+ * the field in at all. Same reason for the border: a chip row with no chrome+ * reads as static text rather than as a control, which is how that field and+ * "Folders to process" both looked once `mode` reached here.+ */+function TagsInput({+ value,+ onChange,+ placeholder,+ disabled,+ className,+ style,+ options,+ filterOption,+ optionFilterProp,+ optionRender,+ notFoundContent,+ maxCount,+ "data-testid": testId,+}: {+ value?: string[];+ onChange?: (value: string[]) => void;+ placeholder?: React.ReactNode;+ disabled?: boolean;+ className?: string;+ style?: React.CSSProperties;+ options?: SelectOption[];+ filterOption?: AntSelectProps["filterOption"];+ optionFilterProp?: string;+ optionRender?: (option: SelectOption) => React.ReactNode;+ notFoundContent?: React.ReactNode;+ maxCount?: number;+ "data-testid"?: string;+}) {+ const [draft, setDraft] = React.useState("");+ const [open, setOpen] = React.useState(false);+ const [active, setActive] = React.useState(0);+ const inputRef = React.useRef<HTMLInputElement>(null);+ // Same `aria-activedescendant` wiring as SearchableSelect and the multiple+ // variant below: the id links the input to the listbox and its options.+ const listId = React.useId();++ const tags = React.useMemo(+ () => (Array.isArray(value) ? value : value == null ? [] : [String(value)]),+ [value],+ );++ const items = React.useMemo(+ () => normaliseOptions(options, undefined),+ [options],+ );+ /** antd stops accepting entries at `maxCount`; the prompt card uses it as "pick one". */+ const full = maxCount != null && tags.length >= maxCount;+ // Chosen options drop out of the list and the draft filters it, as antd does.+ const visible = items.filter(+ (o) =>+ !tags.includes(String(o.value)) &&+ matchesQuery(o, draft, filterOption, optionFilterProp),+ );++ const add = (next: string) => {+ // antd de-duplicates and ignores an empty entry.+ if (!next || tags.includes(next) || full) {+ return;+ }+ onChange?.([...tags, next]);+ };++ const commit = (entry: string) => {+ add(entry);+ setDraft("");+ setActive(0);+ };++ const box = (+ <div+ data-testid={testId}+ style={style}+ className={cn(+ "ant-select-selector flex min-h-8 w-full flex-wrap items-center gap-1 rounded-md border border-input bg-transparent px-2 py-1 focus-within:ring-1 focus-within:ring-ring",+ disabled ? "cursor-not-allowed opacity-50" : "cursor-text",+ className,+ )}+ // antd puts the caret in the box wherever inside it the user clicks; the+ // guard is so a click ON the input keeps the caret where it was put.+ onMouseDown={(event) => {+ if (disabled || event.target === inputRef.current) {+ return;+ }+ event.preventDefault();+ inputRef.current?.focus();+ if (items.length) {+ setOpen(true);+ }+ }}+ >+ {tags.map((tag) => (+ <span+ key={tag}+ className="inline-flex items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-xs"+ >+ {tag}+ {!disabled && (+ <button+ type="button"+ aria-label={`Remove ${tag}`}+ className="cursor-pointer leading-none opacity-60 hover:opacity-100"+ onClick={() => onChange?.(tags.filter((t) => t !== tag))}+ >+ ×+ </button>+ )}+ </span>+ ))}+ <input+ ref={inputRef}+ type="text"+ className="min-w-24 flex-1 bg-transparent text-sm outline-none"+ placeholder={tags.length ? undefined : (placeholder as string)}+ value={draft}+ disabled={disabled}+ // No `role="combobox"` here, matching the two sibling lists: it would+ // displace the input's implicit `textbox` role, which call-sites and+ // the shim's own tests select it by.+ aria-controls={listId}+ aria-activedescendant={+ open && visible.length ? `${listId}-${active}` : undefined+ }+ onFocus={() => items.length && setOpen(true)}+ onChange={(e) => {+ setDraft(e.target.value);+ setActive(0);+ if (items.length) {+ setOpen(true);+ }+ }}+ onKeyDown={(e) => {+ if (e.key === "Enter" || e.key === ",") {+ // Enter would otherwise submit the surrounding antd Form.+ e.preventDefault();+ // With the list open Enter takes the highlighted option, as antd+ // does; otherwise it commits whatever has been typed.+ commit(+ open && visible[active]+ ? String(visible[active].value)+ : draft.trim(),+ );+ } else if (e.key === "ArrowDown" || e.key === "ArrowUp") {+ if (!items.length) {+ return;+ }+ e.preventDefault();+ if (!open) {+ setOpen(true);+ return;+ }+ if (visible.length) {+ const step = e.key === "ArrowDown" ? 1 : -1;+ setActive((i) => (i + step + visible.length) % visible.length);+ }+ } else if (e.key === "Escape" && open) {+ e.preventDefault();+ /*+ * Radix listens for Escape on the document, so both this popup and+ * the modal these fields sit in would dismiss on one press. Closing+ * the popup here and stopping the key at the React root leaves the+ * modal open, which is what antd does.+ */+ e.stopPropagation();+ setOpen(false);+ } else if (e.key === "Backspace" && !draft && tags.length) {+ onChange?.(tags.slice(0, -1));+ }+ }}+ // antd also commits the pending entry when focus leaves.+ onBlur={() => commit(draft.trim())}+ />+ {items.length > 0 && (+ <ChevronDown className="ml-auto h-4 w-4 shrink-0 opacity-50" />+ )}+ </div>+ );++ // Free-text-only call-sites (Custom Synonyms, the table headers) have no+ // list to show, and antd renders no dropdown for them either.+ if (!items.length) {+ return box;+ }++ return (+ <Popover open={open && !disabled} onOpenChange={setOpen}>+ <PopoverAnchor asChild>{box}</PopoverAnchor>+ <PopoverContent+ align="start"+ className={cn(+ selectContentClassName,+ "w-[var(--radix-popover-trigger-width)] max-h-[min(16rem,var(--radix-popover-content-available-height))] overflow-y-auto p-1",+ )}+ // The caret belongs in the box — this popup is typed INTO, not tabbed+ // to, and pulling focus out of the input would commit the draft.+ onOpenAutoFocus={(event) => event.preventDefault()}+ onCloseAutoFocus={(event) => event.preventDefault()}+ >+ <div role="listbox" id={listId} aria-multiselectable="true">+ {visible.length === 0 ? (+ <div className="px-2 py-1.5 text-sm text-muted-foreground">+ {notFoundContent ?? "No data"}+ </div>+ ) : (+ visible.map((o, i) => (+ // Options are deliberately not focusable and carry no key handler+ // of their own: this is the `aria-activedescendant` combobox+ // pattern, so focus stays in the draft input and its onKeyDown+ // drives Arrow/Enter into the same `commit` this onClick calls. A+ // handler here would be dead code — the element can never receive+ // the event.+ <div // NOSONAR+ key={String(o.value)}+ id={`${listId}-${i}`}+ role="option"+ aria-selected={false}+ aria-disabled={o.disabled || full || undefined}+ className={cn(+ selectItemClassName,+ i === active && "bg-accent text-accent-foreground",+ (o.disabled || full) && "pointer-events-none opacity-50",+ )}+ onPointerMove={() => setActive(i)}+ // Keep the caret in the box: blurring the input would commit+ // the draft as a tag of its own before this click landed.+ onMouseDown={(event) => event.preventDefault()}+ onClick={() => commit(String(o.value))}+ >+ {optionRender ? optionRender(o.data) : o.display}+ </div>+ ))+ )}+ </div>+ </PopoverContent>+ </Popover>+ );+}++/**+ * antd `<Select options onChange>`. antd calls onChange with the VALUE; Radix+ * does too, so the adaptation is mostly about accepting either `options` data+ * or `<Select.Option>` children.+ */+/**+ * One option, split into the three things the shim needs separately:+ * what to RENDER, what to hand CALL-SITES, and what to key Radix on.+ *+ * Keeping `data` verbatim is the load-bearing part. antd passes the option's+ * own props to `filterOption`/`optionRender`, and the call-sites read whatever+ * field they authored: Summarize Manager filters on `option.children`,+ * Adapter Selection on `option.label` (a string it sets ALONGSIDE a rich+ * `children` node), Configure Connector on `option.data.label`. Normalising+ * those into one `{ value, label }` shape made `option.children` undefined and+ * `option.label` a React element — both of which throw on `.toLowerCase()` on+ * the first keystroke, which is worse than not filtering at all.+ */+interface NormalisedOption {+ value: string | number;+ disabled?: boolean;+ /** What the list and the trigger show. */+ display: React.ReactNode;+ /** The option verbatim, as antd hands it to filterOption/optionRender. */+ data: SelectOption;+}++function normaliseOptions(+ options: SelectOption[] | undefined,+ children: React.ReactNode,+): NormalisedOption[] {+ if (options) {+ return options.map((o) => ({+ value: o.value,+ disabled: o.disabled,+ /*+ * antd falls back to the VALUE when an option carries no label, and+ * call-sites rely on it: the prompt card's enforce-type list is built as+ * `{ value: "text" }` with no label at all. Rendering a bare `label`+ * left every item blank, so the trigger showed an empty box instead of+ * the selected type.+ */+ display: o.label ?? String(o.value),+ data: o,+ }));+ }+ return React.Children.toArray(children)+ .filter(+ (+ c,+ ): c is React.ReactElement<+ SelectOption & { children?: React.ReactNode }+ > => React.isValidElement(c),+ )+ .map((c) => ({+ value: c.props.value,+ disabled: c.props.disabled,+ // `<Option label="x">rich node</Option>` renders the node and filters on+ // the label, so display prefers children and `data` keeps both.+ display: c.props.children ?? c.props.label ?? String(c.props.value),+ data: c.props,+ }));+}++/**+ * The multi-value modes' `value`, flattened to plain strings.+ *+ * Stringified because every comparison downstream is `includes`/`===` against+ * an option's value, and those two are routinely different types: `options`+ * carry numeric ids while the stored selection came back from JSON as+ * strings, and `12 === "12"` is false. The object case is `labelInValue`.+ */+function toValueStrings(source: AntSelectProps["value"]): string[] {+ const list = Array.isArray(source)+ ? source+ : source == null || source === ""+ ? []+ : [source];+ return list.map((v) =>+ v != null && typeof v === "object" ? String(v.value) : String(v),+ );+}++/** antd's onChange arguments: `{ value, label }` under labelInValue, else the raw value. */+function toChangeArgs(+ match: NormalisedOption | undefined,+ raw: string,+ labelInValue: boolean | undefined,+): [string | number | LabelInValue, SelectOption | undefined] {+ const selected = match?.value ?? raw;+ return [+ labelInValue ? { value: selected, label: match?.display } : selected,+ match?.data,+ ];+}++/**+ * Flatten an option's renderable content to text, so the DEFAULT filter can+ * match labels that are elements — `<Space><Image/><span>GCS</span></Space>`+ * is the usual shape here, and `String()` on that yields "[object Object]".+ */+function optionText(node: React.ReactNode): string {+ if (node == null || typeof node === "boolean") {+ return "";+ }+ if (typeof node === "string" || typeof node === "number") {+ return String(node);+ }+ if (Array.isArray(node)) {+ return node.map(optionText).join(" ");+ }+ if (React.isValidElement(node)) {+ return optionText((node.props as { children?: React.ReactNode }).children);+ }+ return "";+}++/**+ * antd's filtering: an explicit `filterOption` wins, `false` disables it, and+ * otherwise it is a case-insensitive substring over `optionFilterProp` —+ * falling back to the option's own text, which is what a user typing into+ * these lists is looking at.+ */+function matchesQuery(+ item: NormalisedOption,+ query: string,+ filterOption: AntSelectProps["filterOption"],+ optionFilterProp: string | undefined,+): boolean {+ if (!query) {+ return true;+ }+ if (filterOption === false) {+ return true;+ }+ if (typeof filterOption === "function") {+ return filterOption(query, item.data);+ }+ const field = optionFilterProp+ ? (item.data as Record<string, unknown>)[optionFilterProp]+ : undefined;+ const haystack = optionFilterProp+ ? optionText(field as React.ReactNode)+ : optionText(item.display) || String(item.value);+ return haystack.toLowerCase().includes(query.toLowerCase());+}++interface SearchableSelectProps {+ items: NormalisedOption[];+ /** Already unwrapped from labelInValue and normalised to a string. */+ value?: string;+ placeholder?: React.ReactNode;+ disabled?: boolean;+ size?: SizeToken;+ className?: string;+ style?: React.CSSProperties;+ filterOption?: AntSelectProps["filterOption"];+ optionFilterProp?: string;+ notFoundContent?: React.ReactNode;+ optionRender?: (option: SelectOption) => React.ReactNode;+ renderPopup?: (menu: React.ReactNode) => React.ReactNode;+ onSelect: (item: NormalisedOption) => void;+ /** Honoured so a call-site (or a test) can force the popup open, as antd allows. */+ open?: boolean;+ "data-testid"?: string;+}++/**+ * antd's `showSearch` select: a text box that filters the list as you type.+ *+ * Deliberately NOT Radix's Select. That component owns keyboard focus — it+ * moves DOM focus onto the highlighted option and runs a single-character+ * typeahead on the content — so an <input> nested inside it is unusable: the+ * typeahead swallows the keystrokes, and Select.Item re-focuses itself on+ * every pointermove, stealing the caret the moment the mouse crosses the+ * list. This is the ARIA combobox pattern instead: focus stays in the input+ * for the whole interaction and the active option is tracked with+ * `aria-activedescendant`, which is also what antd does.+ */+const SearchableSelect = React.forwardRef<+ HTMLButtonElement,+ SearchableSelectProps+>(function SearchableSelect(+ {+ items,+ value,+ placeholder,+ disabled,+ size,+ className,+ style,+ filterOption,+ optionFilterProp,+ notFoundContent,+ optionRender,+ renderPopup,+ onSelect,+ open: openProp,+ "data-testid": testId,+ },+ ref,+) {+ const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);+ const open = openProp ?? uncontrolledOpen;+ const [query, setQuery] = React.useState("");+ const [activeIndex, setActiveIndex] = React.useState(0);+ const inputRef = React.useRef<HTMLInputElement>(null);+ const listId = React.useId();++ const selected = items.find((o) => String(o.value) === value);+ const visible = items.filter((o) =>+ matchesQuery(o, query, filterOption, optionFilterProp),+ );++ /*+ * Clamp rather than reset: the query changes on every keystroke, and an+ * active index left pointing past the end of the newly filtered list would+ * make Enter a no-op.+ */+ const active = Math.min(activeIndex, Math.max(visible.length - 1, 0));++ const setOpen = (next: boolean) => {+ setUncontrolledOpen(next);+ if (!next) {+ // antd drops the query when the dropdown closes, so reopening shows the+ // full list rather than the last search.+ setQuery("");+ }+ };++ const choose = (item: NormalisedOption | undefined) => {+ if (!item || item.disabled) {+ return;+ }+ onSelect(item);+ setOpen(false);+ };++ const move = (delta: number) => {+ if (!visible.length) {+ return;+ }+ let next = active;+ // Skip disabled rows, and stop rather than wrap once the ends are reached.+ for (let step = 0; step < visible.length; step++) {+ next += delta;+ if (next < 0 || next >= visible.length) {+ return;+ }+ if (!visible[next].disabled) {+ setActiveIndex(next);+ return;+ }+ }+ };++ const menu = (+ <div+ role="listbox"+ id={listId}+ className="max-h-64 overflow-y-auto overflow-x-hidden p-1"+ >+ {visible.length === 0 ? (+ <div className="px-2 py-4 text-center text-sm text-muted-foreground">+ {notFoundContent ?? "No results"}+ </div>+ ) : (+ visible.map((o, i) => (+ // Options are deliberately not focusable and carry no key handler of+ // their own: this is the `aria-activedescendant` combobox pattern, so+ // focus stays on the input and its onKeyDown drives Arrow/Enter into+ // the same `choose` this onClick calls. A handler here would be dead+ // code — the element can never receive the event.+ <div // NOSONAR+ key={String(o.value)}+ id={`${listId}-${i}`}+ role="option"+ aria-selected={String(o.value) === value}+ aria-disabled={o.disabled || undefined}+ className={cn(+ selectItemClassName,+ i === active && "bg-accent text-accent-foreground",+ o.disabled && "pointer-events-none opacity-50",+ )}+ onPointerMove={() => setActiveIndex(i)}+ onClick={() => choose(o)}+ >+ {String(o.value) === value && (+ <span className="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">+ <Check className="h-4 w-4" />+ </span>+ )}+ {optionRender ? optionRender(o.data) : o.display}+ </div>+ ))+ )}+ </div>+ );++ return (+ <Popover open={open} onOpenChange={setOpen}>+ <PopoverTrigger asChild>+ <button+ ref={ref}+ type="button"+ role="combobox"+ aria-expanded={open}+ // The listbox this trigger owns. It is only in the tree while the+ // popover is open, which is what `aria-expanded` tells AT.+ aria-controls={listId}+ disabled={disabled}+ data-testid={testId}+ style={style}+ // Radix's Select marks an empty trigger this way and the shared+ // class string greys the placeholder off it.+ data-placeholder={selected ? undefined : ""}+ className={cn(+ selectTriggerClassName,+ "ant-select-selector",+ size === "small" && "h-8 text-sm",+ className,+ )}+ >+ <span className="truncate">{selected?.display ?? placeholder}</span>+ <ChevronDown className="h-4 w-4 shrink-0 opacity-50" />+ </button>+ </PopoverTrigger>+ <PopoverContent+ align="start"+ className={cn(+ selectContentClassName,+ // The LIST scrolls, not the surface — otherwise the search box+ // scrolls away from the results it is filtering.+ "w-[var(--radix-popover-trigger-width)] max-h-none overflow-hidden p-0",+ )}+ // Focus belongs in the search box, not on the surface Radix would+ // otherwise focus; without this the first keystroke goes nowhere.+ onOpenAutoFocus={(event) => {+ event.preventDefault();+ inputRef.current?.focus();+ }}+ >+ <div className="flex items-center gap-2 border-b px-3">+ <SearchIcon className="h-4 w-4 shrink-0 opacity-50" />+ <input+ ref={inputRef}+ type="text"+ role="searchbox"+ aria-controls={listId}+ aria-activedescendant={+ visible.length ? `${listId}-${active}` : undefined+ }+ className="h-9 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"+ placeholder={+ typeof placeholder === "string" ? placeholder : "Search"+ }+ value={query}+ onChange={(e) => {+ setQuery(e.target.value);+ setActiveIndex(0);+ }}+ onKeyDown={(e) => {+ if (e.key === "ArrowDown") {+ e.preventDefault();+ move(1);+ } else if (e.key === "ArrowUp") {+ e.preventDefault();+ move(-1);+ } else if (e.key === "Enter") {+ e.preventDefault();+ choose(visible[active]);+ }+ }}+ />+ </div>+ {/*+ * Same close-on-interaction wrapper as the plain Select path: a+ * `dropdownRender` footer opens a modal, and the popup would sit on+ * top of it. Options close the popup through `choose` already.+ */}+ {/*+ * `presentation`: the wrapper only catches clicks bubbling out of the+ * footer — it carries no semantics of its own, and the elements that+ * do (the listbox below, the footer's buttons) are already reachable.+ */}+ <div role="presentation" onClick={() => setOpen(false)}>+ {renderPopup ? renderPopup(menu) : menu}+ </div>+ </PopoverContent>+ </Popover>+ );+});++/**+ * antd `<Select mode="multiple">` — a fixed-option multi-select.+ *+ * Radix's Select is single-select, and `multiple` used to fall through to the+ * single-select paths below. That failed by SHAPE rather than visibly: the+ * control rendered and looked usable, but handed the call-site one bare value+ * where it expected an array, and offered no way to pick a second entry.+ * Global API Deployment Keys posts that field straight to DRF's+ * `PrimaryKeyRelatedField(many=True)`, which rejected it with+ * `Expected a list of items but got type "str"`.+ *+ * Same `aria-activedescendant` combobox pattern as SearchableSelect (see the+ * note there for why Radix's Select cannot host a search box), with the three+ * differences that are the point of the mode: the popup stays open across+ * selections, the trigger shows the chosen options as removable chips, and+ * the change handler always emits an array.+ *+ * Deliberately NOT the tag editor above: `multiple` has no free text, so+ * routing it there would let a member or a deployment be invented by typing a+ * name matching no option.+ */+interface MultiSelectProps {+ items: NormalisedOption[];+ /** Already unwrapped from labelInValue and stringified, so `includes` works. */+ values: string[];+ onValuesChange: (next: string[]) => void;+ placeholder?: React.ReactNode;+ disabled?: boolean;+ allowClear?: boolean;+ size?: SizeToken;+ className?: string;+ style?: React.CSSProperties;+ filterOption?: AntSelectProps["filterOption"];+ optionFilterProp?: string;+ notFoundContent?: React.ReactNode;+ optionRender?: (option: SelectOption) => React.ReactNode;+ renderPopup?: (menu: React.ReactNode) => React.ReactNode;+ maxCount?: number;+ /** Honoured so a call-site (or a test) can force the popup open, as antd allows. */+ open?: boolean;+ "data-testid"?: string;+}++function MultiSelect({+ items,+ values,+ onValuesChange,+ placeholder,+ disabled,+ allowClear,+ size,+ className,+ style,+ filterOption,+ optionFilterProp,+ notFoundContent,+ optionRender,+ renderPopup,+ maxCount,+ open: openProp,+ "data-testid": testId,+}: MultiSelectProps) {+ const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);+ const open = openProp ?? uncontrolledOpen;+ const [query, setQuery] = React.useState("");+ const [activeIndex, setActiveIndex] = React.useState(0);+ const inputRef = React.useRef<HTMLInputElement>(null);+ const listId = React.useId();++ const visible = items.filter((o) =>+ matchesQuery(o, query, filterOption, optionFilterProp),+ );+ // Clamped, not reset, for the same reason as SearchableSelect: the query+ // changes on every keystroke and a stale index would make Enter a no-op.+ const active = Math.min(activeIndex, Math.max(visible.length - 1, 0));+ /** antd stops accepting new entries at `maxCount`; removals stay available. */+ const full = maxCount != null && values.length >= maxCount;++ const setOpen = (next: boolean) => {+ /*+ * The one place `disabled` is enforced. A <div> trigger has no `disabled`+ * attribute, and the greyed-out styling below is CSS the pointer obeys but+ * the keyboard does not — so without this, tabbing to a disabled picker+ * and pressing Enter still opened it.+ */+ if (disabled && next) {+ return;+ }+ setUncontrolledOpen(next);+ if (!next) {+ // antd drops the query when the dropdown closes, so reopening shows the+ // full list rather than the last search.+ setQuery("");+ }+ };++ const toggle = (item: NormalisedOption | undefined) => {+ if (!item || item.disabled) {+ return;+ }+ const raw = String(item.value);+ if (values.includes(raw)) {+ onValuesChange(values.filter((v) => v !== raw));+ return;+ }+ if (full) {+ return;+ }+ onValuesChange([...values, raw]);+ /*+ * antd clears the search once an entry is taken but leaves the dropdown+ * open — picking a second option needs neither a reopen nor a manual+ * delete of what was typed for the first.+ */+ setQuery("");+ setActiveIndex(0);+ };++ const move = (delta: number) => {+ if (!visible.length) {+ return;+ }+ let next = active;+ // Skip disabled rows, and stop rather than wrap once the ends are reached.+ for (let step = 0; step < visible.length; step++) {+ next += delta;+ if (next < 0 || next >= visible.length) {+ return;+ }+ if (!visible[next].disabled) {+ setActiveIndex(next);+ return;+ }+ }+ };++ /*+ * A selected value with no matching option still has to render something.+ * These pickers fill their `options` from a fetch, so an edit form seeded+ * with stored ids paints before the list arrives and would otherwise show a+ * row of blank chips.+ */+ const displayFor = (raw: string) =>+ items.find((o) => String(o.value) === raw)?.display ?? raw;++ const remove = (raw: string) =>+ onValuesChange(values.filter((v) => v !== raw));++ const menu = (+ <div+ role="listbox"+ aria-multiselectable="true"+ id={listId}+ className="max-h-64 overflow-y-auto overflow-x-hidden p-1"+ >+ {visible.length === 0 ? (+ <div className="px-2 py-4 text-center text-sm text-muted-foreground">+ {notFoundContent ?? "No results"}+ </div>+ ) : (+ visible.map((o, i) => {+ const raw = String(o.value);+ const checked = values.includes(raw);+ return (+ // Not focusable and no key handler of its own: this is the+ // `aria-activedescendant` pattern, so focus stays in the search+ // box and its onKeyDown drives the same `toggle` this calls.+ <div // NOSONAR+ key={raw}+ id={`${listId}-${i}`}+ role="option"+ aria-selected={checked}+ aria-disabled={o.disabled || (full && !checked) || undefined}+ className={cn(+ selectItemClassName,+ i === active && "bg-accent text-accent-foreground",+ (o.disabled || (full && !checked)) &&+ "pointer-events-none opacity-50",+ )}+ onPointerMove={() => setActiveIndex(i)}+ onClick={() => toggle(o)}+ >+ {checked && (+ <span className="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">+ <Check className="h-4 w-4" />+ </span>+ )}+ {optionRender ? optionRender(o.data) : o.display}+ </div>+ );+ })+ )}+ </div>+ );++ return (+ <Popover open={open} onOpenChange={setOpen}>+ <PopoverTrigger asChild>+ <div+ role="combobox"+ aria-expanded={open}+ // The listbox this trigger owns. It is only in the tree while the+ // popover is open, which is what `aria-expanded` tells AT.+ aria-controls={listId}+ aria-haspopup="listbox"+ aria-disabled={disabled || undefined}+ tabIndex={disabled ? -1 : 0}+ data-testid={testId}+ style={style}+ // Radix's Select marks an empty trigger this way and the shared+ // class string greys the placeholder off it.+ data-placeholder={values.length ? undefined : ""}+ className={cn(+ selectTriggerClassName,+ /*+ * The shared trigger is a fixed-height, no-wrap single line; a+ * chip row wraps and grows with the selection. The disabled+ * styling is cosmetic — `setOpen` is what actually enforces it.+ */+ "ant-select-selector h-auto min-h-8 flex-wrap justify-start gap-1 whitespace-normal py-1",+ size === "small" && "text-sm",+ disabled && "pointer-events-none opacity-50",+ className,+ )}+ onKeyDown={(event) => {+ /*+ * Radix opens its trigger from a click, and a <div> gets none from+ * the keyboard — so the combobox keys are wired up by hand, or the+ * control is unreachable without a mouse.+ */+ if (+ event.key === "Enter" ||+ event.key === " " ||+ event.key === "ArrowDown"+ ) {+ event.preventDefault();+ setOpen(true);+ }+ }}+ >+ {values.length === 0 ? (+ <span className="truncate">{placeholder}</span>+ ) : (+ values.map((raw) => (+ <span+ key={raw}+ className="inline-flex max-w-full items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-xs"+ >+ <span className="truncate">{displayFor(raw)}</span>+ {!disabled && (+ <button+ type="button"+ aria-label={`Remove ${optionText(displayFor(raw)) || raw}`}+ className="cursor-pointer leading-none opacity-60 hover:opacity-100"+ /*+ * The chip sits INSIDE the popover trigger, so both events+ * have to be stopped: mousedown is what Radix opens on,+ * and the click would reach the trigger behind it.+ */+ onMouseDown={(event) => event.stopPropagation()}+ onClick={(event) => {+ event.stopPropagation();+ remove(raw);+ }}+ >+ ×+ </button>+ )}+ </span>+ ))+ )}+ {allowClear && values.length > 0 && !disabled ? (+ <button+ type="button"+ aria-label="Clear"+ className="ml-auto cursor-pointer opacity-50 hover:opacity-100"+ onMouseDown={(event) => event.stopPropagation()}+ onClick={(event) => {+ event.stopPropagation();+ onValuesChange([]);+ }}+ >+ <X className="h-4 w-4" />+ </button>+ ) : (+ <ChevronDown className="ml-auto h-4 w-4 shrink-0 opacity-50" />+ )}+ </div>+ </PopoverTrigger>+ <PopoverContent+ align="start"+ className={cn(+ selectContentClassName,+ // The LIST scrolls, not the surface — otherwise the search box+ // scrolls away from the results it is filtering.+ "w-[var(--radix-popover-trigger-width)] max-h-none overflow-hidden p-0",+ )}+ // Focus belongs in the search box, not on the surface Radix would+ // otherwise focus; without this the first keystroke goes nowhere.+ onOpenAutoFocus={(event) => {+ event.preventDefault();+ inputRef.current?.focus();+ }}+ >+ <div className="flex items-center gap-2 border-b px-3">+ <SearchIcon className="h-4 w-4 shrink-0 opacity-50" />+ {/*+ * Unconditional, unlike the single-select path which gates on+ * `showSearch`: antd defaults that flag to true in multiple mode, so+ * FileHistoryModal's status filter — which omits the prop — is+ * filterable today and would quietly lose it if this were gated.+ */}+ <input+ ref={inputRef}+ type="text"+ role="searchbox"+ aria-controls={listId}+ aria-activedescendant={+ visible.length ? `${listId}-${active}` : undefined+ }+ className="h-9 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"+ placeholder={+ typeof placeholder === "string" ? placeholder : "Search"+ }+ value={query}+ onChange={(event) => {+ setQuery(event.target.value);+ setActiveIndex(0);+ }}+ onKeyDown={(event) => {+ if (event.key === "ArrowDown") {+ event.preventDefault();+ move(1);+ } else if (event.key === "ArrowUp") {+ event.preventDefault();+ move(-1);+ } else if (event.key === "Enter") {+ // Would otherwise submit the antd Form these sit in.+ event.preventDefault();+ toggle(visible[active]);+ } else if (event.key === "Backspace" && !query && values.length) {+ onValuesChange(values.slice(0, -1));+ }+ }}+ />+ </div>+ {/*+ * No close-on-click wrapper here, unlike the two single-select paths:+ * staying open across selections is the whole point of the mode. A+ * `popupRender` footer therefore has to close itself, which no+ * call-site combines with `multiple` today.+ */}+ {renderPopup ? renderPopup(menu) : menu}+ </PopoverContent>+ </Popover>+ );+}++/** antd's multiple-mode onChange arguments: the values ARRAY, plus the options. */+function toMultiChangeArgs(+ raw: string[],+ items: NormalisedOption[],+ labelInValue: boolean | undefined,+): [(string | number | LabelInValue)[], SelectOption[]] {+ const matched = raw.map((r) => items.find((o) => String(o.value) === r));+ return [+ /*+ * The ORIGINAL option value, not the string MultiSelect compares on: a+ * numeric id handed back as "12" is a different value to an API. An entry+ * matching no option keeps its raw string — the options may still be+ * loading (see `displayFor`).+ */+ raw.map((r, i) =>+ labelInValue+ ? { value: matched[i]?.value ?? r, label: matched[i]?.display }+ : (matched[i]?.value ?? r),+ ),+ matched.filter((m): m is NormalisedOption => Boolean(m)).map((m) => m.data),+ ];+}++const SelectBase = React.forwardRef<HTMLButtonElement, AntSelectProps>(+ function Select(+ {+ value,+ defaultValue,+ onChange,+ options,+ placeholder,+ disabled,+ allowClear,+ showSearch,+ filterOption,+ optionFilterProp,+ notFoundContent,+ labelInValue,+ optionRender,+ popupRender,+ dropdownRender,+ mode,+ maxCount,+ // antd styling prop; consumed so it cannot land on the DOM+ variant,+ size,+ className,+ style,+ children,+ "data-testid": testId,+ ...props+ },+ ref,+ ) {+ /*+ * Only consulted when a popup renderer is supplied — see the SelectContent+ * below for why that case has to drive `open` itself. Declared up here+ * because the tags-mode return below is an early exit.+ */+ const [popupOpen, setPopupOpen] = React.useState(false);++ /*+ * Free-text multi-value entry; Radix's Select cannot express it.+ *+ * ONLY `tags`. antd's `multiple` is a fixed-option multi-select over+ * `options` with NO free text, and its call-sites (GroupMemberManager,+ * FileHistoryModal, Global API Deployment Keys) pick from a known list —+ * routing them here would let a member, a file status or a deployment be+ * invented by typing one. They go to MultiSelect below instead.+ */+ if (mode === "tags") {+ return (+ <TagsInput+ value={toValueStrings(value)}+ onChange={(next) => onChange?.(next)}+ placeholder={placeholder}+ disabled={disabled}+ className={className}+ style={style}+ options={options}+ filterOption={filterOption}+ optionFilterProp={optionFilterProp}+ optionRender={optionRender}+ notFoundContent={notFoundContent}+ maxCount={maxCount}+ data-testid={testId}+ />+ );+ }++ const items = normaliseOptions(options, children);++ /*+ * antd's fixed-option multi-select. Placed ahead of both single-select+ * paths below because falling through to them is not a degraded picker,+ * it is the wrong VALUE: they call onChange with one bare entry where the+ * call-site holds — and posts — an array.+ */+ if (mode === "multiple") {+ return (+ <MultiSelect+ items={items}+ // `toMultiChangeArgs` restores the original value type on the way+ // back out, so the stringification stops at this boundary.+ values={toValueStrings(value ?? defaultValue)}+ onValuesChange={(next) =>+ onChange?.(...toMultiChangeArgs(next, items, labelInValue))+ }+ placeholder={placeholder}+ disabled={disabled}+ allowClear={allowClear}+ size={size}+ className={className}+ style={style}+ filterOption={filterOption}+ optionFilterProp={optionFilterProp}+ notFoundContent={notFoundContent}+ optionRender={optionRender}+ renderPopup={popupRender ?? dropdownRender}+ maxCount={maxCount}+ open={(props as { open?: boolean }).open}+ data-testid={testId}+ />+ );+ }++ /*+ * antd treats "" as "nothing selected" and shows the placeholder; several+ * call-sites seed their state with `useState("")`. Radix reserves the+ * empty string internally, so passing it through leaves the trigger blank+ * AND suppresses the placeholder. Map it back to undefined.+ */+ const toValue = (v: AntSelectProps["value"]) => {+ /*+ * Under `labelInValue` the call-site holds `{ value, label }`, and+ * `String()`-ing that yields "[object Object]", which matches no item:+ * the trigger went blank AND suppressed the placeholder, so a selected+ * connector looked like no selection at all.+ */+ const raw =+ labelInValue && v != null && typeof v === "object" && !Array.isArray(v)+ ? v.value+ : v;+ // An array only reaches here if a call-site passes one without a `mode`;+ // antd shows nothing in that case, and Radix would throw on a non-string.+ return raw == null || raw === "" || Array.isArray(raw)+ ? undefined+ : String(raw);+ };++ // `dropdownRender` is what antd called this before 5.25; both are in use.+ const renderPopup = popupRender ?? dropdownRender;++ const optionItems = items.map((o) => (+ <SelectItem+ key={String(o.value)}+ value={String(o.value)}+ disabled={o.disabled}+ >+ {optionRender ? optionRender(o.data) : o.display}+ </SelectItem>+ ));++ if (showSearch) {+ return (+ <SearchableSelect+ ref={ref}+ items={items}+ value={toValue(value) ?? toValue(defaultValue)}+ placeholder={placeholder}+ disabled={disabled}+ size={size}+ className={className}+ style={style}+ filterOption={filterOption}+ optionFilterProp={optionFilterProp}+ notFoundContent={notFoundContent}+ optionRender={optionRender}+ renderPopup={renderPopup}+ onSelect={(item) =>+ onChange?.(...toChangeArgs(item, String(item.value), labelInValue))+ }+ open={(props as { open?: boolean }).open}+ data-testid={testId}+ />+ );+ }++ return (+ <ShadcnSelect+ value={toValue(value)}+ defaultValue={toValue(defaultValue)}+ onValueChange={(v) => {+ /*+ * Radix reserves "" and rejects a `SelectItem` carrying it, so this+ * can never be a user selection — it is Radix announcing its own+ * uncontrolled-to-controlled switch. `toValue` maps antd's "nothing+ * selected" to undefined, which leaves Radix uncontrolled until a+ * real value arrives; forwarding the "" it then emits wrote that+ * emptiness straight back over the value that had just landed.+ *+ * Prompt Studio's Limit-to Section blanked out on every edit for+ * exactly this: the profile's "Default" reached the field and was+ * wiped in the same tick.+ */+ if (v === "") {+ return;+ }+ const match = items.find((o) => String(o.value) === v);+ onChange?.(...toChangeArgs(match, v, labelInValue));+ }}+ disabled={disabled}+ {...(renderPopup+ ? { open: popupOpen, onOpenChange: setPopupOpen }+ : {})}+ {...props}+ >+ <SelectTrigger+ ref={ref}+ /*+ * `style` and `data-testid` belong on the TRIGGER, not on Radix's+ * Root (which renders nothing) — call-sites size these with+ * `style={{ width: 200 }}`, and the trigger is what a test clicks.+ */+ style={style}+ data-testid={testId}+ className={cn(+ "ant-select-selector",+ size === "small" && "h-8 text-sm",+ className,+ )}+ >+ <SelectValue placeholder={placeholder} />+ </SelectTrigger>+ <SelectContent>+ {renderPopup ? (+ /*+ * antd closes its dropdown the moment focus leaves the select, so+ * a footer button inside `dropdownRender` closes it as a side+ * effect. Radix has no equivalent, and both call-sites open a+ * modal from that footer — leaving the popup open would park it on+ * top of the very modal it just opened. Close on `click` rather+ * than `mousedown`: unmounting the button mid-mousedown would eat+ * the click before the footer's own handler ever ran.+ *+ * `presentation` keeps this passive wrapper from breaking the+ * listbox/option relationship Radix sets up around it.+ */+ <div role="presentation" onClick={() => setPopupOpen(false)}>+ {renderPopup(<>{optionItems}</>)}+ </div>+ ) : (+ optionItems+ )}+ </SelectContent>+ </ShadcnSelect>+ );+ },+);++/** antd `<Select.Option>` — data holder consumed by Select above. */+function Option({+ children,+}: {+ value?: string | number;+ children?: React.ReactNode;+}) {+ return children ?? null;+}++const Select = Object.assign(SelectBase, { Option });++/* --------------------------------------------------- Checkbox / Switch */++/**+ * antd `<Checkbox checked onChange>` gives onChange a DOM-like event with+ * `target.checked`; Radix gives a boolean. Call-sites read `e.target.checked`,+ * so the shim rebuilds that shape.+ */+const Checkbox = React.forwardRef<HTMLButtonElement, AntCheckboxProps>(+ function Checkbox(+ {+ checked,+ defaultChecked,+ onChange,+ disabled,+ className,+ children,+ ...props+ },+ ref,+ ) {+ const box = (+ <ShadcnCheckbox+ ref={ref}+ checked={checked}+ defaultChecked={defaultChecked}+ disabled={disabled}+ onCheckedChange={(next) =>+ onChange?.({+ target: { checked: next === true },+ stopPropagation: () => undefined,+ })+ }+ className={className}+ {...props}+ />+ );+ if (!children) {+ return box;+ }+ return (+ <Label className="flex items-center gap-2 font-normal">+ {box}+ {children}+ </Label>+ );+ },+);++/**+ * antd `<Switch checked onChange>` — onChange receives `(checked, event)`.+ *+ * onChange is driven off the Root's own `onClick`, NOT off Radix's+ * `onCheckedChange`. Radix routes that through `useControllableState`, which+ * invokes the callback from inside a state updater — i.e. during the following+ * render, after the click has finished bubbling. A handler written+ * `(checked, e) => e.stopPropagation()` (both card toggles are) would then run+ * too late to stop anything. Reading `aria-checked` off the button gives the+ * pre-toggle state for controlled and uncontrolled switches alike, and a+ * `<button>` turns keyboard activation into a click, so both input paths work.+ */+const Switch = React.forwardRef<HTMLButtonElement, AntSwitchProps>(+ function Switch(+ {+ checked,+ value,+ defaultChecked,+ onChange,+ onClick,+ disabled,+ size,+ className,+ ...props+ },+ ref,+ ) {+ return (+ <ShadcnSwitch+ ref={ref}+ checked={checked ?? value}+ defaultChecked={defaultChecked}+ disabled={disabled}+ onClick={(event) => {+ onClick?.(event);+ onChange?.(+ event.currentTarget.getAttribute("aria-checked") !== "true",+ event,+ );+ }}+ className={cn(size === "small" && "scale-90", className)}+ {...props}+ />+ );+ },+);++/* ------------------------------------------------------------------ Radio */++/*+ * Marks that a Radio is inside a Radio.Group.+ *+ * antd allows a STANDALONE `<Radio checked onClick />` — Manage Documents and+ * the LLM-profiles settings table both render one per row, with no group, to+ * pick the active document/profile. Radix's RadioGroupItem cannot do that: it+ * reads its group's context and throws+ * "`RadioGroupItemProvider` must be used within `RadioGroup`", which took down+ * the whole route via the error boundary — the reported "clicking Settings /+ * Manage Documents throws error".+ *+ * So the shim has to cover both shapes: grouped items go to Radix, ungrouped+ * ones render a native input that honours `checked`/`onClick` directly.+ */+const InRadioGroupContext = React.createContext(false);++const RadioBase = React.forwardRef<HTMLButtonElement, AntRadioProps>(+ function Radio(+ {+ value,+ disabled,+ className,+ children,+ checked,+ onClick,+ onChange,+ ...props+ },+ ref,+ ) {+ const inGroup = React.useContext(InRadioGroupContext);++ return (+ <Label+ className={cn(+ /*+ * INLINE-flex, as antd's .ant-radio-wrapper is. A block-level `flex`+ * spans the full cell, so a label-less radio (the "Select Default"+ * column renders one per row) pinned itself to the left edge and+ * ignored the cell's `text-align: center` — it sat 39px off from its+ * own centred column header.+ */+ "ant-radio-wrapper inline-flex items-center gap-2 font-normal",+ !disabled && "cursor-pointer",+ className,+ )}+ >+ {inGroup ? (+ <RadioGroupItem+ ref={ref}+ value={String(value)}+ disabled={disabled}+ {...props}+ />+ ) : (+ /*+ * Standalone: a native radio, styled to match the Radix one. `name`+ * is deliberately omitted — these are independent single radios, and+ * sharing a name would make the browser deselect its siblings.+ */+ <input+ type="radio"+ className="size-4 shrink-0 cursor-pointer accent-primary disabled:cursor-not-allowed disabled:opacity-50"+ checked={checked ?? false}+ disabled={disabled}+ onClick={onClick}+ // React requires onChange on a controlled input; forward the+ // caller's when there is one so PromptOutput's radio still fires.+ onChange={onChange ?? (() => undefined)}+ {...props}+ />+ )}+ {children}+ </Label>+ );+ },+);++/** antd `<Radio.Group value onChange>` — onChange gets an event-like object. */+const RadioGroup = React.forwardRef<HTMLDivElement, AntRadioGroupProps>(+ function RadioGroup(+ {+ value,+ defaultValue,+ onChange,+ options,+ disabled,+ className,+ children,+ ...props+ },+ ref,+ ) {+ return (+ <ShadcnRadioGroup+ ref={ref}+ value={value != null ? String(value) : undefined}+ defaultValue={defaultValue != null ? String(defaultValue) : undefined}+ disabled={disabled}+ onValueChange={(v) => onChange?.({ target: { value: v } })}+ className={cn("ant-radio-group flex flex-col gap-2", className)}+ {...props}+ >+ {/* Tells descendant Radios they may use Radix's RadioGroupItem. */}+ <InRadioGroupContext.Provider value={true}>+ {options+ ? options.map((o) => (+ <Radio+ key={String(o.value)}+ value={o.value}+ disabled={o.disabled}+ >+ {o.label}+ </Radio>+ ))+ : children}+ </InRadioGroupContext.Provider>+ </ShadcnRadioGroup>+ );+ },+);++const Radio = Object.assign(RadioBase, {+ Group: RadioGroup,+ // antd renders Radio.Button as a segmented control; the call-sites here+ // only rely on it behaving as a radio, so it maps to the same component.+ Button: RadioBase,+});++export { Checkbox, Input, InputNumber, Radio, Select, Switch };diff --git a/frontend/src/components/ui/shims/antd-layout.test.jsx b/frontend/src/components/ui/shims/antd-layout.test.jsxnew file mode 100644index 000000000..9fc1590e3--- /dev/null+++ b/frontend/src/components/ui/shims/antd-layout.test.jsx@@ -0,0 +1,198 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, it } from "vitest";++import { Col, Flex, Row, Space } from "@/components/ui/shims/antd-layout";++describe("antd-compatible layout shims (P1-05)", () => {+ // The reason these are shims rather than a gap-* swap: 20 hand-written CSS+ // rules in this repo select antd's internal wrapper elements.++ it("wraps each Space child in .ant-space-item, as existing CSS expects", () => {+ const { container } = render(+ <Space>+ <span>a</span>+ <span>b</span>+ <span>c</span>+ </Space>,+ );+ expect(container.querySelectorAll(".ant-space-item")).toHaveLength(3);+ expect(container.querySelector(".ant-space")).toBeTruthy();+ });++ it("skips falsy children so conditional renders do not leave empty gaps", () => {+ const show = false;+ const { container } = render(+ <Space>+ <span>a</span>+ {show && <span>hidden</span>}+ {null}+ <span>b</span>+ </Space>,+ );+ expect(container.querySelectorAll(".ant-space-item")).toHaveLength(2);+ });++ it("wraps fragment children individually, as antd's toArray does", () => {+ // The playground header shape: everything behind one conditional+ // fragment. React's Children.toArray counts that as a single child, so+ // without flattening the whole header lands in one .ant-space-item and+ // loses its gaps.+ const show = true;+ const { container } = render(+ <Space>+ {show && (+ <>+ <span>a</span>+ <span>b</span>+ <span>c</span>+ </>+ )}+ </Space>,+ );+ expect(container.querySelectorAll(".ant-space-item")).toHaveLength(3);+ });++ it("flattens nested fragments and drops their falsy children", () => {+ const { container } = render(+ <Space>+ <span>a</span>+ <>+ <span>b</span>+ {false && <span>hidden</span>}+ <>+ <span>c</span>+ </>+ </>+ </Space>,+ );+ expect(container.querySelectorAll(".ant-space-item")).toHaveLength(3);+ });++ it("wraps mapped children individually", () => {+ const { container } = render(+ <Space>+ {["x", "y", "z"].map((k) => (+ <span key={k}>{k}</span>+ ))}+ </Space>,+ );+ expect(container.querySelectorAll(".ant-space-item")).toHaveLength(3);+ });++ it("stacks vertically for direction=vertical", () => {+ const { container } = render(+ <Space direction="vertical">+ <span>a</span>+ </Space>,+ );+ const el = container.querySelector(".ant-space");+ expect(el.className).toContain("flex-col");+ expect(el.className).toContain("ant-space-vertical");+ });++ it("maps antd size tokens to a px gap", () => {+ const { container } = render(+ <Space size="large">+ <span>a</span>+ </Space>,+ );+ expect(container.querySelector(".ant-space").style.gap).toBe("24px");+ });++ it("accepts a numeric size", () => {+ const { container } = render(+ <Space size={5}>+ <span>a</span>+ </Space>,+ );+ expect(container.querySelector(".ant-space").style.gap).toBe("5px");+ });++ it("keeps the .ant-row / .ant-col hooks", () => {+ const { container } = render(+ <Row>+ <Col span={12}>half</Col>+ </Row>,+ );+ expect(container.querySelector(".ant-row")).toBeTruthy();+ expect(container.querySelector(".ant-col")).toBeTruthy();+ });++ it("converts Col span to a percentage of antd's 24-column grid", () => {+ const { container } = render(+ <Row>+ <Col span={12}>half</Col>+ </Row>,+ );+ expect(container.querySelector(".ant-col").style.width).toBe("50%");+ });++ /*+ * antd's responsive Col props were not destructured, so `<Col xs={24}>` fell+ * into `...props`, hit the DOM as an unknown attribute, and the column got+ * NO width — the Dashboard's "Usage by Deployment" card shrank to fit its+ * empty state instead of spanning the row.+ */+ it("sizes a Col from its responsive breakpoint props", () => {+ const { container } = render(+ <Row>+ <Col xs={24}>full</Col>+ </Row>,+ );+ expect(container.querySelector(".ant-col").style.width).toBe("100%");+ });++ it("does not leak breakpoint props onto the DOM", () => {+ const { container } = render(+ <Row>+ <Col xs={24} md={12}>+ x+ </Col>+ </Row>,+ );+ const col = container.querySelector(".ant-col");+ expect(col).not.toHaveAttribute("xs");+ expect(col).not.toHaveAttribute("md");+ });++ it("prefers the largest specified breakpoint over span", () => {+ const { container } = render(+ <Row>+ <Col span={6} xs={24} md={12}>+ x+ </Col>+ </Row>,+ );+ expect(container.querySelector(".ant-col").style.width).toBe("50%");+ });++ it("applies gutter as negative row margin plus column padding", () => {+ const { container } = render(+ <Row gutter={16}>+ <Col span={24}>full</Col>+ </Row>,+ );+ expect(container.querySelector(".ant-row").style.marginLeft).toBe("-8px");+ expect(container.querySelector(".ant-col").style.paddingLeft).toBe("8px");+ });++ it("renders Flex with direction and gap", () => {+ const { container } = render(+ <Flex vertical gap={8}>+ <span>a</span>+ </Flex>,+ );+ const el = container.firstChild;+ expect(el.className).toContain("flex-col");+ expect(el.style.gap).toBe("8px");+ });++ it("passes className and props through on every component", () => {+ render(+ <Space className="cell-content" data-testid="s">+ <span>a</span>+ </Space>,+ );+ expect(screen.getByTestId("s").className).toContain("cell-content");+ });+});diff --git a/frontend/src/components/ui/shims/antd-layout.tsx b/frontend/src/components/ui/shims/antd-layout.tsxnew file mode 100644index 000000000..4e91c539d--- /dev/null+++ b/frontend/src/components/ui/shims/antd-layout.tsx@@ -0,0 +1,338 @@+import * as React from "react";++import { cn } from "@/lib/utils";++/**+ * antd-compatible layout primitives: `Space`, `Row`, `Col`, `Flex` (P1-05).+ *+ * The plan called these a direct swap to flex/grid utilities. That is unsafe+ * here for one specific reason: **antd's `Space` wraps every child in its own+ * `.ant-space-item` div**, and `Row`/`Col` emit `.ant-row`/`.ant-col`. This+ * repo has 20 hand-written CSS rules that select those internals+ * (`.ant-space .ant-space-item .ant-card`, `.file-history-modal .ant-space`,+ * `.ant-row`/`.ant-col` …). Collapsing the wrappers into `gap-*` on the parent+ * deletes the elements those selectors match, so the styling silently stops+ * applying — a regression, not a restyle (C4).+ *+ * 22 `Space` call-sites also render children from `.map()` or conditionals,+ * where per-child wrappers change what `> *` matches.+ *+ * These components therefore keep antd's DOM shape (including the class names+ * the existing CSS targets) while dropping the antd dependency. The legacy+ * `ant-*` class names are emitted deliberately, and go away in P4 when the+ * dependent CSS is cleaned up.+ */++/**+ * The antd layout surface these shims accept.+ *+ * Enumerated by hand rather than inferred: the failure mode this whole layer+ * has is the silent prop-drop, where a call-site passes something the shim+ * never destructures and `...props` swallows it without a warning. Naming+ * each prop turns the next one into a compile error at the call-site.+ */+type SizeToken = "small" | "middle" | "large";+type AlignToken = "start" | "end" | "center" | "baseline";++/** antd accepts a token, a raw px number, or a [horizontal, vertical] pair. */+type SpaceSize = SizeToken | number | Array<SizeToken | number>;++interface SpaceProps extends React.HTMLAttributes<HTMLDivElement> {+ direction?: "horizontal" | "vertical";+ size?: SpaceSize;+ align?: AlignToken;+ wrap?: boolean;+ /** Rendered between items, as antd does. */+ split?: React.ReactNode;+}++interface RowProps extends React.HTMLAttributes<HTMLDivElement> {+ /** px, or [horizontal, vertical] px. */+ gutter?: number | [number, number];+ justify?: AlignToken | React.CSSProperties["justifyContent"];+ align?: AlignToken | React.CSSProperties["alignItems"];+ wrap?: boolean;+}++/** antd's responsive Col props, smallest breakpoint first. */+type ColBreakpoint = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";++interface ColProps extends React.HTMLAttributes<HTMLDivElement> {+ /** Width in 24ths, antd's grid basis. */+ span?: number;+ offset?: number;+ flex?: React.CSSProperties["flex"];+ /*+ * antd's per-breakpoint widths, also in 24ths. These were not destructured,+ * so `<Col xs={24}>` fell into `...props`, reached the DOM as an unknown+ * attribute, and the column got NO width at all — the Dashboard's "Usage by+ * Deployment" card shrank to fit its empty state instead of spanning the row.+ */+ xs?: number;+ sm?: number;+ md?: number;+ lg?: number;+ xl?: number;+ xxl?: number;+ /**+ * Internal: Row clones its children to pass its gutter down for padding.+ * Not part of antd's API and not meant for call-sites.+ */+ __gutter?: number;+}++interface FlexProps extends React.HTMLAttributes<HTMLDivElement> {+ vertical?: boolean;+ justify?: AlignToken | React.CSSProperties["justifyContent"];+ align?: AlignToken | React.CSSProperties["alignItems"];+ gap?: SizeToken | number;+ wrap?: boolean;+}++/** antd `size` token → px gap. antd accepts a number or a preset. */+const SIZE_PX: Record<SizeToken, number> = {+ small: 8,+ middle: 16,+ large: 24,+};++function resolveGap(size?: SpaceSize): number | number[] {+ if (size == null) {+ return SIZE_PX.small;+ }+ if (typeof size === "number") {+ return size;+ }+ if (Array.isArray(size)) {+ return size.map((s) => (typeof s === "number" ? s : (SIZE_PX[s] ?? 8)));+ }+ return SIZE_PX[size] ?? SIZE_PX.small;+}++/**+ * antd tokens differ from the CSS keywords: antd says `start`, flexbox wants+ * `flex-start`. Call-sites pass either, so translate what we recognise and+ * hand anything else to CSS untouched.+ */+function toCssAlign<T extends string | undefined>(+ value: T,+): string | undefined {+ if (value == null) {+ return undefined;+ }+ return ALIGN[value as AlignToken] ?? value;+}++const ALIGN: Record<AlignToken, string> = {+ start: "flex-start",+ end: "flex-end",+ center: "center",+ baseline: "baseline",+};++/**+ * antd counts `Space`'s children with rc-util's `toArray`, which **descends+ * into fragments**; React's own `Children.toArray` does not — it counts+ * `<>…</>` as a single child.+ *+ * That difference is not cosmetic. A call-site that renders its items behind+ * `{cond && <>…</>}` (the LLMWhisperer playground header does) collapsed into+ * one `.ant-space-item`, so the gap between them disappeared and any+ * block-level child — a vertical `Divider` — broke onto its own line, which+ * stacked the header vertically.+ */+function flattenFragments(children: React.ReactNode): React.ReactNode[] {+ return React.Children.toArray(children).flatMap((child) =>+ React.isValidElement(child) && child.type === React.Fragment+ ? flattenFragments(+ (child.props as { children?: React.ReactNode }).children,+ )+ : [child],+ );+}++/**+ * antd `<Space>`. Keeps the `.ant-space` / `.ant-space-item` structure so the+ * existing CSS that targets it keeps working.+ */+const Space = React.forwardRef<HTMLDivElement, SpaceProps>(function Space(+ {+ direction = "horizontal",+ size,+ align,+ wrap,+ split,+ className,+ style,+ children,+ ...props+ },+ ref,+) {+ const gap = resolveGap(size);+ // toArray already discards null, undefined and booleans, so the empty+ // string is the only falsy child left worth dropping.+ const items = flattenFragments(children).filter((c) => c !== "");++ return (+ <div+ ref={ref}+ className={cn(+ "ant-space inline-flex",+ direction === "vertical"+ ? "ant-space-vertical"+ : "ant-space-horizontal",+ direction === "vertical" ? "flex-col" : "flex-row",+ wrap && "flex-wrap",+ className,+ )}+ style={{+ gap: Array.isArray(gap)+ ? `${gap[1] ?? gap[0]}px ${gap[0]}px`+ : `${gap}px`,+ alignItems:+ align != null+ ? ALIGN[align]+ : direction === "vertical"+ ? undefined+ : "center",+ ...style,+ }}+ {...props}+ >+ {items.map((child, i) => (+ // The wrapper div is the whole point: existing CSS selects it.+ // eslint-disable-next-line react/no-array-index-key+ <div key={i} className="ant-space-item">+ {child}+ {split && i < items.length - 1 ? split : null}+ </div>+ ))}+ </div>+ );+});++/** antd `<Row>`. antd's 24-column grid, with the `.ant-row` hook preserved. */+const Row = React.forwardRef<HTMLDivElement, RowProps>(function Row(+ { gutter, justify, align, wrap = true, className, style, children, ...props },+ ref,+) {+ const [hGutter, vGutter] = Array.isArray(gutter) ? gutter : [gutter ?? 0, 0];++ return (+ <div+ ref={ref}+ className={cn("ant-row flex", wrap && "flex-wrap", className)}+ style={{+ marginLeft: hGutter ? -hGutter / 2 : undefined,+ marginRight: hGutter ? -hGutter / 2 : undefined,+ rowGap: vGutter || undefined,+ justifyContent: toCssAlign(justify),+ alignItems: toCssAlign(align),+ ...style,+ }}+ data-gutter={hGutter || undefined}+ {...props}+ >+ {React.Children.map(children, (child) =>+ React.isValidElement<ColProps>(child) && hGutter+ ? React.cloneElement(child, { __gutter: hGutter })+ : child,+ )}+ </div>+ );+});++/** antd `<Col span={1..24}>`, sharing antd's 24-column basis. */+const COL_BREAKPOINTS: ColBreakpoint[] = ["xs", "sm", "md", "lg", "xl", "xxl"];++const Col = React.forwardRef<HTMLDivElement, ColProps>(function Col(+ {+ span,+ offset,+ flex,+ __gutter,+ xs,+ sm,+ md,+ lg,+ xl,+ xxl,+ className,+ style,+ children,+ ...props+ },+ ref,+) {+ /*+ * antd picks the value for the LARGEST breakpoint the viewport satisfies,+ * falling back to `span`. Reproducing that faithfully would need a media+ * query per column; in practice every call-site here either passes `span`+ * alone or repeats the same value across breakpoints (`xs={24}`), so the+ * largest specified value is the effective one on a desktop viewport.+ */+ const responsive = { xs, sm, md, lg, xl, xxl };+ const widest = COL_BREAKPOINTS.reduce<number | undefined>(+ (acc, bp) => (responsive[bp] != null ? responsive[bp] : acc),+ undefined,+ );+ const effectiveSpan = widest ?? span;++ return (+ <div+ ref={ref}+ className={cn("ant-col", className)}+ style={{+ width:+ effectiveSpan != null ? `${(effectiveSpan / 24) * 100}%` : undefined,+ marginLeft: offset != null ? `${(offset / 24) * 100}%` : undefined,+ flex: flex ?? undefined,+ paddingLeft: __gutter ? __gutter / 2 : undefined,+ paddingRight: __gutter ? __gutter / 2 : undefined,+ ...style,+ }}+ {...props}+ >+ {children}+ </div>+ );+});++/**+ * antd `<Flex>`. This one genuinely is a thin styling wrapper — no per-child+ * divs, no CSS in this repo targeting `.ant-flex` — but it lives here so the+ * four layout components are imported from one place.+ */+const Flex = React.forwardRef<HTMLDivElement, FlexProps>(function Flex(+ { vertical, justify, align, gap, wrap, className, style, children, ...props },+ ref,+) {+ return (+ <div+ ref={ref}+ className={cn(+ "flex",+ vertical && "flex-col",+ wrap && "flex-wrap",+ className,+ )}+ style={{+ justifyContent: toCssAlign(justify),+ alignItems: toCssAlign(align),+ gap:+ typeof gap === "number"+ ? `${gap}px`+ : gap != null+ ? `${SIZE_PX[gap] ?? gap}px`+ : undefined,+ ...style,+ }}+ {...props}+ >+ {children}+ </div>+ );+});++export { Col, Flex, Row, Space };diff --git a/frontend/src/components/ui/shims/antd-leaves.test.jsx b/frontend/src/components/ui/shims/antd-leaves.test.jsxnew file mode 100644index 000000000..1cb021d8c--- /dev/null+++ b/frontend/src/components/ui/shims/antd-leaves.test.jsx@@ -0,0 +1,208 @@+import { fireEvent, render, screen } from "@testing-library/react";+import { describe, expect, it, vi } from "vitest";++import {+ Alert,+ Avatar,+ Divider,+ Empty,+ Progress,+ Spin,+ Tag,+} from "@/components/ui/shims/antd-leaves";++describe("antd-compatible leaf shims (P1-06)", () => {+ it("renders Tag content", () => {+ render(<Tag>beta</Tag>);+ expect(screen.getByText("beta")).toBeInTheDocument();+ });++ /*+ * antd's preset tags are TINTED — pale background, saturated text, mid-tone+ * border — not solid fills. Mapping them onto shadcn Badge variants rendered+ * `<Tag color="orange">` as white-on-brown, where the reference draws a pale+ * amber chip. Values below are read off antd's own stylesheet.+ */+ it("renders a preset colour as antd's tinted chip, not a solid fill", () => {+ const { container } = render(<Tag color="orange">Trial</Tag>);+ const { style } = container.firstChild;+ expect(style.backgroundColor).toBe("#fff7e6");+ expect(style.color).toBe("#d46b08");+ expect(style.borderColor).toBe("#ffd591");+ });++ it("tints the status aliases the same way", () => {+ const { container } = render(<Tag color="success">ok</Tag>);+ expect(container.firstChild.style.backgroundColor).toBe("#f6ffed");+ expect(container.firstChild.style.color).toBe("#389e0d");+ });++ it("tints red without the destructive fill", () => {+ const { container } = render(<Tag color="red">bad</Tag>);+ expect(container.firstChild.style.backgroundColor).toBe("#fff1f0");+ expect(container.firstChild.className).not.toContain("destructive");+ });++ // One call-site passes a raw rgb() that antd applied directly — it must not+ // be silently dropped just because it is not a known token.+ it("falls through to inline style for a raw CSS colour", () => {+ const { container } = render(<Tag color="rgb(45, 183, 245)">custom</Tag>);+ expect(container.firstChild.style.backgroundColor).toBe(+ "rgb(45, 183, 245)",+ );+ });++ it("renders a close affordance only when closable", () => {+ const onClose = vi.fn();+ render(+ <Tag closable onClose={onClose}>+ x+ </Tag>,+ );+ fireEvent.click(screen.getByRole("button", { name: "Close" }));+ expect(onClose).toHaveBeenCalled();+ });++ it("renders Spin as a status indicator", () => {+ render(<Spin />);+ expect(screen.getByRole("status")).toBeInTheDocument();+ });++ it("renders Spin's tip text when supplied", () => {+ render(<Spin tip="Loading data" />);+ expect(screen.getByText("Loading data")).toBeInTheDocument();+ });++ /*+ * The wrapper form used to drop its children outright, which blanked the+ * document list in FetchSpecificModal. Both spinning states are asserted:+ * the content must survive either way, since antd dims it rather than+ * unmounting it.+ */+ it("renders Spin's children in the wrapper form while spinning", () => {+ render(+ <Spin spinning={true}>+ <div>Wrapped content</div>+ </Spin>,+ );+ expect(screen.getByText("Wrapped content")).toBeInTheDocument();+ expect(screen.getByRole("status")).toBeInTheDocument();+ });++ it("drops the indicator but keeps the children once spinning is false", () => {+ render(+ <Spin spinning={false}>+ <div>Wrapped content</div>+ </Spin>,+ );+ expect(screen.getByText("Wrapped content")).toBeInTheDocument();+ expect(screen.queryByRole("status")).not.toBeInTheDocument();+ });++ it("keeps `spinning` off the DOM", () => {+ const { container } = render(+ <Spin spinning={false}>+ <div>Wrapped content</div>+ </Spin>,+ );+ expect(container.querySelector("[spinning]")).toBeNull();+ });++ it("sizes a Tag's icon down to the chip's text", () => {+ const { container } = render(+ <Tag icon={<svg data-testid="tag-icon" />}>Reviewer</Tag>,+ );+ expect(container.firstChild).toHaveClass("[&>svg]:size-3");+ });++ it("renders Alert message and description", () => {+ render(<Alert message="Heads up" description="More detail" />);+ expect(screen.getByText("Heads up")).toBeInTheDocument();+ expect(screen.getByText("More detail")).toBeInTheDocument();+ });++ it("uses the destructive variant for type=error", () => {+ const { container } = render(<Alert type="error" message="Bad" />);+ expect(container.firstChild.className).toContain("destructive");+ });++ /*+ * antd tints info alerts blue (colorInfoBg #e6f4ff / colorInfo #1677ff).+ * `info` had no branch at all, so the "Highlight Feature Availability"+ * notice fell through to the plain default variant and rendered as a+ * neutral grey box with none of the visual language of an info message.+ */+ it("gives an info Alert the blue info theme", () => {+ const { container } = render(+ <Alert type="info" showIcon message="Heads up" />,+ );+ const el =+ container.querySelector('[role="alert"]') ?? container.firstChild;+ expect(el.className).toContain("bg-info-bg");+ expect(el.className).toContain("border-info");+ });++ it("defaults to the info theme when no type is given, as antd does", () => {+ const { container } = render(<Alert message="Heads up" />);+ const el =+ container.querySelector('[role="alert"]') ?? container.firstChild;+ expect(el.className).toContain("bg-info-bg");+ });++ it("Alert dismisses itself when closable, and calls onClose", () => {+ const onClose = vi.fn();+ render(<Alert closable onClose={onClose} message="Dismiss me" />);+ fireEvent.click(screen.getByRole("button", { name: "Close" }));+ expect(onClose).toHaveBeenCalled();+ expect(screen.queryByText("Dismiss me")).not.toBeInTheDocument();+ });++ it("renders a horizontal Divider by default", () => {+ const { container } = render(<Divider />);+ expect(container.firstChild).toBeTruthy();+ });++ it("renders Divider label text when given children", () => {+ render(<Divider>OR</Divider>);+ expect(screen.getByText("OR")).toBeInTheDocument();+ });++ it("Empty shows a default description, and a custom one when given", () => {+ const { rerender } = render(<Empty />);+ expect(screen.getByText("No data")).toBeInTheDocument();+ rerender(<Empty description="Nothing here yet" />);+ expect(screen.getByText("Nothing here yet")).toBeInTheDocument();+ });++ it("Avatar renders a fallback when there is no src", () => {+ render(<Avatar>AB</Avatar>);+ expect(screen.getByText("AB")).toBeInTheDocument();+ });++ it("Avatar accepts a numeric size as explicit dimensions", () => {+ const { container } = render(<Avatar size={48}>Z</Avatar>);+ expect(container.firstChild.style.width).toBe("48px");+ });++ /*+ * antd's `.ant-avatar` is inline, and call-sites depend on it: Share access+ * passes `<><Avatar /><Typography.Text /></>` as one List.Item.Meta title+ * and expects avatar and email on the same line. The shadcn primitive is+ * `flex`, which stacked the email under the avatar.+ */+ it("Avatar lays out inline so it shares a line with adjacent text", () => {+ const { container } = render(<Avatar>Z</Avatar>);+ expect(container.firstChild.className).toContain("inline-flex");+ expect(container.firstChild.className).not.toMatch(/(^|\s)flex(\s|$)/);+ });++ it("Progress shows the rounded percentage", () => {+ render(<Progress percent={42.6} />);+ expect(screen.getByText("43%")).toBeInTheDocument();+ });++ it("Progress hides the readout when showInfo is false", () => {+ render(<Progress percent={50} showInfo={false} />);+ expect(screen.queryByText("50%")).not.toBeInTheDocument();+ });+});diff --git a/frontend/src/components/ui/shims/antd-leaves.tsx b/frontend/src/components/ui/shims/antd-leaves.tsxnew file mode 100644index 000000000..d8c702719--- /dev/null+++ b/frontend/src/components/ui/shims/antd-leaves.tsx@@ -0,0 +1,539 @@+import {+ CircleAlert,+ CircleCheck,+ Inbox,+ Info,+ TriangleAlert,+ X,+} from "lucide-react";+import * as React from "react";++import {+ AlertDescription,+ AlertTitle,+ Alert as ShadcnAlert,+} from "@/components/ui/alert";+import {+ AvatarFallback,+ AvatarImage,+ Avatar as ShadcnAvatar,+} from "@/components/ui/avatar";+import { Badge } from "@/components/ui/badge";+import { Progress as ShadcnProgress } from "@/components/ui/progress";+import { Separator } from "@/components/ui/separator";+import { Spinner } from "@/components/ui/spinner";+import { cn } from "@/lib/utils";++/**+ * antd-compatible leaf components (P1-06): Tag, Spin, Alert, Image, Divider,+ * Empty, Avatar, Progress.+ *+ * These are the "direct swap" tier per docs/shim-convention.md — the antd+ * originals carry no behaviour the shadcn primitives lack. They are gathered+ * here anyway so the call-sites convert by import rather than by rewriting+ * ~60 JSX blocks by hand, which keeps the diff mechanical and reviewable (C4).+ *+ * Notable: `Spin` has ZERO `spinning={...}` usages in this codebase, so no+ * overlay-mode wrapper is needed — every site is a bare indicator.+ */++/** antd Tag colour token → Badge variant / class. */+/**+ * The antd surface these leaf shims accept.+ *+ * Enumerated by hand rather than inferred, for the reason this whole layer+ * exists: an unrecognised prop falls into `...props` and disappears without a+ * warning. Naming each one makes the next omission a compile error at the+ * call-site.+ */+type TagColor =+ | "success"+ | "processing"+ | "error"+ | "warning"+ | "default"+ | "blue"+ | "green"+ | "red"+ | "orange"+ | "purple"+ | "cyan"+ | "magenta"+ | "gold"+ | "lime"+ | "geekblue"+ | "volcano";++type AlertType = "success" | "info" | "warning" | "error";++interface TagProps extends React.HTMLAttributes<HTMLDivElement> {+ /** A known token maps to a variant; anything else is used as a raw colour. */+ color?: TagColor | string;+ icon?: React.ReactNode;+ closable?: boolean;+ onClose?: (e: React.MouseEvent<HTMLButtonElement>) => void;+ bordered?: boolean;+}++interface SpinProps extends React.HTMLAttributes<HTMLElement> {+ size?: "small" | "default" | "large";+ /** Caption rendered beside the spinner. */+ tip?: React.ReactNode;+ /**+ * Wrapper form only. antd defaults it to `true`, so `<Spin>{children}</Spin>`+ * with no `spinning` shows the overlay.+ */+ spinning?: boolean;+}++interface AlertProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {+ message?: React.ReactNode;+ description?: React.ReactNode;+ type?: AlertType;+ showIcon?: boolean;+ closable?: boolean;+ onClose?: (e: React.MouseEvent<HTMLButtonElement>) => void;+ /** Full-width banner styling, as antd does. */+ banner?: boolean;+ action?: React.ReactNode;+}++interface ImageProps+ extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "width" | "height"> {+ width?: number | string;+ height?: number | string;+ /** antd opens a lightbox; accepted so call-sites keep compiling. */+ preview?: boolean;+ /** Shown when the image fails to load. */+ fallback?: string;+}++interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {+ type?: "horizontal" | "vertical";+}++interface EmptyProps extends React.HTMLAttributes<HTMLDivElement> {+ description?: React.ReactNode;+ image?: React.ReactNode;+}++interface AvatarProps+ extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {+ /** A token, or an explicit pixel size. */+ size?: "small" | "default" | "large" | number;+ shape?: "circle" | "square";+ src?: string;+ icon?: React.ReactNode;+ alt?: string;+ children?: React.ReactNode;+}++interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {+ percent?: number;+ status?: "success" | "exception" | "normal" | "active";+ showInfo?: boolean;+}++/*+ * antd's preset tag colours, read off the reference's own stylesheet.+ *+ * These were mapped onto shadcn Badge VARIANTS, which are solid fills — so+ * `<Tag color="orange">` rendered as white-on-brown where antd draws a pale+ * amber chip with saturated text. antd's presets are always tinted: a very+ * light background, a strong foreground, and a mid-tone border. Reproduce the+ * palette rather than approximating it with three variants.+ */+const TAG_PRESET: Record<string, { fg: string; bg: string; border: string }> = {+ red: { fg: "#cf1322", bg: "#fff1f0", border: "#ffa39e" },+ volcano: { fg: "#d4380d", bg: "#fff2e8", border: "#ffbb96" },+ orange: { fg: "#d46b08", bg: "#fff7e6", border: "#ffd591" },+ gold: { fg: "#d48806", bg: "#fffbe6", border: "#ffe58f" },+ lime: { fg: "#7cb305", bg: "#fcffe6", border: "#eaff8f" },+ green: { fg: "#389e0d", bg: "#f6ffed", border: "#b7eb8f" },+ cyan: { fg: "#08979c", bg: "#e6fffb", border: "#87e8de" },+ blue: { fg: "#0958d9", bg: "#e6f4ff", border: "#91caff" },+ geekblue: { fg: "#1d39c4", bg: "#f0f5ff", border: "#adc6ff" },+ purple: { fg: "#531dab", bg: "#f9f0ff", border: "#d3adf7" },+ magenta: { fg: "#c41d7f", bg: "#fff0f6", border: "#ffadd2" },+ // antd's status aliases resolve to the same chips.+ success: { fg: "#389e0d", bg: "#f6ffed", border: "#b7eb8f" },+ error: { fg: "#cf1322", bg: "#fff1f0", border: "#ffa39e" },+ warning: { fg: "#d46b08", bg: "#fff7e6", border: "#ffd591" },+ processing: { fg: "#0958d9", bg: "#e6f4ff", border: "#91caff" },+};++/** antd `<Tag>`. Custom colours (e.g. `rgb(...)`) fall through to inline style. */+const Tag = React.forwardRef<HTMLDivElement, TagProps>(function Tag(+ {+ color,+ icon,+ closable,+ onClose,+ bordered,+ className,+ style,+ children,+ ...props+ },+ ref,+) {+ const preset = color+ ? TAG_PRESET[color as keyof typeof TAG_PRESET]+ : undefined;+ // A raw CSS colour (e.g. `rgb(...)`) antd would have applied directly as a+ // solid fill; only presets get the tinted treatment.+ const custom = color && !preset ? color : undefined;++ return (+ <Badge+ ref={ref}+ variant="secondary"+ /*+ * `[&>svg]:size-3` sizes the `icon` prop. antd's icons were a font and+ * inherited the tag's font-size; lucide ships SVGs that carry+ * width/height 24, and index.css's inline-icon rule cannot reach them+ * because Badge is `inline-flex` (that rule deliberately skips flex+ * parents). Without this a `<Tag icon={…}>` renders a 24px glyph beside+ * 12px text — e.g. the HITL reviewer chip in FetchSpecificModal.+ */+ className={cn(+ "ant-tag gap-1 border font-normal [&>svg]:size-3",+ className,+ )}+ style={+ preset+ ? {+ backgroundColor: preset.bg,+ borderColor: preset.border,+ color: preset.fg,+ ...style,+ }+ : custom+ ? {+ backgroundColor: custom,+ borderColor: custom,+ color: "#fff",+ ...style,+ }+ : style+ }+ {...props}+ >+ {icon}+ {children}+ {closable ? (+ <button+ type="button"+ onClick={onClose}+ aria-label="Close"+ className="ml-0.5 cursor-pointer"+ >+ <X className="size-3" />+ </button>+ ) : null}+ </Badge>+ );+});++/**+ * antd `<Spin>`, in both of its forms.+ *+ * This shim used to handle only the bare indicator and said so in a comment.+ * That was wrong: three plugins use the WRAPPER form,+ * `<Spin spinning={loading}>{content}</Spin>`, and because the old body+ * destructured `{size, tip, className, ...props}` and then supplied its own+ * JSX children, `props.children` was silently discarded — the content it+ * wrapped never rendered at all. FetchSpecificModal showed a permanently+ * spinning dialog with no document list and no empty state; `spinning` also+ * leaked onto the DOM as an unknown attribute. Hence the explicit `children`+ * binding below, which is what makes the drop impossible to reintroduce.+ *+ * Class names follow antd's real structure: `ant-spin-nested-loading` on the+ * outer box and `ant-spin-container` on the child that gets blurred. The old+ * code put `ant-spin-container` on the bare indicator, which is neither+ * antd's meaning nor something any stylesheet relied on.+ */+const Spin = React.forwardRef<HTMLElement, SpinProps>(function Spin(+ { size, tip, spinning = true, className, children, ...props },+ ref,+) {+ const mapped = size === "large" ? "lg" : size === "small" ? "sm" : "default";+ const indicator = (+ <>+ <Spinner size={mapped} />+ {tip ? (+ <span className="text-sm text-muted-foreground">{tip}</span>+ ) : null}+ </>+ );++ if (children === undefined) {+ return (+ <span+ ref={ref as React.Ref<HTMLSpanElement>}+ className={cn("inline-flex items-center gap-2", className)}+ {...props}+ >+ {indicator}+ </span>+ );+ }++ return (+ <div+ ref={ref as React.Ref<HTMLDivElement>}+ className={cn("ant-spin-nested-loading relative", className)}+ {...props}+ >+ {spinning ? (+ <span className="absolute inset-0 z-10 flex items-center justify-center gap-2">+ {indicator}+ </span>+ ) : null}+ {/*+ * antd dims and freezes the wrapped content rather than unmounting it,+ * so scroll position and focus survive a reload. `aria-busy` is what+ * tells a screen reader the region is stale, since the spinner itself+ * carries no text.+ */}+ <div+ className={cn(+ "ant-spin-container",+ spinning && "pointer-events-none select-none opacity-50",+ )}+ aria-busy={spinning}+ >+ {children}+ </div>+ </div>+ );+});++const ALERT_ICON = {+ success: CircleCheck,+ info: Info,+ warning: TriangleAlert,+ error: CircleAlert,+};++/** antd `<Alert message description type showIcon closable banner />`. */+const Alert = React.forwardRef<HTMLDivElement, AlertProps>(function Alert(+ {+ message,+ description,+ type = "info",+ showIcon,+ closable,+ onClose,+ banner,+ action,+ className,+ ...props+ },+ ref,+) {+ const [open, setOpen] = React.useState(true);+ const Icon = ALERT_ICON[type] ?? Info;++ if (!open) {+ return null;+ }++ return (+ <ShadcnAlert+ ref={ref}+ variant={type === "error" ? "destructive" : "default"}+ className={cn(+ type === "success" && "border-success/40 text-success",+ type === "warning" && "border-warning/40 text-warning",+ /*+ * antd tints info alerts BLUE (colorInfoBg #e6f4ff, colorInfo+ * #1677ff). `info` had no branch at all, so it fell through to the+ * plain default variant and the "Highlight Feature Availability"+ * notice rendered as a neutral grey box with none of the visual+ * language of an info message.+ */+ type === "info" && "border-info/40 bg-info-bg [&>svg]:text-info",+ banner && "rounded-none border-x-0",+ className,+ )}+ {...props}+ >+ {showIcon ? <Icon className="size-4" /> : null}+ {message ? <AlertTitle>{message}</AlertTitle> : null}+ {description ? <AlertDescription>{description}</AlertDescription> : null}+ {action}+ {closable ? (+ <button+ type="button"+ aria-label="Close"+ className="absolute right-3 top-3 cursor-pointer"+ onClick={(e) => {+ setOpen(false);+ onClose?.(e);+ }}+ >+ <X className="size-4" />+ </button>+ ) : null}+ </ShadcnAlert>+ );+});++/** antd `<Image>`. `preview` is not reimplemented — no call-site enables it. */+const Image = React.forwardRef<HTMLImageElement, ImageProps>(function Image(+ {+ src,+ alt = "",+ width,+ height,+ preview,+ fallback,+ className,+ style,+ ...props+ },+ ref,+) {+ return (+ <img+ ref={ref}+ src={src}+ alt={alt}+ className={cn("max-w-full", className)}+ style={{ width, height, ...style }}+ {...props}+ />+ );+});++/** antd `<Divider type="vertical|horizontal">`. */+const Divider = React.forwardRef<HTMLDivElement, DividerProps>(function Divider(+ { type = "horizontal", className, children, ...props },+ ref,+) {+ if (children) {+ return (+ <div className={cn("flex items-center gap-2 py-2", className)} {...props}>+ <Separator className="flex-1" />+ <span className="text-sm text-muted-foreground">{children}</span>+ <Separator className="flex-1" />+ </div>+ );+ }+ return (+ <Separator+ ref={ref}+ orientation={type === "vertical" ? "vertical" : "horizontal"}+ className={cn(+ "ant-divider",+ type === "vertical" ? "mx-2 h-auto self-stretch" : "my-2",+ className,+ )}+ {...props}+ />+ );+});++/** antd `<Empty description image />`. */+const Empty = React.forwardRef<HTMLDivElement, EmptyProps>(function Empty(+ { description = "No data", image, className, children, ...props },+ ref,+) {+ return (+ <div+ ref={ref}+ className={cn(+ "flex flex-col items-center justify-center gap-2 py-8 text-muted-foreground",+ className,+ )}+ {...props}+ >+ {image ?? <Inbox className="size-10 opacity-60" />}+ {description ? <div className="text-sm">{description}</div> : null}+ {children}+ </div>+ );+});++const AVATAR_SIZE = { small: "size-6", default: "size-8", large: "size-10" };++/**+ * antd `<Avatar size shape src icon />`.+ *+ * `inline-flex align-middle`, not the primitive's `flex`. antd's `.ant-avatar`+ * is `display: inline-block`, so `<Avatar /> name` renders on ONE line and+ * call-sites rely on that: Share access and Co-owners both pass+ * `<><Avatar /><Typography.Text /></>` as a single `List.Item.Meta` title and+ * get an avatar stacked ABOVE the email with `flex`, because a block-level box+ * cannot share a line with the text beside it. Blockified inside a flex parent+ * anyway, so rows that already lay their children out are unaffected.+ */+const Avatar = React.forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(+ {+ size = "default",+ shape,+ src,+ icon,+ alt = "",+ className,+ children,+ ...props+ },+ ref,+) {+ const sizeClass =+ typeof size === "number"+ ? undefined+ : (AVATAR_SIZE[size] ?? AVATAR_SIZE.default);++ return (+ <ShadcnAvatar+ ref={ref}+ className={cn(+ "inline-flex align-middle",+ sizeClass,+ shape === "square" && "rounded-md",+ className,+ )}+ style={+ typeof size === "number" ? { width: size, height: size } : undefined+ }+ {...props}+ >+ {src ? <AvatarImage src={src} alt={alt} /> : null}+ <AvatarFallback>{icon ?? children}</AvatarFallback>+ </ShadcnAvatar>+ );+});++/** antd `<Progress percent status />`. */+const Progress = React.forwardRef<HTMLDivElement, ProgressProps>(+ function Progress(+ { percent = 0, status, showInfo = true, className, ...props },+ ref,+ ) {+ return (+ <div className={cn("flex items-center gap-2", className)}>+ <ShadcnProgress+ ref={ref}+ value={percent}+ className={cn(+ "flex-1",+ status === "exception" && "[&>div]:bg-destructive",+ status === "success" && "[&>div]:bg-success",+ )}+ {...props}+ />+ {showInfo ? (+ <span className="text-xs text-muted-foreground">+ {Math.round(percent)}%+ </span>+ ) : null}+ </div>+ );+ },+);++export { Alert, Avatar, Divider, Empty, Image, Progress, Spin, Tag };diff --git a/frontend/src/components/ui/shims/antd-overlays.scrolllock.test.jsx b/frontend/src/components/ui/shims/antd-overlays.scrolllock.test.jsxnew file mode 100644index 000000000..ad213af1d--- /dev/null+++ b/frontend/src/components/ui/shims/antd-overlays.scrolllock.test.jsx@@ -0,0 +1,84 @@+import { render, screen, waitFor } from "@testing-library/react";+import { afterEach, describe, expect, it } from "vitest";++import { Modal } from "@/components/ui/shims/antd-overlays";++/**+ * P2-02 / P0-12: `body { overflow: hidden }` vs Radix's scroll-lock.+ *+ * index.css sets `overflow: hidden` on body permanently (the app is a fixed+ * full-height shell). Radix ALSO sets `overflow: hidden` on body while a+ * dialog is open, and restores the previous value on close. The risk flagged+ * in P0-12 was that Radix could restore the wrong value — leaving body+ * scrollable after a dialog closes, which would break the app shell layout.+ *+ * These tests pin the invariant that actually matters: body overflow must be+ * hidden before, during, AND after a dialog's lifecycle.+ */++function bodyOverflow() {+ return (+ document.body.style.overflow ||+ getComputedStyle(document.body).overflow ||+ ""+ );+}++describe("dialog scroll-lock vs the app shell's body overflow (P2-02)", () => {+ afterEach(() => {+ document.body.style.overflow = "";+ });++ it("leaves body overflow hidden after a dialog opens and closes", async () => {+ // Reproduce the app shell: index.css pins body overflow hidden.+ document.body.style.overflow = "hidden";++ const { rerender } = render(<Modal open={false}>body content</Modal>);+ expect(bodyOverflow()).toBe("hidden");++ rerender(<Modal open>body content</Modal>);+ await waitFor(() =>+ expect(screen.getByText("body content")).toBeInTheDocument(),+ );+ // Radix locks scroll while open; the shell wanted it hidden anyway.+ expect(bodyOverflow()).toBe("hidden");++ rerender(<Modal open={false}>body content</Modal>);+ await waitFor(() =>+ expect(screen.queryByText("body content")).not.toBeInTheDocument(),+ );++ // The regression this guards: Radix restoring "" or "visible" here would+ // make the fixed app shell scrollable.+ expect(bodyOverflow()).toBe("hidden");+ });++ it("survives two open/close cycles without leaking overflow state", async () => {+ document.body.style.overflow = "hidden";+ const { rerender } = render(<Modal open={false}>cycle</Modal>);++ for (let i = 0; i < 2; i++) {+ rerender(<Modal open>cycle</Modal>);+ await waitFor(() => screen.getByText("cycle"));+ rerender(<Modal open={false}>cycle</Modal>);+ await waitFor(() =>+ expect(screen.queryByText("cycle")).not.toBeInTheDocument(),+ );+ expect(bodyOverflow()).toBe("hidden");+ }+ });++ it("restores the original value when the shell did NOT pin overflow", async () => {+ // Sanity check the other direction: on a page that never set overflow,+ // Radix must not leave it hidden after close.+ document.body.style.overflow = "";+ const { rerender } = render(<Modal open>free</Modal>);+ await waitFor(() => screen.getByText("free"));++ rerender(<Modal open={false}>free</Modal>);+ await waitFor(() =>+ expect(screen.queryByText("free")).not.toBeInTheDocument(),+ );+ expect(document.body.style.overflow).not.toBe("hidden");+ });+});diff --git a/frontend/src/components/ui/shims/antd-overlays.test.jsx b/frontend/src/components/ui/shims/antd-overlays.test.jsxnew file mode 100644index 000000000..f7e17252f--- /dev/null+++ b/frontend/src/components/ui/shims/antd-overlays.test.jsx@@ -0,0 +1,672 @@+import { fireEvent, render, screen } from "@testing-library/react";+import * as React from "react";+import { describe, expect, it, vi } from "vitest";++import { Switch as AntSwitch } from "@/components/ui/shims/antd-inputs";+import {+ Collapse,+ Dropdown,+ Modal,+ Popover,+ Tooltip,+} from "@/components/ui/shims/antd-overlays";++describe("antd-compatible overlay shims (P2)", () => {+ it("renders nothing when closed", () => {+ render(<Modal open={false}>body</Modal>);+ expect(screen.queryByText("body")).not.toBeInTheDocument();+ });++ it("renders the body and title when open", () => {+ render(+ <Modal open title="My title">+ body+ </Modal>,+ );+ expect(screen.getByText("body")).toBeInTheDocument();+ expect(screen.getByText("My title")).toBeInTheDocument();+ });++ it("accepts the legacy `visible` alias antd used before `open`", () => {+ render(<Modal visible>legacy</Modal>);+ expect(screen.getByText("legacy")).toBeInTheDocument();+ });++ // The default-footer behaviour is the easiest thing to lose in a naive swap:+ // antd renders OK/Cancel unless footer={null}.++ it("renders a default OK/Cancel footer like antd does", () => {+ render(<Modal open>body</Modal>);+ expect(screen.getByRole("button", { name: "OK" })).toBeInTheDocument();+ expect(screen.getByRole("button", { name: "Cancel" })).toBeInTheDocument();+ });++ it("suppresses the footer entirely for footer={null}", () => {+ render(+ <Modal open footer={null}>+ body+ </Modal>,+ );+ expect(+ screen.queryByRole("button", { name: "OK" }),+ ).not.toBeInTheDocument();+ });++ it("renders a custom footer when one is supplied", () => {+ render(+ <Modal open footer={<button type="button">Custom</button>}>+ body+ </Modal>,+ );+ expect(screen.getByRole("button", { name: "Custom" })).toBeInTheDocument();+ expect(+ screen.queryByRole("button", { name: "OK" }),+ ).not.toBeInTheDocument();+ });++ it("honours custom okText/cancelText", () => {+ render(+ <Modal open okText="Save" cancelText="Discard">+ body+ </Modal>,+ );+ expect(screen.getByRole("button", { name: "Save" })).toBeInTheDocument();+ expect(screen.getByRole("button", { name: "Discard" })).toBeInTheDocument();+ });++ it("fires onOk and onCancel from the default footer", () => {+ const onOk = vi.fn();+ const onCancel = vi.fn();+ render(+ <Modal open onOk={onOk} onCancel={onCancel}>+ body+ </Modal>,+ );+ screen.getByRole("button", { name: "OK" }).click();+ screen.getByRole("button", { name: "Cancel" }).click();+ expect(onOk).toHaveBeenCalled();+ expect(onCancel).toHaveBeenCalled();+ });++ it("disables the OK button while confirmLoading", () => {+ render(+ <Modal open confirmLoading>+ body+ </Modal>,+ );+ expect(screen.getByRole("button", { name: "OK" })).toBeDisabled();+ });++ it("unmounts the body for destroyOnClose when closed", () => {+ const { rerender } = render(+ <Modal open destroyOnClose>+ body+ </Modal>,+ );+ expect(screen.getByText("body")).toBeInTheDocument();+ rerender(+ <Modal open={false} destroyOnClose>+ body+ </Modal>,+ );+ expect(screen.queryByText("body")).not.toBeInTheDocument();+ });++ it("passes the trigger through untouched when a Tooltip has no title", () => {+ render(+ <Tooltip title="">+ <button type="button">plain</button>+ </Tooltip>,+ );+ expect(screen.getByRole("button", { name: "plain" })).toBeInTheDocument();+ });++ it("still renders its child when a Tooltip does have a title", () => {+ render(+ <Tooltip title="hint">+ <button type="button">hoverable</button>+ </Tooltip>,+ );+ expect(+ screen.getByRole("button", { name: "hoverable" }),+ ).toBeInTheDocument();+ });++ /*+ * A Tooltip is routinely the child of another `asChild` primitive — the+ * sidebar nests it inside a hover Popover. Radix identifies its trigger by+ * the REF it passes down, so a Tooltip that forwards handlers but drops the+ * ref leaves the parent with no anchor to measure. The Platform fly-out did+ * open, correctly populated, at y=-616: entirely above the viewport.+ */+ /*+ * `cloneElement` merges by key, so forwarding `onClick: undefined` from a+ * parent that passes no handler OVERWRITES the child's own. That is how+ * every sidebar item stopped navigating: each is a `<Space onClick>` inside+ * a titleless Tooltip, and the click silently did nothing.+ */+ it("does not clobber the child's own handlers with undefined", async () => {+ const onClick = vi.fn();+ render(+ <Tooltip title="">+ <button type="button" onClick={onClick}>+ go+ </button>+ </Tooltip>,+ );+ fireEvent.click(screen.getByRole("button", { name: "go" }));+ expect(onClick).toHaveBeenCalledTimes(1);+ });++ it("keeps the child's handlers working when a title is present", () => {+ const onClick = vi.fn();+ render(+ <Tooltip title="hint">+ <button type="button" onClick={onClick}>+ go+ </button>+ </Tooltip>,+ );+ fireEvent.click(screen.getByRole("button", { name: "go" }));+ expect(onClick).toHaveBeenCalledTimes(1);+ });++ /*+ * A parent Radix primitive sets `data-state` to its OWN open/closed state.+ * Spreading that onto the child overwrote whatever the child used it for:+ * the API Deployments toggle is a Switch inside a Tooltip, and it kept+ * `aria-checked="true"` while its `data-state` became "closed" — so an+ * enabled deployment rendered as an empty grey pill.+ */+ it("does not overwrite the child's own data-state", () => {+ render(+ <Tooltip title="" data-state="closed">+ <button+ type="button"+ role="switch"+ aria-checked="true"+ data-state="checked"+ >+ toggle+ </button>+ </Tooltip>,+ );+ expect(screen.getByRole("switch")).toHaveAttribute("data-state", "checked");+ });++ /*+ * With a TITLE, Radix's own TooltipTrigger merges its `data-state` (the+ * tooltip's open state) onto the `asChild` child — the shim cannot strip+ * that. A Switch styled off `data-state` therefore rendered ENABLED+ * deployments as an empty grey pill. The Switch keys off `aria-checked`+ * instead, which survives the merge; this guards that it still does.+ */+ it("leaves a Switch child visibly checked inside a titled Tooltip", () => {+ render(+ <Tooltip title="Disable API deployment">+ <AntSwitch checked onChange={() => {}} />+ </Tooltip>,+ );+ const sw = screen.getByRole("switch");+ expect(sw).toHaveAttribute("aria-checked", "true");+ expect(sw.className).toContain("aria-checked:bg-primary");+ // The thumb is inside the trigger, so its own state is untouched.+ expect(sw.firstElementChild).toHaveAttribute("data-state", "checked");+ });++ it("forwards a parent primitive's ref to the trigger element", () => {+ const ref = React.createRef();+ render(+ <Tooltip title="" ref={ref}>+ <button type="button">anchored</button>+ </Tooltip>,+ );+ expect(ref.current).toBe(screen.getByRole("button", { name: "anchored" }));+ });++ it("forwards the ref to the trigger even when a title is present", () => {+ const ref = React.createRef();+ render(+ <Tooltip title="hint" ref={ref}>+ <button type="button">anchored</button>+ </Tooltip>,+ );+ // The bubble is NOT the anchor: the parent must measure the trigger.+ expect(ref.current).toBe(screen.getByRole("button", { name: "anchored" }));+ });++ it("opens a hover Popover nested behind a Tooltip", async () => {+ render(+ <Popover content={<div>fly-out</div>} trigger="hover">+ <Tooltip title="">+ <button type="button">Platform</button>+ </Tooltip>+ </Popover>,+ );+ const trigger = screen.getByRole("button", { name: "Platform" });+ expect(trigger).toHaveAttribute("aria-haspopup");++ // The hover handlers have to survive the Tooltip in between.+ fireEvent.mouseEnter(trigger);+ expect(await screen.findByText("fly-out")).toBeInTheDocument();+ });++ // Regression: `centered` used to add a duplicate centring utility, which+ // tailwind-merge resolved by dropping the base translate — leaving the+ // dialog at transform:none, pinned to the top with its header clipped.+ it("keeps the base centring transform when centered is passed", () => {+ render(+ <Modal open centered title="Centred">+ body+ </Modal>,+ );+ const dlg = document.querySelector("[role='dialog']");+ expect(dlg).toBeTruthy();+ const cls = dlg.className;+ // The base transform must survive.+ expect(cls).toContain("translate-y-[-50%]");+ expect(cls).toContain("translate-x-[-50%]");+ // And the conflicting spelling must not be present.+ expect(cls).not.toContain("-translate-y-1/2");+ });++ it("does not leak `centered` onto the DOM", () => {+ render(+ <Modal open centered>+ body+ </Modal>,+ );+ const dlg = document.querySelector("[role='dialog']");+ expect(dlg.getAttribute("centered")).toBeNull();+ });++ // Regression: the adapter settings form rendered 1109px tall in an 800px+ // viewport, pushing the dialog to y=-194 with Submit unreachable. antd caps+ // .ant-modal-body; without that element the app's existing CSS matched+ // nothing.+ it("wraps content in a scrollable .ant-modal-body", () => {+ render(+ <Modal open title="Tall">+ <div>form fields</div>+ </Modal>,+ );+ const body = document.querySelector(".ant-modal-body");+ expect(body).toBeTruthy();+ expect(body.className).toContain("overflow-y-auto");+ expect(body.className).toContain("max-h-[70vh]");+ expect(body.textContent).toContain("form fields");+ });++ // Regression: ConfirmModal (12 consumers — delete buttons across prompt+ // studio, workflows, top nav) calls Modal.useModal() on every click. It was+ // undefined, so each of those screens threw a TypeError when clicked.+ it("Modal.useModal returns [api, contextHolder] like antd", () => {+ function Harness() {+ const [api, holder] = Modal.useModal();+ return (+ <>+ <button+ type="button"+ onClick={() =>+ api.confirm({ title: "Delete this?", onOk: () => undefined })+ }+ >+ open+ </button>+ {holder}+ </>+ );+ }+ render(<Harness />);+ expect(screen.getByRole("button", { name: "open" })).toBeInTheDocument();+ fireEvent.click(screen.getByRole("button", { name: "open" }));+ expect(screen.getByText("Delete this?")).toBeInTheDocument();+ });++ it("Modal.useModal fires onOk when confirmed", () => {+ const onOk = vi.fn();+ function Harness() {+ const [api, holder] = Modal.useModal();+ return (+ <>+ <button+ type="button"+ onClick={() => api.confirm({ title: "Sure?", okText: "Yes", onOk })}+ >+ open+ </button>+ {holder}+ </>+ );+ }+ render(<Harness />);+ fireEvent.click(screen.getByRole("button", { name: "open" }));+ fireEvent.click(screen.getByRole("button", { name: "Yes" }));+ expect(onOk).toHaveBeenCalled();+ });++ // Dropdown.Button is a SPLIT button. ReviewHeader renders+ // <Dropdown.Button>Download File</Dropdown.Button>, and clicking the label+ // must download rather than open the menu — that separation is the entire+ // reason antd ships a distinct component from <Dropdown>.+ describe("Dropdown.Button (split button)", () => {+ it("fires onClick from the main half without opening the menu", () => {+ const onClick = vi.fn();+ const onMenuClick = vi.fn();+ render(+ <Dropdown.Button+ onClick={onClick}+ menu={{+ items: [{ key: "csv", label: "As CSV" }],+ onClick: onMenuClick,+ }}+ >+ Download File+ </Dropdown.Button>,+ );++ fireEvent.click(screen.getByRole("button", { name: "Download File" }));+ expect(onClick).toHaveBeenCalledTimes(1);+ expect(screen.queryByText("As CSV")).not.toBeInTheDocument();+ expect(onMenuClick).not.toHaveBeenCalled();+ });++ it("opens the menu from the chevron half", async () => {+ render(+ <Dropdown.Button menu={{ items: [{ key: "csv", label: "As CSV" }] }}>+ Download File+ </Dropdown.Button>,+ );++ const chevron = screen.getByRole("button", { name: "More actions" });+ expect(chevron).toHaveAttribute("aria-haspopup", "menu");+ // Radix opens menus on pointerdown, not click.+ fireEvent.pointerDown(+ chevron,+ new PointerEvent("pointerdown", { bubbles: true, button: 0 }),+ );+ expect(await screen.findByText("As CSV")).toBeInTheDocument();+ });++ it("disables both halves together", () => {+ render(+ <Dropdown.Button disabled menu={{ items: [] }}>+ Download File+ </Dropdown.Button>,+ );+ expect(+ screen.getByRole("button", { name: "Download File" }),+ ).toBeDisabled();+ expect(+ screen.getByRole("button", { name: "More actions" }),+ ).toBeDisabled();+ });+ });++ /*+ * Radix's menu owns the keyboard: printable keys reaching the content run its+ * typeahead, which pulls focus onto the matching item, and Enter/Space on an+ * item activate it. antd's Menu did neither, so antd call-sites put form+ * fields straight into a menu entry — Prompt Studio's kebab holds the+ * postprocessing webhook URL input. Under Radix, typing in it threw focus out+ * of the field mid-word and dropped the characters that followed.+ *+ * These assert PROPAGATION rather than the resulting focus. Radix's typeahead+ * and Enter-to-activate are what the keystroke reaching the menu turns into,+ * and neither runs faithfully under jsdom — a focus assertion would pass+ * against the unfixed shim too, for want of any typeahead to steal it.+ */+ describe("Dropdown with a field inside a menu item", () => {+ // The menu content is portalled, but a portal still propagates events along+ // the REACT tree, so this spy sees whatever escapes the menu entry.+ const renderMenu = (label) => {+ const onKeyDown = vi.fn();+ render(+ <div onKeyDown={onKeyDown}>+ <Dropdown+ menu={{+ items: [+ { key: "enable", label: "Enabled" },+ { key: "field", label },+ { key: "delete", label: "Delete" },+ ],+ }}+ >+ <button type="button">Open</button>+ </Dropdown>+ </div>,+ );+ fireEvent.pointerDown(screen.getByRole("button", { name: "Open" }), {+ button: 0,+ ctrlKey: false,+ pointerType: "mouse",+ });+ return onKeyDown;+ };++ it("keeps a printable key typed in a field out of the menu", () => {+ const onKeyDown = renderMenu(<input aria-label="Webhook URL" />);++ // "d" is the first letter of "Delete": typeahead would jump to it.+ fireEvent.keyDown(screen.getByLabelText("Webhook URL"), { key: "d" });++ expect(onKeyDown).not.toHaveBeenCalled();+ });++ it("keeps Enter typed in a field out of the menu", () => {+ const onKeyDown = renderMenu(<input aria-label="Webhook URL" />);++ fireEvent.keyDown(screen.getByLabelText("Webhook URL"), { key: "Enter" });++ expect(onKeyDown).not.toHaveBeenCalled();+ });++ it("still lets Escape through, so the menu can dismiss", () => {+ const onKeyDown = renderMenu(<input aria-label="Webhook URL" />);++ fireEvent.keyDown(screen.getByLabelText("Webhook URL"), {+ key: "Escape",+ });++ expect(onKeyDown).toHaveBeenCalled();+ });++ // Scoped to text entry. A checkbox is not a place you type, and Space+ // activates it exactly as it activates a menu entry, so the menu's own+ // keyboard handling is left in place there.+ it("leaves the menu's keyboard handling alone for a checkbox", () => {+ const onKeyDown = renderMenu(+ <input type="checkbox" aria-label="Required" />,+ );++ fireEvent.keyDown(screen.getByLabelText("Required"), { key: "d" });++ expect(onKeyDown).toHaveBeenCalled();+ });+ });++ /*+ * `activeKey` is antd's CONTROLLED open state, and it is the ONLY way any+ * call-site in this app opens a Collapse — the prompt card, the notes card+ * and the LLM-profile form all render their own chevron in a header row+ * above the panel and feed the result back in as `activeKey`. The shim+ * originally read only `defaultActiveKey`, so `activeKey` fell through to+ * `...props`, landed on the DOM as an unknown attribute, and every panel+ * stayed shut: each prompt card showed its title bar and nothing else — no+ * prompt text, no coverage, no LLM profile, no output.+ *+ * These assert VISIBILITY rather than mere rendering. A smoke test that only+ * checked the tree rendered would have passed against the broken shim.+ */+ describe("Collapse activeKey (antd parity)", () => {+ it("shows the panel body when activeKey names the panel", () => {+ render(+ <Collapse activeKey={"1"}>+ <Collapse.Panel key="1" showArrow={false}>+ card body+ </Collapse.Panel>+ </Collapse>,+ );+ expect(screen.getByText("card body")).toBeVisible();+ });++ // Call-sites write `activeKey={expandCard && "1"}`, so a closed card hands+ // the shim `false` — which must read as "closed", not as a key.+ it("hides the body when activeKey is false", () => {+ render(+ <Collapse activeKey={false}>+ <Collapse.Panel key="1" showArrow={false}>+ card body+ </Collapse.Panel>+ </Collapse>,+ );+ expect(screen.queryByText("card body")).not.toBeInTheDocument();+ });++ it("follows activeKey when the parent toggles it", () => {+ const { rerender } = render(+ <Collapse activeKey={false}>+ <Collapse.Panel key="1" showArrow={false}>+ card body+ </Collapse.Panel>+ </Collapse>,+ );+ expect(screen.queryByText("card body")).not.toBeInTheDocument();++ rerender(+ <Collapse activeKey={"1"}>+ <Collapse.Panel key="1" showArrow={false}>+ card body+ </Collapse.Panel>+ </Collapse>,+ );+ expect(screen.getByText("card body")).toBeVisible();+ });++ it("opens an `items` panel from activeKey too", () => {+ render(+ <Collapse+ activeKey={"1"}+ items={[{ key: "1", label: "Advanced", children: "settings body" }]}+ />,+ );+ expect(screen.getByText("settings body")).toBeVisible();+ });++ // AddLlmProfile drives its panel from onChange; without it the header is dead.+ it("reports toggles through onChange", () => {+ const onChange = vi.fn();+ render(+ <Collapse+ activeKey={false}+ onChange={onChange}+ items={[{ key: "1", label: "Advanced", children: "settings body" }]}+ />,+ );+ fireEvent.click(screen.getByText("Advanced"));+ expect(onChange).toHaveBeenCalledWith(["1"]);+ });++ it("renders the caller's expandIcon with the active state", () => {+ render(+ <Collapse+ activeKey={"1"}+ expandIcon={({ isActive }) => (+ <span>{isActive ? "open" : "shut"}</span>+ )}+ items={[{ key: "1", label: "Advanced", children: "settings body" }]}+ />,+ );+ expect(screen.getByText("open")).toBeInTheDocument();+ });++ /*+ * NotesCard omits showArrow, so it keeps antd's `true` default while+ * still passing no header. It draws its own title row above the panel,+ * so a bar here would be an empty clickable strip in between.+ */+ it("renders no header bar for a headerless panel that kept showArrow", () => {+ const { container } = render(+ <Collapse activeKey={"1"}>+ <Collapse.Panel key="1">note body</Collapse.Panel>+ </Collapse>,+ );+ expect(screen.getByText("note body")).toBeVisible();+ expect(container.querySelector(".ant-collapse-header")).toBeNull();+ });++ // A panel with no header and no arrow must not grow a stray empty bar.+ it("renders no header bar for a headerless, arrowless panel", () => {+ const { container } = render(+ <Collapse activeKey={"1"}>+ <Collapse.Panel key="1" showArrow={false}>+ card body+ </Collapse.Panel>+ </Collapse>,+ );+ expect(container.querySelector(".ant-collapse-header")).toBeNull();+ });++ // ghost/size are antd styling props; they must not reach the DOM.+ it("keeps antd-only styling props off the DOM", () => {+ const { container } = render(+ <Collapse ghost size="small" activeKey={"1"}>+ <Collapse.Panel key="1" showArrow={false}>+ card body+ </Collapse.Panel>+ </Collapse>,+ );+ const root = container.firstElementChild;+ expect(root.getAttribute("ghost")).toBeNull();+ expect(root.getAttribute("activeKey")).toBeNull();+ });++ it("still honours uncontrolled defaultActiveKey", () => {+ render(+ <Collapse defaultActiveKey={["1"]}>+ <Collapse.Panel key="1" showArrow={false}>+ card body+ </Collapse.Panel>+ </Collapse>,+ );+ expect(screen.getByText("card body")).toBeVisible();+ });+ });+});++/*+ * antd's Tooltip delays are seconds; Radix's are milliseconds, and Radix has+ * no close-delay prop at all. Neither was declared, so both rode along in+ * `rest` onto the TRIGGER — `rest` is deliberately forwarded there so Radix's+ * own aria/data attributes reach the anchored element, which meant these two+ * reached the DOM with it and React warned on every render.+ */+describe("Tooltip antd delay props", () => {+ it("does not leak mouseEnterDelay or mouseLeaveDelay onto the trigger", () => {+ render(+ <Tooltip title="hi" mouseEnterDelay={0.3} mouseLeaveDelay={0.2}>+ <button type="button">trigger</button>+ </Tooltip>,+ );+ const trigger = screen.getByRole("button", { name: "trigger" });+ expect(trigger.getAttribute("mouseEnterDelay")).toBeNull();+ expect(trigger.getAttribute("mouseenterdelay")).toBeNull();+ expect(trigger.getAttribute("mouseLeaveDelay")).toBeNull();+ expect(trigger.getAttribute("mouseleavedelay")).toBeNull();+ });++ /*+ * Only asserts the tooltip still works with the prop present. The delay+ * itself is Radix's to honour once `delayDuration` is handed over, and+ * asserting on wall-clock timing here would buy a flaky test.+ */+ it("still opens when a delay is supplied", async () => {+ render(+ <Tooltip title="delayed tip" mouseEnterDelay={0}>+ <button type="button">trigger</button>+ </Tooltip>,+ );+ fireEvent.focus(screen.getByRole("button", { name: "trigger" }));+ expect(await screen.findAllByText("delayed tip")).not.toHaveLength(0);+ });+});diff --git a/frontend/src/components/ui/shims/antd-overlays.tsx b/frontend/src/components/ui/shims/antd-overlays.tsxnew file mode 100644index 000000000..31bacaca5--- /dev/null+++ b/frontend/src/components/ui/shims/antd-overlays.tsx@@ -0,0 +1,1325 @@+import { ChevronDown } from "lucide-react";+import * as React from "react";+import ReactDOM from "react-dom/client";++import {+ AlertDialog,+ AlertDialogAction,+ AlertDialogCancel,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogTitle,+ AlertDialogTrigger,+} from "@/components/ui/alert-dialog";+import {+ Collapsible,+ CollapsibleContent,+ CollapsibleTrigger,+} from "@/components/ui/collapsible";+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogFooter,+ DialogHeader,+ DialogTitle,+} from "@/components/ui/dialog";+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuSeparator,+ DropdownMenuTrigger,+} from "@/components/ui/dropdown-menu";+import {+ Popover,+ PopoverContent,+ PopoverTrigger,+} from "@/components/ui/popover";+import { Button } from "@/components/ui/shims/antd-button";+import {+ Tooltip as ShadcnTooltip,+ TooltipContent,+ TooltipProvider,+ TooltipTrigger,+} from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";++/**+ * antd-compatible overlay components (P2-02..P2-05): Modal, Tooltip, Dropdown,+ * Popconfirm, Popover, Collapse.+ *+ * Shim tier per docs/shim-convention.md — these carry behaviour Radix does not+ * express the same way:+ * - Modal: `open`/`visible` twin props, `footer={null}` to suppress the+ * default OK/Cancel pair, `destroyOnClose` remount semantics, `width`,+ * `centered`, `maskClosable`.+ * - Dropdown: antd takes a `menu={{ items }}` data structure; Radix wants+ * composed children.+ * - Popconfirm: an inline confirm bubble, routed onto AlertDialog so its+ * behaviour matches useConfirm().+ */++/* ------------------------------------------------------------------ Modal */++/**+ * antd `<Modal>`. `open` and the legacy `visible` alias both work.+ *+ * antd renders an OK/Cancel footer unless `footer={null}`; that default is+ * reproduced here so call-sites relying on it keep their buttons.+ */+/**+ * The antd overlay surface these shims accept.+ *+ * Enumerated by hand for the reason this layer exists: an unrecognised prop+ * falls into `...props` and vanishes without a warning. Two of the props below+ * are here precisely because that happened — `open`/`visible` on the Popover+ * (Radix reads a bare `open` as fully controlled, so Esc and outside-click+ * could not close it) and the antd-only `trigger`/`arrow`, which leaked onto+ * the DOM and drew React warnings.+ */+type Placement =+ | "top"+ | "topLeft"+ | "topRight"+ | "bottom"+ | "bottomLeft"+ | "bottomRight"+ | "left"+ | "leftTop"+ | "leftBottom"+ | "right"+ | "rightTop"+ | "rightBottom";++/** antd's menu descriptor, as the call-sites here use it. */+/** antd's menu click payload: the key, plus the originating DOM event. */+interface MenuClickInfo {+ key?: string;+ domEvent?: React.MouseEvent<HTMLElement>;+}++interface MenuItem {+ key?: string;+ label?: React.ReactNode;+ icon?: React.ReactNode;+ danger?: boolean;+ disabled?: boolean;+ /** antd renders a separator for this instead of an item. */+ type?: "divider" | "group" | "item";+ onClick?: (e: React.MouseEvent<HTMLElement>) => void;+ /**+ * Overrides the id derived from the parent's `data-testid` (see Dropdown).+ * Worth setting when `key` is a uuid, which makes an unreadable locator.+ */+ "data-testid"?: string;+}++interface MenuProp {+ items?: MenuItem[];+ onClick?: (info: MenuClickInfo) => void;+}++interface ModalProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "onClick"> {+ open?: boolean;+ /** antd's pre-v5 name for `open`; both are still in use here. */+ visible?: boolean;+ title?: React.ReactNode;+ onCancel?: () => void;+ onOk?: () => void;+ /** `null` removes the button row entirely, as antd does. */+ footer?: React.ReactNode;+ okText?: React.ReactNode;+ cancelText?: React.ReactNode;+ okButtonProps?: Record<string, unknown>;+ cancelButtonProps?: Record<string, unknown>;+ confirmLoading?: boolean;+ width?: number | string;+ centered?: boolean;+ maskClosable?: boolean;+ closable?: boolean;+ /** Remounts the body on reopen, which the Form shim relies on to re-seed. */+ destroyOnClose?: boolean;+ /**+ * Declared explicitly: React's `HTMLAttributes` does not carry `data-*` at+ * all — JSX lets them through on intrinsic elements only — so destructuring+ * one out of these props is a type error without this line.+ */+ "data-testid"?: string;+}++interface TooltipProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {+ title?: React.ReactNode;+ placement?: Placement;+ /**+ * antd's open delay, in SECONDS. Radix takes milliseconds, so it is scaled+ * below. Undeclared, it fell into `rest`, rode along to the trigger and+ * landed on the DOM — React warned about an unrecognised `mouseEnterDelay`+ * prop on every render of the agentic document-status list.+ */+ mouseEnterDelay?: number;+ /**+ * antd's close delay, also in seconds. Consumed but NOT honoured: Radix's+ * Tooltip has no close-delay prop (only `disableHoverableContent`, which is+ * a different behaviour). Declared so it cannot reach the DOM the way+ * `mouseEnterDelay` did.+ */+ mouseLeaveDelay?: number;+}++interface DropdownProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "onClick"> {+ menu?: MenuProp;+ /** antd's pre-v5 API: a rendered menu element instead of a descriptor. */+ overlay?: React.ReactNode;+ trigger?: string[];+ placement?: Placement;+ disabled?: boolean;+ /**+ * Declared explicitly: React's `HTMLAttributes` does not carry `data-*` at+ * all — JSX lets them through on intrinsic elements only — so destructuring+ * one out of these props is a type error without this line.+ */+ "data-testid"?: string;+}++interface DropdownButtonProps extends DropdownProps {+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;+ icon?: React.ReactNode;+}++interface PopconfirmProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "onCancel"> {+ title?: React.ReactNode;+ description?: React.ReactNode;+ onConfirm?: () => void;+ onCancel?: () => void;+ okText?: React.ReactNode;+ cancelText?: React.ReactNode;+ okType?: "primary" | "danger" | "default";+ disabled?: boolean;+ /**+ * Declared explicitly: React's `HTMLAttributes` does not carry `data-*` at+ * all — JSX lets them through on intrinsic elements only — so destructuring+ * one out of these props is a type error without this line.+ */+ "data-testid"?: string;+}++interface PopoverProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "content"> {+ content?: React.ReactNode;+ title?: React.ReactNode;+ placement?: Placement;+ open?: boolean;+ /** antd's pre-v5 name for `open`. */+ visible?: boolean;+ onOpenChange?: (open: boolean) => void;+ /** antd's pre-v5 name for `onOpenChange`. */+ onVisibleChange?: (open: boolean) => void;+ /*+ * antd-only, consumed here rather than forwarded: Radix has no equivalent,+ * and letting them reach the DOM produced unknown-attribute warnings.+ */+ arrow?: boolean;+ overlayClassName?: string;+ overlayStyle?: React.CSSProperties;+ getPopupContainer?: (node: HTMLElement) => HTMLElement;+ destroyTooltipOnHide?: boolean;+ trigger?: string | string[];+ /**+ * Declared explicitly: React's `HTMLAttributes` does not carry `data-*` at+ * all — JSX lets them through on intrinsic elements only — so destructuring+ * one out of these props is a type error without this line.+ */+ "data-testid"?: string;+}++interface CollapseItem {+ key: string;+ label?: React.ReactNode;+ children?: React.ReactNode;+}++/*+ * antd accepts a key, a list of keys, or nothing. Call-sites additionally+ * pass a boolean via `activeKey={someFlag && "1"}`, which evaluates to+ * `false` when the flag is off.+ */+type CollapseKey = string | string[] | boolean | undefined;++/*+ * `React.Children.toArray` REWRITES keys, turning `<Collapse.Panel key="1">`+ * into ".$1" — so comparing a call-site's `activeKey="1"` against the child's+ * key never matches and the panel silently stays shut. Strip the prefix back+ * off before comparing.+ */+function normalizeKey(key: React.Key | null | undefined): string {+ return String(key ?? "").replace(/^\.\$/, "");+}++/** True when `key` is listed as open by an antd activeKey/defaultActiveKey. */+function isKeyOpen(active: CollapseKey, key: React.Key | null): boolean {+ if (active === undefined || active === false || active === true) {+ // `true` is not a key either — antd would match nothing.+ return false;+ }+ const target = normalizeKey(key);+ return Array.isArray(active)+ ? active.some((k) => String(k) === target)+ : String(active) === target;+}++interface CollapseProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {+ items?: CollapseItem[];+ defaultActiveKey?: CollapseKey;+ /*+ * antd's CONTROLLED open state. All three call-sites use it, and several+ * write `activeKey={expandCard && "1"}`, so `false` reaches us meaning+ * "closed" — hence the `boolean` in CollapseKey rather than a bare string.+ */+ activeKey?: CollapseKey;+ onChange?: (key: string[]) => void;+ /** antd renders the caret itself; call-sites pass a render function. */+ expandIcon?: (panel: { isActive: boolean }) => React.ReactNode;+ /** Borderless variant — consumed so it cannot land on the DOM. */+ ghost?: boolean;+ size?: "small" | "middle" | "large";+ accordion?: boolean;+ bordered?: boolean;+}++/** antd's `Modal.confirm({...})` / `Modal.useModal()` config. */+interface ConfirmConfig {+ title?: React.ReactNode;+ content?: React.ReactNode;+ okText?: React.ReactNode;+ cancelText?: React.ReactNode;+ okType?: "primary" | "danger" | "default";+ onOk?: () => void | Promise<unknown>;+ onCancel?: () => void;+ centered?: boolean;+ width?: number | string;+}++const ModalBase = React.forwardRef<HTMLDivElement, ModalProps>(function Modal(+ {+ open,+ visible,+ title,+ onCancel,+ onOk,+ footer,+ okText = "OK",+ cancelText = "Cancel",+ okButtonProps,+ cancelButtonProps,+ confirmLoading,+ width,+ // consumed so it cannot land on the DOM; see the note below+ centered,+ maskClosable = true,+ closable = true,+ destroyOnClose,+ className,+ style,+ children,+ "data-testid": testId,+ ...props+ },+ ref,+) {+ const isOpen = open ?? visible ?? false;++ // antd unmounts the body on close when destroyOnClose is set; Radix keeps+ // it mounted. Returning null reproduces the remount.+ if (destroyOnClose && !isOpen) {+ return null;+ }++ return (+ <Dialog+ open={isOpen}+ onOpenChange={(next) => {+ if (!next) {+ onCancel?.();+ }+ }}+ >+ <DialogContent+ ref={ref}+ className={cn(+ // .ant-modal-content is targeted by existing CSS (padding, height).+ "ant-modal-content",+ // NOTE: no `centered` handling here. shadcn's DialogContent is+ // ALREADY centred (`top-[50%] translate-y-[-50%]`), and adding an+ // equivalent-but-differently-spelled utility makes tailwind-merge+ // treat the two as conflicting — it drops one, leaving the dialog+ // with `transform: none` pinned to the top of the viewport with its+ // header clipped. antd's `centered` is therefore a no-op for us.+ // This shadcn DialogContent always renders its close button, so+ // antd's `closable={false}` is honoured by hiding it rather than by+ // a prop.+ !closable && "[&>button[type='button']:last-of-type]:hidden",+ className,+ )}+ /*+ * antd's `width` is an exact width, not a ceiling. Setting only+ * `maxWidth` left shadcn's `w-full max-w-lg` in charge: the dialog+ * stretched to whatever space it had (570px for a `width={600}`+ * modal) and drifted off-centre, because the centring transform is+ * computed against a width the modal never actually took. Pinning+ * both makes the rendered box match the number the call-site asked+ * for, and the translate then centres it exactly.+ */+ style={+ width != null+ ? {+ width,+ maxWidth: `min(${typeof width === "number" ? `${width}px` : width}, calc(100vw - 2rem))`,+ ...style,+ }+ : style+ }+ onPointerDownOutside={(e) => {+ if (!maskClosable) {+ e.preventDefault();+ }+ }}+ onEscapeKeyDown={(e) => {+ if (!maskClosable && !closable) {+ e.preventDefault();+ }+ }}+ data-testid={testId}+ {...props}+ >+ {title ? (+ <DialogHeader className="ant-modal-header">+ <DialogTitle>{title}</DialogTitle>+ </DialogHeader>+ ) : null}+ {/*+ antd wraps modal content in `.ant-modal-body`, and this app's CSS+ caps that element's height (`max-height: 70vh; overflow-y: auto` and+ similar) so tall modals scroll internally. Without the element those+ rules match nothing: the adapter settings form grew to 1109px in an+ 800px viewport, overflowing to y=-194 and putting Submit off-screen.+ The class name is kept so the existing per-modal CSS keeps working;+ the max-height here is the fallback for modals that have none.+ */}+ <div className="ant-modal-body max-h-[70vh] overflow-y-auto">+ {children}+ </div>+ {footer === null ? null : footer !== undefined ? (+ <DialogFooter>{footer}</DialogFooter>+ ) : (+ <DialogFooter>+ <Button+ onClick={onCancel}+ data-testid={testId ? `${testId}-cancel` : undefined}+ {...cancelButtonProps}+ >+ {cancelText}+ </Button>+ <Button+ type="primary"+ loading={confirmLoading}+ onClick={onOk}+ data-testid={testId ? `${testId}-ok` : undefined}+ {...okButtonProps}+ >+ {okText}+ </Button>+ </DialogFooter>+ )}+ </DialogContent>+ </Dialog>+ );+});++/* ---------------------------------------------------------------- Tooltip */++/** antd `<Tooltip title placement>`. Renders nothing extra when title is empty. */+const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(function Tooltip(+ {+ title,+ placement = "top",+ mouseEnterDelay,+ // Consumed only; see the note on the prop.+ mouseLeaveDelay: _mouseLeaveDelay,+ children,+ className,+ ...props+ },+ ref,+) {+ /*+ * Props that must reach the TRIGGER, not the tooltip bubble.+ *+ * A Tooltip is routinely the child of another `asChild` primitive — the+ * sidebar nests it inside a hover Popover — and Radix merges that parent's+ * props onto this component. Those props are pointer handlers meant for the+ * element under the cursor. Spreading them onto TooltipContent (as the whole+ * of `...props` used to be) put them on the bubble, where they never fire,+ * and the `!title` branch below dropped them entirely by returning children+ * raw. Either way the sidebar's Platform and HITL fly-outs never opened, with+ * no error — the same silent prop-drop this layer keeps producing.+ */+ const {+ onMouseEnter,+ onMouseLeave,+ onFocus,+ onBlur,+ onPointerDown,+ onPointerEnter,+ onPointerLeave,+ onClick,+ /*+ * Dropped, never forwarded. A parent Radix primitive sets `data-state` to+ * its OWN open/closed state, and spreading that onto the child overwrites+ * whatever the child was using it for. The API Deployments toggle is a+ * `<Switch>` inside a `<Tooltip>`: it kept `aria-checked="true"` but its+ * `data-state` became "closed", and since the Switch styles off+ * `data-state` an enabled deployment rendered as an empty grey pill.+ */+ "data-state": _parentState,+ ...rest+ } = props as React.HTMLAttributes<HTMLElement> & {+ "data-state"?: string;+ };+ /*+ * Undefined entries are stripped, not spread. `cloneElement` merges by key,+ * so an `onClick: undefined` from a parent that passes no handler OVERWRITES+ * the child's own — which is exactly how every sidebar item stopped+ * navigating: `<Space onClick={...}>` inside a titleless Tooltip had its+ * handler replaced with undefined and the click did nothing.+ */+ const triggerProps = Object.fromEntries(+ Object.entries({+ onMouseEnter,+ onMouseLeave,+ onFocus,+ onBlur,+ onPointerDown,+ onPointerEnter,+ onPointerLeave,+ onClick,+ }).filter(([, v]) => v !== undefined),+ );++ /*+ * Radix identifies an `asChild` trigger by the REF it passes down, and any+ * aria/data attributes it sets ride along in `rest`. Forwarding only the+ * pointer handlers made the sidebar fly-outs open with no anchor: Radix had+ * nothing to measure, so it positioned Platform's 236x308 panel at y=-616,+ * entirely above the viewport. It was open and correct — just off-screen.+ *+ * `rest` carries those attributes because a parent `asChild` primitive+ * merges them onto this component, so it belongs on the trigger too, not on+ * the tooltip bubble.+ */+ /*+ * Cast because the trigger element is whatever the call-site passed — a+ * Space, an Image, a button — so the concrete ref type is not knowable here.+ * `asChild` forwards it to that element regardless.+ */+ const anchorProps = {+ ...rest,+ ...triggerProps,+ // Same reason as the handlers above: a bare `ref` key would overwrite the+ // child's own ref with undefined whenever no parent supplied one.+ ...(ref ? { ref } : {}),+ } as Record<string, unknown>;++ if (!title) {+ // No tooltip to show, but the trigger props — ref included — still have to+ // land on the child rather than being discarded with the wrapper.+ return React.isValidElement(children)+ ? React.cloneElement(children as React.ReactElement, anchorProps)+ : children;+ }++ return (+ <TooltipProvider>+ <ShadcnTooltip+ {...(mouseEnterDelay != null+ ? { delayDuration: mouseEnterDelay * 1000 }+ : {})}+ >+ {/*+ * The outer primitive's ref and attributes go on the TRIGGER: they+ * identify the element it anchors to, and the bubble is not that+ * element. `ref` is deliberately not forwarded to TooltipContent here+ * for the same reason.+ */}+ {/*+ * The outer primitive's ref and attributes go on the TRIGGER: they+ * identify the element it anchors to, and the bubble is not that+ * element. `ref` is deliberately not forwarded to TooltipContent here+ * for the same reason.+ */}+ <TooltipTrigger asChild {...anchorProps}>+ {children}+ </TooltipTrigger>+ <TooltipContent+ side={+ placement.replace(/(Top|Bottom|Left|Right)$/, "") as+ | "top"+ | "bottom"+ | "left"+ | "right"+ }+ className={cn("max-w-xs break-words", className)}+ >+ {title}+ </TooltipContent>+ </ShadcnTooltip>+ </TooltipProvider>+ );+});++/* --------------------------------------------------------------- Dropdown */++/**+ * Radix's menu owns the keyboard: every printable keydown that reaches the+ * content runs its typeahead, which pulls DOM focus onto the item whose label+ * matches, and Enter/Space on an item activate it. antd's Menu did neither, so+ * antd call-sites put form fields straight into a menu entry — Prompt Studio's+ * kebab holds the postprocessing webhook URL `<Input>`. Typing in one under+ * Radix dropped characters mid-word and threw focus out of the field.+ *+ * So keystrokes that start in a text-entry control are stopped before they+ * bubble to the item (Enter/Space activation, arrow-key roving focus) or to the+ * content (typeahead). Escape and Tab are let through: dismissal listens on+ * document natively and is unaffected either way, and Tab should still leave.+ */+function isTextEntryTarget(target: EventTarget | null): boolean {+ if (!(target instanceof HTMLElement)) {+ return false;+ }+ if (target.isContentEditable) {+ return true;+ }+ const tag = target.tagName;+ if (tag === "TEXTAREA" || tag === "SELECT") {+ return true;+ }+ if (tag !== "INPUT") {+ return false;+ }+ // Checkboxes and radios are keyboard-activated with Space, which is also how+ // the menu activates an item; only free-text inputs need the menu muted.+ const type = (target as HTMLInputElement).type;+ return type !== "checkbox" && type !== "radio" && type !== "button";+}++function stopKeysFromFields(event: React.KeyboardEvent): void {+ if (event.key === "Escape" || event.key === "Tab") {+ return;+ }+ if (isTextEntryTarget(event.target)) {+ event.stopPropagation();+ }+}++/**+ * antd `<Dropdown menu={{ items }}>`. antd passes menu entries as data, so the+ * shim maps them onto Radix's composed children.+ */+const DropdownBase = React.forwardRef<HTMLDivElement, DropdownProps>(+ function Dropdown(+ {+ menu,+ overlay,+ trigger,+ placement,+ disabled,+ children,+ "data-testid": testId,+ ...props+ },+ ref,+ ) {+ const items = menu?.items ?? [];++ return (+ // Radix Root takes open/onOpenChange/modal only — the remaining antd props+ // are consumed above and deliberately not forwarded.+ <DropdownMenu>+ <DropdownMenuTrigger+ asChild+ disabled={disabled}+ className="ant-dropdown-trigger"+ >+ {children}+ </DropdownMenuTrigger>+ {/*+ * `data-testid` goes on the CONTENT, alongside `ref`, and NOT on the+ * trigger: the trigger is `children`, which the call-site renders and+ * can label itself, while this panel is portalled out of the tree with+ * no stable position and only library classes to select on.+ */}+ <DropdownMenuContent ref={ref} data-testid={testId} align="end">+ {overlay ??+ items.map((item, i) =>+ item?.type === "divider" ? (+ <DropdownMenuSeparator key={`div-${i}`} />+ ) : (+ <DropdownMenuItem+ /*+ * `p-0` plus a padded title span, rather than padding on the+ * item itself. antd's menu entries are frequently a whole+ * interactive element (ConfirmModal's clickable Space, for+ * one), and Radix closes the menu on pointerdown ANYWHERE in+ * the item — so a click in the item's own padding ring+ * dismissed the menu without ever reaching that element.+ * Delete therefore worked only "sometimes". Moving the+ * padding inward keeps the same hit area but makes all of it+ * belong to the child.+ */+ className="ant-dropdown-menu-item p-0"+ key={item?.key ?? i}+ data-testid={+ item?.["data-testid"] ??+ (testId && item?.key+ ? `${testId}-item-${item.key}`+ : undefined)+ }+ disabled={item?.disabled}+ onClick={(e) => {+ menu?.onClick?.({ key: item?.key, domEvent: e });+ item?.onClick?.(e);+ }}+ >+ {/*+ * The padding is pushed onto the DEEPEST element via+ * `[&>*]:px-2 [&>*]:py-1.5`, not held on a wrapper. Radix+ * closes the menu on pointerdown anywhere in the item, so any+ * padding a label sits *inside* is a dead ring: the menu+ * dismisses and the label's own handler never fires. That is+ * why Delete only worked sometimes. Giving the label the+ * padding makes the entire row its click target.+ *+ * The fallback padding on the span covers plain-text labels,+ * which have no child to push it onto.+ */}+ {item?.icon ? (+ <span className="flex shrink-0 items-center pl-2">+ {item.icon}+ </span>+ ) : null}+ <span+ className={cn(+ "ant-dropdown-menu-title-content w-full",+ "[&>*]:w-full [&>*]:px-2 [&>*]:py-1.5",+ // Only pads when the label is bare text, not an element.+ "[&:not(:has(>*))]:px-2 [&:not(:has(>*))]:py-1.5",+ )}+ /*+ * Held here rather than on the DropdownMenuItem: Radix+ * composes its own keydown handler onto the item element,+ * and stopPropagation cannot cancel a handler bound to the+ * same node. From a descendant it stops both the item's and+ * the content's.+ */+ onKeyDown={stopKeysFromFields}+ >+ {item?.label}+ </span>+ </DropdownMenuItem>+ ),+ )}+ </DropdownMenuContent>+ </DropdownMenu>+ );+ },+);++/**+ * antd `<Dropdown.Button>` — a split button: `children` is a normal action+ * button that fires `onClick`, and a separate chevron half opens the menu.+ *+ * Distinct from `<Dropdown>`, where the child IS the trigger. Rendering the+ * menu items as one grouped control keeps the two halves' hit targets apart,+ * which is the whole point of the component: clicking "Download File" must+ * download, not open a menu.+ */+const DropdownButton = React.forwardRef<HTMLDivElement, DropdownButtonProps>(+ function DropdownButton(+ {+ menu,+ overlay,+ trigger,+ placement,+ disabled,+ onClick,+ icon,+ className,+ children,+ ...props+ },+ ref,+ ) {+ return (+ <div className={cn("inline-flex items-center", className)}>+ <Button+ disabled={disabled}+ onClick={onClick}+ className="rounded-r-none border-r-0"+ >+ {children}+ </Button>+ <Dropdown+ ref={ref}+ menu={menu}+ overlay={overlay}+ trigger={trigger}+ placement={placement}+ disabled={disabled}+ {...props}+ >+ <Button+ disabled={disabled}+ aria-label="More actions"+ className="rounded-l-none px-2"+ icon={icon ?? <ChevronDown className="size-4" aria-hidden="true" />}+ />+ </Dropdown>+ </div>+ );+ },+);++const Dropdown = Object.assign(DropdownBase, { Button: DropdownButton });++/* ------------------------------------------------------------- Popconfirm */++/**+ * antd `<Popconfirm title description onConfirm>`. Uses AlertDialog so the+ * confirm semantics match useConfirm() rather than being a second pattern.+ */+const Popconfirm = React.forwardRef<HTMLDivElement, PopconfirmProps>(+ function Popconfirm(+ {+ title,+ description,+ onConfirm,+ onCancel,+ okText = "OK",+ cancelText = "Cancel",+ okType,+ disabled,+ children,+ "data-testid": testId,+ ...props+ },+ ref,+ ) {+ if (disabled) {+ return children;+ }++ return (+ <AlertDialog {...props}>+ <AlertDialogTrigger asChild>{children}</AlertDialogTrigger>+ {/*+ * On the CONTENT, with `ref` — `...props` lands on Radix's Root, which+ * renders no DOM, so an id written at a call-site reached nothing.+ *+ * The two buttons derive from it because they are the whole point of+ * the component and cannot be labelled from outside: the shim builds+ * them from `okText`/`cancelText`, they are portalled, and they carry+ * nothing but library classes. Confirming a delete is exactly the step+ * a test has to drive.+ */}+ <AlertDialogContent ref={ref} data-testid={testId}>+ <AlertDialogHeader>+ <AlertDialogTitle>{title}</AlertDialogTitle>+ {description ? (+ <AlertDialogDescription>{description}</AlertDialogDescription>+ ) : null}+ </AlertDialogHeader>+ <AlertDialogFooter>+ <AlertDialogCancel+ onClick={onCancel}+ data-testid={testId ? `${testId}-cancel` : undefined}+ >+ {cancelText}+ </AlertDialogCancel>+ <AlertDialogAction+ onClick={onConfirm}+ data-testid={testId ? `${testId}-ok` : undefined}+ className={+ okType === "danger"+ ? "bg-destructive text-destructive-foreground hover:bg-destructive/90"+ : undefined+ }+ >+ {okText}+ </AlertDialogAction>+ </AlertDialogFooter>+ </AlertDialogContent>+ </AlertDialog>+ );+ },+);++/* ------------------------------------------------- Popover / Collapse */++/**+ * antd `<Popover content title trigger open onOpenChange>`.+ *+ * Three antd/Radix mismatches are reconciled here, all of which the emoji+ * picker in AddCustomToolFormModal hit at once:+ *+ * - antd call-sites pass `open` and drive it themselves from the trigger's+ * onClick, with no `onOpenChange`. Radix reads a bare `open` as FULLY+ * controlled, so Esc and outside-click had nowhere to report a close and+ * the picker could only be dismissed by clicking the button again.+ * `onOpenChange` is therefore always supplied, falling back to antd's+ * `onOpenChange`/`onVisibleChange` when the call-site has one.+ * - `trigger` ("click"/"hover") is antd's API and is not a Radix prop; it+ * was landing on the DOM as an unknown attribute.+ * - antd sizes the bubble to its content. Radix's PopoverContent is a fixed+ * `w-72`, which clipped the emoji picker; `w-auto` plus collision padding+ * lets it size naturally and flip when it would run off-screen.+ */+const AntPopover = React.forwardRef<HTMLDivElement, PopoverProps>(+ function AntPopover(+ {+ content,+ title,+ placement = "top",+ trigger: antdTrigger,+ open,+ visible,+ onOpenChange,+ onVisibleChange,+ arrow,+ overlayClassName,+ overlayStyle,+ getPopupContainer,+ destroyTooltipOnHide,+ children,+ className,+ "data-testid": testId,+ ...props+ },+ ref,+ ) {+ const controlledOpen = open ?? visible;+ const handleOpenChange = onOpenChange ?? onVisibleChange;++ /*+ * antd's `trigger="hover"` has no Radix equivalent — Radix Popover opens+ * on click only. The prop was being destructured and then ignored, so the+ * sidebar's HITL and Platform fly-out menus simply never appeared on+ * hover: a silent prop-drop, the exact failure this layer keeps producing.+ *+ * Driven here rather than with Radix's HoverCard because the call-sites+ * also CLICK these items to navigate, and swapping the primitive would+ * change that behaviour. A small close delay keeps the menu reachable+ * while the pointer travels from the trigger to the panel.+ */+ const triggers = Array.isArray(antdTrigger)+ ? antdTrigger+ : [antdTrigger ?? "click"];+ const isHover = triggers.includes("hover");++ const [hoverOpen, setHoverOpen] = React.useState(false);+ const closeTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);+ const cancelClose = () => {+ if (closeTimer.current) {+ clearTimeout(closeTimer.current);+ closeTimer.current = null;+ }+ };+ React.useEffect(() => cancelClose, []);++ const hoverHandlers = isHover+ ? {+ onMouseEnter: () => {+ cancelClose();+ setHoverOpen(true);+ },+ onMouseLeave: () => {+ cancelClose();+ closeTimer.current = setTimeout(() => setHoverOpen(false), 150);+ },+ }+ : undefined;++ // An explicit `open`/`visible` still wins, so controlled call-sites are+ // unaffected by the hover tracking above.+ const isOpen = controlledOpen ?? (isHover ? hoverOpen : undefined);++ return (+ <Popover+ open={isOpen}+ // Always present, even when the call-site tracks state itself — without+ // it Radix cannot dismiss a controlled popover at all.+ onOpenChange={(next) => {+ if (isHover) {+ setHoverOpen(next);+ }+ handleOpenChange?.(next);+ }}+ {...props}+ >+ <PopoverTrigger asChild {...hoverHandlers}>+ {children}+ </PopoverTrigger>+ <PopoverContent+ ref={ref}+ /*+ * On the CONTENT, with `ref`, not on Radix's Root — the Root renders+ * no DOM at all, so a `data-testid` in `...props` vanished. The panel+ * is portalled and the trigger is `children`, which the call-site can+ * label itself, so this is the half that needs a handle.+ */+ data-testid={testId}+ // Same handlers on the panel: without them the 150ms timer fires as+ // the pointer crosses the gap and the menu closes under the cursor.+ {...hoverHandlers}+ side={+ placement.replace(/(Top|Bottom|Left|Right)$/, "") as+ | "top"+ | "bottom"+ | "left"+ | "right"+ }+ /*+ * antd's placement suffix names the alignment edge, and which axis it+ * refers to depends on the side: `bottomLeft` is "below, aligned to+ * the left" while `rightTop` is "to the right, aligned to the top".+ * Both are Radix's `align="start"`; Right/Bottom suffixes are "end".+ * The previous mapping only tested Top/Bottom, so the Left/Right+ * suffixes silently fell through to `center`.+ */+ align={+ /(Top|Left)$/.test(placement)+ ? "start"+ : /(Bottom|Right)$/.test(placement)+ ? "end"+ : "center"+ }+ collisionPadding={8}+ /*+ * Content-sized, like antd's bubble.+ *+ * The earlier `max-w-[min(92vw,26rem)]` (416px) was itself a clipping+ * box: the emoji picker needs ~440px once its search field and+ * category bar are counted, so its right-hand column was sliced off+ * mid-emoji.+ *+ * `--radix-popover-content-available-width` is what the popover may+ * actually occupy on the chosen side, so the bubble grows to its+ * content and only shrinks when the viewport genuinely cannot fit it.+ * Padding is left to the call-site (via `overlayClassName`), since the+ * sidebar and ConfigureDs popovers want shadcn's default `p-4` while a+ * self-chromed widget like the picker wants none.+ */+ className={cn(+ "ant-popover-inner w-auto max-w-[var(--radix-popover-content-available-width)]",+ overlayClassName,+ className,+ )}+ style={overlayStyle}+ >+ {title ? <div className="mb-1 font-semibold">{title}</div> : null}+ {content}+ </PopoverContent>+ </Popover>+ );+ },+);++/**+ * antd `<Collapse items>` / `<Collapse.Panel>`.+ *+ * `activeKey` is antd's CONTROLLED open state and every call-site in the app+ * uses it: the prompt cards and notes cards toggle their body from a chevron+ * that lives in their own header row (outside this component), and the+ * LLM-profile form drives its advanced-settings panel the same way. Supporting+ * only `defaultActiveKey` left the prop to fall into `...props` and land on the+ * DOM as an unknown attribute, while every Collapsible stayed closed forever —+ * so each prompt card rendered its title bar and nothing else: no prompt text,+ * no coverage, no LLM profile, no output.+ */+const CollapseBase = React.forwardRef<HTMLDivElement, CollapseProps>(+ function Collapse(+ {+ items,+ defaultActiveKey,+ activeKey,+ onChange,+ expandIcon,+ // consumed so they cannot land on the DOM as unknown attributes+ ghost,+ size,+ accordion,+ bordered,+ className,+ children,+ ...props+ },+ ref,+ ) {+ // Controlled whenever the call-site passes activeKey at all — including+ // the `false` that `activeKey={flag && "1"}` produces when closed.+ const controlled = activeKey !== undefined;++ const renderPanel = (+ key: React.Key | null,+ header: React.ReactNode,+ body: React.ReactNode,+ showArrow: boolean,+ ) => {+ const open = isKeyOpen(controlled ? activeKey : defaultActiveKey, key);+ /*+ * A header bar is only rendered when there is something to put in it.+ * The prompt and notes cards pass no `header` — they draw their own+ * title row, with its own expand chevron, ABOVE this component — so a+ * bar here would be an empty clickable strip wedged between that row+ * and the body. (NotesCard also leaves `showArrow` at its default, so+ * keying off the arrow alone is not enough.)+ */+ const hasHeader = Boolean(header) && showArrow;+ return (+ <Collapsible+ key={key ?? undefined}+ {...(controlled ? { open } : { defaultOpen: open })}+ onOpenChange={(next) =>+ onChange?.(next && key != null ? [normalizeKey(key)] : [])+ }+ >+ {hasHeader ? (+ <CollapsibleTrigger className="ant-collapse-header flex w-full items-center justify-between py-2 text-left font-medium">+ {header}+ {expandIcon?.({ isActive: open })}+ </CollapsibleTrigger>+ ) : null}+ <CollapsibleContent className="ant-collapse-content-box">+ {body}+ </CollapsibleContent>+ </Collapsible>+ );+ };++ // Legacy children form: <Collapse><Collapse.Panel header=…>…</Collapse.Panel></Collapse>+ if (!items) {+ const panels = React.Children.toArray(children).filter(+ (+ c,+ ): c is React.ReactElement<{+ header?: React.ReactNode;+ children?: React.ReactNode;+ showArrow?: boolean;+ }> => React.isValidElement(c),+ );+ return (+ <div ref={ref} className={className} {...props}>+ {panels.map((panel, i) =>+ renderPanel(+ panel.key ?? i,+ panel.props.header,+ panel.props.children,+ panel.props.showArrow !== false,+ ),+ )}+ </div>+ );+ }+ return (+ <div ref={ref} className={className} {...props}>+ {items.map((item) =>+ renderPanel(item.key, item.label, item.children, true),+ )}+ </div>+ );+ },+);++/**+ * antd's imperative modal API: `Modal.useModal()` returns `[api, contextHolder]`+ * and `api.confirm({ title, content, onOk })` opens a confirm dialog.+ *+ * ConfirmModal (used by 12 components — delete buttons across prompt studio,+ * workflows, the top nav) calls this on every click. Leaving it undefined+ * throws a TypeError and takes down whichever screen the user clicked on.+ *+ * Implemented on AlertDialog so it behaves the same as useConfirm() rather+ * than becoming a second, divergent confirm pattern.+ */+type ModalKind = "confirm" | "info" | "success" | "error" | "warning";+type ModalState = (ConfirmConfig & { kind: ModalKind }) | null;++type ModalApi = {+ confirm: (cfg?: ConfirmConfig) => void;+ info: (cfg?: ConfirmConfig) => void;+ success: (cfg?: ConfirmConfig) => void;+ error: (cfg?: ConfirmConfig) => void;+ warning: (cfg?: ConfirmConfig) => void;+ destroyAll: () => void;+};++/* Explicit tuple: without it TS widens the array to a union and the+ * destructured `api` loses its methods at every call-site. */+function useModal(): [ModalApi, React.ReactElement | null] {+ const [state, setState] = React.useState<ModalState>(null);++ const api = React.useMemo(+ () => ({+ confirm: (cfg: ConfirmConfig = {}) =>+ setState({ ...cfg, kind: "confirm" }),+ info: (cfg: ConfirmConfig = {}) => setState({ ...cfg, kind: "info" }),+ success: (cfg: ConfirmConfig = {}) =>+ setState({ ...cfg, kind: "success" }),+ error: (cfg: ConfirmConfig = {}) => setState({ ...cfg, kind: "error" }),+ warning: (cfg: ConfirmConfig = {}) =>+ setState({ ...cfg, kind: "warning" }),+ destroyAll: () => setState(null),+ }),+ [],+ );++ const close = React.useCallback(() => setState(null), []);++ const contextHolder = state ? (+ <AlertDialog+ open+ onOpenChange={(open) => {+ // Escape / outside click must behave like Cancel.+ if (!open) {+ state.onCancel?.();+ close();+ }+ }}+ >+ <AlertDialogContent>+ <AlertDialogHeader>+ <AlertDialogTitle>{state.title ?? "Are you sure?"}</AlertDialogTitle>+ {state.content ? (+ <AlertDialogDescription>{state.content}</AlertDialogDescription>+ ) : null}+ </AlertDialogHeader>+ <AlertDialogFooter>+ {state.kind === "confirm" ? (+ <AlertDialogCancel+ onClick={() => {+ state.onCancel?.();+ close();+ }}+ >+ {state.cancelText ?? "Cancel"}+ </AlertDialogCancel>+ ) : null}+ <AlertDialogAction+ onClick={() => {+ state.onOk?.();+ close();+ }}+ className={+ state.okType === "danger" || state.kind === "error"+ ? "bg-destructive text-destructive-foreground hover:bg-destructive/90"+ : undefined+ }+ >+ {state.okText ?? "OK"}+ </AlertDialogAction>+ </AlertDialogFooter>+ </AlertDialogContent>+ </AlertDialog>+ ) : null;++ return [api, contextHolder];+}++/**+ * antd's fully-imperative `Modal.confirm({ title, onOk })`, callable outside+ * React. The cloud plugins have three of these. It mounts its own root because+ * there is no component tree to render into.+ */+function confirmStatic(cfg: ConfirmConfig = {}) {+ if (typeof document === "undefined") {+ return { destroy: () => undefined };+ }+ const host = document.createElement("div");+ document.body.appendChild(host);+ const root = ReactDOM.createRoot(host);++ const cleanup = () => {+ // Defer: unmounting during React's own commit phase warns.+ setTimeout(() => {+ root.unmount();+ host.remove();+ }, 0);+ };++ function StaticConfirm() {+ const [api, holder] = useModal();+ React.useEffect(() => {+ api.confirm({+ ...cfg,+ onOk: () => {+ cfg.onOk?.();+ cleanup();+ },+ onCancel: () => {+ cfg.onCancel?.();+ cleanup();+ },+ });+ }, [api]);+ return holder;+ }++ root.render(<StaticConfirm />);+ return { destroy: cleanup };+}++/**+ * antd `<Collapse.Panel>` — a data holder consumed by Collapse above.+ * It MUST exist: rendering `<Collapse.Panel>` when it is undefined throws+ * React error #130, which takes down the entire route rather than just this+ * component. That is what crashed Prompt Studio.+ */+function CollapsePanel({+ children,+}: {+ children?: React.ReactNode;+ /* Read off `panel.props` by Collapse above; declared so call-sites type-check. */+ header?: React.ReactNode;+ showArrow?: boolean;+}) {+ return children ?? null;+}++/*+ * Namespace objects, assembled once here. Object.assign keeps the statics in+ * the inferred type, so `<Collapse.Panel>` and `Modal.confirm(...)` type-check+ * AND the shim-completeness guard still resolves them by value — that guard is+ * what catches a missing sub-component before React error #130 takes a whole+ * route down, which is how Prompt Studio crashed.+ */+const Modal = Object.assign(ModalBase, {+ useModal,+ confirm: confirmStatic,+});++const Collapse = Object.assign(CollapseBase, { Panel: CollapsePanel });++export {+ AntPopover as Popover,+ Collapse,+ Dropdown,+ Modal,+ Popconfirm,+ Tooltip,+};diff --git a/frontend/src/components/ui/shims/antd-structure.test.jsx b/frontend/src/components/ui/shims/antd-structure.test.jsxnew file mode 100644index 000000000..5d19daae9--- /dev/null+++ b/frontend/src/components/ui/shims/antd-structure.test.jsx@@ -0,0 +1,1637 @@+import {+ fireEvent,+ render,+ screen,+ waitFor,+ within,+} from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { afterEach, describe, expect, it, vi } from "vitest";++import {+ Badge,+ Card,+ Descriptions,+ Drawer,+ Layout,+ List,+ Menu,+ Pagination,+ Result,+ Segmented,+ Skeleton,+ Statistic,+ Steps,+ Table,+ Tabs,+ Transfer,+ Tree,+ Upload,+} from "@/components/ui/shims/antd-structure";++describe("antd-compatible structural shims (P4)", () => {+ it("Card renders title and body", () => {+ render(<Card title="Settings">content</Card>);+ expect(screen.getByText("Settings")).toBeInTheDocument();+ expect(screen.getByText("content")).toBeInTheDocument();+ });++ it("Card renders the `extra` slot", () => {+ render(<Card title="T" extra={<button type="button">More</button>} />);+ expect(screen.getByRole("button", { name: "More" })).toBeInTheDocument();+ });++ it("Card marks a `hoverable` card as a click target", () => {+ const { container } = render(<Card hoverable>pick me</Card>);++ const card = container.querySelector(".ant-card");+ expect(card).toHaveClass("cursor-pointer");+ // The prop is consumed, not forwarded as a stray DOM attribute.+ expect(card).not.toHaveAttribute("hoverable");+ });++ it("Card leaves a plain card without a pointer cursor", () => {+ const { container } = render(<Card>read me</Card>);++ expect(container.querySelector(".ant-card")).not.toHaveClass(+ "cursor-pointer",+ );+ });++ it("Tabs renders labels from the `items` data prop", () => {+ render(+ <Tabs+ items={[+ { key: "1", label: "First", children: "one" },+ { key: "2", label: "Second", children: "two" },+ ]}+ />,+ );+ expect(screen.getByText("First")).toBeInTheDocument();+ expect(screen.getByText("Second")).toBeInTheDocument();+ });++ /*+ * antd's default tab style is `line` (transparent strip, underlined active+ * label). shadcn's primitive ships the pill/card look, so Prompt Studio+ * rendered a grey rounded pill where the reference draws an underline.+ */+ it("Tabs default to antd's line style, not shadcn's pill", () => {+ render(<Tabs items={[{ key: "1", label: "One", children: "x" }]} />);+ const list = screen.getByRole("tablist");+ expect(list.className).toContain("bg-transparent");+ expect(list.className).toContain("rounded-none");+ });++ /*+ * antd pads line-style tabs `12px 0`, giving the 46px nav the reference+ * shows. `py-0` here made every standalone nav 24px — half height — to suit+ * the one toolbar that centres its tabs against a file name; that toolbar+ * now opts out in its own CSS instead.+ */+ it("Tabs pad line-style labels to antd's height", () => {+ render(<Tabs items={[{ key: "1", label: "One", children: "x" }]} />);+ const cls = screen.getByRole("tab").className;+ expect(cls).toContain("py-3");+ expect(cls).not.toContain("py-0");+ });++ /*+ * React never exposes `key` in props, so reading `c.props.key` gave every+ * TabPane `undefined` and nothing matched `activeKey`. The Output Analyzer's+ * profile tabs rendered permanently inactive with their panel `hidden`, and+ * onChange handed back the ".$"-prefixed key — which the call-site forwarded+ * as a profile id, producing a 500.+ */+ it("Tabs read the pane key off the ELEMENT, not props", () => {+ render(+ <Tabs activeKey="p2">+ <Tabs.TabPane tab="One" key="p1">+ first+ </Tabs.TabPane>+ <Tabs.TabPane tab="Two" key="p2">+ second+ </Tabs.TabPane>+ </Tabs>,+ );+ const selected = screen.getByRole("tab", { selected: true });+ expect(selected).toHaveTextContent("Two");+ expect(screen.getByText("second")).toBeInTheDocument();+ });++ /*+ * The real CombinedOutput shape: a conditional pane followed by a `.map()`.+ * That nesting makes React.Children.toArray use a ".N:$" prefix rather than+ * ".$", which a regex anchored on ".$" alone does not strip — the tab stayed+ * inactive even after the key was read off the element.+ */+ it("Tabs strip the nested-array key prefix too", () => {+ const profiles = [{ id: "p2", name: "Two" }];+ render(+ <Tabs activeKey="p2">+ {false && <Tabs.TabPane tab="Default" key="0" />}+ {profiles.map((p) => (+ <Tabs.TabPane tab={p.name} key={p.id}>+ body {p.id}+ </Tabs.TabPane>+ ))}+ </Tabs>,+ );+ expect(screen.getByRole("tab", { selected: true })).toHaveTextContent(+ "Two",+ );+ });++ it("Tabs report an unprefixed key through onChange", () => {+ const onChange = vi.fn();+ render(+ <Tabs activeKey="p1" onChange={onChange}>+ <Tabs.TabPane tab="One" key="p1" />+ <Tabs.TabPane tab="Two" key="p2" />+ </Tabs>,+ );+ fireEvent.mouseDown(screen.getByRole("tab", { name: "Two" }));+ // ".$p2" here is what reached the backend as a profile id.+ expect(onChange).toHaveBeenCalledWith("p2");+ });++ /*+ * antd renders `items[].icon` before the label. The shim rendered only the+ * label, so the Dashboard's nested usage tabs (API Deployments, ETL+ * Pipelines, …) lost the icons the reference shows on every one.+ */+ it("Tabs render an item's icon alongside its label", () => {+ render(+ <Tabs+ items={[+ {+ key: "api",+ label: "API Deployments",+ icon: <svg data-testid="tab-icon" />,+ children: "x",+ },+ ]}+ />,+ );+ const tab = screen.getByRole("tab");+ expect(within(tab).getByTestId("tab-icon")).toBeInTheDocument();+ expect(tab).toHaveTextContent("API Deployments");+ expect(tab.className).toContain("gap-2");+ });++ it("Tabs add no icon gap when an item has none", () => {+ render(<Tabs items={[{ key: "a", label: "Plain", children: "x" }]} />);+ expect(screen.getByRole("tab").className).not.toContain("gap-2");+ });++ /*+ * `<Skeleton.Button>` / `<Skeleton.Input>` are rendered by the Agentic Prompt+ * Studio plugin. They were missing, so opening any project rendered an+ * undefined component — React error #130, which the error boundary showed as+ * "Couldn't load this page" with no hint at the cause.+ *+ * shim-completeness cannot catch this class on its own: it scans OSS `src/`,+ * and the plugins that use these live in a gitignored tree that is absent+ * from an OSS checkout. Assert them by value here instead.+ */+ /*+ * Same class as Skeleton.Button, found by sweeping every `<Foo.Bar>` the+ * cloud plugins render: the verticals Playground uses <Menu.ItemGroup>, so+ * its absence was a second #130 waiting on that route.+ */+ it("Menu exposes antd's ItemGroup static", () => {+ expect(Menu.ItemGroup, "Menu.ItemGroup is undefined").toBeDefined();+ });++ it("Menu.ItemGroup renders its title and children", () => {+ render(+ <Menu.ItemGroup title="Endpoints">+ <span>an endpoint</span>+ </Menu.ItemGroup>,+ );+ expect(screen.getByText("Endpoints")).toBeInTheDocument();+ expect(screen.getByText("an endpoint")).toBeInTheDocument();+ });++ it("Skeleton exposes antd's Button and Input statics", () => {+ expect(Skeleton.Button, "Skeleton.Button is undefined").toBeDefined();+ expect(Skeleton.Input, "Skeleton.Input is undefined").toBeDefined();+ });++ it("Skeleton.Button and Skeleton.Input render a placeholder", () => {+ const { container } = render(+ <div>+ <Skeleton.Button active size="small" />+ <Skeleton.Input active size="large" />+ </div>,+ );+ expect(+ container.querySelectorAll("div[class*='animate-pulse']").length,+ ).toBeGreaterThanOrEqual(2);+ });++ it("Tabs keep the pill look when type='card'", () => {+ render(+ <Tabs type="card" items={[{ key: "1", label: "One", children: "x" }]} />,+ );+ expect(screen.getByRole("tablist").className).not.toContain(+ "bg-transparent",+ );+ });++ it("Tabs fires onChange with the selected key", () => {+ const onChange = vi.fn();+ render(+ <Tabs+ onChange={onChange}+ items={[+ { key: "a", label: "A", children: "x" },+ { key: "b", label: "B", children: "y" },+ ]}+ />,+ );+ // Radix activates tabs on mousedown, not click.+ fireEvent.mouseDown(screen.getByRole("tab", { name: "B" }));+ expect(onChange).toHaveBeenCalledWith("b");+ });++ it("List renders each item through renderItem", () => {+ render(+ <List+ dataSource={[{ id: 1 }, { id: 2 }]}+ renderItem={(item) => <span>row {item.id}</span>}+ />,+ );+ expect(screen.getByText("row 1")).toBeInTheDocument();+ expect(screen.getByText("row 2")).toBeInTheDocument();+ });++ /*+ * antd renders an <Empty> illustration here, not a bare string. Asserting+ * only the TEXT is what let the icon go missing: "No data" floating alone+ * in a table reads as a rendering failure rather than an empty state.+ */+ it("List shows an empty state with an icon for no data", () => {+ const { container } = render(+ <List dataSource={[]} renderItem={() => null} />,+ );+ expect(screen.getByText("No data")).toBeInTheDocument();+ expect(container.querySelector("svg")).not.toBeNull();+ });++ // Table delegates to the shared DataTable (D5/D9).+ it("Table renders antd-style columns and dataSource", () => {+ render(+ <Table+ columns={[+ { title: "Name", dataIndex: "name", key: "name" },+ { title: "Role", dataIndex: "role", key: "role" },+ ]}+ dataSource={[+ { id: 1, name: "Ada", role: "admin" },+ { id: 2, name: "Grace", role: "user" },+ ]}+ />,+ );+ expect(screen.getByText("Name")).toBeInTheDocument();+ expect(screen.getByText("Ada")).toBeInTheDocument();+ expect(screen.getByText("Grace")).toBeInTheDocument();+ });++ it("Table honours a column's custom render(value, record)", () => {+ render(+ <Table+ columns={[+ {+ title: "Name",+ dataIndex: "name",+ key: "name",+ render: (value, record) => `${value} (#${record.id})`,+ },+ ]}+ dataSource={[{ id: 7, name: "Ada" }]}+ />,+ );+ expect(screen.getByText("Ada (#7)")).toBeInTheDocument();+ });++ it("Table shows an empty state when dataSource is empty", () => {+ const { container } = render(+ <Table+ columns={[{ title: "Name", dataIndex: "name", key: "name" }]}+ dataSource={[]}+ />,+ );+ expect(screen.getByText("No data")).toBeInTheDocument();+ // antd puts an <Empty> illustration here, not a bare string.+ expect(container.querySelector("svg")).not.toBeNull();+ });++ /*+ * antd's `.ant-table-thead > tr > th` is `background: #fafafa` with a 1px+ * #f0f0f0 bottom border (read off the reference's own stylesheet). shadcn+ * leaves the header transparent, so against the white table surface the+ * header row was indistinguishable from the body.+ */+ it("gives the Table header row a distinct background", () => {+ const { container } = render(+ <Table+ columns={[{ title: "Name", dataIndex: "name", key: "name" }]}+ dataSource={[{ key: "1", name: "a" }]}+ />,+ );+ const headerRow = container.querySelector("thead tr");+ expect(headerRow.className).toContain("neutral-50");+ expect(headerRow.className).toContain("border-b");+ });++ it("Table accepts antd's object form of `loading`", () => {+ const { container } = render(+ <Table+ columns={[{ title: "N", dataIndex: "n", key: "n" }]}+ dataSource={[]}+ loading={{ spinning: true }}+ />,+ );+ expect(container.querySelector("[role='status']")).toBeTruthy();+ });++ it("Result renders title and subTitle", () => {+ render(<Result status="success" title="Done" subTitle="All good" />);+ expect(screen.getByText("Done")).toBeInTheDocument();+ expect(screen.getByText("All good")).toBeInTheDocument();+ });++ it("Segmented renders options and reports the picked value", () => {+ const onChange = vi.fn();+ render(+ <Segmented options={["Day", "Week"]} value="Day" onChange={onChange} />,+ );+ fireEvent.click(screen.getByText("Week"));+ expect(onChange).toHaveBeenCalledWith("Week");+ });++ it("Pagination reports the next page and page size", () => {+ const onChange = vi.fn();+ render(+ <Pagination current={1} pageSize={10} total={30} onChange={onChange} />,+ );+ fireEvent.click(screen.getByRole("button", { name: "Next" }));+ expect(onChange).toHaveBeenCalledWith(2, 10);+ });++ it("Pagination disables Previous on the first page", () => {+ render(<Pagination current={1} pageSize={10} total={30} />);+ expect(screen.getByRole("button", { name: "Previous" })).toBeDisabled();+ });++ it("Descriptions renders label/value pairs", () => {+ render(+ <Descriptions items={[{ key: "a", label: "Owner", children: "Ada" }]} />,+ );+ expect(screen.getByText("Owner")).toBeInTheDocument();+ expect(screen.getByText("Ada")).toBeInTheDocument();+ });++ /*+ * antd lays Descriptions out as a real <table> with the label BESIDE its+ * value, and plugin CSS hooks that DOM directly: LLMWhisperer's billing page+ * styles `.pricing-table th`, and its free-plan card hides+ * `.ant-descriptions-item-content` to show modes without prices. A <dl> of+ * stacked pairs matched neither rule and lost the pricing table entirely.+ */+ it("Descriptions renders a table, one row per column-worth of items", () => {+ const { container } = render(+ <Descriptions+ column={1}+ items={[+ { key: "a", label: "Native Text", children: "$1/1000 pages" },+ { key: "b", label: "Low Cost", children: "$5/1000 pages" },+ ]}+ />,+ );+ expect(container.querySelector("table")).toBeInTheDocument();+ expect(container.querySelectorAll("tbody tr")).toHaveLength(2);+ });++ it("Descriptions packs `column` items into each row", () => {+ const { container } = render(+ <Descriptions+ column={2}+ items={[+ { key: "a", label: "Document", children: "a.pdf" },+ { key: "b", label: "Tool", children: "extract" },+ { key: "c", label: "Reviewers", children: "2" },+ ]}+ />,+ );+ const rows = container.querySelectorAll("tbody tr");+ expect(rows).toHaveLength(2);+ expect(rows[0].querySelectorAll("td")).toHaveLength(2);+ expect(rows[1].querySelectorAll("td")).toHaveLength(1);+ });++ it("Descriptions bordered puts the label in a th beside its value", () => {+ const { container } = render(+ <Descriptions+ bordered+ column={1}+ items={[{ key: "a", label: "Native Text", children: "$1/1000 pages" }]}+ />,+ );+ const row = container.querySelector("tbody tr");+ expect(within(row).getByText("Native Text").tagName).toBe("TH");+ const content = row.querySelector("td");+ expect(content).toHaveClass("ant-descriptions-item-content");+ expect(content).toHaveTextContent("$1/1000 pages");+ });++ it("Descriptions keeps the label's own text free of the colon", () => {+ render(+ <Descriptions items={[{ key: "a", label: "Owner", children: "Ada" }]} />,+ );+ // antd hangs the colon off ::after, so call-sites (and their tests) can+ // still match the label they wrote.+ expect(screen.getByText("Owner")).toHaveTextContent(/^Owner$/);+ });++ it("Descriptions reads Descriptions.Item children as items", () => {+ const { container } = render(+ <Descriptions bordered column={1}>+ <Descriptions.Item label="Name">Invoice API</Descriptions.Item>+ <Descriptions.Item label="Base URL">https://x/api</Descriptions.Item>+ </Descriptions>,+ );+ expect(container.querySelectorAll("tbody tr")).toHaveLength(2);+ expect(screen.getByText("Name").tagName).toBe("TH");+ expect(screen.getByText("Invoice API")).toBeInTheDocument();+ });++ it("Statistic applies precision and suffix", () => {+ render(+ <Statistic title="Uptime" value={99.456} precision={1} suffix="%" />,+ );+ expect(screen.getByText("99.5")).toBeInTheDocument();+ expect(screen.getByText("%")).toBeInTheDocument();+ });++ // antd's Badge is a count overlay — NOT shadcn's pill Badge (antd calls that Tag).+ it("Badge overlays a count on its child", () => {+ render(+ <Badge count={5}>+ <span>inbox</span>+ </Badge>,+ );+ expect(screen.getByText("inbox")).toBeInTheDocument();+ expect(screen.getByText("5")).toBeInTheDocument();+ });++ it("Badge caps the count at overflowCount", () => {+ render(<Badge count={150} overflowCount={99} />);+ expect(screen.getByText("99+")).toBeInTheDocument();+ });++ /**+ * antd applies `style` to the COUNT, not to the wrapper. PromptChangeIndicator+ * passes `style={{ backgroundColor: color }}` to tint its counter; letting it+ * fall through onto the wrapper painted a solid grey block behind the icon+ * button on every prompt card in Prompt Studio (7 of them on one screen).+ */+ it("Badge applies `style` to the count, not the wrapper", () => {+ const { container } = render(+ <Badge count={3} style={{ backgroundColor: "#bfbfbf" }}>+ <button type="button">act</button>+ </Badge>,+ );+ const wrapper = container.firstChild;+ expect(wrapper.style.backgroundColor).toBe("");+ expect(screen.getByText("3").style.backgroundColor).toBe("#bfbfbf");+ });++ it("Badge offsets the count when antd's `offset` is given", () => {+ render(+ <Badge count={2} offset={[-2, 12]}>+ <button type="button">act</button>+ </Badge>,+ );+ expect(screen.getByText("2").style.transform).toBe("translate(-2px, 12px)");+ });++ /**+ * The count is painted over the child, and `offset` routinely drags it across+ * the child's middle. Left interactive it ate the child's clicks — and only+ * once it grew wide enough to cover them, so a 1-digit count worked and+ * `12` killed Prompt Studio's audit button outright.+ */+ it("Badge's count does not intercept clicks meant for its child", () => {+ render(+ <Badge count={12} offset={[-2, 12]}>+ <button type="button">act</button>+ </Badge>,+ );+ expect(screen.getByText("12")).toHaveClass("pointer-events-none");+ });++ it("Badge hides a zero count unless showZero", () => {+ const { rerender } = render(<Badge count={0} />);+ expect(screen.queryByText("0")).not.toBeInTheDocument();+ rerender(<Badge count={0} showZero />);+ expect(screen.getByText("0")).toBeInTheDocument();+ });++ it("Drawer renders its content when open", () => {+ render(+ <Drawer open title="Panel">+ drawer body+ </Drawer>,+ );+ expect(screen.getByText("drawer body")).toBeInTheDocument();+ });++ /*+ * Regression: the Lookup drawer passes all three of these, and every one was+ * dropped — `closable={false}` and `destroyOnClose` landed on the DOM node as+ * attributes (React warned about both), the panel kept its own 24px padding+ * so the drawer's full-bleed header floated inset, and `width` became+ * `max-width`, leaving the Sheet on its `w-3/4` default.+ */+ it("Drawer honours closable, styles.body and width", () => {+ const { container } = render(+ <Drawer+ open+ closable={false}+ destroyOnClose+ width="85%"+ styles={{ body: { padding: 0 } }}+ >+ drawer body+ </Drawer>,+ );+ const panel = container.ownerDocument.querySelector('[role="dialog"]');++ expect(screen.queryByText("Close")).not.toBeInTheDocument();+ expect(panel).not.toHaveAttribute("destroyOnClose");+ expect(panel).not.toHaveAttribute("closable");+ expect(panel).toHaveStyle({ width: "85%", maxWidth: "100%" });+ expect(screen.getByText("drawer body")).toHaveStyle({ padding: "0px" });+ });++ it("Drawer keeps the stock close button by default", () => {+ render(<Drawer open>drawer body</Drawer>);+ expect(screen.getByText("Close")).toBeInTheDocument();+ });++ it("Transfer splits items across source and target by targetKeys", () => {+ render(+ <Transfer+ dataSource={[+ { key: "1", title: "Left item" },+ { key: "2", title: "Right item" },+ ]}+ targetKeys={["2"]}+ />,+ );+ expect(screen.getByText("Left item")).toBeInTheDocument();+ expect(screen.getByText("Right item")).toBeInTheDocument();+ });++ /*+ * antd's Transfer is a CHECKBOX widget: tick rows, then press the arrow+ * between the panels. The earlier stub moved whichever row was clicked and+ * drew no checkboxes, counts, search or arrows, so it read as a plain list+ * beside the reference.+ */+ it("Transfer moves the CHECKED rows when the arrow is pressed", () => {+ const onChange = vi.fn();+ render(+ <Transfer+ dataSource={[+ { key: "1", title: "Movable" },+ { key: "2", title: "Other" },+ ]}+ targetKeys={[]}+ onChange={onChange}+ />,+ );+ // Clicking the row alone must NOT move it.+ fireEvent.click(screen.getByText("Movable"));+ expect(onChange).not.toHaveBeenCalled();++ fireEvent.click(screen.getByLabelText("Move selected to the right"));+ expect(onChange).toHaveBeenCalledWith(["1"], "right", ["1"]);+ });++ it("Transfer moves back to the left from the target panel", () => {+ const onChange = vi.fn();+ render(+ <Transfer+ dataSource={[{ key: "1", title: "Movable" }]}+ targetKeys={["1"]}+ onChange={onChange}+ />,+ );+ fireEvent.click(screen.getByText("Movable"));+ fireEvent.click(screen.getByLabelText("Move selected to the left"));+ expect(onChange).toHaveBeenCalledWith([], "left", ["1"]);+ });++ it("Transfer disables an arrow when nothing on that side is checked", () => {+ render(+ <Transfer dataSource={[{ key: "1", title: "A" }]} targetKeys={[]} />,+ );+ expect(screen.getByLabelText("Move selected to the right")).toBeDisabled();+ expect(screen.getByLabelText("Move selected to the left")).toBeDisabled();+ });++ it("Transfer shows an item count per panel, like antd", () => {+ render(+ <Transfer+ dataSource={[+ { key: "1", title: "A" },+ { key: "2", title: "B" },+ { key: "3", title: "C" },+ ]}+ targetKeys={["3"]}+ titles={["Source", "Target"]}+ />,+ );+ expect(screen.getByText("2 items")).toBeInTheDocument();+ expect(screen.getByText("1 items")).toBeInTheDocument();+ });++ /* `showSearch` was accepted and silently dropped. */+ it("Transfer renders a filter box per panel when showSearch is set", () => {+ render(+ <Transfer+ showSearch+ dataSource={[+ { key: "1", title: "Alpha" },+ { key: "2", title: "Beta" },+ ]}+ targetKeys={[]}+ />,+ );+ const boxes = screen.getAllByPlaceholderText("Search here");+ expect(boxes).toHaveLength(2);++ fireEvent.change(boxes[0], { target: { value: "alp" } });+ expect(screen.getByText("Alpha")).toBeInTheDocument();+ expect(screen.queryByText("Beta")).not.toBeInTheDocument();+ });++ it("Transfer renders no filter box without showSearch", () => {+ render(+ <Transfer dataSource={[{ key: "1", title: "A" }]} targetKeys={[]} />,+ );+ expect(+ screen.queryByPlaceholderText("Search here"),+ ).not.toBeInTheDocument();+ });++ it("Transfer select-all checks every row in its own panel", () => {+ const onChange = vi.fn();+ render(+ <Transfer+ dataSource={[+ { key: "1", title: "A" },+ { key: "2", title: "B" },+ ]}+ targetKeys={[]}+ titles={["Source", "Target"]}+ onChange={onChange}+ />,+ );+ fireEvent.click(screen.getByLabelText("Select all in Source"));+ fireEvent.click(screen.getByLabelText("Move selected to the right"));+ expect(onChange).toHaveBeenCalledWith(["1", "2"], "right", ["1", "2"]);+ });++ // Regression: these two bugs shipped to a dev deployment and produced an+ // icons-only sidebar sitting in a 240px gutter, plus an empty dashboard.++ it("Layout grows with flex-auto so nested flex:1 children get height", () => {+ const { container } = render(<Layout>content</Layout>);+ // flex-auto, NOT the default flex:0 1 auto — otherwise the element+ // computes to height 0 and every flex:1 descendant collapses.+ expect(container.firstChild.className).toContain("flex-auto");+ });++ it("Layout.Content also grows rather than staying flex-1", () => {+ const { container } = render(<Layout.Content>body</Layout.Content>);+ expect(container.firstChild.className).toContain("flex-auto");+ });++ it("Layout switches to a row when it contains a Sider", () => {+ const { container } = render(+ <Layout>+ <Layout.Sider>nav</Layout.Sider>+ <Layout.Content>body</Layout.Content>+ </Layout>,+ );+ expect(container.firstChild.className).toContain("flex-row");+ });++ // The real app renders its Sider inside <SideNavBar>, so child inspection+ // cannot see it — detection has to work at runtime, however deep it is.+ it("Layout detects a Sider nested inside another component", () => {+ function NestedNav() {+ return <Layout.Sider width={240}>nav</Layout.Sider>;+ }+ const { container } = render(+ <Layout>+ <NestedNav />+ <Layout.Content>body</Layout.Content>+ </Layout>,+ );+ expect(container.firstChild.className).toContain("flex-row");+ expect(container.firstChild.className).not.toContain("flex-col");+ });++ it("Layout stacks in a column with no Sider", () => {+ const { container } = render(+ <Layout>+ <Layout.Content>body</Layout.Content>+ </Layout>,+ );+ expect(container.firstChild.className).toContain("flex-col");+ });++ it("Sider renders at collapsedWidth when collapsed", () => {+ const { container } = render(+ <Layout.Sider width={240} collapsedWidth={65} collapsed>+ nav+ </Layout.Sider>,+ );+ expect(container.firstChild.style.width).toBe("65px");+ });++ it("Sider renders at full width when not collapsed", () => {+ const { container } = render(+ <Layout.Sider width={240} collapsedWidth={65} collapsed={false}>+ nav+ </Layout.Sider>,+ );+ expect(container.firstChild.style.width).toBe("240px");+ });++ /**+ * antd wraps a Sider's children in `.ant-layout-sider-children`, and+ * SideNavBar.css depends on it: that wrapper is the flex column which clamps+ * `.sidebar-content-wrapper` so its `overflow-y: auto` has something to+ * scroll against. Rendering children bare skipped the clamp, the scroll+ * wrapper grew to its full content height (929px in a 668px rail), and the+ * bottom menu items became unreachable.+ */+ it("Sider wraps children in .ant-layout-sider-children like antd", () => {+ const { container } = render(+ <Layout.Sider width={240}>+ <span>nav content</span>+ </Layout.Sider>,+ );+ const wrapper = container.querySelector(".ant-layout-sider-children");+ expect(wrapper).toBeTruthy();+ expect(wrapper.textContent).toContain("nav content");+ // The child must be INSIDE the wrapper, not a sibling of it.+ expect(container.firstChild.children).toHaveLength(1);+ });++ it("Sider does not leak antd-only props onto the DOM", () => {+ const { container } = render(+ <Layout.Sider width={240} collapsedWidth={65} collapsible trigger={null}>+ nav+ </Layout.Sider>,+ );+ const el = container.firstChild;+ expect(el.getAttribute("collapsedwidth")).toBeNull();+ expect(el.getAttribute("collapsible")).toBeNull();+ });++ // Regression: the adapter pickers pass grid={{ column: 4 }}; ignoring it+ // rendered one card per row in a tall scroller instead of a 4-up grid.+ it("List renders a grid when antd's grid prop is supplied", () => {+ const { container } = render(+ <List+ grid={{ gutter: 16, column: 4 }}+ dataSource={[{ id: 1 }, { id: 2 }]}+ renderItem={(i) => <span>item {i.id}</span>}+ />,+ );+ const root = container.firstChild;+ expect(root.className).toContain("grid");+ expect(root.className).toContain("grid-cols-4");+ expect(root.className).not.toContain("divide-y");+ expect(root.style.gap).toBe("16px");+ });++ /**+ * `divide-y` sets the border WIDTH only; Tailwind's default border colour is+ * black. Without an explicit divide colour every list row gained a solid+ * black rule where antd drew a near-invisible hairline.+ *+ * The token is `separator` (#f0f0f0), not `border` (#e5e5e5): antd draws+ * this rule at rgba(5,5,5,.06), and --border is four shades darker, which+ * reads as a hard rule between rows rather than a hairline.+ */+ /*+ * The row wrapper must add NO vertical padding.+ *+ * antd puts the 16px on `.ant-list-item`, which is what `renderItem`+ * returns, so padding the wrapper as well stacks a second 16+16px. That+ * shipped twice: `py-2` gave 96px rows and the "fix" to `py-4` gave 114px,+ * both against the reference's 82px — and jsdom reports no geometry, so+ * only the class list can catch it.+ */+ it("List does not pad the row wrapper (renderItem owns its padding)", () => {+ const { container } = render(+ <List dataSource={[{ id: 1 }]} renderItem={(i) => <span>{i.id}</span>} />,+ );+ const wrapper = container.firstChild.firstChild;+ expect(+ wrapper.className,+ "the wrapper must not add py-*; antd pads .ant-list-item, which renderItem returns",+ ).not.toMatch(/\bpy-\d/);+ });++ it("List colours its row dividers with the separator token", () => {+ const { container } = render(+ <List+ dataSource={[{ id: 1 }, { id: 2 }]}+ renderItem={(i) => <span>{i.id}</span>}+ />,+ );+ expect(container.firstChild.className).toContain("divide-separator");+ });++ /*+ * `extra` is antd's OTHER trailing slot, and dropping it is silent: an+ * unknown prop on a <div> renders nothing and throws nothing. Share access+ * puts its revoke-access delete icon there, so the modal listed who a+ * resource was shared with and offered no way to un-share them.+ */+ it("List.Item renders the extra slot, not just actions", () => {+ render(+ <List+ dataSource={[{ id: 1 }]}+ renderItem={() => (+ <List.Item extra={<button type="button">Revoke</button>}>+ <span>[email protected]</span>+ </List.Item>+ )}+ />,+ );+ expect(screen.getByRole("button", { name: "Revoke" })).toBeInTheDocument();+ });++ it("List.Item renders actions and extra together", () => {+ render(+ <List+ dataSource={[{ id: 1 }]}+ renderItem={() => (+ <List.Item+ actions={[+ <button type="button" key="edit">+ Edit+ </button>,+ ]}+ extra={<button type="button">Revoke</button>}+ >+ <span>row</span>+ </List.Item>+ )}+ />,+ );+ expect(screen.getByRole("button", { name: "Edit" })).toBeInTheDocument();+ expect(screen.getByRole("button", { name: "Revoke" })).toBeInTheDocument();+ });++ it("List still stacks when no grid prop is given", () => {+ const { container } = render(+ <List dataSource={[{ id: 1 }]} renderItem={(i) => <span>{i.id}</span>} />,+ );+ expect(container.firstChild.className).toContain("divide-y");+ expect(container.firstChild.className).not.toContain("grid-cols");+ });+ /**+ * `Upload.Dragger = Upload` aliased the dragger to the plain inline Upload,+ * so the Import Project modal rendered its icon and help text with no drop+ * zone around them, and dropping a file did nothing.+ */+ describe("Upload.Dragger (antd parity)", () => {+ it("renders a dashed drop zone, not the inline Upload span", () => {+ const { container } = render(+ <Upload.Dragger>+ <p>Click or drag file to this area</p>+ </Upload.Dragger>,+ );+ expect(container.querySelector(".ant-upload-drag")).toBeTruthy();+ const zone = container.querySelector("[class*='border-dashed']");+ expect(zone).toBeTruthy();+ expect(screen.getByText(/Click or drag file/)).toBeInTheDocument();+ });++ it("accepts a dropped file and routes it through beforeUpload", async () => {+ const beforeUpload = vi.fn().mockReturnValue(false);+ const { container } = render(+ <Upload.Dragger beforeUpload={beforeUpload}>+ <p>drop here</p>+ </Upload.Dragger>,+ );+ const file = new File(["{}"], "project.json", {+ type: "application/json",+ });+ fireEvent.drop(container.querySelector(".ant-upload-drag"), {+ dataTransfer: { files: [file] },+ });+ await vi.waitFor(() =>+ expect(beforeUpload).toHaveBeenCalledWith(file, [file]),+ );+ });++ /*+ * antd's `beforeUpload` returning false cancels only the UPLOAD — the+ * file still enters fileList and onChange still fires. The shim returned+ * early instead, so Import Project's fileList stayed empty and clicking+ * Import answered "Please select a file to import" for the JSON the user+ * had just picked.+ */+ it("still reports the file when beforeUpload returns false", async () => {+ const onChange = vi.fn();+ const { container } = render(+ <Upload.Dragger beforeUpload={() => false} onChange={onChange}>+ <p>drop here</p>+ </Upload.Dragger>,+ );+ const file = new File(["{}"], "project.json", {+ type: "application/json",+ });+ fireEvent.change(container.querySelector("input[type='file']"), {+ target: { files: [file] },+ });++ await vi.waitFor(() => expect(onChange).toHaveBeenCalled());+ const info = onChange.mock.calls.at(-1)[0];+ expect(info.fileList).toHaveLength(1);+ expect(info.fileList[0].originFileObj).toBe(file);+ expect(info.fileList[0].name).toBe("project.json");+ // `false` is not an upload, so it must not be reported as a completed one.+ expect(info.file.status).toBeUndefined();+ });++ it("appends to the fileList the call-site already holds", async () => {+ const onChange = vi.fn();+ const held = [{ uid: "a", name: "first.json" }];+ const { container } = render(+ <Upload.Dragger+ multiple+ fileList={held}+ beforeUpload={() => false}+ onChange={onChange}+ >+ <p>drop here</p>+ </Upload.Dragger>,+ );+ fireEvent.change(container.querySelector("input[type='file']"), {+ target: { files: [new File(["{}"], "second.json")] },+ });++ await vi.waitFor(() => expect(onChange).toHaveBeenCalled());+ expect(onChange.mock.calls.at(-1)[0].fileList.map((f) => f.name)).toEqual(+ ["first.json", "second.json"],+ );+ });++ it("replaces rather than queues under maxCount={1}", async () => {+ const onChange = vi.fn();+ const { container } = render(+ <Upload.Dragger+ maxCount={1}+ fileList={[{ uid: "a", name: "first.json" }]}+ beforeUpload={() => false}+ onChange={onChange}+ >+ <p>drop here</p>+ </Upload.Dragger>,+ );+ fireEvent.change(container.querySelector("input[type='file']"), {+ target: { files: [new File(["{}"], "second.json")] },+ });++ await vi.waitFor(() => expect(onChange).toHaveBeenCalled());+ expect(onChange.mock.calls.at(-1)[0].fileList.map((f) => f.name)).toEqual(+ ["second.json"],+ );+ });++ /*+ * `Upload.LIST_IGNORE` was undefined, so a call-site returning it (Look-up+ * Studio's oversize-file veto) did not match `=== false` and fell through+ * to the success path — a rejected file reported as uploaded.+ */+ it("drops the file entirely when beforeUpload returns LIST_IGNORE", async () => {+ const onChange = vi.fn();+ const { container } = render(+ <Upload.Dragger+ beforeUpload={() => Upload.LIST_IGNORE}+ onChange={onChange}+ >+ <p>drop here</p>+ </Upload.Dragger>,+ );+ fireEvent.change(container.querySelector("input[type='file']"), {+ target: { files: [new File(["x"], "huge.pdf")] },+ });+ await new Promise((r) => setTimeout(r, 0));+ expect(onChange).not.toHaveBeenCalled();+ });++ /*+ * With beforeUpload returning false nothing else on screen changes, so+ * the list is the only sign the file registered at all.+ */+ it("lists the staged files and removes one on demand", async () => {+ const onChange = vi.fn();+ render(+ <Upload.Dragger+ fileList={[{ uid: "a", name: "project.json" }]}+ beforeUpload={() => false}+ onChange={onChange}+ >+ <p>drop here</p>+ </Upload.Dragger>,+ );+ expect(screen.getByText("project.json")).toBeInTheDocument();++ fireEvent.click(screen.getByRole("button", { name: /Remove project/i }));+ await vi.waitFor(() => expect(onChange).toHaveBeenCalled());+ expect(onChange.mock.calls.at(-1)[0].fileList).toEqual([]);+ });++ it("honours showUploadList={false}", () => {+ render(+ <Upload.Dragger+ showUploadList={false}+ fileList={[{ uid: "a", name: "project.json" }]}+ >+ <p>drop here</p>+ </Upload.Dragger>,+ );+ expect(screen.queryByText("project.json")).toBeNull();+ });++ it("does not accept drops while disabled", () => {+ const beforeUpload = vi.fn();+ const { container } = render(+ <Upload.Dragger disabled beforeUpload={beforeUpload}>+ <p>drop here</p>+ </Upload.Dragger>,+ );+ fireEvent.drop(container.querySelector(".ant-upload-drag"), {+ dataTransfer: {+ files: [new File(["{}"], "x.json", { type: "application/json" })],+ },+ });+ expect(beforeUpload).not.toHaveBeenCalled();+ });+ });++ /**+ * With `action` set and no `customRequest`, antd POSTs the file itself.+ * The shim swallowed `action` into `...props` and fell through to the+ * no-uploader branch, so Manage Documents reported "File uploaded+ * successfully" and appended an empty document row for a request that was+ * never sent — and React warned about `action` on a non-`<form>` node.+ */+ describe("Upload `action` uploader (antd parity)", () => {+ const pickFile = (container, file) => {+ const input = container.querySelector("input[type='file']");+ fireEvent.change(input, { target: { files: [file] } });+ };++ const jsonResponse = (body, ok = true) => ({+ ok,+ text: () => Promise.resolve(JSON.stringify(body)),+ });++ afterEach(() => {+ vi.unstubAllGlobals();+ });++ it("POSTs the file to `action` as multipart with `headers` and `name`", async () => {+ const fetchMock = vi+ .fn()+ .mockResolvedValue(jsonResponse({ data: [{ document_id: "d1" }] }));+ vi.stubGlobal("fetch", fetchMock);++ const { container } = render(+ <Upload.Dragger+ name="file"+ action="/api/v1/upload"+ headers={{ "X-CSRFToken": "tok" }}+ >+ <p>drop here</p>+ </Upload.Dragger>,+ );+ const file = new File(["%PDF-"], "invoice.pdf", {+ type: "application/pdf",+ });+ pickFile(container, file);++ await vi.waitFor(() => expect(fetchMock).toHaveBeenCalledTimes(1));+ const [url, init] = fetchMock.mock.calls[0];+ expect(url).toBe("/api/v1/upload");+ expect(init.method).toBe("POST");+ expect(init.headers).toEqual({ "X-CSRFToken": "tok" });+ expect(init.body.get("file")).toBe(file);+ });++ it("reports `uploading` then `done` with the parsed response body", async () => {+ const body = { data: [{ document_id: "d1", document_name: "a.pdf" }] };+ vi.stubGlobal("fetch", vi.fn().mockResolvedValue(jsonResponse(body)));+ const onChange = vi.fn();++ const { container } = render(+ <Upload.Dragger name="file" action="/api/v1/upload" onChange={onChange}>+ <p>drop here</p>+ </Upload.Dragger>,+ );+ pickFile(+ container,+ new File(["%PDF-"], "a.pdf", { type: "application/pdf" }),+ );++ await vi.waitFor(() =>+ expect(onChange.mock.calls.map(([info]) => info.file.status)).toEqual([+ "uploading",+ "done",+ ]),+ );+ const done = onChange.mock.calls.at(-1)[0];+ expect(done.file.response).toEqual(body);+ });++ it("reports `error` with the parsed body when the server rejects it", async () => {+ const body = { errors: [{ detail: "File too large" }] };+ vi.stubGlobal(+ "fetch",+ vi.fn().mockResolvedValue(jsonResponse(body, false)),+ );+ const onChange = vi.fn();++ const { container } = render(+ <Upload.Dragger name="file" action="/api/v1/upload" onChange={onChange}>+ <p>drop here</p>+ </Upload.Dragger>,+ );+ pickFile(+ container,+ new File(["%PDF-"], "a.pdf", { type: "application/pdf" }),+ );++ await vi.waitFor(() =>+ expect(onChange.mock.calls.at(-1)[0].file.status).toBe("error"),+ );+ expect(onChange.mock.calls.at(-1)[0].file.response).toEqual(body);+ });++ it("does not leak `action` onto the DOM node", () => {+ const { container } = render(+ <Upload.Dragger name="file" action="/api/v1/upload">+ <p>drop here</p>+ </Upload.Dragger>,+ );+ expect(container.querySelector("[action='/api/v1/upload']")).toBeNull();+ });++ it("skips the upload when beforeUpload rejects, without an unhandled rejection", async () => {+ const fetchMock = vi.fn();+ vi.stubGlobal("fetch", fetchMock);+ const beforeUpload = vi+ .fn()+ .mockRejectedValue(new Error("File name already exists"));++ const { container } = render(+ <Upload.Dragger+ name="file"+ action="/api/v1/upload"+ beforeUpload={beforeUpload}+ >+ <p>drop here</p>+ </Upload.Dragger>,+ );+ pickFile(+ container,+ new File(["%PDF-"], "a.pdf", { type: "application/pdf" }),+ );++ await vi.waitFor(() => expect(beforeUpload).toHaveBeenCalled());+ expect(fetchMock).not.toHaveBeenCalled();+ });++ it("does not report success when there is no uploader at all", () => {+ const onChange = vi.fn();+ const { container } = render(+ <Upload.Dragger onChange={onChange}>+ <p>drop here</p>+ </Upload.Dragger>,+ );+ const file = new File(["{}"], "p.json", { type: "application/json" });+ pickFile(container, file);+ // The no-action call-sites (FileUpload, FileWidget) read the File off+ // `originFileObj` and upload it themselves, so this path must stay.+ expect(onChange).toHaveBeenCalledWith(+ expect.objectContaining({+ file: expect.objectContaining({+ status: "done",+ originFileObj: file,+ }),+ }),+ );+ });+ });++ /*+ * The Settings menu passes an icon per item. Dropped straight into the flex+ * row, a LONG label squeezes the SVG to width 0 while leaving its height at+ * 24 — "SummarizedExtraction" rendered as a blank gap where every shorter+ * sibling showed its icon. The icon needs its own shrink-0 box.+ */+ describe("Menu icons", () => {+ it("renders an icon for every item, including long labels", () => {+ const { container } = render(+ <Menu+ items={[+ { key: "1", label: "Grammar", icon: <svg data-testid="i1" /> },+ {+ key: "2",+ label: "SummarizedExtraction",+ icon: <svg data-testid="i2" />,+ },+ ]}+ />,+ );+ expect(container.querySelectorAll("svg")).toHaveLength(2);+ });++ it("gives the icon a shrink-proof wrapper so a long label cannot crush it", () => {+ const { container } = render(+ <Menu+ items={[+ {+ key: "2",+ label: "SummarizedExtraction",+ icon: <svg data-testid="i2" />,+ },+ ]}+ />,+ );+ const wrapper = container.querySelector("svg").parentElement;+ expect(wrapper.className).toContain("shrink-0");+ });++ /*+ * antd marks the selected item with a PRIMARY tint and primary text, not+ * a grey. `bg-accent` resolved to the same #f5f5f5 as the hover state, so+ * the active settings page looked identical to an idle one.+ */+ it("distinguishes the selected item from the hover state", () => {+ render(+ <Menu+ selectedKeys={["1"]}+ items={[+ { key: "1", label: "Active" },+ { key: "2", label: "Idle" },+ ]}+ />,+ );+ const active = screen.getByText("Active").closest("button");+ const idle = screen.getByText("Idle").closest("button");+ expect(active.className).toContain("text-primary");+ expect(active.className).not.toContain("bg-accent");+ expect(idle.className).not.toContain("text-primary");+ });++ it("renders items that carry no icon", () => {+ render(<Menu items={[{ key: "1", label: "Plain" }]} />);+ expect(screen.getByText("Plain")).toBeInTheDocument();+ });+ });++ /*+ * The Output Analyzer's Document List wires its handler to `onSelect`, not+ * `onClick` — antd fires both. Unhandled, the prop landed on the <nav> as+ * React's DOM `select` handler and picking another document did nothing.+ */+ describe("Menu onSelect", () => {+ it("fires onSelect with the picked key", async () => {+ const onSelect = vi.fn();+ render(+ <Menu+ selectedKeys={["0"]}+ items={[+ { key: "0", label: "bank_citi.pdf" },+ { key: "1", label: "BOFA_cc_statement.pdf" },+ ]}+ onSelect={onSelect}+ />,+ );+ await userEvent.click(screen.getByText("BOFA_cc_statement.pdf"));+ expect(onSelect).toHaveBeenCalledWith(+ expect.objectContaining({ key: "1", selectedKeys: ["1"] }),+ );+ });++ it("fires onClick and onSelect together, as antd does", async () => {+ const onClick = vi.fn();+ const onSelect = vi.fn();+ render(+ <Menu+ items={[{ key: "7", label: "Pick me" }]}+ onClick={onClick}+ onSelect={onSelect}+ />,+ );+ await userEvent.click(screen.getByText("Pick me"));+ expect(onClick).toHaveBeenCalledWith({ key: "7" });+ expect(onSelect).toHaveBeenCalledTimes(1);+ });+ });++ /*+ * The Configure Connector modal's file browser. `Tree.DirectoryTree` was+ * undefined, so picking any FILESYSTEM connector rendered `undefined` as an+ * element type and React #130 took down the whole workflow page.+ */+ describe("Tree.DirectoryTree", () => {+ const treeData = [+ { key: "docs", title: "docs", isLeaf: false },+ { key: "a.pdf", title: "a.pdf", isLeaf: true },+ ];++ it("is defined — a bare Tree has no directory browser", () => {+ expect(Tree.DirectoryTree).toBeDefined();+ });++ it("renders a row per node", () => {+ render(<Tree.DirectoryTree treeData={treeData} />);+ expect(screen.getByText("docs")).toBeInTheDocument();+ expect(screen.getByText("a.pdf")).toBeInTheDocument();+ });++ it("gives directories a switcher and leaves none", () => {+ render(<Tree.DirectoryTree treeData={treeData} />);+ expect(screen.getAllByRole("button", { name: "Expand" })).toHaveLength(1);+ });++ it("reports the expanded keys to onExpand", () => {+ const onExpand = vi.fn();+ render(<Tree.DirectoryTree treeData={treeData} onExpand={onExpand} />);+ fireEvent.click(screen.getByRole("button", { name: "Expand" }));+ expect(onExpand).toHaveBeenCalledWith(["docs"]);+ });++ it("passes the node to onSelect so the call-site can read isLeaf", () => {+ const onSelect = vi.fn();+ render(<Tree.DirectoryTree treeData={treeData} onSelect={onSelect} />);+ fireEvent.click(screen.getByText("a.pdf"));+ expect(onSelect).toHaveBeenCalledWith(+ ["a.pdf"],+ expect.objectContaining({+ node: expect.objectContaining({ key: "a.pdf", isLeaf: true }),+ }),+ );+ });++ /*+ * The connector browser lists one directory at a time: folders arrive+ * without `children` and are fetched on first expand. Without this the+ * tree is a flat list of directories that never open.+ */+ it("calls loadData when a childless directory is expanded", async () => {+ const loadData = vi.fn().mockResolvedValue(undefined);+ render(<Tree.DirectoryTree treeData={treeData} loadData={loadData} />);+ fireEvent.click(screen.getByRole("button", { name: "Expand" }));+ // Awaited: the switcher's loading state clears when loadData settles,+ // which is a state update after the click returns.+ await waitFor(() => {+ expect(loadData).toHaveBeenCalledWith(+ expect.objectContaining({ key: "docs" }),+ );+ });+ });++ it("does not re-fetch a directory whose children are already loaded", () => {+ const loadData = vi.fn().mockResolvedValue(undefined);+ render(+ <Tree.DirectoryTree+ treeData={[+ {+ key: "docs",+ title: "docs",+ children: [{ key: "docs/a.pdf", title: "a.pdf", isLeaf: true }],+ },+ ]}+ loadData={loadData}+ />,+ );+ fireEvent.click(screen.getByRole("button", { name: "Expand" }));+ expect(loadData).not.toHaveBeenCalled();+ });++ it("hides children until the directory is expanded", () => {+ const nested = [+ {+ key: "docs",+ title: "docs",+ children: [{ key: "docs/a.pdf", title: "a.pdf", isLeaf: true }],+ },+ ];+ render(<Tree.DirectoryTree treeData={nested} />);+ expect(screen.queryByText("a.pdf")).not.toBeInTheDocument();+ fireEvent.click(screen.getByRole("button", { name: "Expand" }));+ expect(screen.getByText("a.pdf")).toBeInTheDocument();+ });++ it("honours controlled expandedKeys", () => {+ const nested = [+ {+ key: "docs",+ title: "docs",+ children: [{ key: "docs/a.pdf", title: "a.pdf", isLeaf: true }],+ },+ ];+ render(<Tree.DirectoryTree treeData={nested} expandedKeys={["docs"]} />);+ expect(screen.getByText("a.pdf")).toBeInTheDocument();+ });++ /*+ * FileExplorer passes `expandAction={false}` so that clicking a folder+ * selects it as the destination without also opening it. If the row+ * handler still toggled, choosing a folder would expand it every time.+ */+ it("expandAction={false} keeps a row click from expanding", () => {+ const onExpand = vi.fn();+ render(+ <Tree.DirectoryTree+ treeData={treeData}+ expandAction={false}+ onExpand={onExpand}+ />,+ );+ fireEvent.click(screen.getByText("docs"));+ expect(onExpand).not.toHaveBeenCalled();+ });++ // The switcher sits inside the clickable row; without stopPropagation the+ // row handler fires too and (under the default expandAction) toggles back.+ it("expands exactly once when the switcher is clicked", () => {+ const onExpand = vi.fn();+ render(<Tree.DirectoryTree treeData={treeData} onExpand={onExpand} />);+ fireEvent.click(screen.getByRole("button", { name: "Expand" }));+ expect(onExpand).toHaveBeenCalledTimes(1);+ expect(onExpand).toHaveBeenCalledWith(["docs"]);+ });+ });++ describe("Steps", () => {+ it("renders titles from the `items` data prop", () => {+ render(+ <Steps current={0} items={[{ title: "One" }, { title: "Two" }]} />,+ );+ expect(screen.getByText("One")).toBeInTheDocument();+ expect(screen.getByText("Two")).toBeInTheDocument();+ });++ // CreateApiDeploymentFromPromptStudio uses `const { Step } = Steps`.+ it("renders the legacy <Steps.Step> children form", () => {+ render(+ <Steps current={0}>+ <Steps.Step title="Deployment Details" />+ <Steps.Step title="Tool Settings" />+ </Steps>,+ );+ expect(screen.getByText("Deployment Details")).toBeInTheDocument();+ expect(screen.getByText("Tool Settings")).toBeInTheDocument();+ });++ // antd's token, not a DOM attribute — forwarding it warns and does nothing.+ it("does not forward `size` to the DOM", () => {+ const { container } = render(+ <Steps current={0} size="small" items={[{ title: "One" }]} />,+ );+ expect(container.querySelector("ol")).not.toHaveAttribute("size");+ });++ /*+ * The cloud Agentic Prompt Studio onboarding stepper is a navigation+ * control: each step jumps to its tab. The shim dropped `onChange`, so+ * every step rendered as inert text and the guide could not be used to+ * navigate at all.+ */+ it("makes steps clickable when onChange is given", async () => {+ const onChange = vi.fn();+ render(+ <Steps+ current={1}+ onChange={onChange}+ items={[{ title: "One" }, { title: "Two" }, { title: "Three" }]}+ />,+ );++ await userEvent.click(screen.getByRole("button", { name: /Three/ }));+ expect(onChange).toHaveBeenCalledWith(2);+ });++ it("leaves steps inert when onChange is omitted", () => {+ render(+ <Steps current={0} items={[{ title: "One" }, { title: "Two" }]} />,+ );+ expect(screen.queryAllByRole("button")).toHaveLength(0);+ });++ it("keeps a disabled step unclickable", () => {+ const onChange = vi.fn();+ render(+ <Steps+ current={0}+ onChange={onChange}+ items={[{ title: "One" }, { title: "Two", disabled: true }]}+ />,+ );+ expect(screen.getAllByRole("button")).toHaveLength(1);+ expect(screen.getByRole("button", { name: /One/ })).toBeInTheDocument();+ });++ /*+ * The onboarding stepper passes an explicit status per item. Ignoring it+ * left every completed step looking identical to the current one, so the+ * guide gave no read on progress.+ */+ it("marks a finished step done and the current one active", () => {+ render(+ <Steps+ current={1}+ items={[+ { title: "One", status: "finish" },+ { title: "Two", status: "process" },+ { title: "Three", status: "wait" },+ ]}+ />,+ );++ const [one, two, three] = screen.getAllByRole("listitem");+ // finish renders a check rather than its number.+ expect(within(one).queryByText("1")).not.toBeInTheDocument();+ expect(within(two).getByText("2")).toBeInTheDocument();+ expect(within(three).getByText("3")).toBeInTheDocument();+ expect(+ within(two).getByText("Two").closest("[aria-current]"),+ ).toHaveAttribute("aria-current", "step");+ });++ it("derives status from `current` when items carry none", () => {+ render(+ <Steps current={1} items={[{ title: "One" }, { title: "Two" }]} />,+ );+ const [one, two] = screen.getAllByRole("listitem");+ // index 0 < current ⇒ finish ⇒ check instead of "1".+ expect(within(one).queryByText("1")).not.toBeInTheDocument();+ expect(within(two).getByText("2")).toBeInTheDocument();+ });++ // The top-level `status` prop applies to the current step only.+ it("applies the top-level status to the current step", () => {+ render(+ <Steps+ current={1}+ status="error"+ items={[{ title: "One" }, { title: "Two" }]}+ />,+ );+ const [, two] = screen.getAllByRole("listitem");+ expect(within(two).queryByText("2")).not.toBeInTheDocument();+ expect(within(two).getByText("Two")).toHaveClass("text-destructive");+ });++ it("renders item descriptions", () => {+ render(+ <Steps+ current={0}+ items={[{ title: "One", description: "Pick a doc" }]}+ />,+ );+ expect(screen.getByText("Pick a doc")).toBeInTheDocument();+ });++ it("carries status and disabled through the <Steps.Step> children form", () => {+ const onChange = vi.fn();+ render(+ <Steps current={1} onChange={onChange}>+ <Steps.Step title="One" status="finish" />+ <Steps.Step title="Two" disabled />+ </Steps>,+ );+ expect(screen.getAllByRole("button")).toHaveLength(1);+ expect(screen.getByRole("button", { name: /One/ })).toBeInTheDocument();+ });+ });+});diff --git a/frontend/src/components/ui/shims/antd-structure.tsx b/frontend/src/components/ui/shims/antd-structure.tsxnew file mode 100644index 000000000..c47161507--- /dev/null+++ b/frontend/src/components/ui/shims/antd-structure.tsx@@ -0,0 +1,2588 @@+import {+ Check,+ ChevronDown,+ ChevronLeft,+ ChevronRight,+ CircleCheck,+ CircleX,+ LoaderCircle,+ Paperclip,+ Upload as UploadIcon,+ X,+} from "lucide-react";+import * as React from "react";+import { DataTable } from "@/components/data-table/DataTable";+import {+ CardContent,+ CardHeader,+ CardTitle,+ Card as ShadcnCard,+} from "@/components/ui/card";+import { Checkbox } from "@/components/ui/checkbox";+import { Input } from "@/components/ui/input";+import {+ Sheet,+ SheetContent,+ SheetHeader,+ SheetTitle,+} from "@/components/ui/sheet";+import { Button } from "@/components/ui/shims/antd-button";+import { Empty } from "@/components/ui/shims/antd-leaves";+import { Skeleton as ShadcnSkeleton } from "@/components/ui/skeleton";+import {+ Tabs as ShadcnTabs,+ TabsContent,+ TabsList,+ TabsTrigger,+} from "@/components/ui/tabs";+import { cn } from "@/lib/utils";++/**+ * antd-compatible structural components (P4): Table, Card, Tabs, List, Layout,+ * Upload, Result, Drawer, Menu, Segmented, Pagination, Steps, Tree, Skeleton.+ *+ * `Table` delegates to the shared DataTable (D5/D9) so there is exactly one+ * table implementation. The rest are thin wrappers that keep antd's prop names+ * so the last 68 call-site files convert by import.+ */++/** antd `<Table>` → the shared DataTable. */+/*+ * Namespace objects use Object.assign so the statics stay in the inferred+ * type: `<Card.Meta>` and `<Collapse.Panel>`-style sub-components must both+ * type-check AND remain resolvable by value, because the shim-completeness+ * guard reads them that way to catch a missing one before React error #130+ * takes down a whole route.+ */+function Column() {+ return null;+}+const Table = Object.assign(DataTable, { Column });++/** antd `<Card title extra bordered>`. */+/**+ * The antd surface these structural shims accept.+ *+ * Enumerated by hand, like the other shims, because the failure mode of this+ * layer is the silent prop-drop: a call-site passes something the shim never+ * destructures and `...props` swallows it with no error at all. `Upload.Dragger`+ * is the cautionary tale here — it was aliased to `Upload`, so the drop zone+ * rendered as a plain button and drag-and-drop simply did nothing.+ */+type SizeToken = "small" | "middle" | "large" | "default";++/** A `{ key, label }` descriptor, antd's usual shape for list-like data. */+interface KeyedItem {+ key?: string;+ label?: React.ReactNode;+ children?: React.ReactNode;+ icon?: React.ReactNode;+ disabled?: boolean;+ /**+ * Overrides the id Tabs derives from its own `data-testid`. Worth setting+ * where `key` is a uuid or a bare ordinal, which makes a poor locator.+ */+ "data-testid"?: string;+}++interface CardProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {+ title?: React.ReactNode;+ /** Rendered at the top-right of the header. */+ extra?: React.ReactNode;+ bordered?: boolean;+ size?: SizeToken;+ /**+ * antd's `hoverable`: the card is a click target, so it gets a pointer+ * cursor and lifts on hover. Ten call sites pass it, and until it was+ * declared here `...props` put it on the `<div>` as an unknown attribute --+ * the cards read as inert.+ */+ hoverable?: boolean;+ /** antd v5 per-slot style overrides, e.g. `{ body: {...} }`. */+ styles?: { header?: React.CSSProperties; body?: React.CSSProperties };+}++interface TabsProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {+ items?: Array<KeyedItem & { children?: React.ReactNode }>;+ activeKey?: string;+ defaultActiveKey?: string;+ onChange?: (key: string) => void;+ tabBarExtraContent?: React.ReactNode;+ type?: "line" | "card" | "editable-card";+ /*+ * Passed by the cloud manual-review plugin (`<Tabs … size="large">`) and+ * accepted rather than forwarded — the tab sizing comes from the shadcn+ * primitive's own classes. Declared because omitting it would make the+ * cloud build fail to compile against this interface, which is precisely+ * the silent gap that typing this layer is meant to expose.+ */+ size?: SizeToken;+ /**+ * Declared explicitly: React's `HTMLAttributes` does not carry `data-*` at+ * all — JSX lets them through on intrinsic elements only — so destructuring+ * one out of these props is a type error without this line.+ */+ "data-testid"?: string;+}++interface ListProps<T = unknown> extends React.HTMLAttributes<HTMLDivElement> {+ dataSource?: T[];+ renderItem?: (item: T, index: number) => React.ReactNode;+ header?: React.ReactNode;+ footer?: React.ReactNode;+ /** antd's responsive grid; `column` picks the fixed column count. */+ grid?: { column?: number; gutter?: number };+ locale?: { emptyText?: React.ReactNode };+}++interface LayoutProps extends React.HTMLAttributes<HTMLDivElement> {+ /** antd uses this to switch the flex direction when a Sider is present. */+ hasSider?: boolean;+}++/** antd's file wrapper. `originFileObj` is the real File the call-sites read. */+interface UploadFile {+ uid?: string;+ name?: string;+ status?: "uploading" | "done" | "error" | "removed";+ originFileObj?: File;+ response?: unknown;+}++interface UploadProps+ extends Omit<React.HTMLAttributes<HTMLElement>, "onChange"> {+ /** Returning false cancels the upload, as antd does. */+ beforeUpload?: (file: File, fileList: File[]) => boolean | Promise<unknown>;+ customRequest?: (options: {+ file: File;+ onSuccess?: (body?: unknown) => void;+ onError?: (err?: unknown) => void;+ }) => void;+ onChange?: (info: { file: UploadFile; fileList: UploadFile[] }) => void;+ /**+ * antd's declarative uploader: with `action` set and no `customRequest`,+ * antd itself POSTs the file as multipart. Destructured rather than left to+ * `...props` for two reasons — the shim has to actually send the request,+ * and React rejects `action` on a non-`<form>` DOM node.+ */+ action?: string;+ headers?: Record<string, string>;+ /** The multipart field name antd posts the file under. */+ name?: string;+ accept?: string;+ multiple?: boolean;+ showUploadList?: boolean;+ fileList?: UploadFile[];+ /** antd truncates the list to this; `1` REPLACES rather than truncates. */+ maxCount?: number;+ /** Returning false (or rejecting) vetoes the removal, as antd does. */+ onRemove?: (file: UploadFile) => boolean | void | Promise<unknown>;+ disabled?: boolean;+}++interface ResultProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {+ status?: "success" | "error" | "info" | "warning" | "404" | "403" | "500";+ title?: React.ReactNode;+ subTitle?: React.ReactNode;+ extra?: React.ReactNode;+ icon?: React.ReactNode;+}++interface DrawerProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {+ open?: boolean;+ onClose?: () => void;+ title?: React.ReactNode;+ placement?: "top" | "right" | "bottom" | "left";+ width?: number | string;+ /** antd renders a top-right close button unless this is false. */+ closable?: boolean;+ /**+ * antd's per-slot style overrides. Only `body` is honoured — no call-site+ * uses the others, and silently accepting them would be worse than the+ * type error.+ */+ styles?: { body?: React.CSSProperties };+ /**+ * Accepted and ignored: Radix already unmounts the panel on close, which is+ * what antd's `destroyOnClose` asks for. Declared so it is consumed rather+ * than spread onto the DOM node.+ */+ destroyOnClose?: boolean;+}++interface SegmentedOption {+ label?: React.ReactNode;+ value: string | number;+ icon?: React.ReactNode;+}++interface SegmentedProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {+ /** antd accepts bare strings as well as `{ label, value }` objects. */+ options?: Array<SegmentedOption | string>;+ value?: string | number;+ onChange?: (value: string | number) => void;+ /**+ * Declared explicitly: React's `HTMLAttributes` does not carry `data-*` at+ * all — JSX lets them through on intrinsic elements only — so destructuring+ * one out of these props is a type error without this line.+ */+ "data-testid"?: string;+}++interface MenuProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "onClick" | "onSelect"> {+ items?: KeyedItem[];+ selectedKeys?: string[];+ onClick?: (info: { key: string }) => void;+ /**+ * antd fires `onSelect` alongside `onClick` whenever a selectable item is+ * picked, and plenty of call sites listen on that one alone — the Output+ * Analyzer's Document List does. Without it declared here the prop fell+ * through to the <nav> as React's DOM `select` handler, which never fires+ * on a click, so switching documents silently did nothing.+ */+ onSelect?: (info: {+ key: string;+ keyPath: string[];+ selectedKeys: string[];+ }) => void;+ mode?: "vertical" | "horizontal" | "inline";+}++interface SkeletonProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {+ active?: boolean;+ /** `true`, or `{ rows }` for an explicit line count. */+ paragraph?: boolean | { rows?: number };+ title?: boolean;+}++type StepStatus = "wait" | "process" | "finish" | "error";++interface StepItem {+ title?: React.ReactNode;+ description?: React.ReactNode;+ /** Overrides the status derived from this step's index vs `current`. */+ status?: StepStatus;+ icon?: React.ReactNode;+ /** antd keeps a disabled step unclickable even when `onChange` is set. */+ disabled?: boolean;+}++interface StepsProps+ extends Omit<React.HTMLAttributes<HTMLOListElement>, "onChange"> {+ current?: number;+ items?: StepItem[];+ /** antd applies this to the CURRENT step; the others follow `current`. */+ status?: StepStatus;+ /**+ * Present ⇒ the steps become clickable, as antd's `<Steps onChange>` does.+ * Omitted ⇒ they stay inert text, which is what the API-deployment wizard+ * wants.+ */+ onChange?: (current: number) => void;+ /** antd's token, not a DOM attribute — consumed rather than forwarded. */+ size?: SizeToken;+ /** The legacy `<Steps.Step>` children form. */+ children?: React.ReactNode;+}++interface PaginationProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {+ current?: number;+ pageSize?: number;+ total?: number;+ onChange?: (page: number, pageSize: number) => void;+ showSizeChanger?: boolean;+}++interface TreeNode {+ key: string;+ title?: React.ReactNode;+ icon?: React.ReactNode;+ /** A file rather than a directory: no switcher, never expandable. */+ isLeaf?: boolean;+ children?: TreeNode[];+}++interface TreeProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {+ treeData?: TreeNode[];+ onSelect?: (keys: string[], info: { node: TreeNode }) => void;+}++interface DirectoryTreeProps extends TreeProps {+ expandedKeys?: string[];+ selectedKeys?: string[];+ onExpand?: (keys: string[]) => void;+ /** Resolves once the node's children have been fetched into `treeData`. */+ loadData?: (node: TreeNode) => Promise<unknown> | void;+ switcherIcon?: React.ReactNode;+ /** `false` limits expanding to the switcher; antd's default is the row. */+ expandAction?: false | "click" | "doubleClick";+ showLine?: boolean;+ autoExpandParent?: boolean;+ rootClassName?: string;+}++interface DescriptionsProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {+ title?: React.ReactNode;+ items?: Array<{+ key?: string;+ label?: React.ReactNode;+ children?: React.ReactNode;+ }>;+ column?: number;+ bordered?: boolean;+ /** antd appends a colon to the label of a NON-bordered Descriptions. */+ colon?: boolean;+ /*+ * Passed by two cloud plugins (`size="small"` / `"middle"`). Accepted+ * rather than forwarded — the DOM has no such attribute, and the density+ * comes from this shim's own classes.+ */+ size?: SizeToken;+}++interface StatisticProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "prefix"> {+ title?: React.ReactNode;+ value?: React.ReactNode;+ /** Decimal places applied when `value` is numeric. */+ precision?: number;+ prefix?: React.ReactNode;+ suffix?: React.ReactNode;+ valueStyle?: React.CSSProperties;+}++interface FloatButtonProps+ extends Omit<React.HTMLAttributes<HTMLButtonElement>, "type"> {+ icon?: React.ReactNode;+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;+ tooltip?: React.ReactNode;+ type?: "default" | "primary";+}++interface TransferItem {+ key: string;+ title?: React.ReactNode;+ disabled?: boolean;+}++interface TransferProps+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {+ dataSource?: TransferItem[];+ targetKeys?: string[];+ /** antd reports the new target keys, the direction, and what moved. */+ onChange?: (+ nextTargetKeys: string[],+ direction: "left" | "right",+ movedKeys: string[],+ ) => void;+ render?: (item: TransferItem) => React.ReactNode;+ titles?: [React.ReactNode, React.ReactNode];+ /** Adds a filter box to each panel. Both manual-review call-sites pass it. */+ showSearch?: boolean;+ locale?: { searchPlaceholder?: string; notFoundContent?: React.ReactNode };+ disabled?: boolean;+}++interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {+ count?: number;+ /** Renders a dot instead of a number. */+ dot?: boolean;+ status?: "success" | "processing" | "default" | "error" | "warning";+ color?: string;+ /** Counts above this render as "N+". */+ overflowCount?: number;+ showZero?: boolean;+ offset?: [number, number];+}++const CardBase = React.forwardRef<HTMLDivElement, CardProps>(function Card(+ {+ title,+ extra,+ bordered = true,+ size,+ hoverable = false,+ className,+ styles,+ children,+ ...props+ },+ ref,+) {+ return (+ // The ant-* class names are emitted deliberately: this app has ~16 CSS+ // rules targeting `.ant-card-body` alone (heights, padding, overflow) and+ // more on head/extra. Without them those rules silently stop applying.+ <ShadcnCard+ ref={ref}+ className={cn(+ "ant-card",+ !bordered && "border-0 shadow-none",+ hoverable &&+ "cursor-pointer transition-shadow duration-200 hover:shadow-md",+ className,+ )}+ {...props}+ >+ {title || extra ? (+ <CardHeader+ className={cn(+ "ant-card-head flex-row items-center justify-between",+ size === "small" && "p-3",+ )}+ >+ {title ? (+ <CardTitle className="ant-card-head-title text-base">+ {title}+ </CardTitle>+ ) : (+ <span />+ )}+ {extra ? <div className="ant-card-extra">{extra}</div> : null}+ </CardHeader>+ ) : null}+ <CardContent+ className={cn("ant-card-body", size === "small" && "p-3 pt-0")}+ >+ {children}+ </CardContent>+ </ShadcnCard>+ );+});++/** antd `<Card.Meta avatar title description />`. */+function CardMeta({+ avatar,+ title,+ description,+ className,+}: {+ avatar?: React.ReactNode;+ title?: React.ReactNode;+ description?: React.ReactNode;+ className?: string;+}) {+ return (+ <div className={cn("ant-card-meta flex items-start gap-3", className)}>+ {avatar}+ <div className="min-w-0">+ {title ? (+ <div className="ant-card-meta-title font-medium">{title}</div>+ ) : null}+ {description ? (+ <div className="ant-card-meta-description text-sm text-muted-foreground">+ {description}+ </div>+ ) : null}+ </div>+ </div>+ );+}++/**+ * antd `<Tabs items activeKey onChange>`. Also supports the legacy+ * `<Tabs.TabPane>` children form.+ */+const TabsBase = React.forwardRef<HTMLDivElement, TabsProps>(function Tabs(+ {+ items,+ activeKey,+ defaultActiveKey,+ onChange,+ tabBarExtraContent,+ type,+ // Consumed, not forwarded: antd's token is not a DOM attribute.+ size: _size,+ className,+ children,+ "data-testid": testId,+ ...props+ },+ ref,+) {+ const panes =+ items ??+ React.Children.toArray(children)+ .filter(+ (+ c,+ ): c is React.ReactElement<{+ tabKey?: string;+ key?: string;+ tab?: React.ReactNode;+ icon?: React.ReactNode;+ children?: React.ReactNode;+ disabled?: boolean;+ "data-testid"?: string;+ }> => React.isValidElement(c),+ )+ .map((c) => ({+ /*+ * The ELEMENT's key, not `props.key` — React never puts `key` in+ * props, so reading it there yielded undefined for every pane and+ * nothing ever matched `activeKey`. CombinedOutput (the Output+ * Analyzer's profile tabs) uses `<Tabs.TabPane key=...>`, so its tabs+ * rendered permanently inactive with the panel `hidden`.+ *+ * `toArray` rewrites keys, and the prefix is NOT always ".$": children+ * arriving through a nested array — here a conditional pane followed by+ * a `.map()` — get ".N:$" instead. Strip either form, or the value+ * never matches antd's activeKey and the ".1:$…" string leaks out+ * through onChange as a profile id (that was the 500).+ */+ key: c.props.tabKey ?? String(c.key ?? "").replace(/^\.(\d+:)?\$/, ""),+ "data-testid": c.props["data-testid"],+ label: c.props.tab,+ // antd supports an icon on TabPane too, not just on `items`.+ icon: c.props.icon,+ children: c.props.children,+ disabled: c.props.disabled,+ }));++ const first = panes[0]?.key;++ return (+ <ShadcnTabs+ // Radix treats a present-but-undefined `value` as controlled, which+ // freezes the tabs. Pass EITHER value (antd's controlled activeKey) OR+ // defaultValue (uncontrolled), never both.+ {...(activeKey != null+ ? { value: String(activeKey) }+ : { defaultValue: String(defaultActiveKey ?? first ?? "") })}+ onValueChange={(v) => onChange?.(v)}+ className={cn("ant-tabs", className)}+ data-testid={testId}+ // Radix Root takes value/defaultValue/onValueChange/orientation only;+ // the remaining antd props are consumed above, not forwarded.+ >+ <div className="ant-tabs-nav flex items-center justify-between">+ {/*+ * antd's DEFAULT tab style is `line`: transparent strip, the active+ * label tinted and underlined. shadcn's primitive ships the `card`+ * look instead — a grey rounded pill with a raised active chip — which+ * is what Prompt Studio was rendering against the reference's+ * underline. `type="card"` opts back into the pill.+ *+ * Overridden here rather than in the primitive, so call-sites that+ * genuinely want shadcn's segmented tabs keep it.+ */}+ <TabsList+ className={cn(+ "ant-tabs-nav-list",+ type !== "card" &&+ "h-auto gap-4 rounded-none bg-transparent p-0 text-foreground",+ )}+ >+ {panes.map((p) => (+ <TabsTrigger+ key={String(p.key)}+ value={String(p.key)}+ data-testid={+ p["data-testid"] ??+ (testId && p.key != null ? `${testId}-tab-${p.key}` : undefined)+ }+ disabled={p.disabled}+ className={cn(+ type !== "card" &&+ // Underline the active tab; keep the label tinted like antd.+ "rounded-none border-b-2 border-transparent bg-transparent px-0 font-normal shadow-none data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-primary data-[state=active]:shadow-none",+ /*+ * antd pads line-style tabs `12px 0`, giving a 46px nav. Two+ * call-sites disagree about whether that is wanted:+ *+ * - Standalone navs (Agentic Prompt Studio's project tabs,+ * Prompt Studio's left panel) want antd's height. Without+ * the padding they render 24px against the reference's 46px.+ * - The doc-manager toolbar centres its tabs against a file+ * name and buttons, and padding inflates the label's own box+ * so the TEXT rides above the row's centre line (`pb-2` gave+ * 36px, `py-3` 48px, both ~5.6px off the file name).+ *+ * So pad by default and let that one toolbar opt out via CSS,+ * rather than making every other nav wrong to suit it.+ */+ type !== "card" && "py-3",+ // antd spaces the icon from its label; the base trigger has no+ // gap because it never expects two children.+ p.icon && "gap-2",+ )}+ >+ {/*+ * antd renders `items[].icon` before the label; the shim dropped+ * it, so the Dashboard's nested usage tabs (API Deployments, ETL+ * Pipelines, …) lost the icons the reference shows. `shrink-0`+ * keeps a lucide SVG from being squeezed by the label.+ */}+ {p.icon ? (+ <span className="flex shrink-0 items-center">{p.icon}</span>+ ) : null}+ {p.label}+ </TabsTrigger>+ ))}+ </TabsList>+ {tabBarExtraContent}+ </div>+ {panes.map((p) => (+ <TabsContent+ key={String(p.key)}+ value={String(p.key)}+ className="ant-tabs-content ant-tabs-tabpane"+ >+ {p.children}+ </TabsContent>+ ))}+ </ShadcnTabs>+ );+});++function TabPane({+ children,+}: {+ tab?: React.ReactNode;+ children?: React.ReactNode;+}) {+ return children ?? null;+}++// Written out so Tailwind sees the class names statically.+const LIST_GRID_COLS: Record<number, string> = {+ 1: "grid-cols-1",+ 2: "grid-cols-2",+ 3: "grid-cols-3",+ 4: "grid-cols-4",+ 6: "grid-cols-6",+};++/**+ * antd `<List dataSource renderItem grid>`.+ *+ * `grid={{ column: n, gutter: g }}` switches antd from a stacked list to an+ * n-column grid. Ignoring it (and rendering a divided vertical list) makes+ * every adapter picker show one card per row in a tall scroller instead of a+ * 4-up grid — which is what happened on the Add LLM / Add Connector modals.+ */+const ListBase = React.forwardRef<HTMLDivElement, ListProps>(function List(+ {+ dataSource = [],+ renderItem,+ header,+ footer,+ grid,+ className,+ locale,+ ...props+ },+ ref,+) {+ const cols = grid?.column;+ const isGrid = cols != null;++ return (+ <div+ ref={ref}+ className={cn(+ // `divide-y` sets the border WIDTH but not its colour, and Tailwind's+ // default border colour is black. antd's list separator is a+ // near-invisible rgba(5,5,5,.06) hairline, so without `divide-border`+ // every row gained a solid black rule between it and the next.+ /*+ * `divide-separator` (#f0f0f0), not `divide-border` (#e5e5e5).+ * antd draws this separator as rgba(5,5,5,.06), which composites to+ * #f0f0f0 on white — a hairline. --border is four shades darker and+ * read as a hard rule between rows. Scoped here rather than by+ * retargeting --border, which also paints card edges and <Separator>+ * app-wide. The token is declared in index.css for light AND dark.+ */+ isGrid ? "grid" : "divide-y divide-separator",+ isGrid && LIST_GRID_COLS[cols as number],+ className,+ )}+ style={isGrid && grid?.gutter ? { gap: grid.gutter } : undefined}+ {...props}+ >+ {header ? <div className="py-2 font-medium">{header}</div> : null}+ {dataSource.length ? (+ dataSource.map((item, i) => (+ /*+ * NO vertical padding here.+ *+ * antd's `.ant-list-item` owns the 16px, and `renderItem` returns+ * that item — so padding the wrapper too stacks a second 16+16px on+ * top. An earlier pass set `py-4` here to match antd's 16px and+ * produced 114px rows against the reference's 82px: the item was+ * already correct at 82px and the wrapper added the surplus. `py-2`+ * before it was the same bug, just smaller (96px).+ *+ * Call-sites that need padding put it on their own row (ListView+ * uses `.cur-pointer { padding: 16px 0 }`), which is where antd+ * puts it too.+ */+ <div key={i}>{renderItem?.(item, i)}</div>+ ))+ ) : (+ <div className="ant-list-empty-text">+ {/* antd shows an <Empty> illustration here, not a bare string. */}+ {locale?.emptyText ? (+ locale.emptyText+ ) : (+ <Empty description="No data" />+ )}+ </div>+ )}+ {footer ? <div className="py-2">{footer}</div> : null}+ </div>+ );+});++/**+ * antd `<List.Item actions extra>`.+ *+ * BOTH trailing slots have to be honoured. antd's horizontal item renders+ * `children`, then `actions`, then `extra`; call-sites pick whichever reads+ * better and expect the same right-hand placement from either. Accepting only+ * `actions` let `extra` fall into `...props` and land on the <div> as an+ * unknown DOM attribute, so the node was dropped without an error — which is+ * how Share access lost the delete icon that revokes a user's or group's+ * access, leaving no way to un-share at all. Export Tool, Group members and+ * Co-owners lost their row controls the same way.+ */+function ListItem({+ actions,+ extra,+ children,+ className,+ ...props+}: React.HTMLAttributes<HTMLDivElement> & {+ actions?: React.ReactNode[];+ extra?: React.ReactNode;+}) {+ return (+ <div+ className={cn("flex items-center justify-between gap-2", className)}+ {...props}+ >+ <div className="min-w-0 flex-1">{children}</div>+ {actions?.length || extra ? (+ <div className="flex items-center gap-2">+ {actions}+ {extra}+ </div>+ ) : null}+ </div>+ );+}+function ListItemMeta({+ avatar,+ title,+ description,+}: {+ avatar?: React.ReactNode;+ title?: React.ReactNode;+ description?: React.ReactNode;+}) {+ return (+ <div className="flex items-center gap-2">+ {avatar}+ <div className="min-w-0">+ {title ? <div className="font-medium">{title}</div> : null}+ {description ? (+ <div className="text-sm text-muted-foreground">{description}</div>+ ) : null}+ </div>+ </div>+ );+}++/**+ * antd `<Layout>` and its slots.+ *+ * Three behaviours here are load-bearing, and all three caused real breakage+ * when they were missing:+ *+ * 1. `flex-auto` — antd's Layout is `flex: auto`, so a nested Layout grows to+ * fill its parent. Without it the element computes `flex: 0 1 auto`, gets+ * height 0, and every descendant using `flex: 1` collapses while still+ * being present in the DOM.+ *+ * 2. `hasSider` — a Layout containing a Sider lays out as a ROW. antd detects+ * this at RUNTIME via context, not by inspecting children, and that+ * distinction matters: here the sider is rendered inside `<SideNavBar>`,+ * so no amount of `React.Children` inspection can see it. A Sider therefore+ * registers itself with the nearest Layout through context on mount.+ *+ * 3. `min-w-0` — the horizontal twin of the `min-h-0` beside it. A Layout is+ * itself a flex item, and a flex item's automatic minimum size is its+ * CONTENT's max-content width, so any page wide enough to overflow pushes+ * the Layout past its track instead of scrolling inside it. That is not a+ * few stray pixels: the agentic Prompt Studio nests percentage-width panes+ * (`.pd-left-panel { width: 50% }`) around a table the DataTable gives+ * `min-width: max-content` (antd `scroll={{ x: true }}`), and the two+ * resolve against each other until the shell measures ~500,000px wide.+ * Everything right of the viewport — the Export button, the PDF pane, five+ * of the six status columns — was rendered, just off-screen.+ */+const SiderRegistryContext = React.createContext<(() => () => void) | null>(+ null,+);++const LayoutBase = React.forwardRef<HTMLDivElement, LayoutProps>(+ function Layout({ className, hasSider, children, ...props }, ref) {+ // A descendant Sider flips this on mount, however deeply it is nested.+ const [siderDetected, setSiderDetected] = React.useState(false);+ const register = React.useCallback(() => {+ setSiderDetected(true);+ return () => setSiderDetected(false);+ }, []);++ const isRow = hasSider ?? siderDetected;++ return (+ <SiderRegistryContext.Provider value={register}>+ <div+ ref={ref}+ className={cn(+ "flex min-h-0 min-w-0 flex-auto",+ isRow ? "flex-row" : "flex-col",+ className,+ )}+ {...props}+ >+ {children}+ </div>+ </SiderRegistryContext.Provider>+ );+ },+);++function Header({ className, ...p }: React.HTMLAttributes<HTMLElement>) {+ return <header className={cn("flex items-center", className)} {...p} />;+}+function Content({ className, ...p }: React.HTMLAttributes<HTMLElement>) {+ return <main className={cn("min-h-0 flex-auto", className)} {...p} />;+}+/**+ * antd `<Layout.Sider collapsible collapsed collapsedWidth width>`.+ *+ * The collapse props are behaviour, not decoration: when `collapsed` is set,+ * antd renders the sider at `collapsedWidth` instead of `width`. Dropping them+ * (as a plain `<aside {...props}>` does) leaves the rail at full width while+ * its call-site hides every label behind `!collapsed` — an icons-only sidebar+ * in a 240px gutter. They are also consumed here so `collapsible` /+ * `collapsedWidth` never reach the DOM as invalid attributes.+ */+interface SiderProps extends React.HTMLAttributes<HTMLElement> {+ width?: number | string;+ collapsed?: boolean;+ collapsedWidth?: number;+ collapsible?: boolean;+ /** `null` removes antd's built-in collapse handle. */+ trigger?: React.ReactNode;+ breakpoint?: "xs" | "sm" | "md" | "lg" | "xl" | "xxl";+ onCollapse?: (collapsed: boolean) => void;+}++function Sider({+ className,+ width = 200,+ collapsed,+ collapsedWidth = 80,+ collapsible,+ trigger,+ breakpoint,+ onCollapse,+ style,+ children,+ ...p+}: SiderProps) {+ // Tell the nearest ancestor Layout to lay out as a row (antd's hasSider).+ const register = React.useContext(SiderRegistryContext);+ React.useEffect(() => register?.(), [register]);++ return (+ <aside+ className={cn(+ "ant-layout-sider shrink-0 transition-[width] duration-200",+ collapsed && "ant-layout-sider-collapsed",+ className,+ )}+ style={{ width: collapsed ? collapsedWidth : width, ...style }}+ data-collapsed={collapsed ? "true" : undefined}+ // .ant-layout-sider-collapsed is styled by the app's CSS.+ data-sider=""+ {...p}+ >+ {/*+ * antd wraps a Sider's children in `.ant-layout-sider-children`, and+ * SideNavBar.css depends on it: that wrapper is the flex column which+ * clamps `.sidebar-content-wrapper` so its `overflow-y: auto` has+ * something to scroll against.+ *+ * Rendering children bare skipped the clamp, so the scroll wrapper grew+ * to its full content height (929px inside a 668px rail), `auto` never+ * engaged, and the bottom menu items were simply unreachable.+ */}+ <div className="ant-layout-sider-children">{children}</div>+ </aside>+ );+}+function Footer({ className, ...p }: React.HTMLAttributes<HTMLElement>) {+ return <footer className={className} {...p} />;+}++/**+ * antd's sentinel for "reject this file AND keep it out of the list", as+ * opposed to `false`, which only cancels the upload. Same literal antd uses,+ * so a call-site importing either one behaves identically.+ */+const LIST_IGNORE = "__LIST_IGNORE__";++/** Stable enough to key the rendered list and to match on removal. */+const fileUid = (file: File) =>+ `${file.name}-${file.size}-${file.lastModified}`;++/** antd `<Upload beforeUpload customRequest action>` over a hidden file input. */+const UploadBase = React.forwardRef<HTMLElement, UploadProps>(function Upload(+ {+ beforeUpload,+ customRequest,+ onChange,+ action,+ headers,+ name,+ accept,+ multiple,+ showUploadList,+ fileList,+ maxCount,+ onRemove,+ disabled,+ children,+ className,+ ...props+ },+ ref,+) {+ const inputRef = React.useRef<HTMLInputElement>(null);++ const emit = (status: UploadFile["status"], file: File, response?: unknown) =>+ onChange?.({+ file: { name: file.name, status, response, originFileObj: file },+ fileList: fileList ?? [],+ });++ /**+ * antd hands the parsed body back as `info.file.response` on both the done+ * and error paths — Manage Documents reads `response.data[0]` for the new+ * document and `response.errors[0].detail` for the failure message, so a+ * non-JSON body has to degrade to text rather than throw.+ */+ const readBody = async (res: Response) => {+ const text = await res.text();+ try {+ return JSON.parse(text);+ } catch {+ return text;+ }+ };++ /**+ * The `action` uploader. Without it the shim fell straight through to the+ * `!customRequest` branch below and reported `status: "done"` for a request+ * it had never sent: Manage Documents logged "File uploaded successfully"+ * and appended an empty row for every file, and nothing reached the server.+ */+ const uploadToAction = async (endpoint: string, file: File) => {+ emit("uploading", file);+ const body = new FormData();+ body.append(name ?? "file", file);+ try {+ const res = await fetch(endpoint, {+ method: "POST",+ headers: headers ?? {},+ body,+ credentials: "same-origin",+ });+ const payload = await readBody(res);+ emit(res.ok ? "done" : "error", file, payload);+ } catch (err) {+ emit("error", file, err);+ }+ };++ /**+ * antd's `maxCount`: a limit of 1 REPLACES the selection rather than+ * truncating it, which is what Verticals' request body relies on to let a+ * second pick swap the attached file.+ */+ const capped = (list: UploadFile[]) => {+ if (!maxCount) {+ return list;+ }+ return maxCount === 1 ? list.slice(-1) : list.slice(0, maxCount);+ };++ /**+ * Record a file the call-site will upload itself, and tell it so.+ *+ * antd's fileList is cumulative across selections, so a batch starts from+ * whatever the call-site is already holding rather than replacing it.+ */+ const stage = (staged: UploadFile[], file: File) => {+ const entry: UploadFile = {+ uid: fileUid(file),+ name: file.name,+ originFileObj: file,+ };+ const next = capped([...staged, entry]);+ onChange?.({ file: entry, fileList: next });+ return next;+ };++ const handleFiles = async (files: File[]) => {+ let staged: UploadFile[] = [...(fileList ?? [])];+ for (const file of files) {+ // antd aborts the upload when beforeUpload returns false, and equally+ // when the promise it returned rejects — Manage Documents rejects to+ // veto a duplicate file name, which used to surface as an unhandled+ // rejection that killed the rest of the loop.+ let proceed: boolean | unknown = true;+ if (beforeUpload) {+ try {+ proceed = await beforeUpload(file, files);+ } catch {+ continue;+ }+ }+ /*+ * antd has two distinct ways of saying no, and the shim honoured+ * neither correctly. `LIST_IGNORE` drops the file outright; anything+ * else that is not `false` means "go ahead and upload". Without the+ * constant, `Upload.LIST_IGNORE` was `undefined` at the call-site, so+ * Look-up Studio's oversize-file veto fell through to the success path+ * and reported a file it had just rejected as uploaded.+ */+ if (proceed === LIST_IGNORE) {+ continue;+ }+ if (proceed === false) {+ /*+ * `false` cancels only the UPLOAD — antd still adds the file to+ * fileList and still fires onChange. Import Project, Verticals'+ * request body and Simple Prompt Studio all veto the automatic+ * upload and submit the file themselves, so this onChange is the+ * ONLY way they ever learn a file was picked. Returning early here+ * left their fileList permanently empty: Import Project answered+ * "Please select a file to import" for the file the user had just+ * chosen, so the JSON could never be imported at all.+ */+ staged = stage(staged, file);+ continue;+ }+ if (customRequest) {+ customRequest({+ file,+ onSuccess: (body?: unknown) => emit("done", file, body),+ onError: (err?: unknown) => emit("error", file, err),+ });+ } else if (action) {+ await uploadToAction(action, file);+ } else {+ onChange?.({+ file: { name: file.name, status: "done", originFileObj: file },+ fileList: files,+ });+ }+ }+ };++ /** antd's remove button: `onRemove` may veto, otherwise the file drops out. */+ const removeFile = async (file: UploadFile) => {+ if (onRemove) {+ let keep: unknown;+ try {+ keep = await onRemove(file);+ } catch {+ return;+ }+ if (keep === false) {+ return;+ }+ }+ onChange?.({+ file: { ...file, status: "removed" },+ fileList: (fileList ?? []).filter((f) => f.uid !== file.uid),+ });+ };++ return (+ <span+ ref={ref}+ className={cn("inline-block", className)}+ {...props}+ // antd's Upload accepts dropped files, and Upload.Dragger's whole+ // purpose is to be a drop target — without this the dashed zone looked+ // droppable but silently ignored the file, and the browser navigated+ // away to render it instead.+ onDragOver={(e) => {+ e.preventDefault();+ props.onDragOver?.(e);+ }}+ onDrop={(e) => {+ e.preventDefault();+ if (!disabled) {+ handleFiles(Array.from(e.dataTransfer?.files ?? []));+ }+ props.onDrop?.(e);+ }}+ >+ <input+ ref={inputRef}+ type="file"+ accept={accept}+ multiple={multiple}+ disabled={disabled}+ className="hidden"+ onChange={(e) => {+ handleFiles(Array.from(e.target.files ?? []));+ // Clear the input so re-picking the same file fires change again;+ // otherwise retrying a failed upload silently does nothing.+ e.target.value = "";+ }}+ />+ <span+ onClick={() => !disabled && inputRef.current?.click()}+ onKeyDown={(e) => {+ if (e.key === "Enter" || e.key === " ") {+ inputRef.current?.click();+ }+ }}+ role="button"+ tabIndex={disabled ? -1 : 0}+ // A `role="button"` span gets no cursor from the browser at all, and+ // it is not a <button> so `buttonVariants` never reaches it.+ className={cn(disabled ? "cursor-not-allowed" : "cursor-pointer")}+ >+ {children ?? (+ <Button icon={<UploadIcon className="size-4" />}>Upload</Button>+ )}+ </span>+ {/*+ * antd's `.ant-upload-list`, on by default. It is the only feedback the+ * manual-submit call-sites give: with `beforeUpload` returning false+ * nothing else on screen changes when a file is picked, so Import+ * Project looked like it had ignored the JSON entirely.+ *+ * Rendered OUTSIDE the trigger span above — inside it, clicking the+ * remove button would also reopen the file picker.+ */}+ {showUploadList !== false && (fileList?.length ?? 0) > 0 && (+ <span className="ant-upload-list mt-2 block space-y-1 text-left">+ {fileList?.map((file) => (+ <span+ key={file.uid ?? file.name}+ className={cn(+ "flex items-center gap-2 rounded px-2 py-1 text-sm hover:bg-muted/60",+ file.status === "error" && "text-destructive",+ )}+ >+ <Paperclip className="size-4 shrink-0 text-muted-foreground" />+ <span className="truncate">{file.name}</span>+ <button+ type="button"+ aria-label={`Remove ${file.name ?? "file"}`}+ className="ml-auto shrink-0 text-muted-foreground hover:text-destructive"+ onClick={() => removeFile(file)}+ >+ <X className="size-4" />+ </button>+ </span>+ ))}+ </span>+ )}+ </span>+ );+});++/**+ * antd `<Upload.Dragger>` — the large dashed drop zone.+ *+ * This was `Upload.Dragger = Upload`, which is not the same component: the+ * plain Upload renders an inline button-sized span, so the Import Project+ * modal showed its icon and help text floating with no drop target around+ * them, and dragging a file onto it did nothing because no drag handlers+ * existed at all.+ *+ * Reproduces antd's visuals (dashed border, tinted fill, hover/drag accent)+ * on Midnight Bloom tokens, and wires the drop events the name implies.+ */+const Dragger = React.forwardRef<HTMLElement, UploadProps>(function Dragger(+ { className, disabled, children, ...props },+ ref,+) {+ const [dragging, setDragging] = React.useState(false);++ return (+ <Upload+ ref={ref}+ disabled={disabled}+ className={cn("ant-upload-drag block w-full", className)}+ {...props}+ onDragOver={(e) => {+ e.preventDefault();+ if (!disabled) {+ setDragging(true);+ }+ }}+ onDragLeave={() => setDragging(false)}+ onDrop={() => setDragging(false)}+ >+ <div+ className={cn(+ /*+ * antd's `.ant-upload-drag` is `padding: 16px 0` and takes its+ * height from the content. `py-10` (40px each side) made the+ * Manage Documents dropzone 114px tall for a single line of text,+ * dominating the modal.+ */+ "flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-input bg-muted/40 px-4 py-4 text-center transition-colors",+ !disabled && "hover:border-primary",+ dragging && "border-primary bg-primary/5",+ disabled && "cursor-not-allowed opacity-50",+ )}+ >+ {children}+ </div>+ </Upload>+ );+});++/** antd `<Result status title subTitle extra>`. */+const Result = React.forwardRef<HTMLDivElement, ResultProps>(function Result(+ {+ status = "info",+ title,+ subTitle,+ extra,+ icon,+ className,+ children,+ ...props+ },+ ref,+) {+ const Icon = status === "success" ? CircleCheck : CircleX;+ return (+ <div+ ref={ref}+ className={cn(+ "flex flex-col items-center gap-2 py-10 text-center",+ className,+ )}+ {...props}+ >+ {icon ?? (+ <Icon+ className={cn(+ "size-12",+ status === "success" ? "text-success" : "text-destructive",+ )}+ />+ )}+ {title ? (+ <div className="ant-result-title text-lg font-semibold">{title}</div>+ ) : null}+ {subTitle ? (+ <div className="ant-result-subtitle text-sm text-muted-foreground">+ {subTitle}+ </div>+ ) : null}+ {extra}+ {children}+ </div>+ );+});++/** antd `<Drawer open onClose placement>` → shadcn Sheet. */+const Drawer = React.forwardRef<HTMLDivElement, DrawerProps>(function Drawer(+ {+ open,+ onClose,+ title,+ placement = "right",+ width,+ closable = true,+ styles,+ // Consumed, not forwarded — see DrawerProps.+ destroyOnClose: _destroyOnClose,+ className,+ children,+ ...props+ },+ ref,+) {+ /*+ * antd's `width` is the panel's actual width; mapping it to `max-width` left+ * the Sheet on its `w-3/4` default, so `width="85%"` silently rendered 75%.+ * `max-width: 100%` goes with it to beat the variant's `sm:max-w-sm` (384px),+ * which would otherwise clamp any width past that. antd applies `width` to+ * side drawers only — top/bottom ones are sized by `height`, which no+ * call-site passes.+ */+ const isSideDrawer = placement === "left" || placement === "right";+ const sizing =+ width !== undefined && isSideDrawer+ ? { width, maxWidth: "100%" as const }+ : undefined;++ return (+ <Sheet open={open} onOpenChange={(next) => !next && onClose?.()}>+ <SheetContent+ ref={ref}+ side={placement}+ showClose={closable}+ style={sizing}+ /*+ * `p-0` + a padded body, rather than padding on the panel itself.+ * antd pads the BODY, so a call-site clearing it (`styles.body`) gets a+ * full-bleed panel; with the padding on the panel, a drawer whose+ * header carries its own background floated inset with a 24px frame of+ * page around it. `flex-col` + `flex-1` reproduces antd's scrolling+ * body under a fixed header.+ */+ className={cn("flex flex-col gap-0 p-0", className)}+ {...props}+ >+ {title ? (+ <SheetHeader className="shrink-0 border-b px-6 py-4">+ <SheetTitle>{title}</SheetTitle>+ </SheetHeader>+ ) : null}+ <div className="min-h-0 flex-1 overflow-auto p-6" style={styles?.body}>+ {children}+ </div>+ </SheetContent>+ </Sheet>+ );+});++/** antd `<Segmented options value onChange>`. */+const Segmented = React.forwardRef<HTMLDivElement, SegmentedProps>(+ function Segmented(+ {+ options = [],+ value,+ onChange,+ className,+ "data-testid": testId,+ ...props+ },+ ref,+ ) {+ return (+ <div+ ref={ref}+ className={cn("inline-flex gap-1 rounded-md bg-muted p-1", className)}+ data-segmented=""+ data-testid={testId}+ {...props}+ >+ {options.map((o) => {+ const val = typeof o === "object" ? o.value : o;+ const label = typeof o === "object" ? o.label : o;+ return (+ /*+ * Segments are repeated controls built from `options`, so they+ * cannot be labelled from the call-site. The ids derive from the+ * parent's, as Tabs and Dropdown do, so a call-site opts in once.+ *+ * NOTE: this makes each segment selectable, not the ACTIVE one+ * assertable — which segment is selected is still expressed only+ * by the Tailwind classes below. Exposing that state would mean+ * adding an attribute rather than a test id, which is out of scope+ * for this pass.+ */+ <button+ key={String(val)}+ type="button"+ data-testid={testId ? `${testId}-option-${val}` : undefined}+ onClick={() => onChange?.(val)}+ className={cn(+ // `whitespace-nowrap`: antd segments never wrap. Without it a+ // two-word label breaks mid-control the moment the segmented+ // sits in a tight row — the agentic Prompt Studio's document+ // pane rendered "Raw Text" as "Raw" over "Text", stacking the+ // whole toolbar to two lines.+ "ant-segmented-item cursor-pointer whitespace-nowrap rounded px-3 py-1 text-sm disabled:cursor-not-allowed",+ String(value) === String(val)+ ? "bg-background shadow-sm"+ : "text-muted-foreground",+ )}+ >+ {label}+ </button>+ );+ })}+ </div>+ );+ },+);++/** antd `<Menu items onClick>` — a simple vertical list. */+const MenuBase = React.forwardRef<HTMLDivElement, MenuProps>(function Menu(+ {+ items = [],+ selectedKeys = [],+ onClick,+ onSelect,+ mode,+ className,+ ...props+ },+ ref,+) {+ return (+ <nav ref={ref} className={cn("flex flex-col gap-1", className)} {...props}>+ {items.filter(Boolean).map((item) => (+ <button+ key={String(item.key)}+ type="button"+ disabled={item.disabled}+ onClick={() => {+ const key = String(item.key);+ onClick?.({ key });+ // Single-select, as antd's Menu is by default: the new selection+ // is just this key.+ onSelect?.({ key, keyPath: [key], selectedKeys: [key] });+ }}+ className={cn(+ "flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-left text-sm hover:bg-accent disabled:cursor-not-allowed",+ /*+ * antd marks the selected item with a PRIMARY tint and primary+ * text (colorPrimaryBg + colorPrimary), not a grey. `bg-accent`+ * resolved to the same #f5f5f5 as the hover state, so the active+ * settings page was indistinguishable from an idle one.+ */+ selectedKeys.includes(String(item.key)) &&+ "bg-[var(--violet-50)] font-medium text-primary hover:bg-[var(--violet-50)]",+ )}+ >+ {/*+ * The icon needs its own shrink-0 box. Dropped straight into the+ * flex row, a long label squeezes the SVG to width 0 while leaving+ * its height at 24 — "SummarizedExtraction" in the Prompt Studio+ * settings menu rendered as a blank gap where every shorter+ * sibling showed its icon. antd wraps the icon for the same reason.+ */}+ {item.icon ? (+ <span className="flex shrink-0 items-center">{item.icon}</span>+ ) : null}+ <span className="truncate">{item.label}</span>+ </button>+ ))}+ </nav>+ );+});+function MenuItem({ children }: { children?: React.ReactNode }) {+ return children ?? null;+}++/**+ * antd `<Menu.ItemGroup title>` — a labelled group of items.+ *+ * Rendered by the verticals Playground plugin. Missing it is the same latent+ * React #130 that `Skeleton.Button` caused on the Agentic Prompt Studio route:+ * an undefined element type takes down the whole page, not just the menu.+ */+function MenuItemGroup({+ title,+ children,+}: {+ title?: React.ReactNode;+ children?: React.ReactNode;+}) {+ return (+ <div className="ant-menu-item-group">+ {title ? (+ <div className="ant-menu-item-group-title px-3 py-1.5 text-xs text-muted-foreground">+ {title}+ </div>+ ) : null}+ <div className="ant-menu-item-group-list">{children}</div>+ </div>+ );+}++/**+ * antd's `<Skeleton.Button>` / `<Skeleton.Input>` — single-element placeholders+ * sized like the control they stand in for, rather than the paragraph block+ * `<Skeleton>` renders.+ *+ * Their absence took down the whole Agentic Prompt Studio project route:+ * rendering an undefined component is React error #130, which the error+ * boundary reports as "Couldn't load this page" with no clue which component+ * was missing.+ */+const SKELETON_BLOCK_SIZES = {+ small: "h-6",+ default: "h-8",+ large: "h-10",+} as const;++interface SkeletonBlockProps extends React.HTMLAttributes<HTMLDivElement> {+ /** antd sizes these by control height, not by content. */+ size?: keyof typeof SKELETON_BLOCK_SIZES;+ /** antd's shimmer toggle; the shadcn primitive always animates. */+ active?: boolean;+ block?: boolean;+ shape?: "circle" | "round" | "square" | "default";+}++function SkeletonButton({+ size = "default",+ active: _active,+ block,+ shape,+ className,+ ...props+}: SkeletonBlockProps) {+ return (+ <ShadcnSkeleton+ className={cn(+ SKELETON_BLOCK_SIZES[size] ?? SKELETON_BLOCK_SIZES.default,+ block ? "w-full" : "w-16",+ shape === "circle" ? "rounded-full" : "rounded-md",+ className,+ )}+ {...props}+ />+ );+}++function SkeletonInput({+ size = "default",+ active: _active,+ block,+ className,+ ...props+}: SkeletonBlockProps) {+ return (+ <ShadcnSkeleton+ className={cn(+ SKELETON_BLOCK_SIZES[size] ?? SKELETON_BLOCK_SIZES.default,+ // antd's Input skeleton spans its container unless told otherwise;+ // the call-sites rely on that to fill a panel row.+ block === false ? "w-40" : "w-full",+ "rounded-md",+ className,+ )}+ {...props}+ />+ );+}++/** antd `<Skeleton active paragraph />`. */+const SkeletonBase = React.forwardRef<HTMLDivElement, SkeletonProps>(+ function Skeleton(+ { active, paragraph, title = true, className, ...props },+ ref,+ ) {+ const rows = typeof paragraph === "object" ? (paragraph.rows ?? 3) : 3;+ return (+ <div ref={ref} className={cn("space-y-2", className)} {...props}>+ {title ? <ShadcnSkeleton className="h-5 w-1/3" /> : null}+ {Array.from({ length: rows }).map((_, i) => (+ <ShadcnSkeleton key={i} className="h-4 w-full" />+ ))}+ </div>+ );+ },+);++/*+ * Object.assign so the statics stay part of the inferred type — same reason as+ * Card.Meta and Collapse.Panel. `<Skeleton.Button>` must type-check AND remain+ * resolvable by value, because the shim-completeness guard reads it that way.+ */+const Skeleton = Object.assign(SkeletonBase, {+ Button: SkeletonButton,+ Input: SkeletonInput,+});++/** One `<Steps.Step>`; the parent reads its props, so it renders nothing. */+function Step(_props: StepItem) {+ return null;+}++/** Written out so Tailwind sees the class names statically. */+const STEP_MARKER: Record<StepStatus, string> = {+ wait: "bg-muted text-muted-foreground",+ process: "bg-primary text-primary-foreground",+ finish: "bg-primary/15 text-primary",+ error: "bg-destructive text-white",+};++/**+ * antd derives a step's status from its index against `current`, unless the+ * item carries its own — which the cloud onboarding stepper does for all five.+ * The top-level `status` prop applies to the current step only.+ */+function resolveStepStatus(+ item: StepItem,+ index: number,+ current: number,+ overall: StepStatus | undefined,+): StepStatus {+ if (item.status) {+ return item.status;+ }+ if (index === current) {+ return overall ?? "process";+ }+ return index < current ? "finish" : "wait";+}++/**+ * antd `<Steps current items>`. Also supports the legacy `<Steps.Step>`+ * children form, which CreateApiDeploymentFromPromptStudio uses.+ */+const StepsBase = React.forwardRef<HTMLOListElement, StepsProps>(function Steps(+ {+ current = 0,+ items,+ status,+ onChange,+ // Consumed, not forwarded: antd's token is not a DOM attribute.+ size: _size,+ className,+ children,+ ...props+ },+ ref,+) {+ const entries: StepItem[] =+ items ??+ React.Children.toArray(children)+ .filter((c): c is React.ReactElement<StepItem> => React.isValidElement(c))+ .map((c) => ({+ title: c.props.title,+ description: c.props.description,+ status: c.props.status,+ icon: c.props.icon,+ disabled: c.props.disabled,+ }));++ return (+ <ol+ ref={ref}+ className={cn("flex items-center gap-4", className)}+ {...props}+ >+ {entries.map((item, i) => {+ const stepStatus = resolveStepStatus(item, i, current, status);+ const body = (+ <>+ <span+ className={cn(+ "flex size-6 shrink-0 items-center justify-center rounded-full text-xs",+ STEP_MARKER[stepStatus],+ )}+ >+ {item.icon ??+ (stepStatus === "finish" ? (+ <Check className="size-3.5" />+ ) : stepStatus === "error" ? (+ <X className="size-3.5" />+ ) : (+ i + 1+ ))}+ </span>+ <span className="flex flex-col items-start text-left">+ <span+ className={cn(+ "text-sm",+ stepStatus === "process" && "font-medium",+ stepStatus === "error" && "text-destructive",+ )}+ >+ {item.title}+ </span>+ {item.description ? (+ <span className="text-xs text-muted-foreground">+ {item.description}+ </span>+ ) : null}+ </span>+ </>+ );++ return (+ // Index key: steps are a fixed ordered list, and titles repeat.+ <li key={i}>+ {onChange && !item.disabled ? (+ <button+ type="button"+ className="flex cursor-pointer items-center gap-2 rounded"+ aria-current={stepStatus === "process" ? "step" : undefined}+ onClick={() => onChange(i)}+ >+ {body}+ </button>+ ) : (+ <span+ className="flex items-center gap-2"+ aria-current={stepStatus === "process" ? "step" : undefined}+ >+ {body}+ </span>+ )}+ </li>+ );+ })}+ </ol>+ );+});++/** antd `<Pagination current pageSize total onChange>`. */+const Pagination = React.forwardRef<HTMLDivElement, PaginationProps>(+ function Pagination(+ {+ current = 1,+ pageSize = 10,+ total = 0,+ onChange,+ showSizeChanger,+ className,+ ...props+ },+ ref,+ ) {+ const pages = Math.max(1, Math.ceil(total / pageSize));+ return (+ <div+ ref={ref}+ className={cn("flex items-center justify-end gap-2 text-sm", className)}+ {...props}+ >+ <Button+ size="small"+ disabled={current <= 1}+ onClick={() => onChange?.(current - 1, pageSize)}+ >+ Previous+ </Button>+ <span className="text-muted-foreground">+ Page {current} of {pages}+ </span>+ <Button+ size="small"+ disabled={current >= pages}+ onClick={() => onChange?.(current + 1, pageSize)}+ >+ Next+ </Button>+ </div>+ );+ },+);++/** antd `<Tree treeData>` — a shallow nested list; no call-site drags nodes. */+const TreeBase = React.forwardRef<HTMLDivElement, TreeProps>(function Tree(+ { treeData = [], onSelect, className, ...props },+ ref,+) {+ const renderNodes = (nodes: TreeNode[], depth = 0): React.ReactNode =>+ nodes.map((n: TreeNode) => (+ <div key={String(n.key)} style={{ paddingLeft: depth * 12 }}>+ <button+ type="button"+ className="cursor-pointer rounded px-1 py-0.5 text-left text-sm hover:bg-accent"+ onClick={() => onSelect?.([n.key], { node: n })}+ >+ {n.title}+ </button>+ {n.children ? renderNodes(n.children, depth + 1) : null}+ </div>+ ));++ return (+ <div ref={ref} className={className} {...props}>+ {renderNodes(treeData)}+ </div>+ );+});++/**+ * antd `<Tree.DirectoryTree>` — the file browser in the Configure Connector+ * modal, which is the only call-site.+ *+ * It cannot share TreeBase: that one renders every node expanded and has no+ * notion of `loadData`, but the connector browser lists one directory at a+ * time and fetches a folder's children the first time it is opened. The+ * folders come back childless, so without `loadData` the tree is a flat list+ * of unopenable directories.+ *+ * `expandedKeys`/`selectedKeys` fall back to internal state when the+ * call-site omits them, because antd supports both forms and FileExplorer+ * only happens to drive the controlled one.+ */+const DirectoryTree = React.forwardRef<HTMLDivElement, DirectoryTreeProps>(+ function DirectoryTree(+ {+ treeData = [],+ expandedKeys,+ selectedKeys,+ onExpand,+ onSelect,+ loadData,+ switcherIcon,+ /*+ * antd's DirectoryTree expands a directory when its ROW is clicked;+ * `expandAction={false}` restricts that to the switcher. FileExplorer+ * passes false so that picking a destination folder does not also+ * expand it.+ */+ expandAction = "click",+ // Consumed, not forwarded: antd chrome flags, not DOM attributes.+ showLine: _showLine,+ autoExpandParent: _autoExpandParent,+ rootClassName,+ className,+ ...props+ },+ ref,+ ) {+ const [ownExpandedKeys, setOwnExpandedKeys] = React.useState<string[]>([]);+ const [ownSelectedKeys, setOwnSelectedKeys] = React.useState<string[]>([]);+ const [loadingKeys, setLoadingKeys] = React.useState<string[]>([]);++ const expanded = expandedKeys ?? ownExpandedKeys;+ const selected = selectedKeys ?? ownSelectedKeys;++ const toggle = (node: TreeNode) => {+ const isOpen = expanded.includes(node.key);+ const next = isOpen+ ? expanded.filter((k) => k !== node.key)+ : [...expanded, node.key];+ setOwnExpandedKeys(next);+ onExpand?.(next);++ // antd fetches a node's children on first expand only — `children`+ // being set is what marks it already loaded.+ if (isOpen || node.children || !loadData) {+ return;+ }+ setLoadingKeys((keys) => [...keys, node.key]);+ Promise.resolve(loadData(node))+ .catch(() => {+ // The call-site surfaces its own load error; this only clears the+ // spinner so the switcher does not stay stuck.+ })+ .finally(() => {+ setLoadingKeys((keys) => keys.filter((k) => k !== node.key));+ });+ };++ const select = (node: TreeNode) => {+ const next = [node.key];+ setOwnSelectedKeys(next);+ onSelect?.(next, { node });+ };++ const renderNodes = (nodes: TreeNode[], depth = 0): React.ReactNode =>+ nodes.map((node) => {+ const isOpen = expanded.includes(node.key);+ const isSelected = selected.includes(node.key);+ return (+ <div key={String(node.key)}>+ <div+ role="treeitem"+ tabIndex={0}+ aria-selected={isSelected}+ aria-expanded={node.isLeaf ? undefined : isOpen}+ className={cn(+ "flex cursor-pointer items-center gap-1 rounded py-0.5 pe-1 text-sm hover:bg-accent",+ isSelected && "bg-accent text-accent-foreground",+ )}+ style={{ paddingInlineStart: depth * 12 + 4 }}+ onClick={() => {+ select(node);+ if (expandAction === "click" && !node.isLeaf) {+ toggle(node);+ }+ }}+ onKeyDown={(e) => {+ if (e.key === "Enter" || e.key === " ") {+ e.preventDefault();+ select(node);+ }+ }}+ >+ {node.isLeaf ? (+ <span className="size-[18px] shrink-0" />+ ) : (+ <button+ type="button"+ aria-label={isOpen ? "Collapse" : "Expand"}+ className={cn(+ "flex size-[18px] shrink-0 items-center justify-center transition-transform",+ !isOpen && "-rotate-90",+ )}+ onClick={(e) => {+ // Without this the row handler also fires and, when+ // `expandAction` is "click", immediately toggles back.+ e.stopPropagation();+ toggle(node);+ }}+ >+ {loadingKeys.includes(node.key) ? (+ <LoaderCircle className="size-3 animate-spin" />+ ) : (+ (switcherIcon ?? <ChevronDown className="size-3" />)+ )}+ </button>+ )}+ {node.icon ? (+ <span className="flex size-4 shrink-0 items-center justify-center">+ {node.icon}+ </span>+ ) : null}+ {/* min-w-0 so the name column's `ellipsis` has something to+ shrink against instead of overflowing the panel. */}+ <span className="min-w-0 flex-1">{node.title}</span>+ </div>+ {/* role="group" so children report their real depth; without it+ every row is announced as level 1 regardless of nesting. */}+ {isOpen && node.children ? (+ <div role="group">{renderNodes(node.children, depth + 1)}</div>+ ) : null}+ </div>+ );+ });++ return (+ <div+ ref={ref}+ role="tree"+ className={cn(rootClassName, className)}+ {...props}+ >+ {renderNodes(treeData)}+ </div>+ );+ },+);++/** One `<Descriptions.Item>`, however the call-site supplied it. */+type DescriptionEntry = NonNullable<DescriptionsProps["items"]>[number];++/**+ * antd's cell padding is `padding paddingLG`, stepped down a token per size:+ * 16/24 by default, 12/24 for "middle", 8/16 for "small".+ */+function cellPadding(size: SizeToken | undefined) {+ if (size === "small") {+ return "px-4 py-2";+ }+ return size === "middle" ? "px-6 py-3" : "px-6 py-4";+}++/** antd's `itemPaddingBottom`, which spaces the rows of a plain Descriptions. */+function itemPaddingBottom(size: SizeToken | undefined) {+ if (size === "small") {+ return "pb-2";+ }+ return size === "middle" ? "pb-3" : "pb-4";+}++/** `items` and `<Descriptions.Item>` children are two spellings of one list. */+function toEntries(+ items: DescriptionsProps["items"],+ children: React.ReactNode,+): DescriptionEntry[] {+ if (items) {+ return items;+ }+ return React.Children.toArray(children)+ .filter((c): c is React.ReactElement<DescriptionEntry> =>+ React.isValidElement(c),+ )+ .map((c, i) => ({+ key: String(c.key ?? i),+ label: c.props.label,+ children: c.props.children,+ }));+}++/**+ * antd `<Descriptions>` — a label/value grid. Only cloud plugins use it, but it+ * lives here per D9 so both repos share one implementation.+ *+ * antd renders it as a real <table>: a row per `column` items, with the label+ * BESIDE its value — a `<th>` when `bordered`, an inline `<span>` and a colon+ * when not. The first pass emitted a <dl> of stacked label-above-value pairs+ * instead, which cost LLMWhisperer's billing page its pricing table: each plan+ * card listed the four processing modes and their prices as loose text, and the+ * two plugin CSS rules that hook antd's own DOM matched nothing — `.pricing-table+ * th` (label cell transparent, not grey) and the free card's+ * `.ant-descriptions-item-content { display: none }`, which is what leaves that+ * card showing mode names without prices.+ */+const DescriptionsBase = React.forwardRef<HTMLDivElement, DescriptionsProps>(+ function Descriptions(+ {+ title,+ items,+ column = 3,+ bordered,+ size,+ colon = true,+ className,+ children,+ ...props+ },+ ref,+ ) {+ const entries = toEntries(items, children);+ const rows: DescriptionEntry[][] = [];+ for (let i = 0; i < entries.length; i += column) {+ rows.push(entries.slice(i, i + column));+ }++ const padding = bordered ? cellPadding(size) : itemPaddingBottom(size);++ return (+ <div+ ref={ref}+ className={cn(+ "ant-descriptions w-full",+ bordered && "ant-descriptions-bordered",+ className,+ )}+ {...props}+ >+ {title ? (+ <div className="ant-descriptions-header mb-2 font-medium">+ {title}+ </div>+ ) : null}+ <div+ className={cn(+ "ant-descriptions-view",+ /*+ * The rounding has to clip the corner cells, and the outer border+ * belongs to this wrapper so the cells only draw the dividers+ * BETWEEN themselves — otherwise every edge doubles up.+ */+ bordered && "overflow-hidden rounded-lg border border-separator",+ )}+ >+ {/*+ * Deliberately NOT `table-fixed`: antd sizes these columns to their+ * content, which is what lets a long label like "High Quality with+ * Form Elements / Table" take the width it needs.+ */}+ <table className="w-full border-collapse">+ <tbody>+ {rows.map((row, r) => (+ <tr+ key={row.map((item) => String(item.key ?? item.label)).join()}+ className="ant-descriptions-row"+ >+ {row.map((item, c) =>+ bordered ? (+ <React.Fragment key={String(item.key ?? item.label)}>+ <th+ className={cn(+ "ant-descriptions-item-label text-start align-top text-sm font-normal text-muted-foreground",+ // antd's `labelBg` — a wash, not an opaque grey, so+ // it tints whatever the surface underneath is.+ "bg-black/[0.02]",+ padding,+ r < rows.length - 1 && "border-b border-separator",+ "border-r border-separator",+ )}+ >+ {item.label}+ </th>+ <td+ className={cn(+ "ant-descriptions-item-content align-top text-sm",+ padding,+ r < rows.length - 1 && "border-b border-separator",+ c < row.length - 1 && "border-r border-separator",+ )}+ >+ {item.children}+ </td>+ </React.Fragment>+ ) : (+ <td+ key={String(item.key ?? item.label)}+ className={cn(+ "ant-descriptions-item align-top",+ r < rows.length - 1 && padding,+ )}+ >+ <div className="ant-descriptions-item-container flex text-sm">+ <span+ className={cn(+ "ant-descriptions-item-label me-2 shrink-0 text-muted-foreground",+ /*+ * antd hangs the colon off ::after, so the label's+ * own text stays exactly what the call-site wrote+ * — a `getByText("Owner")` still matches.+ */+ colon && "after:ms-px after:content-[':']",+ )}+ >+ {item.label}+ </span>+ <span className="ant-descriptions-item-content min-w-0">+ {item.children}+ </span>+ </div>+ </td>+ ),+ )}+ </tr>+ ))}+ </tbody>+ </table>+ </div>+ </div>+ );+ },+);++/**+ * A marker only: `<Descriptions>` reads `label`/`children` off these elements+ * and lays the cells out itself, exactly as antd does. Rendering it standalone+ * would emit a row with no table around it, so it renders nothing.+ */+function DescriptionsItem(_props: {+ label?: React.ReactNode;+ children?: React.ReactNode;+}) {+ return null;+}++/** antd `<Statistic title value prefix suffix precision />`. */+const Statistic = React.forwardRef<HTMLDivElement, StatisticProps>(+ function Statistic(+ {+ title,+ value,+ precision,+ prefix,+ suffix,+ valueStyle,+ className,+ ...props+ },+ ref,+ ) {+ const shown =+ typeof value === "number" && precision != null+ ? value.toFixed(precision)+ : value;+ return (+ <div ref={ref} className={cn("space-y-1", className)} {...props}>+ {title ? (+ <div className="text-sm text-muted-foreground">{title}</div>+ ) : null}+ <div+ className="flex items-baseline gap-1 text-2xl font-semibold"+ style={valueStyle}+ >+ {prefix}+ <span>{shown}</span>+ {suffix ? <span className="text-base">{suffix}</span> : null}+ </div>+ </div>+ );+ },+);++/** antd `<FloatButton icon onClick tooltip />`. */+const FloatButtonBase = React.forwardRef<HTMLButtonElement, FloatButtonProps>(+ function FloatButton(+ { icon, onClick, tooltip, type, className, children, ...props },+ ref,+ ) {+ return (+ <button+ ref={ref}+ type="button"+ title={typeof tooltip === "string" ? tooltip : undefined}+ onClick={onClick}+ className={cn(+ "fixed bottom-6 right-6 z-50 flex size-11 cursor-pointer items-center justify-center rounded-full shadow-lg",+ type === "primary"+ ? "bg-primary text-primary-foreground"+ : "border bg-background text-foreground",+ className,+ )}+ {...props}+ >+ {icon ?? children}+ </button>+ );+ },+);+function FloatButtonGroup({ children }: { children?: React.ReactNode }) {+ return (+ <div className="fixed bottom-6 right-6 z-50 flex flex-col gap-2">+ {children}+ </div>+ );+}++/**+ * antd `<Transfer>` — dual list with move-between controls.+ *+ * antd's Transfer is a CHECKBOX-selection widget: you tick rows in one panel,+ * then press the arrow between the panels to move the checked set. The earlier+ * stub moved a row on click and rendered neither checkboxes, item counts,+ * search, nor the arrows — so against the reference it read as a plain list+ * and `showSearch` (which the manual-review call-sites pass) did nothing.+ */+const Transfer = React.forwardRef<HTMLDivElement, TransferProps>(+ function Transfer(+ {+ dataSource = [],+ targetKeys = [],+ onChange,+ render,+ titles = ["Source", "Target"],+ showSearch,+ locale,+ disabled,+ className,+ ...props+ },+ ref,+ ) {+ const inTarget = React.useMemo(() => new Set(targetKeys), [targetKeys]);+ // Checked rows, tracked per side so the arrows know what to move.+ const [checked, setChecked] = React.useState<Set<string>>(new Set());+ const [search, setSearch] = React.useState({ left: "", right: "" });++ const source = dataSource.filter((d) => !inTarget.has(d.key));+ const target = dataSource.filter((d) => inTarget.has(d.key));++ const label = (item: TransferItem) =>+ render ? render(item) : (item.title ?? item.key);++ const matches = (item: TransferItem, term: string) => {+ if (!term) {+ return true;+ }+ const text =+ typeof item.title === "string" ? item.title : String(item.key);+ return text.toLowerCase().includes(term.toLowerCase());+ };++ const visible = (entries: TransferItem[], side: "left" | "right") =>+ entries.filter((e) => matches(e, search[side]));++ const toggle = (key: string) => {+ setChecked((prev) => {+ const next = new Set(prev);+ if (next.has(key)) {+ next.delete(key);+ } else {+ next.add(key);+ }+ return next;+ });+ };++ const move = (toTarget: boolean) => {+ const from = toTarget ? source : target;+ const moving = from.filter((d) => checked.has(d.key)).map((d) => d.key);+ if (!moving.length) {+ return;+ }+ const next = toTarget+ ? [...targetKeys, ...moving]+ : targetKeys.filter((k) => !moving.includes(k));+ onChange?.(next, toTarget ? "right" : "left", moving);+ // antd clears the selection of whichever side just moved.+ setChecked((prev) => {+ const rest = new Set(prev);+ for (const k of moving) {+ rest.delete(k);+ }+ return rest;+ });+ };++ const column = (+ title: React.ReactNode,+ entries: TransferItem[],+ side: "left" | "right",+ ) => {+ const rows = visible(entries, side);+ const selectable = entries.filter((e) => !e.disabled);+ const allChecked =+ selectable.length > 0 && selectable.every((e) => checked.has(e.key));+ const someChecked = selectable.some((e) => checked.has(e.key));++ const toggleAll = () => {+ setChecked((prev) => {+ const next = new Set(prev);+ for (const e of selectable) {+ if (allChecked) {+ next.delete(e.key);+ } else {+ next.add(e.key);+ }+ }+ return next;+ });+ };++ return (+ <div className="ant-transfer-list flex min-w-0 flex-1 flex-col rounded-md border">+ {/* antd's header: select-all on the left, count, then the title. */}+ <div className="ant-transfer-list-header flex items-center gap-2 border-b px-3 py-2 text-sm">+ <Checkbox+ checked={+ allChecked ? true : someChecked ? "indeterminate" : false+ }+ onCheckedChange={toggleAll}+ disabled={disabled || !selectable.length}+ aria-label={`Select all in ${+ typeof title === "string" ? title : side+ }`}+ />+ <span className="text-muted-foreground">+ {someChecked+ ? `${selectable.filter((e) => checked.has(e.key)).length}/${entries.length} items`+ : `${entries.length} items`}+ </span>+ <span className="ml-auto truncate font-medium">{title}</span>+ </div>++ {showSearch ? (+ <div className="border-b p-2">+ <Input+ value={search[side]}+ placeholder={locale?.searchPlaceholder ?? "Search here"}+ disabled={disabled}+ onChange={(e) =>+ setSearch((prev) => ({ ...prev, [side]: e.target.value }))+ }+ className="h-8 text-sm"+ />+ </div>+ ) : null}++ <div className="ant-transfer-list-body max-h-64 overflow-auto">+ {rows.length ? (+ rows.map((item) => (+ <label+ key={String(item.key)}+ className={cn(+ "flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm hover:bg-accent",+ (item.disabled || disabled) &&+ "cursor-not-allowed opacity-50",+ )}+ >+ <Checkbox+ checked={checked.has(item.key)}+ disabled={item.disabled || disabled}+ onCheckedChange={() => toggle(item.key)}+ />+ <span className="min-w-0 truncate">{label(item)}</span>+ </label>+ ))+ ) : (+ <div className="px-3 py-6 text-center text-sm text-muted-foreground">+ {locale?.notFoundContent ?? "No data"}+ </div>+ )}+ </div>+ </div>+ );+ };++ const canMoveRight = source.some((d) => checked.has(d.key));+ const canMoveLeft = target.some((d) => checked.has(d.key));++ return (+ <div+ ref={ref}+ className={cn("ant-transfer flex items-center gap-2", className)}+ {...props}+ >+ {column(titles[0], source, "left")}+ {/* The arrows sit BETWEEN the panels, as in antd — moving the checked+ set rather than the row that happened to be clicked. */}+ <div className="flex shrink-0 flex-col gap-1">+ <button+ type="button"+ aria-label="Move selected to the right"+ disabled={disabled || !canMoveRight}+ onClick={() => move(true)}+ className="inline-flex size-6 items-center justify-center rounded border text-muted-foreground transition-colors hover:border-primary hover:text-primary disabled:cursor-not-allowed disabled:opacity-40"+ >+ <ChevronRight className="size-3" />+ </button>+ <button+ type="button"+ aria-label="Move selected to the left"+ disabled={disabled || !canMoveLeft}+ onClick={() => move(false)}+ className="inline-flex size-6 items-center justify-center rounded border text-muted-foreground transition-colors hover:border-primary hover:text-primary disabled:cursor-not-allowed disabled:opacity-40"+ >+ <ChevronLeft className="size-3" />+ </button>+ </div>+ {column(titles[1], target, "right")}+ </div>+ );+ },+);++/**+ * antd `<Badge count dot status>` — a small counter/dot overlaid on its child.+ * Distinct from shadcn's `Badge` (a pill label), which is what antd calls Tag.+ *+ * `style` targets the COUNT, not the wrapper. antd documents it that way, and+ * call-sites rely on it: PromptChangeIndicator passes+ * `style={{ backgroundColor: color }}` to tint its counter. Letting `style`+ * fall through `{...props}` onto the wrapper span painted a solid grey block+ * behind the icon button on every prompt card in Prompt Studio.+ */+const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(function Badge(+ {+ count,+ dot,+ status,+ color,+ overflowCount = 99,+ showZero,+ offset,+ className,+ style,+ children,+ ...props+ },+ ref,+) {+ const shown =+ typeof count === "number" && count > overflowCount+ ? `${overflowCount}+`+ : count;+ const visible = dot || (count != null && (count !== 0 || showZero));++ if (!children) {+ return visible ? (+ <span+ ref={ref}+ className={cn(+ "inline-flex items-center justify-center rounded-full bg-destructive px-1.5 text-xs text-destructive-foreground",+ dot && "size-2 p-0",+ className,+ )}+ style={{ ...(color ? { backgroundColor: color } : null), ...style }}+ {...props}+ >+ {dot ? null : shown}+ </span>+ ) : null;+ }++ return (+ <span+ ref={ref}+ className={cn("relative inline-flex", className)}+ {...props}+ >+ {children}+ {visible ? (+ <span+ className={cn(+ // pointer-events-none: the count is decoration painted OVER the+ // child, and `offset` routinely pulls it across the child's middle+ // (PromptChangeIndicator uses [-2, 12] to dodge the prompt row's+ // overflow clipping). Without this it swallows the clicks meant for+ // the child, and worse, only once the count is wide enough to cover+ // it -- a one-digit badge left the icon's centre reachable, two+ // digits masked 85% of it and the button went dead.+ "pointer-events-none absolute -right-1 -top-1 inline-flex items-center justify-center rounded-full bg-destructive px-1.5 text-xs text-destructive-foreground",+ dot && "size-2 p-0",+ )}+ style={{+ ...(color ? { backgroundColor: color } : null),+ // antd's `offset` is [x, y] in px, applied to the count.+ ...(Array.isArray(offset)+ ? { transform: `translate(${offset[0]}px, ${offset[1]}px)` }+ : null),+ ...style,+ }}+ >+ {dot ? null : shown}+ </span>+ ) : null}+ </span>+ );+});++const Card = Object.assign(CardBase, { Meta: CardMeta });+const Tabs = Object.assign(TabsBase, { TabPane });+const Tree = Object.assign(TreeBase, { DirectoryTree });+const Steps = Object.assign(StepsBase, { Step });+const List = Object.assign(ListBase, {+ Item: Object.assign(ListItem, { Meta: ListItemMeta }),+});+const Layout = Object.assign(LayoutBase, {+ Header,+ Content,+ Sider,+ Footer,+});+const Upload = Object.assign(UploadBase, { Dragger, LIST_IGNORE });+const Menu = Object.assign(MenuBase, {+ Item: MenuItem,+ ItemGroup: MenuItemGroup,+});+const Descriptions = Object.assign(DescriptionsBase, {+ Item: DescriptionsItem,+});+const FloatButton = Object.assign(FloatButtonBase, {+ Group: FloatButtonGroup,+});++export {+ Badge,+ Card,+ Descriptions,+ Drawer,+ FloatButton,+ Layout,+ List,+ Menu,+ Pagination,+ Result,+ Segmented,+ Skeleton,+ Statistic,+ Steps,+ Table,+ Tabs,+ Transfer,+ Tree,+ Upload,+};diff --git a/frontend/src/components/ui/shims/antd-typography.test.jsx b/frontend/src/components/ui/shims/antd-typography.test.jsxnew file mode 100644index 000000000..e41fda160--- /dev/null+++ b/frontend/src/components/ui/shims/antd-typography.test.jsx@@ -0,0 +1,120 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, it } from "vitest";++import {+ Paragraph,+ Text,+ Title,+ Typography,+} from "@/components/ui/shims/antd-typography";++describe("Typography shim (P1-03)", () => {+ it("renders Text as a span with the content", () => {+ render(<Text>hello</Text>);+ expect(screen.getByText("hello").tagName).toBe("SPAN");+ });++ it("maps antd `type` onto Midnight Bloom token classes", () => {+ render(+ <>+ <Text type="secondary">sec</Text>+ <Text type="danger">dang</Text>+ <Text type="success">succ</Text>+ <Text type="warning">warn</Text>+ </>,+ );+ expect(screen.getByText("sec").className).toContain(+ "text-muted-foreground",+ );+ expect(screen.getByText("dang").className).toContain("text-destructive");+ expect(screen.getByText("succ").className).toContain("text-success");+ expect(screen.getByText("warn").className).toContain("text-warning");+ });++ it("supports strong / italic / delete / code", () => {+ render(+ <>+ <Text strong>s</Text>+ <Text italic>i</Text>+ <Text delete>d</Text>+ <Text code>c</Text>+ </>,+ );+ expect(screen.getByText("s").className).toContain("font-semibold");+ expect(screen.getByText("i").className).toContain("italic");+ expect(screen.getByText("d").className).toContain("line-through");+ expect(screen.getByText("c").className).toContain("font-mono");+ });++ /*+ * antd's inline code carries a border as well as a fill. Without it the+ * snippets in Custom Data ("{{custom_data.key}}") sat at #f5f5f5 on a+ * #fafafa surface — a five-value difference, effectively invisible.+ */+ it("gives inline code a border so it stands out from body text", () => {+ render(<Text code>{"{{custom_data.key}}"}</Text>);+ const el = screen.getByText("{{custom_data.key}}");+ expect(el.className).toContain("border");+ expect(el.className).toContain("bg-muted");+ });++ it("renders Title at the requested heading level", () => {+ render(+ <>+ <Title level={1}>h1</Title>+ <Title level={3}>h3</Title>+ <Title level={5}>h5</Title>+ </>,+ );+ expect(screen.getByText("h1").tagName).toBe("H1");+ expect(screen.getByText("h3").tagName).toBe("H3");+ expect(screen.getByText("h5").tagName).toBe("H5");+ });++ it("renders Paragraph as a <p>", () => {+ render(<Paragraph>para</Paragraph>);+ expect(screen.getByText("para").tagName).toBe("P");+ });++ it("exposes the antd-style Typography.X namespace", () => {+ render(<Typography.Text>ns</Typography.Text>);+ expect(screen.getByText("ns").tagName).toBe("SPAN");+ });++ // The behaviour that made a plain `truncate` swap unsafe:++ it("truncates on a single line for ellipsis={true}", () => {+ render(<Text ellipsis>long</Text>);+ expect(screen.getByText("long").className).toContain("truncate");+ });++ it("clamps to N lines for ellipsis={{ rows: n }} using a static class", () => {+ render(<Text ellipsis={{ rows: 2, expandable: false }}>two</Text>);+ // Must be the literal class Tailwind can see at build time.+ expect(screen.getByText("two").className).toContain("line-clamp-2");+ });++ it("keeps the text reachable when a tooltip is requested", () => {+ render(<Text ellipsis={{ tooltip: true }}>tipped</Text>);+ // Radix renders the trigger; the content mounts on interaction. The point+ // of the assertion is that requesting a tooltip does not drop the text.+ expect(screen.getByText("tipped")).toBeInTheDocument();+ expect(screen.getByText("tipped").className).toContain("truncate");+ });++ it("accepts custom tooltip content without losing the visible text", () => {+ render(<Text ellipsis={{ tooltip: "full value" }}>short</Text>);+ expect(screen.getByText("short")).toBeInTheDocument();+ });++ it("passes through className and arbitrary props", () => {+ render(+ <Text className="custom-cls" data-testid="probe" title="t">+ x+ </Text>,+ );+ const el = screen.getByTestId("probe");+ expect(el.className).toContain("custom-cls");+ expect(el.getAttribute("title")).toBe("t");+ });+});diff --git a/frontend/src/components/ui/shims/antd-typography.tsx b/frontend/src/components/ui/shims/antd-typography.tsxnew file mode 100644index 000000000..98737ab61--- /dev/null+++ b/frontend/src/components/ui/shims/antd-typography.tsx@@ -0,0 +1,337 @@+import * as React from "react";++import {+ Tooltip,+ TooltipContent,+ TooltipProvider,+ TooltipTrigger,+} from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";++/**+ * Typography primitives (P1-03).+ *+ * These deliberately mirror antd's `Typography` API — `type`, `strong`,+ * `italic`, `ellipsis`, `level` — so the ~295 call-sites become an import+ * swap rather than a hand-rewrite of every element. Per D9/§5.0 this lives in+ * OSS so cloud plugins import it too.+ *+ * Why a shim instead of plain tags + Tailwind classes: antd's `ellipsis` is+ * not styling. `ellipsis={{ tooltip: true }}` truncates AND shows the full+ * text on hover, and `ellipsis={{ rows: 2 }}` clamps to N lines. Swapping in+ * a bare `truncate` class would silently drop the tooltip — a behaviour+ * regression, which C4 forbids. `Ellipsis` below implements both.+ */++/**+ * The antd Typography surface these shims accept.+ *+ * Enumerating it is the point of the TypeScript conversion. Every bug this+ * layer has produced was a silent prop-drop: a call-site passes a prop, the+ * shim never destructures it, and `...props` swallows it with no error at all+ * (`showCount`, `onValuesChange`, `setFields`, `validateStatus` each shipped+ * that way). With an explicit interface the next one is a compile error at the+ * call-site instead of a defect in the UI.+ */+type TypographyType = "secondary" | "success" | "warning" | "danger";++/** antd's `ellipsis`: `true`, or a config object. */+type EllipsisConfig = {+ /** Lines to clamp to. Only 1–6 have a static Tailwind class; see CLAMP_CLASS. */+ rows?: number;+ /** `true` shows the element's own children on hover; a node shows that node. */+ tooltip?: boolean | React.ReactNode;+};+type EllipsisProp = boolean | EllipsisConfig;++interface TypographyCommonProps {+ type?: TypographyType;+ strong?: boolean;+ italic?: boolean;+ underline?: boolean;+ /** antd spells this `delete`; destructured as `del` since it is a keyword. */+ delete?: boolean;+ code?: boolean;+ ellipsis?: EllipsisProp;+}++/** antd `type` → Midnight Bloom token classes. */+const TYPE_CLASS: Record<TypographyType, string> = {+ secondary: "text-muted-foreground",+ success: "text-success",+ warning: "text-warning",+ danger: "text-destructive",+};++/**+ * Truncation wrapper reproducing antd's `ellipsis` behaviour.+ *+ * - `true` → single-line truncate+ * - `{ rows: n }` → clamp to n lines+ * - `{ tooltip: true }` → truncate + show own text content on hover+ * - `{ tooltip: <node|string> }`→ truncate + show that content on hover+ *+ * The tooltip is always rendered when requested, rather than only when the+ * text actually overflows. antd measures the DOM to decide; matching that+ * exactly would need a resize observer per element. Showing it unconditionally+ * keeps the information reachable, which is the point of the prop.+ */+// Written out rather than interpolated (`line-clamp-${n}`): Tailwind scans+// source statically and never sees a class name built at runtime.+const CLAMP_CLASS: Record<number, string> = {+ 1: "truncate whitespace-nowrap",+ 2: "line-clamp-2",+ 3: "line-clamp-3",+ 4: "line-clamp-4",+ 5: "line-clamp-5",+ 6: "line-clamp-6",+};++interface EllipsisProps extends React.HTMLAttributes<HTMLElement> {+ ellipsis?: EllipsisProp;+ /** The element or component to render as, supplied by the caller. */+ Comp: React.ElementType;+}++const Ellipsis = React.forwardRef<HTMLElement, EllipsisProps>(function Ellipsis(+ { ellipsis, children, className, Comp, ...props },+ ref,+) {+ const cfg: EllipsisConfig =+ ellipsis === true || ellipsis === false || ellipsis == null ? {} : ellipsis;+ const rows = cfg.rows ?? 1;+ const clampClass = CLAMP_CLASS[rows] ?? CLAMP_CLASS[1];++ const el = (+ <Comp ref={ref} className={cn(clampClass, className)} {...props}>+ {children}+ </Comp>+ );++ if (!cfg.tooltip) {+ return el;+ }++ const tip = cfg.tooltip === true ? children : cfg.tooltip;++ return (+ <TooltipProvider>+ <Tooltip>+ <TooltipTrigger asChild>{el}</TooltipTrigger>+ <TooltipContent className="max-w-md break-words">{tip}</TooltipContent>+ </Tooltip>+ </TooltipProvider>+ );+});++/** Shared prop → class handling for Text / Paragraph / Link. */+function useTypographyClass({+ type,+ strong,+ italic,+ underline,+ del,+ code,+}: Omit<TypographyCommonProps, "delete" | "ellipsis"> & { del?: boolean }) {+ return cn(+ // ~8 CSS rules target .ant-typography (margins, line-height).+ "ant-typography",+ strong && "ant-typography-strong",+ type && TYPE_CLASS[type],+ strong && "font-semibold",+ italic && "italic",+ underline && "underline",+ del && "line-through",+ /*+ * antd's inline code has a BORDER as well as a fill — that outline is what+ * makes it read as code. `bg-muted` alone is #f5f5f5, five values off the+ * #fafafa surface it sits on, so the snippets in Custom Data were+ * indistinguishable from body text.+ */+ code &&+ "rounded border border-separator bg-muted px-1 py-0.5 font-mono text-[0.85em] text-foreground",+ );+}++interface TextProps+ extends TypographyCommonProps,+ Omit<React.HTMLAttributes<HTMLElement>, "color"> {+ /** Renders a <mark> instead of a <span>. */+ mark?: boolean;+}++/** antd `<Typography.Text>`. Renders a <span>. */+const Text = React.forwardRef<HTMLElement, TextProps>(function Text(+ {+ className,+ type,+ strong,+ italic,+ underline,+ delete: del,+ code,+ mark,+ ellipsis,+ children,+ ...props+ },+ ref,+) {+ const base = useTypographyClass({+ type,+ strong,+ italic,+ underline,+ del,+ code,+ });+ const Comp = mark ? "mark" : "span";++ if (ellipsis) {+ return (+ <Ellipsis+ Comp={Comp}+ ellipsis={ellipsis}+ className={cn("inline-block max-w-full align-bottom", base, className)}+ ref={ref}+ {...props}+ >+ {children}+ </Ellipsis>+ );+ }++ return (+ <Comp ref={ref} className={cn(base, className)} {...props}>+ {children}+ </Comp>+ );+});++interface TitleProps+ extends TypographyCommonProps,+ Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> {+ level?: 1 | 2 | 3 | 4 | 5 | 6;+}++/** antd `<Typography.Title level={1..5}>`. Renders the matching heading. */+const Title = React.forwardRef<HTMLHeadingElement, TitleProps>(function Title(+ { className, level = 1, type, ellipsis, children, ...props },+ ref,+) {+ const Comp = `h${Math.min(Math.max(level, 1), 6)}` as React.ElementType;+ const size: string | undefined = {+ 1: "text-3xl font-bold tracking-tight",+ 2: "text-2xl font-semibold tracking-tight",+ 3: "text-xl font-semibold",+ 4: "text-lg font-semibold",+ 5: "text-base font-semibold",+ 6: "text-sm font-semibold",+ }[level];++ if (ellipsis) {+ return (+ <Ellipsis+ Comp={Comp}+ ellipsis={ellipsis}+ className={cn(size, type && TYPE_CLASS[type], className)}+ ref={ref}+ {...props}+ >+ {children}+ </Ellipsis>+ );+ }++ return (+ <Comp+ ref={ref}+ className={cn(size, type && TYPE_CLASS[type], className)}+ {...props}+ >+ {children}+ </Comp>+ );+});++interface ParagraphProps+ extends TypographyCommonProps,+ Omit<React.HTMLAttributes<HTMLParagraphElement>, "color"> {}++/** antd `<Typography.Paragraph>`. Renders a <p>. */+const Paragraph = React.forwardRef<HTMLParagraphElement, ParagraphProps>(+ function Paragraph(+ { className, type, strong, italic, ellipsis, children, ...props },+ ref,+ ) {+ const base = useTypographyClass({ type, strong, italic });++ if (ellipsis) {+ return (+ <Ellipsis+ Comp="p"+ ellipsis={ellipsis}+ className={cn(base, className)}+ ref={ref}+ {...props}+ >+ {children}+ </Ellipsis>+ );+ }++ return (+ <p ref={ref} className={cn(base, className)} {...props}>+ {children}+ </p>+ );+ },+);++interface LinkProps+ extends TypographyCommonProps,+ Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "color" | "type"> {}++/**+ * antd `<Typography.Link>`. Renders an <a>.+ * NOTE: unrelated to react-router's `Link` — the 3 call-sites that use+ * react-router keep importing it from there.+ */+const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(function Link(+ { className, type, strong, italic, children, ...props },+ ref,+) {+ const base = useTypographyClass({ type, strong, italic });+ return (+ <a+ ref={ref}+ className={cn(+ "cursor-pointer text-primary underline-offset-4 hover:underline",+ base,+ className,+ )}+ {...props}+ >+ {children}+ </a>+ );+});++/**+ * Namespace object so `<Typography.Text>` call-sites work with only an import+ * change — matching how antd exposes these.+ */+const Typography = Object.assign(+ React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(+ function Typography({ className, children, ...props }, ref) {+ return (+ <div ref={ref} className={cn(className)} {...props}>+ {children}+ </div>+ );+ },+ ),+ { Text, Title, Paragraph, Link },+);++export { Link, Paragraph, Text, Title, Typography };diff --git a/frontend/src/components/ui/shims/shim-completeness.test.jsx b/frontend/src/components/ui/shims/shim-completeness.test.jsxnew file mode 100644index 000000000..d3801a95e--- /dev/null+++ b/frontend/src/components/ui/shims/shim-completeness.test.jsx@@ -0,0 +1,173 @@+import fs from "node:fs";+import path from "node:path";+import { describe, expect, it } from "vitest";+import * as antdButton from "@/components/ui/shims/antd-button";+import * as antdDatetime from "@/components/ui/shims/antd-datetime";+import * as antdForm from "@/components/ui/shims/antd-form";+import * as antdInputs from "@/components/ui/shims/antd-inputs";+import * as antdLayout from "@/components/ui/shims/antd-layout";+import * as antdLeaves from "@/components/ui/shims/antd-leaves";+import * as antdOverlays from "@/components/ui/shims/antd-overlays";+import * as antdStructure from "@/components/ui/shims/antd-structure";+import * as antdTypography from "@/components/ui/shims/antd-typography";++/**+ * Guard against the failure mode that took down Prompt Studio in the dev+ * deployment: a call-site renders `<Collapse.Panel>`, the shim never defined+ * it, React gets `undefined` as an element type and throws #130 — killing the+ * whole route, not just that component.+ *+ * The per-component tests could not catch it, because nothing rendered the+ * sub-component. So this test scans the SOURCE for every `<Foo.Bar>` usage and+ * asserts the shims actually expose it.+ */++/*+ * Built from every shim module's exports rather than hand-listed. The listed+ * form is opt-in coverage, and what it omits it omits silently: `Tree` and+ * `Steps` were both missing, so `<Tree.DirectoryTree>` — undefined, and the+ * whole Configure Connector modal throwing #130 the moment a connector was+ * picked — passed this guard. Adding a shim component must not also require+ * remembering to add it here.+ */+const SHIMS = Object.fromEntries(+ [+ antdButton,+ antdDatetime,+ antdForm,+ antdInputs,+ antdLayout,+ antdLeaves,+ antdOverlays,+ antdStructure,+ antdTypography,+ ].flatMap((mod) =>+ Object.entries(mod).filter(([name]) => /^[A-Z]/.test(name)),+ ),+);++/** Every `<Foo.Bar …>` in the app source, excluding the shims themselves. */+function collectSubComponentUsages() {+ // ../../.. — this file lives in src/components/ui/shims/, so three levels+ // up is `src/`. It was "../.." before the shims moved into their own+ // directory; left unchanged it would have silently scanned only+ // src/components/ and quietly reduced this guard's coverage.+ const root = path.resolve(import.meta.dirname, "../../..");+ /*+ * Assert the scan root, because getting it wrong does NOT fail this test —+ * it silently scans a smaller tree and finds nothing to complain about. The+ * shims move from `ui/` to `ui/shims/` changed the required depth from+ * "../.." to "../../..", and every assertion below still passed with the+ * stale value while covering only part of the app.+ */+ if (path.basename(root) !== "src") {+ throw new Error(+ `shim-completeness scan root must be src/, got ${root}. ` ++ "Fix the relative depth rather than the assertion.",+ );+ }+ const found = new Set();+ let scanned = 0;+ const walk = (dir) => {+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {+ const full = path.join(dir, entry.name);+ if (entry.isDirectory()) {+ if (entry.name === "node_modules") {+ continue;+ }+ walk(full);+ continue;+ }+ // .tsx as well as .jsx: the shim layer is being converted to TypeScript+ // file by file, and a `.jsx`-only filter would quietly stop scanning+ // each file as it converts — the scan still passes, just over less.+ if (!/\.[jt]sx$/.test(entry.name) || entry.name.includes(".test.")) {+ continue;+ }+ // The shims themselves are the definition, not a call-site.+ if (full.includes(`${path.sep}shims${path.sep}antd-`)) {+ continue;+ }+ scanned += 1;+ // Strip comments first: a doc comment mentioning `Modal.confirm` is not+ // a call-site, and flagging it would train people to ignore this test.+ const src = fs+ .readFileSync(full, "utf8")+ .replace(/\/\*[\s\S]*?\*\//g, "")+ .replace(/^\s*\/\/.*$/gm, "");+ // <Foo.Bar> in JSX+ for (const m of src.matchAll(/<([A-Z]\w+)\.(\w+)[\s/>]/g)) {+ found.add(`${m[1]}.${m[2]}`);+ }+ // Foo.bar(...) statics — antd exposed imperative APIs this way+ // (Modal.useModal, Modal.confirm). Undefined ones throw a TypeError+ // on click rather than at render, so they are just as fatal.+ for (const m of src.matchAll(/\b([A-Z]\w+)\.(\w+)\s*\(/g)) {+ found.add(`${m[1]}.${m[2]}`);+ }+ /*+ * `const { Bar } = Foo;` — the form antd's own docs use, and the one+ * that hid the DirectoryTree break: FileSystem.jsx lifts the static out+ * at module scope and renders a bare `<DirectoryTree>`, so neither+ * pattern above ever sees a `Tree.` prefix to check. It read as covered+ * because `<Tabs.TabPane>` happens to appear inline somewhere else.+ */+ for (const m of src.matchAll(+ /const\s*\{([^}]*)\}\s*=\s*([A-Z]\w+)\s*;/g,+ )) {+ for (const part of m[1].split(",")) {+ const key = part.split(/[:=]/)[0].trim();+ if (key) {+ found.add(`${m[2]}.${key}`);+ }+ }+ }+ }+ };+ walk(root);+ return { usages: [...found].sort(), scanned };+}++describe("shim completeness — every <Foo.Bar> used must be defined", () => {+ const { usages, scanned } = collectSubComponentUsages();++ it("finds sub-component usages to check", () => {+ expect(usages.length).toBeGreaterThan(0);+ });++ /*+ * This scan has silently narrowed twice: once when the shims moved to+ * ui/shims/ and the "../.." depth went stale, and once when the extension+ * filter still said `.jsx` after files began converting to `.tsx`. Both+ * times every assertion below still passed, over a fraction of the app.+ *+ * `usages.length > 0` does not catch that — one surviving file keeps it+ * true. A floor on the number of files actually read does. 275 match+ * today; 200 leaves room for ordinary churn while a dropped extension or+ * a wrong root (which cost ~all of them) fails loudly.+ */+ it("scans the whole app, not a subset", () => {+ expect(+ scanned,+ "shim-completeness scanned far fewer files than expected — the walk " ++ "root or the extension filter has drifted, so the assertions below " ++ "are covering only part of the app.",+ ).toBeGreaterThan(200);+ });++ for (const usage of usages) {+ const [parent, child] = usage.split(".");+ if (!(parent in SHIMS)) {+ continue;+ }++ it(`${usage} is defined`, () => {+ const value = SHIMS[parent]?.[child];+ expect(+ value,+ `<${usage}> is rendered in the app but ${parent}.${child} is undefined. ` ++ "React throws error #130 for this and the whole route fails to load.",+ ).toBeDefined();+ });+ }+});diff --git a/frontend/src/components/ui/shims/testid-forwarding.test.jsx b/frontend/src/components/ui/shims/testid-forwarding.test.jsxnew file mode 100644index 000000000..98f75e297--- /dev/null+++ b/frontend/src/components/ui/shims/testid-forwarding.test.jsx@@ -0,0 +1,248 @@+import { fireEvent, render, screen, waitFor } from "@testing-library/react";+import { describe, expect, it } from "vitest";+import { Button } from "@/components/ui/shims/antd-button";+import {+ Checkbox,+ Input,+ InputNumber,+ Radio,+ Select,+ Switch,+} from "@/components/ui/shims/antd-inputs";+import {+ Collapse,+ Dropdown,+ Modal,+ Popconfirm,+ Popover,+ Tooltip,+} from "@/components/ui/shims/antd-overlays";+import {+ Card,+ Menu,+ Table,+ Tabs,+ Upload,+} from "@/components/ui/shims/antd-structure";++/**+ * `data-testid` has to survive the shim layer, or every id written at a+ * call-site is dead weight.+ *+ * Five shims swallowed it. `Select`, `Popover` and `Popconfirm` spread+ * `...props` onto a Radix *Root*, which renders no DOM at all; `Dropdown` and+ * `Tabs` destructured `...props` and then never used it. In all five cases the+ * attribute vanished with no warning — the same silent prop-drop this layer+ * keeps producing, and indistinguishable at a call-site from a typo in the id.+ *+ * It is worth guarding rather than eyeballing because the failure only shows up+ * in Playwright, against a running stack, as a locator that matches nothing.+ *+ * Where the id lands is a deliberate choice per component, not an accident:+ *+ * trigger `Select` — the trigger is what a test clicks, and it is the only+ * element the shim itself renders (all three modes: plain,+ * `showSearch`, and `tags`, which render three different widgets).+ *+ * content `Modal`, `Dropdown`, `Popover`, `Popconfirm` — these are portalled+ * out of the tree, so they have no stable position and only library+ * classes to select on. Their triggers are `children`, which the+ * call-site renders and can label itself. This also matches where+ * each shim already sends its `ref`.+ */+describe("data-testid forwarding through the shims", () => {+ /*+ * These render their id straight onto a DOM node they own. Held as a table+ * because the point is coverage of the shim surface, not per-case nuance.+ */+ const passthrough = {+ Button: <Button data-testid="probe">x</Button>,+ Input: <Input data-testid="probe" />,+ InputNumber: <InputNumber data-testid="probe" />,+ Switch: <Switch data-testid="probe" />,+ Checkbox: <Checkbox data-testid="probe" />,+ Radio: <Radio data-testid="probe" />,+ Select: (+ <Select data-testid="probe" options={[{ value: "a", label: "A" }]} />+ ),+ // `showSearch` is a hand-rolled combobox, not Radix's Select — a separate+ // component with a separate trigger, so a separate case.+ SelectSearch: (+ <Select+ showSearch+ data-testid="probe"+ options={[{ value: "a", label: "A" }]}+ />+ ),+ // `tags` mode is a third widget again (TagsInput), reached by an early exit+ // before either of the paths above.+ SelectTags: <Select mode="tags" data-testid="probe" />,+ Modal: (+ <Modal open data-testid="probe">+ body+ </Modal>+ ),+ Tooltip: (+ <Tooltip data-testid="probe" title="t">+ <button type="button">t</button>+ </Tooltip>+ ),+ Popover: (+ <Popover open data-testid="probe" content="c">+ <button type="button">t</button>+ </Popover>+ ),+ Tabs: (+ <Tabs+ data-testid="probe"+ items={[{ key: "a", label: "A", children: "c" }]}+ />+ ),+ Collapse: (+ <Collapse+ data-testid="probe"+ items={[{ key: "a", label: "A", children: "c" }]}+ />+ ),+ Table: (+ <Table+ data-testid="probe"+ columns={[{ title: "C", dataIndex: "c" }]}+ dataSource={[{ key: 1, c: "v" }]}+ />+ ),+ Menu: <Menu data-testid="probe" items={[{ key: "a", label: "A" }]} />,+ Upload: (+ <Upload data-testid="probe">+ <button type="button">u</button>+ </Upload>+ ),+ Card: <Card data-testid="probe">c</Card>,+ };++ for (const [name, element] of Object.entries(passthrough)) {+ it(`${name} puts its data-testid on a DOM node`, () => {+ // `baseElement`, not `container`: the portalled ones render outside it.+ const { baseElement } = render(element);+ expect(+ baseElement.querySelector("[data-testid='probe']"),+ `${name} dropped its data-testid before the DOM`,+ ).not.toBeNull();+ });+ }++ /*+ * Menu entries and tab triggers are the repeated, library-classed elements+ * the naming plan calls out by name, and neither can be labelled from the+ * call-site: both are built by the shim from a data descriptor. They derive+ * an id from the PARENT's, so a call-site opts in once instead of per entry,+ * and the result stays readable — `ws-actions-item-run`, not `tab-1`.+ */+ it("Dropdown labels its portalled menu and each of its items", async () => {+ const { baseElement } = render(+ <Dropdown+ data-testid="probe"+ menu={{ items: [{ key: "a", label: "A" }] }}+ >+ <button type="button">t</button>+ </Dropdown>,+ );++ // Radix opens on pointerdown, not click.+ fireEvent.pointerDown(screen.getByRole("button", { name: "t" }), {+ button: 0,+ ctrlKey: false,+ pointerType: "mouse",+ });++ await waitFor(() =>+ expect(+ baseElement.querySelector("[data-testid='probe']"),+ "the menu panel is unreachable",+ ).not.toBeNull(),+ );+ expect(+ baseElement.querySelector("[data-testid='probe-item-a']"),+ "menu items are unreachable",+ ).not.toBeNull();+ });++ it("Popconfirm labels its panel and both of its buttons", async () => {+ const { baseElement } = render(+ <Popconfirm+ data-testid="probe"+ title="Delete?"+ okText="Yes"+ cancelText="No"+ >+ <button type="button">t</button>+ </Popconfirm>,+ );++ fireEvent.click(screen.getByRole("button", { name: "t" }));++ await waitFor(() =>+ expect(+ baseElement.querySelector("[data-testid='probe']"),+ "the confirm panel is unreachable",+ ).not.toBeNull(),+ );+ expect(+ baseElement.querySelector("[data-testid='probe-ok']"),+ "the confirm button is unreachable",+ ).not.toBeNull();+ expect(+ baseElement.querySelector("[data-testid='probe-cancel']"),+ "the cancel button is unreachable",+ ).not.toBeNull();+ });++ it("Tabs labels each of its triggers", () => {+ const { baseElement } = render(+ <Tabs+ data-testid="probe"+ items={[+ { key: "a", label: "A", children: "c" },+ { key: "b", label: "B", children: "d" },+ ]}+ />,+ );+ expect(+ baseElement.querySelector("[data-testid='probe-tab-a']"),+ ).not.toBeNull();+ expect(+ baseElement.querySelector("[data-testid='probe-tab-b']"),+ ).not.toBeNull();+ });++ it("an explicit id on an item beats the derived one", () => {+ const { baseElement } = render(+ <Tabs+ data-testid="probe"+ items={[+ {+ key: "8f14e45f-ceea-467a-9a3f-1b2c3d4e5f60",+ label: "A",+ children: "c",+ "data-testid": "doc-parser-tab-schema",+ },+ ]}+ />,+ );+ expect(+ baseElement.querySelector("[data-testid='doc-parser-tab-schema']"),+ ).not.toBeNull();+ });++ /*+ * Deriving must stay opt-in. Without this, every tab and menu entry in the+ * app would silently grow an id like `tab-1` — not unique across two tab+ * strips on one page, and exactly the generic naming the plan forbids.+ */+ it("derives nothing when the parent has no data-testid", () => {+ const { baseElement } = render(+ <Tabs items={[{ key: "a", label: "A", children: "c" }]} />,+ );+ expect(baseElement.querySelector("[data-testid]")).toBeNull();+ });+});diff --git a/frontend/src/components/ui/skeleton.tsx b/frontend/src/components/ui/skeleton.tsxnew file mode 100644index 000000000..c26c4ea9f--- /dev/null+++ b/frontend/src/components/ui/skeleton.tsx@@ -0,0 +1,15 @@+import { cn } from "@/lib/utils";++function Skeleton({+ className,+ ...props+}: React.HTMLAttributes<HTMLDivElement>) {+ return (+ <div+ className={cn("animate-pulse rounded-md bg-primary/10", className)}+ {...props}+ />+ );+}++export { Skeleton };diff --git a/frontend/src/components/ui/slider.tsx b/frontend/src/components/ui/slider.tsxnew file mode 100644index 000000000..714c6eeb2--- /dev/null+++ b/frontend/src/components/ui/slider.tsx@@ -0,0 +1,26 @@+import { Slider as SliderPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Slider = React.forwardRef<+ React.ComponentRef<typeof SliderPrimitive.Root>,+ React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>+>(({ className, ...props }, ref) => (+ <SliderPrimitive.Root+ ref={ref}+ className={cn(+ "relative flex w-full touch-none select-none items-center",+ className,+ )}+ {...props}+ >+ <SliderPrimitive.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20">+ <SliderPrimitive.Range className="absolute h-full bg-primary" />+ </SliderPrimitive.Track>+ <SliderPrimitive.Thumb className="block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" />+ </SliderPrimitive.Root>+));+Slider.displayName = SliderPrimitive.Root.displayName;++export { Slider };diff --git a/frontend/src/components/ui/sonner.tsx b/frontend/src/components/ui/sonner.tsxnew file mode 100644index 000000000..336704324--- /dev/null+++ b/frontend/src/components/ui/sonner.tsx@@ -0,0 +1,30 @@+import { useTheme } from "next-themes";+import type * as React from "react";+import { Toaster as Sonner } from "sonner";++type ToasterProps = React.ComponentProps<typeof Sonner>;++const Toaster = ({ ...props }: ToasterProps) => {+ const { theme = "system" } = useTheme();++ return (+ <Sonner+ theme={theme as ToasterProps["theme"]}+ className="toaster group"+ toastOptions={{+ classNames: {+ toast:+ "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",+ description: "group-[.toast]:text-muted-foreground",+ actionButton:+ "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",+ cancelButton:+ "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",+ },+ }}+ {...props}+ />+ );+};++export { Toaster };diff --git a/frontend/src/components/ui/spinner.tsx b/frontend/src/components/ui/spinner.tsxnew file mode 100644index 000000000..62e228f6d--- /dev/null+++ b/frontend/src/components/ui/spinner.tsx@@ -0,0 +1,44 @@+import { cva, type VariantProps } from "class-variance-authority";+import { Loader2 } from "lucide-react";++import { cn } from "@/lib/utils";++/**+ * Loading spinner. Hand-written: shadcn has no registry entry for this, but the+ * Midnight Bloom mockups include one and antd's `Spin` (24 call-sites) needs a+ * replacement in P1-06.+ */+const spinnerVariants = cva("animate-spin text-muted-foreground", {+ variants: {+ size: {+ sm: "size-4",+ default: "size-6",+ lg: "size-8",+ },+ },+ defaultVariants: {+ size: "default",+ },+});++function Spinner({+ className,+ size,+ label = "Loading",+ ...props+}: Omit<React.ComponentPropsWithoutRef<typeof Loader2>, "ref"> &+ VariantProps<typeof spinnerVariants> & {+ /** Accessible name announced for the busy state. */+ label?: string;+ }) {+ return (+ <Loader2+ role="status"+ aria-label={label}+ className={cn(spinnerVariants({ size }), className)}+ {...props}+ />+ );+}++export { Spinner, spinnerVariants };diff --git a/frontend/src/components/ui/switch.tsx b/frontend/src/components/ui/switch.tsxnew file mode 100644index 000000000..b6f6a1d6b--- /dev/null+++ b/frontend/src/components/ui/switch.tsx@@ -0,0 +1,36 @@+import { Switch as SwitchPrimitives } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Switch = React.forwardRef<+ React.ComponentRef<typeof SwitchPrimitives.Root>,+ React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>+>(({ className, ...props }, ref) => (+ <SwitchPrimitives.Root+ className={cn(+ "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",+ /*+ * Keyed off `aria-checked`, not `data-state`. A Radix parent that takes+ * this as an `asChild` trigger — `<Tooltip><Switch checked/></Tooltip>`,+ * which is how the API Deployments toggle is built — merges its OWN+ * `data-state` (the tooltip's open/closed state) onto this element,+ * flipping "checked" to "closed". `aria-checked` survives that merge, so+ * an enabled deployment no longer renders as an empty grey pill.+ */+ "aria-checked:bg-primary aria-[checked=false]:bg-input",+ className,+ )}+ {...props}+ ref={ref}+ >+ <SwitchPrimitives.Thumb+ className={cn(+ "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",+ )}+ />+ </SwitchPrimitives.Root>+));+Switch.displayName = SwitchPrimitives.Root.displayName;++export { Switch };diff --git a/frontend/src/components/ui/table.tsx b/frontend/src/components/ui/table.tsxnew file mode 100644index 000000000..3b6046fd4--- /dev/null+++ b/frontend/src/components/ui/table.tsx@@ -0,0 +1,120 @@+import * as React from "react";++import { cn } from "@/lib/utils";++const Table = React.forwardRef<+ HTMLTableElement,+ React.HTMLAttributes<HTMLTableElement>+>(({ className, ...props }, ref) => (+ <div className="relative w-full overflow-auto">+ <table+ ref={ref}+ className={cn("w-full caption-bottom text-sm", className)}+ {...props}+ />+ </div>+));+Table.displayName = "Table";++const TableHeader = React.forwardRef<+ HTMLTableSectionElement,+ React.HTMLAttributes<HTMLTableSectionElement>+>(({ className, ...props }, ref) => (+ <thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />+));+TableHeader.displayName = "TableHeader";++const TableBody = React.forwardRef<+ HTMLTableSectionElement,+ React.HTMLAttributes<HTMLTableSectionElement>+>(({ className, ...props }, ref) => (+ <tbody+ ref={ref}+ className={cn("[&_tr:last-child]:border-0", className)}+ {...props}+ />+));+TableBody.displayName = "TableBody";++const TableFooter = React.forwardRef<+ HTMLTableSectionElement,+ React.HTMLAttributes<HTMLTableSectionElement>+>(({ className, ...props }, ref) => (+ <tfoot+ ref={ref}+ className={cn(+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",+ className,+ )}+ {...props}+ />+));+TableFooter.displayName = "TableFooter";++const TableRow = React.forwardRef<+ HTMLTableRowElement,+ React.HTMLAttributes<HTMLTableRowElement>+>(({ className, ...props }, ref) => (+ <tr+ ref={ref}+ className={cn(+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",+ className,+ )}+ {...props}+ />+));+TableRow.displayName = "TableRow";++const TableHead = React.forwardRef<+ HTMLTableCellElement,+ React.ThHTMLAttributes<HTMLTableCellElement>+>(({ className, ...props }, ref) => (+ <th+ ref={ref}+ className={cn(+ "h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",+ className,+ )}+ {...props}+ />+));+TableHead.displayName = "TableHead";++const TableCell = React.forwardRef<+ HTMLTableCellElement,+ React.TdHTMLAttributes<HTMLTableCellElement>+>(({ className, ...props }, ref) => (+ <td+ ref={ref}+ className={cn(+ "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",+ className,+ )}+ {...props}+ />+));+TableCell.displayName = "TableCell";++const TableCaption = React.forwardRef<+ HTMLTableCaptionElement,+ React.HTMLAttributes<HTMLTableCaptionElement>+>(({ className, ...props }, ref) => (+ <caption+ ref={ref}+ className={cn("mt-4 text-sm text-muted-foreground", className)}+ {...props}+ />+));+TableCaption.displayName = "TableCaption";++export {+ Table,+ TableBody,+ TableCaption,+ TableCell,+ TableFooter,+ TableHead,+ TableHeader,+ TableRow,+};diff --git a/frontend/src/components/ui/tabs.tsx b/frontend/src/components/ui/tabs.tsxnew file mode 100644index 000000000..9887a9aff--- /dev/null+++ b/frontend/src/components/ui/tabs.tsx@@ -0,0 +1,53 @@+import { Tabs as TabsPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const Tabs = TabsPrimitive.Root;++const TabsList = React.forwardRef<+ React.ComponentRef<typeof TabsPrimitive.List>,+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>+>(({ className, ...props }, ref) => (+ <TabsPrimitive.List+ ref={ref}+ className={cn(+ "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",+ className,+ )}+ {...props}+ />+));+TabsList.displayName = TabsPrimitive.List.displayName;++const TabsTrigger = React.forwardRef<+ React.ComponentRef<typeof TabsPrimitive.Trigger>,+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>+>(({ className, ...props }, ref) => (+ <TabsPrimitive.Trigger+ ref={ref}+ className={cn(+ "inline-flex cursor-pointer items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",+ className,+ )}+ {...props}+ />+));+TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;++const TabsContent = React.forwardRef<+ React.ComponentRef<typeof TabsPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>+>(({ className, ...props }, ref) => (+ <TabsPrimitive.Content+ ref={ref}+ className={cn(+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",+ className,+ )}+ {...props}+ />+));+TabsContent.displayName = TabsPrimitive.Content.displayName;++export { Tabs, TabsContent, TabsList, TabsTrigger };diff --git a/frontend/src/components/ui/textarea.tsx b/frontend/src/components/ui/textarea.tsxnew file mode 100644index 000000000..c838a26bb--- /dev/null+++ b/frontend/src/components/ui/textarea.tsx@@ -0,0 +1,22 @@+import * as React from "react";++import { cn } from "@/lib/utils";++const Textarea = React.forwardRef<+ HTMLTextAreaElement,+ React.TextareaHTMLAttributes<HTMLTextAreaElement>+>(({ className, ...props }, ref) => {+ return (+ <textarea+ className={cn(+ "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",+ className,+ )}+ ref={ref}+ {...props}+ />+ );+});+Textarea.displayName = "Textarea";++export { Textarea };diff --git a/frontend/src/components/ui/tooltip.tsx b/frontend/src/components/ui/tooltip.tsxnew file mode 100644index 000000000..1f5e28b89--- /dev/null+++ b/frontend/src/components/ui/tooltip.tsx@@ -0,0 +1,38 @@+"use client";++import { Tooltip as TooltipPrimitive } from "radix-ui";+import * as React from "react";++import { cn } from "@/lib/utils";++const TooltipProvider = TooltipPrimitive.Provider;++const Tooltip = TooltipPrimitive.Root;++const TooltipTrigger = TooltipPrimitive.Trigger;++/*+ * Props are derived from the Radix component rather than hand-written. That+ * keeps the primitive's surface exactly as wide as what it forwards to, so a+ * typo or a prop Radix has since renamed fails to compile instead of being+ * swallowed by `...props`.+ */+const TooltipContent = React.forwardRef<+ React.ComponentRef<typeof TooltipPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>+>(({ className, sideOffset = 4, ...props }, ref) => (+ <TooltipPrimitive.Portal>+ <TooltipPrimitive.Content+ ref={ref}+ sideOffset={sideOffset}+ className={cn(+ "z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-tooltip-content-transform-origin)]",+ className,+ )}+ {...props}+ />+ </TooltipPrimitive.Portal>+));+TooltipContent.displayName = TooltipPrimitive.Content.displayName;++export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };diff --git a/frontend/src/components/widgets/card-grid-view/CardFieldComponents.jsx b/frontend/src/components/widgets/card-grid-view/CardFieldComponents.jsxindex bffe1b747..646d2fbce 100644--- a/frontend/src/components/widgets/card-grid-view/CardFieldComponents.jsx+++ b/frontend/src/components/widgets/card-grid-view/CardFieldComponents.jsx@@ -1,27 +1,26 @@import {- ClockCircleOutlined,- CopyOutlined,- DeleteOutlined,- EditOutlined,- ExportOutlined,- HistoryOutlined,- MoreOutlined,- ShareAltOutlined,- UserOutlined,-} from "@ant-design/icons";+ Clock,+ Copy,+ EllipsisVertical,+ ExternalLink,+ History,+ Pencil,+ Share2,+ Trash2,+ User,+} from "lucide-react";+import PropTypes from "prop-types";+import { Link } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Flex, Space } from "@/components/ui/shims/antd-layout";+import { Avatar } from "@/components/ui/shims/antd-leaves";import {- Avatar,- Button,- Card,Dropdown,- Flex,Popconfirm,- Space,Tooltip,- Typography,-} from "antd";-import PropTypes from "prop-types";-import { Link } from "react-router-dom";+} from "@/components/ui/shims/antd-overlays";+import { Card } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import WorkflowIcon from "../../../assets/Workflows.svg";import {copyToClipboard,@@ -41,7 +40,15 @@ function CardActionBox({onDelete,deleteTitle = "Delete item?",kebabMenuItems,+ /**+ * Names the kind of card this box sits on ("api-deployment", "pipeline").+ * Combined with the item's id it yields `api-deployment-edit-<id>`, which is+ * the only way to tell one card's Edit from another's.+ */+ testIdPrefix,}) {+ const testId = (suffix) =>+ testIdPrefix ? `${testIdPrefix}-${suffix}-${item?.id}` : undefined;const handleEditAction = (e) => {e.stopPropagation();setSelectedItem(item);@@ -59,13 +66,15 @@ function CardActionBox({<Buttontype="text"className="action-icon-btn edit-icon"- icon={<EditOutlined />}+ data-testid={testId("edit")}+ icon={<Pencil />}onClick={handleEditAction}/><Buttontype="text"className="action-icon-btn share-icon"- icon={<ShareAltOutlined />}+ data-testid={testId("share")}+ icon={<Share2 />}onClick={handleShareAction}/><Popconfirm@@ -79,11 +88,20 @@ function CardActionBox({okText="Delete"cancelText="Cancel"okButtonProps={{ danger: true }}+ /*+ * Not keyed by item: only one confirm panel can be open at a time, so+ * the id identifies the KIND of thing being deleted, which is what a+ * test needs to know before clicking through.+ */+ data-testid={+ testIdPrefix ? `${testIdPrefix}-delete-confirm` : undefined+ }><Buttontype="text"className="action-icon-btn delete-icon"- icon={<DeleteOutlined />}+ data-testid={testId("delete")}+ icon={<Trash2 />}onClick={(e) => e.stopPropagation()}/></Popconfirm>@@ -91,11 +109,13 @@ function CardActionBox({menu={kebabMenuItems}trigger={["click"]}placement="bottomRight"+ data-testid={testId("kebab-menu")}><Buttontype="text"className="card-kebab-menu"- icon={<MoreOutlined />}+ data-testid={testId("kebab-btn")}+ icon={<EllipsisVertical />}onClick={(e) => e.stopPropagation()}/></Dropdown>@@ -111,6 +131,7 @@ CardActionBox.propTypes = {onDelete: PropTypes.func,deleteTitle: PropTypes.string,kebabMenuItems: PropTypes.object.isRequired,+ testIdPrefix: PropTypes.string,};/**@@ -127,7 +148,7 @@ function OwnerFieldRow({ item, sessionDetails, onManageCoOwners }) {const ownerContent = (<Space size={10} className="card-list-field-value">- <UserOutlined />+ <User /><Tooltip title={email}><Typography.Text>{ownerDisplay}</Typography.Text></Tooltip>@@ -176,7 +197,7 @@ function LastRunFieldRow({ lastRunTime }) {Last Run</Typography.Text><Space size={10} className="card-list-field-value">- <ClockCircleOutlined />+ <Clock /><Typography.Text>{lastRunTime ? formattedDateTime(lastRunTime) : "Never"}</Typography.Text>@@ -210,7 +231,7 @@ function Last5RunsFieldRow({Last 5 Runs</Typography.Text><Space size={10} className="card-list-field-value">- <HistoryOutlined />+ <History /><StatusPillsComponentstatuses={statuses}executionType={executionType}@@ -291,7 +312,7 @@ function WorkflowFieldRow({onClick={(e) => e.stopPropagation()}>{workflowName}- <ExportOutlined />+ <ExternalLink /></Link></Space></Flex>@@ -332,7 +353,7 @@ function ApiEndpointSection({ apiEndpoint }) {<Tooltip title="Copy endpoint"><ButtonclassName="copy-btn-outlined"- icon={<CopyOutlined />}+ icon={<Copy />}size="small"onClick={(e) => {e.stopPropagation();diff --git a/frontend/src/components/widgets/card-grid-view/CardGridView.css b/frontend/src/components/widgets/card-grid-view/CardGridView.cssindex f51319cf2..f6daf6822 100644--- a/frontend/src/components/widgets/card-grid-view/CardGridView.css+++ b/frontend/src/components/widgets/card-grid-view/CardGridView.css@@ -31,7 +31,7 @@.card-grid-item .ant-card-head-title {padding: 0;- font-size: 14px;+ font-size: 13px;font-weight: 600;}@@ -57,7 +57,7 @@}.card-item-title {- font-size: 14px;+ font-size: 13px;font-weight: 600;margin: 0;white-space: nowrap;@@ -345,7 +345,7 @@/* Workflow link - styled with icon */.card-list-workflow-link {- font-size: 14px;+ font-size: 13px;color: rgba(0, 0, 0, 0.85);text-decoration: none;display: inline-flex;@@ -363,13 +363,18 @@.card-list-workflow-link-icon {font-size: 11px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 11px;+ height: 11px;color: rgba(0, 0, 0, 0.55);}.card-list-name {- font-family: var(--font-family);+ font-family: var(--font-sans);font-size: 16px;- font-weight: var(--font-weight-600);+ font-weight: 600;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;@@ -391,7 +396,7 @@border-radius: 4px;font-size: 11px;font-weight: 600;- font-family: var(--font-family);+ font-family: var(--font-sans);text-transform: uppercase;letter-spacing: 0.5px;cursor: default;@@ -426,7 +431,7 @@.status-badge.status-badge-clickable:focus-visible,.status-badge.ant-tag.status-badge-clickable:focus-visible {- outline: 2px solid #1890ff;+ outline: 2px solid var(--ring);outline-offset: 2px;}@@ -448,7 +453,7 @@}.status-tooltip-count.success {- color: #52c41a;+ color: var(--success);}.status-tooltip-count.error {@@ -471,7 +476,7 @@/* Preserve icon colors inside dark tooltip background */.status-tooltip-count.success .anticon {- color: #52c41a;+ color: var(--success);}.status-tooltip-count.error .anticon {@@ -483,7 +488,7 @@display: flex;flex-direction: column;gap: 6px;- font-family: var(--font-family);+ font-family: var(--font-sans);}/* Status row - full width below 2-column layout */@@ -511,7 +516,12 @@}.card-list-meta-label .anticon {- font-size: 14px;+ font-size: 13px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 13px;+ height: 13px;}.card-list-meta-icon {@@ -522,7 +532,7 @@/* Meta item values - dark color */.card-list-meta-value {- font-size: 14px;+ font-size: 13px;color: rgba(0, 0, 0, 0.85);font-weight: 400;}@@ -575,8 +585,8 @@/* Connector instance name - user-set name, prominent */.connector-flow-instance-name {- font-family: var(--font-family);- font-size: 14px;+ font-family: var(--font-sans);+ font-size: 13px;font-weight: 500;color: rgba(0, 0, 0, 0.85);white-space: nowrap;@@ -591,8 +601,8 @@/* Legacy connector name style (fallback) */.connector-flow-name {- font-family: var(--font-family);- font-size: 14px;+ font-family: var(--font-sans);+ font-size: 13px;font-weight: 500;color: rgba(0, 0, 0, 0.85);white-space: nowrap;@@ -646,7 +656,7 @@align-items: center;justify-content: center;font-size: 18px;- color: #092c4c;+ color: var(--foreground);cursor: pointer;transition:color 0.2s ease,@@ -661,12 +671,12 @@.action-icon-btn:hover,.action-icon-btn.ant-btn:hover {transform: scale(1.1);- color: #092c4c;+ color: var(--primary);}.action-icon-btn:focus-visible,.action-icon-btn.ant-btn:focus-visible {- outline: 2px solid #1890ff;+ outline: 2px solid var(--ring);outline-offset: 2px;border-radius: 4px;}@@ -739,7 +749,7 @@.card-expand-chevron:focus-visible,.card-expand-chevron.ant-btn:focus-visible {- outline: 2px solid #1890ff;+ outline: 2px solid var(--ring);outline-offset: 2px;}@@ -764,15 +774,15 @@}.card-list-expanded-label {- font-family: var(--font-family);+ font-family: var(--font-sans);font-size: 11px;color: rgba(0, 0, 0, 0.55);letter-spacing: 0.3px;}.card-list-expanded-value {- font-family: var(--font-family);- font-size: 14px;+ font-family: var(--font-sans);+ font-size: 13px;color: rgba(0, 0, 0, 0.85);}@@ -870,6 +880,11 @@.action-icon-btn {font-size: 16px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 16px;+ height: 16px;}}@@ -892,8 +907,8 @@}.copy-btn-outlined:hover {- border-color: #1677ff;- color: #1677ff;+ border-color: var(--primary);+ color: var(--primary);}/* Clickable owner field - mirrors ListView owner badge behavior */@@ -912,7 +927,7 @@}.card-owner-clickable:hover .ant-typography {- color: #1677ff;+ color: var(--primary);}/* Responsive override for card-grid-view on smaller screens */@@ -977,7 +992,7 @@/* Value column with icon */.card-list-field-value {- font-size: 14px;+ font-size: 13px;color: rgba(0, 0, 0, 0.85);}@@ -1000,7 +1015,7 @@}.card-list-field-instance-name {- font-size: 14px;+ font-size: 13px;font-weight: 500;color: rgba(0, 0, 0, 0.85);}@@ -1013,7 +1028,7 @@/* Footer row - inline items */.card-list-footer-row {padding: 14px 16px 0px 16px;- font-size: 14px;+ font-size: 13px;color: rgba(0, 0, 0, 0.85);border-top: 1px solid #f0f0f0;background: #fafafa;@@ -1108,13 +1123,13 @@.card-kebab-menu:focus-visible,.card-kebab-menu.ant-btn:focus-visible {- outline: 2px solid #1890ff;+ outline: 2px solid var(--ring);outline-offset: 2px;}/* Workflow link in row layout */.card-list-workflow-link-row {- font-size: 14px;+ font-size: 13px;color: rgba(0, 0, 0, 0.85);text-decoration: none;display: inline-flex;@@ -1124,11 +1139,16 @@}.card-list-workflow-link-row:hover {- color: #1677ff;+ color: var(--primary);}.card-list-workflow-link-row .anticon {font-size: 11px;+ /* width/height, not font-size alone: antd shipped an icon FONT (sized by+ * font-size); lucide ships SVGs, which ignore it and fall back to their+ * own 24px default. font-size is kept for any text in the same element. */+ width: 11px;+ height: 11px;color: rgba(0, 0, 0, 0.55);}diff --git a/frontend/src/components/widgets/card-grid-view/CardGridView.jsx b/frontend/src/components/widgets/card-grid-view/CardGridView.jsxindex 61207ff03..c726bc22b 100644--- a/frontend/src/components/widgets/card-grid-view/CardGridView.jsx+++ b/frontend/src/components/widgets/card-grid-view/CardGridView.jsx@@ -1,5 +1,7 @@-import { Col, Empty, Flex, Pagination, Row } from "antd";import PropTypes from "prop-types";+import { Col, Flex, Row } from "@/components/ui/shims/antd-layout";+import { Empty } from "@/components/ui/shims/antd-leaves";+import { Pagination } from "@/components/ui/shims/antd-structure";import { CardItem } from "./CardItem.jsx";import { LoadingSkeleton } from "./LoadingSkeleton.jsx";@@ -20,6 +22,7 @@ import "./CardGridView.css";* @param {boolean} props.listMode - When true, renders cards as full-width list items* @param {string} props.forceExpandedId - ID of item to keep expanded (e.g., when modal is open)* @param {string} props.scrollToId - ID of item to scroll to (without forcing expansion)+ * @param {string} props.testIdPrefix - Prefix for the grid's and cards' `data-testid`s* @return {JSX.Element} The rendered card grid component** @example@@ -43,6 +46,14 @@ function CardGridView({forceExpandedId = null,scrollToId = null,pagination = null,+ /**+ * Cards are the list rows of this widget: identical in structure, told apart+ * only by their content, and every control inside one repeats in all the+ * others. `getRowKey` already computes a unique id per item, so each card+ * gets `${testIdPrefix}-card-${key}`. Callers pass a page-specific prefix so+ * the locator names the screen rather than this widget.+ */+ testIdPrefix,}) {// Default grid configurationconst defaultGridConfig = {@@ -105,7 +116,7 @@ function CardGridView({const showPagination = pagination && pagination.total > pagination.pageSize;return (- <div className={`card-grid-view ${className}`}>+ <div className={`card-grid-view ${className}`} data-testid={testIdPrefix}><Row gutter={gutter} className="card-grid-row">{data.map((item, index) => (<Col@@ -121,6 +132,11 @@ function CardGridView({item={item}config={cardConfig}onClick={onCardClick}+ testId={+ testIdPrefix+ ? `${testIdPrefix}-card-${getRowKey(item, index)}`+ : undefined+ }listMode={listMode}forceExpanded={forceExpandedId && String(forceExpandedId) === String(item.id)@@ -191,6 +207,7 @@ CardGridView.propTypes = {listMode: PropTypes.bool,forceExpandedId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),scrollToId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),+ testIdPrefix: PropTypes.string,pagination: PropTypes.shape({current: PropTypes.number,pageSize: PropTypes.number,diff --git a/frontend/src/components/widgets/card-grid-view/CardItem.jsx b/frontend/src/components/widgets/card-grid-view/CardItem.jsxindex e62fe26c6..0acffb554 100644--- a/frontend/src/components/widgets/card-grid-view/CardItem.jsx+++ b/frontend/src/components/widgets/card-grid-view/CardItem.jsx@@ -1,7 +1,11 @@-import { DownOutlined, UpOutlined } from "@ant-design/icons";-import { Button, Card, Flex, Space, Tooltip, Typography } from "antd";+import { ChevronDown, ChevronUp } from "lucide-react";import PropTypes from "prop-types";import { memo, useCallback, useEffect, useRef, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Flex, Space } from "@/components/ui/shims/antd-layout";+import { Tooltip } from "@/components/ui/shims/antd-overlays";+import { Card } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";/*** Individual card item renderer for CardGridView@@ -13,6 +17,7 @@ import { memo, useCallback, useEffect, useRef, useState } from "react";* @param {boolean} props.listMode - Whether to render in list mode* @param {boolean} props.forceExpanded - Force card to stay expanded (e.g., when modal is open)* @param {boolean} props.scrollIntoView - Scroll to this card (without forcing expansion)+ * @param {string} props.testId - `data-testid` for the card element itself* @return {JSX.Element} The rendered card item*/function CardItem({@@ -22,6 +27,7 @@ function CardItem({listMode = false,forceExpanded = false,scrollIntoView = false,+ testId,}) {const [expanded, setExpanded] = useState(false);const cardRef = useRef(null);@@ -235,7 +241,8 @@ function CardItem({<Buttontype="text"className="card-expand-chevron"- icon={isExpanded ? <UpOutlined /> : <DownOutlined />}+ data-testid={testId ? `${testId}-expand-btn` : undefined}+ icon={isExpanded ? <ChevronUp /> : <ChevronDown />}onClick={handleToggleExpand}/>);@@ -249,6 +256,7 @@ function CardItem({<Cardref={cardRef}className="card-grid-item card-list-mode"+ data-testid={testId}hoverable={!!onClick}onClick={handleCardClick}>@@ -265,6 +273,7 @@ function CardItem({<Cardref={cardRef}className="card-grid-item card-list-mode"+ data-testid={testId}hoverable={!!onClick}onClick={handleCardClick}>@@ -289,6 +298,7 @@ function CardItem({<Cardref={cardRef}className="card-grid-item"+ data-testid={testId}hoverable={!!onClick || config.expandable}onClick={handleCardClick}>@@ -366,6 +376,7 @@ CardItem.propTypes = {listMode: PropTypes.bool,forceExpanded: PropTypes.bool,scrollIntoView: PropTypes.bool,+ testId: PropTypes.string,};// Wrap with memo to prevent unnecessary re-renders when parent array reference changesdiff --git a/frontend/src/components/widgets/card-grid-view/LoadingSkeleton.jsx b/frontend/src/components/widgets/card-grid-view/LoadingSkeleton.jsxindex bad03ffd4..cae0d08b1 100644--- a/frontend/src/components/widgets/card-grid-view/LoadingSkeleton.jsx+++ b/frontend/src/components/widgets/card-grid-view/LoadingSkeleton.jsx@@ -1,6 +1,7 @@-import { Card, Col, Row, Skeleton } from "antd";import PropTypes from "prop-types";import { useMemo } from "react";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Card, Skeleton } from "@/components/ui/shims/antd-structure";/*** Loading skeleton that matches the card grid layoutdiff --git a/frontend/src/components/widgets/co-owner-management/CoOwnerManagement.jsx b/frontend/src/components/widgets/co-owner-management/CoOwnerManagement.jsxindex 7d8648e13..9ca010329 100644--- a/frontend/src/components/widgets/co-owner-management/CoOwnerManagement.jsx+++ b/frontend/src/components/widgets/co-owner-management/CoOwnerManagement.jsx@@ -1,19 +1,12 @@-import {- DeleteOutlined,- QuestionCircleOutlined,- UserOutlined,-} from "@ant-design/icons";-import {- Avatar,- Button,- List,- Modal,- Popconfirm,- Select,- Typography,-} from "antd";+import { CircleHelp, Trash2, User } from "lucide-react";import PropTypes from "prop-types";import { useMemo, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";+import { Select } from "@/components/ui/shims/antd-inputs";+import { Avatar } from "@/components/ui/shims/antd-leaves";+import { Modal, Popconfirm } from "@/components/ui/shims/antd-overlays";+import { List } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { SpinnerLoader } from "../spinner-loader/SpinnerLoader";import "./CoOwnerManagement.css";@@ -148,9 +141,7 @@ function CoOwnerManagement({<Buttontype="text"size="small"- icon={- <DeleteOutlined className="action-icon-buttons" />- }+ icon={<Trash2 className="action-icon-buttons" />}onClick={() => handleRemovePending(item?.id)}aria-label={`Remove pending co-owner ${item?.email}`}/>@@ -166,14 +157,14 @@ function CoOwnerManagement({description={`Are you sure you want to remove '${item?.email}' as co-owner?`}okText="Yes"cancelText="No"- icon={<QuestionCircleOutlined />}+ icon={<CircleHelp />}onConfirm={() => handleRemoveExisting(item?.id)}><Buttontype="text"size="small"icon={- <DeleteOutlined+ <Trash2className="action-icon-buttons"style={{opacity:@@ -194,7 +185,7 @@ function CoOwnerManagement({<><AvatarclassName="shared-user-avatar"- icon={<UserOutlined />}+ icon={<User />}/><Typography.Text className="shared-username">{item.email}diff --git a/frontend/src/components/widgets/confirm-modal/ConfirmHost.jsx b/frontend/src/components/widgets/confirm-modal/ConfirmHost.jsxnew file mode 100644index 000000000..17a8b28ae--- /dev/null+++ b/frontend/src/components/widgets/confirm-modal/ConfirmHost.jsx@@ -0,0 +1,71 @@+import * as React from "react";++import {+ AlertDialog,+ AlertDialogAction,+ AlertDialogCancel,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogTitle,+} from "@/components/ui/alert-dialog";++import { getConfirmState, settleConfirm, subscribe } from "./confirmStore";++/**+ * Renders the app-wide confirm dialog. Mount once near the app root.+ *+ * Lives here rather than beside each caller so the dialog outlives the element+ * that opened it — see the note in confirmStore.js for why that matters.+ */+function ConfirmHost() {+ const state = React.useSyncExternalStore(+ subscribe,+ getConfirmState,+ () => null,+ );++ if (!state) {+ return null;+ }++ return (+ <AlertDialog+ open+ onOpenChange={(open) => {+ // Escape and outside-click must settle as Cancel, not leave the+ // promise pending.+ if (!open) {+ settleConfirm(false);+ }+ }}+ >+ <AlertDialogContent>+ <AlertDialogHeader>+ <AlertDialogTitle>{state.title}</AlertDialogTitle>+ {state.content ? (+ <AlertDialogDescription>{state.content}</AlertDialogDescription>+ ) : null}+ </AlertDialogHeader>+ <AlertDialogFooter>+ <AlertDialogCancel onClick={() => settleConfirm(false)}>+ {state.cancelText}+ </AlertDialogCancel>+ <AlertDialogAction+ onClick={() => settleConfirm(true)}+ className={+ state.danger+ ? "bg-destructive text-destructive-foreground hover:bg-destructive/90"+ : undefined+ }+ >+ {state.okText}+ </AlertDialogAction>+ </AlertDialogFooter>+ </AlertDialogContent>+ </AlertDialog>+ );+}++export { ConfirmHost };diff --git a/frontend/src/components/widgets/confirm-modal/ConfirmModal.jsx b/frontend/src/components/widgets/confirm-modal/ConfirmModal.jsxindex ae1ca889a..13c108efa 100644--- a/frontend/src/components/widgets/confirm-modal/ConfirmModal.jsx+++ b/frontend/src/components/widgets/confirm-modal/ConfirmModal.jsx@@ -1,6 +1,18 @@-import { Modal, Space } from "antd";import PropTypes from "prop-types";+import { Space } from "@/components/ui/shims/antd-layout";+import { openConfirm } from "./confirmStore";++/**+ * Wraps its children in a click target that asks for confirmation first.+ *+ * The dialog opens through the module-level store rather than a local+ * `Modal.useModal()` holder. Several call-sites — Delete in a prompt card's+ * kebab menu, most notably — sit inside a Radix DropdownMenu, which unmounts+ * its content the moment an item is clicked. A holder rendered as a sibling of+ * `children` died in that same tick, so the dialog never appeared and Delete+ * silently did nothing at all. See confirmStore.js.+ */function ConfirmModal({children,handleConfirm,@@ -8,38 +20,37 @@ function ConfirmModal({content,okText,cancelText,- isDisabled,+ isDisabled = false,}) {- const [modal, contextHolder] = Modal.useModal();-const handleConfirmModal = () => {if (isDisabled) {handleConfirm();return;}- modal.confirm({+ openConfirm({title: title || "Are you sure?",content: content || "",okText: okText || "Confirm",cancelText: cancelText || "Cancel",onOk: handleConfirm,- centered: true,});};+ /*+ * `w-full` matters inside a DropdownMenuItem. The item carries `px-2 py-1.5`+ * of its own, and Radix closes the menu on pointerdown anywhere in it — so a+ * click landing in that padding ring dismissed everything without ever+ * reaching this handler. That is why Delete worked only "sometimes",+ * depending on where in the row the pointer came down.+ */return (- <>- <Space onClick={handleConfirmModal}>{children}</Space>- {contextHolder}- </>+ <Space className="w-full flex-1" onClick={handleConfirmModal}>+ {children}+ </Space>);}-ConfirmModal.defaultProps = {- isDisabled: false,-};-ConfirmModal.propTypes = {children: PropTypes.any.isRequired,handleConfirm: PropTypes.func.isRequired,diff --git a/frontend/src/components/widgets/confirm-modal/ConfirmModal.test.jsx b/frontend/src/components/widgets/confirm-modal/ConfirmModal.test.jsxnew file mode 100644index 000000000..78868a6c4--- /dev/null+++ b/frontend/src/components/widgets/confirm-modal/ConfirmModal.test.jsx@@ -0,0 +1,177 @@+import { cleanup, render, screen, waitFor } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { afterEach, describe, expect, it, vi } from "vitest";++import { Dropdown } from "@/components/ui/shims/antd-overlays";+import { ConfirmHost } from "./ConfirmHost";+import { ConfirmModal } from "./ConfirmModal";+import { resetConfirm } from "./confirmStore";++// The store is module-level, so a dialog left open by one test would leak+// `pointer-events: none` on <body> into the next.+afterEach(() => {+ cleanup();+ resetConfirm();+});++/**+ * The regression these cover: Delete in a prompt card's kebab menu did nothing+ * at all. `Modal.useModal()` kept the dialog in a hook rendered as a sibling of+ * the menu item, and Radix unmounts DropdownMenu content on click — so the+ * holder was destroyed in the same tick that asked it to open.+ */++function Harness({ children }) {+ return (+ <>+ {children}+ <ConfirmHost />+ </>+ );+}++describe("ConfirmModal", () => {+ it("opens the dialog from a plain trigger", async () => {+ render(+ <Harness>+ <ConfirmModal handleConfirm={vi.fn()} content="Gone forever.">+ Delete+ </ConfirmModal>+ </Harness>,+ );+ await userEvent.click(screen.getByText("Delete"));+ expect(await screen.findByText("Gone forever.")).toBeInTheDocument();+ });++ it("runs handleConfirm only after the dialog is confirmed", async () => {+ const onConfirm = vi.fn();+ render(+ <Harness>+ <ConfirmModal handleConfirm={onConfirm} content="Gone forever.">+ Delete+ </ConfirmModal>+ </Harness>,+ );+ await userEvent.click(screen.getByText("Delete"));+ expect(onConfirm).not.toHaveBeenCalled();++ await userEvent.click(screen.getByRole("button", { name: "Confirm" }));+ expect(onConfirm).toHaveBeenCalledTimes(1);+ });++ it("does not run handleConfirm when cancelled", async () => {+ const onConfirm = vi.fn();+ render(+ <Harness>+ <ConfirmModal handleConfirm={onConfirm} content="Gone forever.">+ Delete+ </ConfirmModal>+ </Harness>,+ );+ await userEvent.click(screen.getByText("Delete"));+ await userEvent.click(screen.getByRole("button", { name: "Cancel" }));+ expect(onConfirm).not.toHaveBeenCalled();+ await waitFor(() =>+ expect(screen.queryByText("Gone forever.")).not.toBeInTheDocument(),+ );+ });++ /*+ * The actual bug. The trigger lives inside a dropdown that unmounts its own+ * content on click, so the dialog must be hosted outside that subtree.+ */+ it("still opens when its trigger is inside a dropdown that closes on click", async () => {+ const onConfirm = vi.fn();+ render(+ <Harness>+ <Dropdown+ menu={{+ items: [+ {+ key: "delete",+ label: (+ <ConfirmModal+ handleConfirm={onConfirm}+ content="The prompt will be permanently deleted."+ >+ Delete+ </ConfirmModal>+ ),+ },+ ],+ }}+ >+ <button type="button">Open menu</button>+ </Dropdown>+ </Harness>,+ );++ await userEvent.click(screen.getByRole("button", { name: "Open menu" }));+ await userEvent.click(await screen.findByText("Delete"));++ // The menu is gone, but the dialog survives it.+ expect(+ await screen.findByText("The prompt will be permanently deleted."),+ ).toBeInTheDocument();++ await userEvent.click(screen.getByRole("button", { name: "Confirm" }));+ expect(onConfirm).toHaveBeenCalledTimes(1);+ });++ /*+ * Radix closes the menu on pointerdown anywhere in the item, so any part of+ * the row that is NOT the ConfirmModal is a dead zone: the menu dismisses+ * and the handler never runs. That is the "works sometimes" report — the+ * outcome depended on where in the row the pointer landed.+ */+ it("leaves no dead zone between the menu item and its confirm trigger", async () => {+ render(+ <Harness>+ <Dropdown+ menu={{+ items: [+ {+ key: "delete",+ label: (+ <ConfirmModal handleConfirm={vi.fn()} content="Gone.">+ Delete+ </ConfirmModal>+ ),+ },+ ],+ }}+ >+ <button type="button">Open menu</button>+ </Dropdown>+ </Harness>,+ );++ await userEvent.click(screen.getByRole("button", { name: "Open menu" }));+ const item = await screen.findByRole("menuitem");+ const trigger = item.querySelector(".ant-space");++ // The item adds no padding of its own, and the padding it does apply is+ // pushed onto the trigger via `[&>*]` — so the whole row is the trigger+ // rather than a padded ring around it.+ expect(item.className).toContain("p-0");+ expect(trigger.className).toContain("w-full");+ const label = item.querySelector(".ant-dropdown-menu-title-content");+ expect(label.className).toContain("[&>*]:px-2");+ expect(label.className).toContain("[&>*]:py-1.5");+ expect(label.firstElementChild).toBe(trigger);+ });++ it("skips the dialog entirely when isDisabled", async () => {+ const onConfirm = vi.fn();+ render(+ <Harness>+ <ConfirmModal handleConfirm={onConfirm} isDisabled content="Nope.">+ Delete+ </ConfirmModal>+ </Harness>,+ );+ await userEvent.click(screen.getByText("Delete"));+ expect(onConfirm).toHaveBeenCalledTimes(1);+ expect(screen.queryByText("Nope.")).not.toBeInTheDocument();+ });+});diff --git a/frontend/src/components/widgets/confirm-modal/confirmStore.js b/frontend/src/components/widgets/confirm-modal/confirmStore.jsnew file mode 100644index 000000000..00d48e49d--- /dev/null+++ b/frontend/src/components/widgets/confirm-modal/confirmStore.js@@ -0,0 +1,81 @@+/**+ * Module-level store for the app-wide confirm dialog.+ *+ * antd's `Modal.confirm()` renders into a container it owns, so it survives the+ * caller unmounting. The shim's `Modal.useModal()` keeps that state in a hook+ * instead, which breaks whenever the trigger lives inside something that closes+ * on click — a Radix DropdownMenu unmounts its content, taking the hook and its+ * contextHolder with it. That is why Delete in a prompt card's kebab menu did+ * nothing at all: the dialog was requested, then destroyed in the same tick.+ *+ * Keeping the state outside React lets <ConfirmHost> (mounted once, near the+ * app root) render the dialog no matter which subtree asked for it.+ */++let current = null;+const listeners = new Set();++function emit() {+ for (const listener of listeners) {+ listener(current);+ }+}++/** Subscribe to dialog state. Returns an unsubscribe function. */+export function subscribe(listener) {+ listeners.add(listener);+ return () => listeners.delete(listener);+}++export function getConfirmState() {+ return current;+}++/**+ * Open the dialog. Resolves true on confirm, false on cancel/escape/outside+ * click, so a caller can `await` it instead of splitting across callbacks.+ */+export function openConfirm(options = {}) {+ return new Promise((resolve) => {+ // A second request supersedes the first; settle the old promise so nothing+ // is left pending forever.+ current?.resolve?.(false);+ current = {+ title: options.title ?? "Are you sure?",+ content: options.content ?? options.description ?? "",+ okText: options.okText ?? "Confirm",+ cancelText: options.cancelText ?? "Cancel",+ danger: options.danger ?? options.okType === "danger",+ onOk: options.onOk,+ onCancel: options.onCancel,+ resolve,+ };+ emit();+ });+}++/**+ * Drop any open dialog without settling it. For test teardown — the store+ * outlives a single render, so a dialog left open leaks `pointer-events: none`+ * on <body> into the next test.+ */+export function resetConfirm() {+ current = null;+ emit();+}++/** Settle the open dialog and clear it. */+export function settleConfirm(result) {+ const open = current;+ current = null;+ emit();+ if (!open) {+ return;+ }+ if (result) {+ open.onOk?.();+ } else {+ open.onCancel?.();+ }+ open.resolve?.(result);+}diff --git a/frontend/src/components/widgets/custom-button/CustomButton.css b/frontend/src/components/widgets/custom-button/CustomButton.cssdeleted file mode 100644index 6815db640..000000000--- a/frontend/src/components/widgets/custom-button/CustomButton.css+++ /dev/null@@ -1,13 +0,0 @@-/* Styles for CustomButton */--.custom-button-primary {- background-color: #092c4c;- border-color: #092c4c;- color: #ffffff;-}--.custom-button-primary:not([disabled]):hover {- background-color: #0e4274 !important;- border-color: #0e4274;- color: #ffffff;-}diff --git a/frontend/src/components/widgets/custom-button/CustomButton.jsx b/frontend/src/components/widgets/custom-button/CustomButton.jsxindex 70778fac4..6e7f71a65 100644--- a/frontend/src/components/widgets/custom-button/CustomButton.jsx+++ b/frontend/src/components/widgets/custom-button/CustomButton.jsx@@ -1,18 +1,27 @@-import { Button } from "antd";import PropTypes from "prop-types";+import * as React from "react";+import { Button } from "@/components/ui/shims/antd-button";-import "./CustomButton.css";--function CustomButton({ ...props }) {- const { type } = props;-- return (- <Button- className={type === "primary" ? "custom-button-primary" : ""}- {...props}- />- );-}+/**+ * forwardRef is load-bearing, not decoration. CustomButton is used as the+ * child of `<Dropdown>`, whose Radix trigger renders with `asChild` and needs+ * a ref to attach its handlers. As a plain function component the ref was+ * dropped, the trigger was inert, and clicking Export in Prompt Studio did+ * nothing at all — no menu, no network request.+ */+/*+ * CustomButton.css used to repaint `type="primary"` navy (#092c4c) on top of+ * the Button shim's output. That override is gone, along with the file: the+ * shim already maps antd `type="primary"` to the shadcn `default` variant,+ * i.e. `bg-primary` = Midnight Bloom violet. Keeping a second definition of+ * "primary" meant the 24 CustomButton call-sites rendered a different colour+ * from every plain `<Button type="primary">` elsewhere in the app.+ *+ * CustomButton now exists purely for the forwardRef below.+ */+const CustomButton = React.forwardRef(function CustomButton(props, ref) {+ return <Button ref={ref} {...props} />;+});CustomButton.propTypes = {type: PropTypes.string,diff --git a/frontend/src/components/widgets/empty-state/EmptyState.jsx b/frontend/src/components/widgets/empty-state/EmptyState.jsxindex 0c9c8537d..784b0799e 100644--- a/frontend/src/components/widgets/empty-state/EmptyState.jsx+++ b/frontend/src/components/widgets/empty-state/EmptyState.jsx@@ -1,12 +1,14 @@-import { PlusOutlined } from "@ant-design/icons";-import { Button, Space, Typography } from "antd";+import { Plus } from "lucide-react";import PropTypes from "prop-types";+import { Button } from "@/components/ui/shims/antd-button";+import { Space } from "@/components/ui/shims/antd-layout";+import { Typography } from "@/components/ui/shims/antd-typography";import { EmptyPlaceholder } from "../../../assets";function EmptyState({ text, btnText, handleClick }) {return (- <div className="display-flex-center-h-and-v">+ <div className="display-flex-center-h-and-v" data-testid="empty-state"><Space direction="vertical" className="display-flex-align-center"><EmptyPlaceholder /><div>@@ -15,7 +17,12 @@ function EmptyState({ text, btnText, handleClick }) {</div>{btnText?.length > 0 && (<div className="display-flex-center">- <Button type="link" icon={<PlusOutlined />} onClick={handleClick}>+ <Button+ type="link"+ icon={<Plus />}+ data-testid="empty-state-action-btn"+ onClick={handleClick}+ >{btnText}</Button></div>diff --git a/frontend/src/components/widgets/error-boundary/ErrorBoundary.jsx b/frontend/src/components/widgets/error-boundary/ErrorBoundary.jsxindex a83aeee3e..b031cc83b 100644--- a/frontend/src/components/widgets/error-boundary/ErrorBoundary.jsx+++ b/frontend/src/components/widgets/error-boundary/ErrorBoundary.jsx@@ -1,8 +1,6 @@-import { Typography } from "antd";import PropTypes from "prop-types";import { Component } from "react";--const { Text } = Typography;+import { Text } from "@/components/ui/shims/antd-typography";// Shallow element-wise compare; resetKeys are typically fresh arrays each// render (e.g. [location.pathname]), so a reference check would never match.diff --git a/frontend/src/components/widgets/grid-view/GridView.jsx b/frontend/src/components/widgets/grid-view/GridView.jsxindex 5dff36a64..fce283478 100644--- a/frontend/src/components/widgets/grid-view/GridView.jsx+++ b/frontend/src/components/widgets/grid-view/GridView.jsx@@ -1,13 +1,10 @@-import { Card, Dropdown, Popconfirm, Typography } from "antd";+import { CircleHelp, EllipsisVertical, Pencil, Trash2 } from "lucide-react";import PropTypes from "prop-types";import { useNavigate } from "react-router-dom";+import { Dropdown, Popconfirm } from "@/components/ui/shims/antd-overlays";+import { Card } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "./GridView.css";-import {- DeleteOutlined,- EditOutlined,- MoreOutlined,- QuestionCircleOutlined,-} from "@ant-design/icons";function GridView({ listOfTools, handleEdit, handleDelete }) {const navigate = useNavigate();@@ -32,7 +29,7 @@ function GridView({ listOfTools, handleEdit, handleDelete }) {{label: "Edit",key: "edit",- icon: <EditOutlined />,+ icon: <Pencil />,onClick: (event) => handleEdit(event, item?.tool_id),},{@@ -43,7 +40,7 @@ function GridView({ listOfTools, handleEdit, handleDelete }) {okText="Yes"cancelText="No"icon={- <QuestionCircleOutlined+ <CircleHelpstyle={{color: "#dc4446",}}@@ -54,7 +51,7 @@ function GridView({ listOfTools, handleEdit, handleDelete }) {}}><Typography.Text type="danger">- <DeleteOutlined+ <Trash2style={{color: "#dc4446",marginInlineEnd: "8px",@@ -73,7 +70,7 @@ function GridView({ listOfTools, handleEdit, handleDelete }) {placement="bottomRight"onClick={(evt) => evt.stopPropagation()}>- <MoreOutlined />+ <EllipsisVertical /></Dropdown>}>diff --git a/frontend/src/components/widgets/resource-table/ResourceTable.css b/frontend/src/components/widgets/resource-table/ResourceTable.cssindex 5b0bf01dd..91040b3c5 100644--- a/frontend/src/components/widgets/resource-table/ResourceTable.css+++ b/frontend/src/components/widgets/resource-table/ResourceTable.css@@ -103,6 +103,17 @@min-width: 0;}+/* Under table-layout: fixed the column no longer grows to fit, so an+ over-long title/description would spill across the neighbouring cell+ instead. Clamp both to a single line — the Typography `ellipsis` prop+ supplies the hover tooltip with the full text. */+.resource-table-name-title,+.resource-table-name-desc {+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+}+.resource-table-name-title {font-size: 15px;}diff --git a/frontend/src/components/widgets/resource-table/ResourceTable.jsx b/frontend/src/components/widgets/resource-table/ResourceTable.jsxindex 3b134e596..c2a99ecb3 100644--- a/frontend/src/components/widgets/resource-table/ResourceTable.jsx+++ b/frontend/src/components/widgets/resource-table/ResourceTable.jsx@@ -1,25 +1,25 @@import {- CaretDownOutlined,- CaretUpOutlined,- ClearOutlined,- DeleteOutlined,- EditOutlined,- QuestionCircleOutlined,- ShareAltOutlined,- SortAscendingOutlined,- SortDescendingOutlined,-} from "@ant-design/icons";+ ArrowDownAZ,+ ArrowUpAZ,+ ChevronDown,+ ChevronUp,+ CircleHelp,+ Eraser,+ Pencil,+ Share2,+ Trash2,+} from "lucide-react";+import PropTypes from "prop-types";+import { useNavigate } from "react-router-dom";+import { Space } from "@/components/ui/shims/antd-layout";+import { Avatar } from "@/components/ui/shims/antd-leaves";import {- Avatar,Dropdown,Popconfirm,- Space,- Table,Tooltip,- Typography,-} from "antd";-import PropTypes from "prop-types";-import { useNavigate } from "react-router-dom";+} from "@/components/ui/shims/antd-overlays";+import { Table } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import { formattedDateTime, timeAgo } from "../../../helpers/GetStaticData";import "./ResourceTable.css";@@ -47,12 +47,12 @@ const colorForSeed = (seed = "") => {// Sort-menu wording differs for text vs date columns (per the design).const SORT_OPTIONS = {text: [- { key: "asc", label: "A-Z", icon: <SortAscendingOutlined /> },- { key: "desc", label: "Z-A", icon: <SortDescendingOutlined /> },+ { key: "asc", label: "A-Z", icon: <ArrowUpAZ /> },+ { key: "desc", label: "Z-A", icon: <ArrowDownAZ /> },],date: [- { key: "asc", label: "Oldest First", icon: <SortAscendingOutlined /> },- { key: "desc", label: "Newest First", icon: <SortDescendingOutlined /> },+ { key: "asc", label: "Oldest First", icon: <ArrowUpAZ /> },+ { key: "desc", label: "Newest First", icon: <ArrowDownAZ /> },],};@@ -68,13 +68,14 @@ function SortHeader({sort,userSorted,onSortChange,+ testId,}) {// Don't light up the default sort column on load — only once the user picks.const active = userSorted && sort?.sortBy === sortKey;const items = [...SORT_OPTIONS[sortType],{ type: "divider" },- { key: "clear", label: "Clear Sort", icon: <ClearOutlined /> },+ { key: "clear", label: "Clear Sort", icon: <Eraser /> },];const onClick = ({ key, domEvent }) => {domEvent?.stopPropagation();@@ -85,18 +86,23 @@ function SortHeader({}};return (+ // The menu is portalled and its entries repeat verbatim across the four+ // sortable columns, so `${testId}-menu-item-asc` is the only thing that+ // distinguishes "A-Z under Name" from "A-Z under Modified".<Dropdowntrigger={["click"]}menu={{ items, onClick, selectedKeys: active ? [sort.order] : [] }}+ data-testid={testId ? `${testId}-menu` : undefined}><buttontype="button"+ data-testid={testId}className={`resource-table-th${active ? " active" : ""}`}><span>{label}</span><span className="resource-table-sort-icon">- <CaretUpOutlined />- <CaretDownOutlined />+ <ChevronUp />+ <ChevronDown /></span></button></Dropdown>@@ -110,6 +116,7 @@ SortHeader.propTypes = {sort: PropTypes.object,userSorted: PropTypes.bool,onSortChange: PropTypes.func,+ testId: PropTypes.string,};/**@@ -144,8 +151,25 @@ function ResourceTable({showOwner = true,isClickable = true,type,+ /**+ * Prefix for the `data-testid`s below. Every control in this table repeats+ * once per row — the action buttons share an aria-label (`Edit Prompt+ * Project`), and the rows themselves differ only by content — so a test+ * needs the row id to address one of them. Callers pass a page-specific+ * prefix (`prompt-studio-list`) so the resulting locators read as the screen+ * they belong to rather than as this widget.+ */+ testIdPrefix = "resource-table",}) {const navigate = useNavigate();+ /*+ * Note the shape: the ROW is `<prefix>-row-<id>` and a control inside it is+ * `<prefix>-<action>-<id>` — deliberately NOT `<prefix>-row-<action>-<id>`,+ * which would make every action button a prefix-match for the row itself and+ * leave `[data-testid^="…-row-"]` matching five elements per row.+ */+ const rowTestId = (item, action) =>+ `${testIdPrefix}-${action}-${item?.[idProp]}`;const renderName = (item) => {const icon = iconProp ? item?.[iconProp] : null;@@ -247,6 +271,7 @@ function ResourceTable({<buttontype="button"className="resource-table-owner-btn"+ data-testid={rowTestId(item, "owner")}onClick={(event) => {event.stopPropagation();handleCoOwner(event, item);@@ -275,10 +300,11 @@ function ResourceTable({type="button"className="action-icon-btn"aria-label={`Edit ${type}`}+ data-testid={rowTestId(item, "edit")}aria-disabled={deprecated}onClick={(event) => !deprecated && handleEdit?.(event, item)}>- <EditOutlined className="action-icon-buttons edit-icon" />+ <Pencil className="action-icon-buttons edit-icon" /></button></Tooltip>{handleShare && (@@ -287,27 +313,36 @@ function ResourceTable({type="button"className="action-icon-btn"aria-label={`Share ${type}`}+ data-testid={rowTestId(item, "share")}aria-disabled={deprecated}onClick={(event) => !deprecated && handleShare(event, item, true)}>- <ShareAltOutlined className="action-icon-buttons share-icon" />+ <Share2 className="action-icon-buttons share-icon" /></button></Tooltip>)}+ {/*+ * The confirm panel is NOT keyed by row: only one can be open at a+ * time, so a per-row id would just make the locator longer without+ * making it more specific. The button that opens it is per-row,+ * because every row has one.+ */}<Popconfirmtitle={`Delete the ${type}`}description={`Are you sure to delete ${item?.[titleProp]}`}okText="Yes"cancelText="No"- icon={<QuestionCircleOutlined />}+ icon={<CircleHelp />}+ data-testid={`${testIdPrefix}-delete-confirm`}onConfirm={(event) => handleDelete?.(event, item)}><buttontype="button"className="action-icon-btn"aria-label={`Delete ${type}`}+ data-testid={rowTestId(item, "delete")}>- <DeleteOutlined className="action-icon-buttons delete-icon" />+ <Trash2 className="action-icon-buttons delete-icon" /></button></Popconfirm></Space>@@ -318,6 +353,7 @@ function ResourceTable({{title: (<SortHeader+ testId={`${testIdPrefix}-sort-name`}label="Name"sortKey={titleProp}sortType="text"@@ -339,6 +375,7 @@ function ResourceTable({{title: (<SortHeader+ testId={`${testIdPrefix}-sort-created`}label="Created"sortKey={dateProp}sortType="date"@@ -354,6 +391,7 @@ function ResourceTable({{title: (<SortHeader+ testId={`${testIdPrefix}-sort-modified`}label="Modified"sortKey={modifiedProp}sortType="date"@@ -367,8 +405,16 @@ function ResourceTable({render: (_, item) => {const iso = item?.[modifiedProp];const rel = timeAgo(iso);+ // The <span> is load-bearing: Tooltip renders a Radix trigger with+ // `asChild`, which slots onto a single ELEMENT child. `timeAgo` returns+ // a string, and slotting onto text throws "Primitive.button failed to+ // slot onto its children" — taking down every route that renders this+ // table with at least one row. antd's Tooltip accepted a bare string+ // here, so the shape survived the conversion unnoticed.return rel ? (- <Tooltip title={formattedDateTime(iso)}>{rel}</Tooltip>+ <Tooltip title={formattedDateTime(iso)}>+ <span>{rel}</span>+ </Tooltip>) : ("-");@@ -395,6 +441,7 @@ function ResourceTable({return (<TableclassName="resource-table"+ data-testid={testIdPrefix}rowKey={idProp}tableLayout="fixed"columns={columns}@@ -403,6 +450,9 @@ function ResourceTable({onChange={handleChange}rowClassName={isClickable ? "resource-table-row-clickable" : ""}onRow={(item) => ({+ // Whatever `onRow` returns is spread onto the <tr>, which is how the+ // row gets an id at all — there is no other hook for it.+ "data-testid": `${testIdPrefix}-row-${item?.[idProp]}`,// onRowClick lets callers override the default relative nav (e.g. an// absolute org-scoped path with router state).onClick: isClickable@@ -452,6 +502,7 @@ ResourceTable.propTypes = {showOwner: PropTypes.bool,isClickable: PropTypes.bool,type: PropTypes.string,+ testIdPrefix: PropTypes.string,};export { ResourceTable };diff --git a/frontend/src/components/widgets/resource-table/ResourceTable.test.jsx b/frontend/src/components/widgets/resource-table/ResourceTable.test.jsxnew file mode 100644index 000000000..fee55a267--- /dev/null+++ b/frontend/src/components/widgets/resource-table/ResourceTable.test.jsx@@ -0,0 +1,87 @@+import { render, screen } from "@testing-library/react";+import { MemoryRouter } from "react-router-dom";+import { describe, expect, it } from "vitest";++import { ResourceTable } from "./ResourceTable";++/**+ * ResourceTable renders fine with an empty list — every cell that can throw is+ * inside a row. So the regression this guards against only appears once there+ * is at least one row, which is why an empty-state smoke test missed it and a+ * green build shipped a table that took down /tools and /workflows.+ *+ * The failure: cells wrap values in `<Tooltip>`, whose Radix trigger uses+ * `asChild` and slots onto a single ELEMENT child. Passing a bare string (as+ * antd's Tooltip allowed) throws "Primitive.button failed to slot onto its+ * children", which the route-level error boundary turns into "Couldn't load+ * this page".+ */+const noop = () => undefined;++const ROW = {+ tool_id: "t1",+ tool_name: "Demo Project",+ description: "A demo",+ created_at: "2026-08-01T00:00:00Z",+ modified_at: "2026-08-02T00:00:00Z",+ owner_emails: ["[email protected]"],+ prompt_count: 2,+};++function renderTable(props = {}) {+ const errors = [];+ const original = console.error;+ console.error = (...args) => {+ errors.push(args.map(String).join(" "));+ };+ try {+ render(+ <MemoryRouter>+ <ResourceTable+ dataSource={[ROW]}+ loading={false}+ pagination={{ current: 1, pageSize: 10, total: 1 }}+ sort={{ sortBy: "modified_at", order: "desc" }}+ userSorted={false}+ titleProp="tool_name"+ descriptionProp="description"+ idProp="tool_id"+ countProp="prompt_count"+ countLabel="Prompts"+ // Present but inert: the actions column only renders its buttons+ // when these are supplied, and the buttons are what carry the+ // Radix triggers under test.+ handleEdit={noop}+ handleShare={noop}+ handleDelete={noop}+ handleCoOwner={noop}+ sessionDetails={{ email: "[email protected]" }}+ type="Prompt Project"+ {...props}+ />+ </MemoryRouter>,+ );+ } finally {+ console.error = original;+ }+ return errors;+}++describe("ResourceTable", () => {+ it("renders a populated row without a Radix slot violation", () => {+ const errors = renderTable();++ const slotErrors = errors.filter((e) =>+ /failed to slot onto its children/i.test(e),+ );+ expect(+ slotErrors,+ `Radix asChild rejected a non-element child:\n${slotErrors.join("\n")}`,+ ).toEqual([]);+ });++ it("shows the row's content once it has rendered", () => {+ renderTable();+ expect(screen.getByText("Demo Project")).toBeInTheDocument();+ });+});diff --git a/frontend/src/components/widgets/share-permission/SharePermission.jsx b/frontend/src/components/widgets/share-permission/SharePermission.jsxindex e4ba263a6..2a0658aec 100644--- a/frontend/src/components/widgets/share-permission/SharePermission.jsx+++ b/frontend/src/components/widgets/share-permission/SharePermission.jsx@@ -1,19 +1,11 @@-import {- Avatar,- Checkbox,- List,- Modal,- Popconfirm,- Select,- Typography,-} from "antd";+import { CircleHelp, Trash2, User, Users } from "lucide-react";+import { Button } from "@/components/ui/shims/antd-button";+import { Checkbox, Select } from "@/components/ui/shims/antd-inputs";+import { Avatar } from "@/components/ui/shims/antd-leaves";+import { Modal, Popconfirm } from "@/components/ui/shims/antd-overlays";+import { List } from "@/components/ui/shims/antd-structure";+import { Typography } from "@/components/ui/shims/antd-typography";import "./SharePermission.css";-import {- DeleteOutlined,- QuestionCircleOutlined,- TeamOutlined,- UserOutlined,-} from "@ant-design/icons";import PropTypes from "prop-types";import { useEffect, useState } from "react";@@ -151,50 +143,59 @@ function SharePermission({sharedWithContent = (<ListdataSource={[...userItems, ...groupItems]}- renderItem={(item) => (- <List.Item- extra={- permissionEdit && (- <Popconfirm- title="Revoke Access"- description={`Are you sure you want to revoke access to '${- item.kind === "user" ? item.email : item.name- }'?`}- okText="Yes"- cancelText="No"- icon={<QuestionCircleOutlined style={{ color: "#faad14" }} />}- onConfirm={() => {- if (item.kind === "user") {- handleDeleteUser(item.id);- } else {- handleDeleteGroup(item.id);- }- }}- >- <Typography.Text>- <DeleteOutlined className="action-icon-buttons" />- </Typography.Text>- </Popconfirm>- )- }- >- <List.Item.Meta- title={- <>- <Avatar- className="shared-user-avatar"- icon={- item.kind === "user" ? <UserOutlined /> : <TeamOutlined />- }- />- <Typography.Text className="shared-username">- {item.kind === "user" ? item.email : item.name}- </Typography.Text>- </>+ renderItem={(item) => {+ const label = item.kind === "user" ? item.email : item.name;+ return (+ <List.Item+ extra={+ permissionEdit && (+ <Popconfirm+ title="Revoke Access"+ description={`Are you sure you want to revoke access to '${label}'?`}+ okText="Yes"+ cancelText="No"+ icon={<CircleHelp style={{ color: "var(--warning)" }} />}+ onConfirm={() => {+ if (item.kind === "user") {+ handleDeleteUser(item.id);+ } else {+ handleDeleteGroup(item.id);+ }+ }}+ >+ {/*+ * A real button with a name: the icon on its own put+ * nothing in the accessibility tree, so the only control+ * for revoking access was unreachable by keyboard and+ * unnameable by a screen reader. Matches the co-owner and+ * export-tool rows.+ */}+ <Button+ type="text"+ size="small"+ icon={<Trash2 className="action-icon-buttons" />}+ aria-label={`Revoke access for ${label}`}+ />+ </Popconfirm>+ )}- />- </List.Item>- )}+ >+ <List.Item.Meta+ title={+ <>+ <Avatar+ className="shared-user-avatar"+ icon={item.kind === "user" ? <User /> : <Users />}+ />+ <Typography.Text className="shared-username">+ {label}+ </Typography.Text>+ </>+ }+ />+ </List.Item>+ );+ }}/>);} else {diff --git a/frontend/src/components/widgets/space-wrapper/SpaceWrapper.jsx b/frontend/src/components/widgets/space-wrapper/SpaceWrapper.jsxindex bc90b3c6a..01c3b4e28 100644--- a/frontend/src/components/widgets/space-wrapper/SpaceWrapper.jsx+++ b/frontend/src/components/widgets/space-wrapper/SpaceWrapper.jsx@@ -1,5 +1,5 @@-import { Space } from "antd";import PropTypes from "prop-types";+import { Space } from "@/components/ui/shims/antd-layout";const SpaceWrapper = ({ children }) => {return (diff --git a/frontend/src/components/widgets/spinner-loader/SpinnerLoader.jsx b/frontend/src/components/widgets/spinner-loader/SpinnerLoader.jsxindex 27d57bdc5..b22b50e32 100644--- a/frontend/src/components/widgets/spinner-loader/SpinnerLoader.jsx+++ b/frontend/src/components/widgets/spinner-loader/SpinnerLoader.jsx@@ -1,5 +1,5 @@-import { Spin } from "antd";import PropTypes from "prop-types";+import { Spin } from "@/components/ui/shims/antd-leaves";import "./SpinnerLoader.css";diff --git a/frontend/src/components/widgets/top-bar/TopBar.css b/frontend/src/components/widgets/top-bar/TopBar.cssindex 352530ad0..c3593f245 100644--- a/frontend/src/components/widgets/top-bar/TopBar.css+++ b/frontend/src/components/widgets/top-bar/TopBar.css@@ -12,10 +12,31 @@gap: 10px;}+.topbar-heading {+ display: flex;+ align-items: center;+}++/* The icon sizes itself off the row, not the SVG's own 24px default. */+.topbar-back {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ padding: 0;+ border: none;+ background: none;+ cursor: pointer;+ color: inherit;+}++.topbar-back svg {+ width: 20px;+ height: 20px;+}+.topbar-title {font-weight: 600;font-size: 18px;- display: inline;line-height: 24px;padding-left: 10px;}diff --git a/frontend/src/components/widgets/top-bar/TopBar.jsx b/frontend/src/components/widgets/top-bar/TopBar.jsxindex 1f5049a2a..f99a083fa 100644--- a/frontend/src/components/widgets/top-bar/TopBar.jsx+++ b/frontend/src/components/widgets/top-bar/TopBar.jsx@@ -1,7 +1,10 @@-import { ArrowLeftOutlined } from "@ant-design/icons";-import { Col, Input, Row, Typography } from "antd";import debounce from "lodash/debounce";+import { ArrowLeft } from "lucide-react";import PropTypes from "prop-types";+import { useEffect, useMemo, useRef } from "react";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Col, Row } from "@/components/ui/shims/antd-layout";+import { Typography } from "@/components/ui/shims/antd-typography";import "./TopBar.css";import { useNavigate } from "react-router-dom";@@ -15,9 +18,6 @@ function TopBar({children,}) {const navigate = useNavigate();- const onSearchDebounce = debounce(({ target: { value } }) => {- onSearch(value);- }, 600);const onSearch = (searchText = "") => {if (searchText?.trim() === "") {@@ -32,18 +32,57 @@ function TopBar({});setFilteredUserList(filteredList);};++ /*+ * Built inline, `debounce(...)` was a fresh instance on every render, so each+ * keystroke started a new 600ms timer on a new closure and nothing was ever+ * coalesced — the filter ran per keypress. Memoised with no deps it is+ * created once; the ref is what keeps that single instance calling the+ * CURRENT onSearch, so it never filters a stale `searchData`.+ */+ const onSearchRef = useRef(onSearch);+ useEffect(() => {+ onSearchRef.current = onSearch;+ });+ const onSearchDebounce = useMemo(+ () => debounce((value) => onSearchRef.current(value), 600),+ [],+ );+ // A pending timer firing after unmount would setState on a dead component.+ useEffect(() => () => onSearchDebounce.cancel(), [onSearchDebounce]);+return (<Row align="middle" justify="space-between" className="search-nav"><Col>- <ArrowLeftOutlined onClick={() => navigate(-1)} />- <Typography className="topbar-title">{title}</Typography>+ {/*+ * A real <button>, not a bare <ArrowLeft onClick>. lucide renders a+ * plain SVG, so the handler landed on an element with no button+ * semantics — not keyboard reachable, and the click did not register+ * at all on these pages. antd's icon component supplied that wrapper.+ *+ * The row is an explicit flex: `.topbar-title` asks for `display:+ * inline`, but Tailwind's preflight makes the SVG `display: block`,+ * which broke the line and stacked the arrow above the title.+ */}+ <div className="topbar-heading">+ <button+ type="button"+ className="topbar-back"+ aria-label="Go back"+ onClick={() => navigate(-1)}+ >+ <ArrowLeft />+ </button>+ <Typography className="topbar-title">{title}</Typography>+ </div></Col><Col><div className="invite-user-search">{enableSearch && (<Inputplaceholder={searchPlaceholder}- onChange={onSearchDebounce}+ data-testid="top-bar-search"+ onChange={(event) => onSearchDebounce(event.target.value)}/>)}{children}diff --git a/frontend/src/components/workflows/new-workflow/NewWorkflow.jsx b/frontend/src/components/workflows/new-workflow/NewWorkflow.jsxindex fc5e22512..34772c173 100644--- a/frontend/src/components/workflows/new-workflow/NewWorkflow.jsx+++ b/frontend/src/components/workflows/new-workflow/NewWorkflow.jsx@@ -1,6 +1,8 @@-import { Form, Input, Modal } from "antd";import PropTypes from "prop-types";import { useRef, useState } from "react";+import { Form } from "@/components/ui/shims/antd-form";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Modal } from "@/components/ui/shims/antd-overlays";import { getBackendErrorDetail } from "../../../helpers/GetStaticData";const { TextArea } = Input;@@ -78,6 +80,7 @@ function NewWorkflow({centeredmaskClosable={false}okText={name ? "Edit Workflow" : "Create Workflow"}+ data-testid="new-workflow-modal"width="400px"okButtonProps={{ disabled: disableCreation, loading: loading }}>diff --git a/frontend/src/components/workflows/workflow/Workflows.css b/frontend/src/components/workflows/workflow/Workflows.cssindex f72d8001d..f59159aa9 100644--- a/frontend/src/components/workflows/workflow/Workflows.css+++ b/frontend/src/components/workflows/workflow/Workflows.css@@ -14,14 +14,14 @@}.workflows-pg-layout {- background-color: var(--page-bg-2);+ background-color: var(--background);padding: 12px;height: 100%;overflow-y: auto;}.workflows-pg-body {- background-color: var(--white);+ background-color: var(--card);height: 100%;display: flex;flex-direction: column;diff --git a/frontend/src/components/workflows/workflow/Workflows.jsx b/frontend/src/components/workflows/workflow/Workflows.jsxindex 4cc41b86c..4bb997c04 100644--- a/frontend/src/components/workflows/workflow/Workflows.jsx+++ b/frontend/src/components/workflows/workflow/Workflows.jsx@@ -1,8 +1,11 @@-import { PlusOutlined, UserOutlined } from "@ant-design/icons";-import { Typography } from "antd";+// Aliased: this file defines its own `User` component below.++import { Plus, User as UserIcon } from "lucide-react";import PropTypes from "prop-types";import { useEffect, useRef, useState } from "react";import { useLocation, useNavigate } from "react-router-dom";+import { Pagination } from "@/components/ui/shims/antd-structure";+import { Text } from "@/components/ui/shims/antd-typography";import { useCoOwnerManagement } from "../../../hooks/useCoOwnerManagement.jsx";import { useExceptionHandler } from "../../../hooks/useExceptionHandler.jsx";@@ -34,8 +37,6 @@ import { SpinnerLoader } from "../../widgets/spinner-loader/SpinnerLoader.jsx";import { workflowService } from "./workflow-service";import "./Workflows.css";-const { Text } = Typography;-const DEFAULT_PAGE_SIZE = 10;function Workflows() {@@ -382,7 +383,7 @@ function Workflows() {const newWorkflowButton = (<CustomButtontype="primary"- icon={<PlusOutlined />}+ icon={<Plus />}onClick={handleNewWorkflowBtnClick}>New Workflow@@ -435,6 +436,7 @@ function Workflows() {)}{!loadError && projectList?.length > 0 && (<ResourceTable+ testIdPrefix="workflow-list"dataSource={projectList}loading={loading}pagination={pagination}@@ -496,7 +498,7 @@ function Workflows() {function User({ name }) {return name ? (<div className="sessionDetails">- <UserOutlined />+ <UserIcon className="size-3.5" /><Text italic ellipsis>{name}</Text>diff --git a/frontend/src/helpers/SocketContext.js b/frontend/src/helpers/SocketContext.jsxsimilarity index 81%rename from frontend/src/helpers/SocketContext.jsrename to frontend/src/helpers/SocketContext.jsxindex 6e6ace9a6..e575df02c 100644--- a/frontend/src/helpers/SocketContext.js+++ b/frontend/src/helpers/SocketContext.jsx@@ -2,8 +2,6 @@ import PropTypes from "prop-types";import { createContext, useEffect, useState } from "react";import io from "socket.io-client";-import { getBaseUrl } from "./GetStaticData";-const SocketContext = createContext();const SocketProvider = ({ children }) => {@@ -15,7 +13,11 @@ const SocketProvider = ({ children }) => {// - Prod: Traefik routes /api/v1/socket to the backend.// This ensures session cookies are sent (same-origin) and avoids// cross-origin WebSocket issues.- const newSocket = io(getBaseUrl(), {+ //+ // The URL is omitted deliberately: socket.io already defaults to the+ // page's own origin, so passing one derived from `window.location` would+ // only hand the connection target to a value the user can influence.+ const newSocket = io({transports: ["websocket"],path: "/api/v1/socket",});diff --git a/frontend/src/helpers/pagination.test.js b/frontend/src/helpers/pagination.test.jsindex 64810137e..a375866e8 100644--- a/frontend/src/helpers/pagination.test.js+++ b/frontend/src/helpers/pagination.test.js@@ -35,10 +35,13 @@ describe("fetchAllPages", () => {await expect(fetchAllPages(axiosInstance, { url: "/x/", params: { type: "LLM" } }),).resolves.toEqual([1, 2, 3]);- // Later pages must keep the caller's own params alongside ?page.+ // Later pages must keep the caller's own params alongside ?page, and go on+ // requesting the max page size — dropping it would silently re-cap the+ // follow-up pages at the endpoint's default and stall the loop.expect(axiosInstance.mock.calls[1][0].params).toEqual({type: "LLM",page: 2,+ page_size: 1000,});});diff --git a/frontend/src/helpers/requestId.js b/frontend/src/helpers/requestId.jsindex da4e80f09..8434abdf2 100644--- a/frontend/src/helpers/requestId.js+++ b/frontend/src/helpers/requestId.js@@ -27,4 +27,4 @@ const getRequestIdFromError = (err) => {);};-export { REQUEST_ID_HEADER, attachRequestIdInterceptor, getRequestIdFromError };+export { attachRequestIdInterceptor, getRequestIdFromError, REQUEST_ID_HEADER };diff --git a/frontend/src/hooks/useAppToast.jsx b/frontend/src/hooks/useAppToast.jsxnew file mode 100644index 000000000..4d3bdb686--- /dev/null+++ b/frontend/src/hooks/useAppToast.jsx@@ -0,0 +1,149 @@+import { toast } from "sonner";++/**+ * Shared toast surface for the whole app (OSS-owned, per D9 / §5.0).+ *+ * Cloud plugins MUST import this rather than calling `sonner` directly or+ * reimplementing their own toast helper — that is what keeps the notification+ * behaviour identical across OSS and enterprise code.+ *+ * During P0–P2 this runs alongside antd's `notification` (§7 coexistence):+ * `useAlertStore` drives both, and antd's imperative `message.*` /+ * `notification.*` call-sites are migrated onto this helper in P2-06.+ */++/** antd alert types → the matching sonner method. */+const TOAST_BY_TYPE = {+ success: toast.success,+ error: toast.error,+ warning: toast.warning,+ info: toast.info,+};++/**+ * Show a toast from an `alertDetails`-shaped object.+ *+ * @param {object} details alert payload+ * @param {string} details.type "success" | "error" | "warning" | "info"+ * @param {string} details.title heading+ * @param {string} details.content body text+ * @param {number} [details.duration] seconds (antd convention; 0 = sticky)+ * @param {string} [details.key] dedupe/dismiss id+ * @param {string} [details.requestId]+ * @param {string} [details.executionId]+ * @returns {string|number|undefined} the sonner toast id+ */+export function showAppToast(details, description) {+ if (!details?.content && !details?.title) {+ return undefined;+ }++ const show = TOAST_BY_TYPE[details.type] ?? toast;++ // antd expresses duration in seconds and treats 0 as "never auto-dismiss";+ // sonner uses milliseconds and Infinity.+ const duration =+ details.duration === 0+ ? Number.POSITIVE_INFINITY+ : (details.duration ?? 6) * 1000;++ const idLine = [+ details.executionId && `Execution ID: ${details.executionId}`,+ details.requestId && `Request ID: ${details.requestId}`,+ ]+ .filter(Boolean)+ .join("\n");++ return show(details.title || details.content, {+ // A React node (rendered markdown + ID lines) wins over the plain string+ // when the caller supplies one — that is how App.jsx keeps the formatted+ // alert body it previously handed to antd's notification.+ description:+ description ??+ (idLine ? `${details.content ?? ""}\n${idLine}`.trim() : details.content),+ duration,+ id: details.key,+ });+}++/** Dismiss one toast by id, or all toasts when called with no argument. */+export function dismissAppToast(id) {+ toast.dismiss(id);+}++/** Hook form, for call-sites that prefer a hook over the bare functions. */+export function useAppToast() {+ return { showAppToast, dismissAppToast, toast };+}++/**+ * Drop-in replacement for antd's imperative `message.*` API (P2-06).+ *+ * antd's `message.error("…")` is a bare function call with no React context,+ * which is exactly what `sonner` provides too — so these call-sites convert by+ * import alone. Kept API-compatible (including the seconds→ms duration+ * convention) so the ~12 sites did not each need rewriting.+ */+export const message = {+ success: (content, duration) =>+ toast.success(content, { duration: toMs(duration) }),+ error: (content, duration) =>+ toast.error(content, { duration: toMs(duration) }),+ warning: (content, duration) =>+ toast.warning(content, { duration: toMs(duration) }),+ info: (content, duration) =>+ toast.info(content, { duration: toMs(duration) }),+ loading: (content) => toast.loading(content),+ open: (content, duration) => toast(content, { duration: toMs(duration) }),+ destroy: (id) => toast.dismiss(id),+};++/** antd counts duration in seconds (0 = sticky); sonner uses milliseconds. */+function toMs(duration) {+ if (duration === 0) {+ return Number.POSITIVE_INFINITY;+ }+ return duration == null ? undefined : duration * 1000;+}++/**+ * Drop-in replacement for antd's imperative `notification.*` API (P2-06 /+ * Phase C). antd's notification takes `{ message, description }`; sonner takes+ * a title plus `{ description }`, so the shape is remapped here rather than at+ * each call-site.+ */+export const notification = {+ success: (cfg = {}) =>+ showAppToast({+ ...cfg,+ type: "success",+ title: cfg.message,+ content: cfg.description,+ }),+ error: (cfg = {}) =>+ showAppToast({+ ...cfg,+ type: "error",+ title: cfg.message,+ content: cfg.description,+ }),+ warning: (cfg = {}) =>+ showAppToast({+ ...cfg,+ type: "warning",+ title: cfg.message,+ content: cfg.description,+ }),+ info: (cfg = {}) =>+ showAppToast({+ ...cfg,+ type: "info",+ title: cfg.message,+ content: cfg.description,+ }),+ open: (cfg = {}) =>+ showAppToast({ ...cfg, title: cfg.message, content: cfg.description }),+ destroy: (key) => dismissAppToast(key),+ /** antd exposes a hook form returning [api, contextHolder]. */+ useNotification: () => [notification, null],+};diff --git a/frontend/src/hooks/useConfirm.jsx b/frontend/src/hooks/useConfirm.jsxnew file mode 100644index 000000000..8032bc17a--- /dev/null+++ b/frontend/src/hooks/useConfirm.jsx@@ -0,0 +1,95 @@+import * as React from "react";++import {+ AlertDialog,+ AlertDialogAction,+ AlertDialogCancel,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogTitle,+} from "@/components/ui/alert-dialog";++/**+ * Promise-returning confirmation dialog (P2-01).+ *+ * Replaces antd's imperative `Modal.confirm({ onOk })` style with+ * `if (await confirm({...})) { ... }`, so a call-site reads top-to-bottom+ * instead of splitting across callbacks.+ *+ * This is OSS-owned on purpose (D9 / §5.0): the cloud plugins have 3+ * `Modal.confirm` sites that must import this rather than reimplement it, and+ * `Popconfirm` (8 OSS sites) is routed through it too.+ *+ * Usage:+ * const { confirm, confirmDialog } = useConfirm();+ * ...+ * if (await confirm({ title: "Delete?", okText: "Delete", danger: true })) {+ * doDelete();+ * }+ * return <>{confirmDialog}...</>;+ */+export function useConfirm() {+ const [state, setState] = React.useState(null);+ // Held in a ref so resolving does not depend on a re-render.+ const resolver = React.useRef(null);++ const confirm = React.useCallback((options = {}) => {+ return new Promise((resolve) => {+ resolver.current = resolve;+ setState({+ title: options.title ?? "Are you sure?",+ description: options.description ?? options.content ?? "",+ okText: options.okText ?? "OK",+ cancelText: options.cancelText ?? "Cancel",+ danger: options.danger ?? options.okType === "danger",+ });+ });+ }, []);++ const settle = React.useCallback((result) => {+ setState(null);+ resolver.current?.(result);+ resolver.current = null;+ }, []);++ const confirmDialog = state ? (+ <AlertDialog+ open+ onOpenChange={(open) => {+ // Covers Escape and outside-click, which must resolve false rather+ // than leaving the promise pending forever.+ if (!open) {+ settle(false);+ }+ }}+ >+ <AlertDialogContent>+ <AlertDialogHeader>+ <AlertDialogTitle>{state.title}</AlertDialogTitle>+ {state.description ? (+ <AlertDialogDescription>{state.description}</AlertDialogDescription>+ ) : null}+ </AlertDialogHeader>+ <AlertDialogFooter>+ <AlertDialogCancel onClick={() => settle(false)}>+ {state.cancelText}+ </AlertDialogCancel>+ <AlertDialogAction+ onClick={() => settle(true)}+ className={+ state.danger+ ? "bg-destructive text-destructive-foreground hover:bg-destructive/90"+ : undefined+ }+ >+ {state.okText}+ </AlertDialogAction>+ </AlertDialogFooter>+ </AlertDialogContent>+ </AlertDialog>+ ) : null;++ return { confirm, confirmDialog };+}diff --git a/frontend/src/hooks/useConfirm.test.jsx b/frontend/src/hooks/useConfirm.test.jsxnew file mode 100644index 000000000..91597e767--- /dev/null+++ b/frontend/src/hooks/useConfirm.test.jsx@@ -0,0 +1,93 @@+import { render, screen, waitFor } from "@testing-library/react";+import { describe, expect, it } from "vitest";++import { useConfirm } from "@/hooks/useConfirm";++/** Explicit no-op: some cases do not assert on the resolved value. */+const noop = () => undefined;++function Harness({ options, onResult }) {+ const { confirm, confirmDialog } = useConfirm();+ return (+ <>+ <button+ type="button"+ onClick={async () => {+ onResult(await confirm(options));+ }}+ >+ ask+ </button>+ {confirmDialog}+ </>+ );+}++describe("useConfirm (P2-01)", () => {+ it("renders nothing until asked", () => {+ render(<Harness options={{}} onResult={noop} />);+ expect(screen.queryByRole("alertdialog")).not.toBeInTheDocument();+ });++ it("shows the title and description supplied", async () => {+ render(+ <Harness+ options={{ title: "Delete file?", description: "Cannot be undone." }}+ onResult={noop}+ />,+ );+ screen.getByRole("button", { name: "ask" }).click();+ await waitFor(() =>+ expect(screen.getByText("Delete file?")).toBeInTheDocument(),+ );+ expect(screen.getByText("Cannot be undone.")).toBeInTheDocument();+ });++ it("resolves true when confirmed", async () => {+ let result;+ render(+ <Harness options={{ okText: "Yes" }} onResult={(r) => (result = r)} />,+ );+ screen.getByRole("button", { name: "ask" }).click();+ await waitFor(() => screen.getByRole("button", { name: "Yes" }));+ screen.getByRole("button", { name: "Yes" }).click();+ await waitFor(() => expect(result).toBe(true));+ });++ it("resolves false when cancelled — the promise must never dangle", async () => {+ let result;+ render(+ <Harness options={{ cancelText: "No" }} onResult={(r) => (result = r)} />,+ );+ screen.getByRole("button", { name: "ask" }).click();+ await waitFor(() => screen.getByRole("button", { name: "No" }));+ screen.getByRole("button", { name: "No" }).click();+ await waitFor(() => expect(result).toBe(false));+ });++ it("closes the dialog after settling", async () => {+ render(<Harness options={{ okText: "Go" }} onResult={noop} />);+ screen.getByRole("button", { name: "ask" }).click();+ await waitFor(() => screen.getByRole("button", { name: "Go" }));+ screen.getByRole("button", { name: "Go" }).click();+ await waitFor(() =>+ expect(screen.queryByRole("alertdialog")).not.toBeInTheDocument(),+ );+ });++ it("can be asked twice in a row", async () => {+ const seen = [];+ render(+ <Harness options={{ okText: "Yes" }} onResult={(r) => seen.push(r)} />,+ );+ screen.getByRole("button", { name: "ask" }).click();+ await waitFor(() => screen.getByRole("button", { name: "Yes" }));+ screen.getByRole("button", { name: "Yes" }).click();+ await waitFor(() => expect(seen).toHaveLength(1));++ screen.getByRole("button", { name: "ask" }).click();+ await waitFor(() => screen.getByRole("button", { name: "Yes" }));+ screen.getByRole("button", { name: "Yes" }).click();+ await waitFor(() => expect(seen).toEqual([true, true]));+ });+});diff --git a/frontend/src/hooks/useRetrievalStrategies.js b/frontend/src/hooks/useRetrievalStrategies.jsindex f53d278c3..614d76701 100644--- a/frontend/src/hooks/useRetrievalStrategies.js+++ b/frontend/src/hooks/useRetrievalStrategies.js@@ -3,14 +3,17 @@ import { useCallback } from "react";import { usePromptStudioService } from "../components/api/prompt-studio-service";import { useRetrievalStrategiesStore } from "../store/retrieval-strategies-store";+// Maps the icon name the backend sends (still antd-flavoured) to the key used+// by RetrievalStrategyModal's own ICON_MAP, which now holds lucide components.+// The backend contract is unchanged — only the frontend key names moved.const ICON_MAP = {- SearchOutlined: "SearchOutlined",- QuestionCircleOutlined: "QuestionCircleOutlined",- ForkOutlined: "ForkOutlined",- ReloadOutlined: "ReloadOutlined",- ShareAltOutlined: "ShareAltOutlined",- TableOutlined: "TableOutlined",- MergeCellsOutlined: "MergeCellsOutlined",+ SearchOutlined: "Search",+ QuestionCircleOutlined: "CircleHelp",+ ForkOutlined: "GitFork",+ ReloadOutlined: "RotateCw",+ ShareAltOutlined: "Share2",+ TableOutlined: "Table",+ MergeCellsOutlined: "Merge",};export const useRetrievalStrategies = () => {@@ -41,7 +44,7 @@ export const useRetrievalStrategies = () => {// Transform the backend data to match our frontend formatconst transformedStrategies = Object.values(data).map((strategy) => ({...strategy,- icon: ICON_MAP[strategy.icon] || "SearchOutlined",+ icon: ICON_MAP[strategy.icon] || "Search",bestFor: strategy.best_for || [],tokenUsage: strategy.token_usage || "Unknown",costImpact: strategy.cost_impact || "Unknown",diff --git a/frontend/src/index.css b/frontend/src/index.cssindex 023b47e57..f8a4a554b 100644--- a/frontend/src/index.css+++ b/frontend/src/index.css@@ -1,4 +1,331 @@-@import "variables.css";+/* ------------------------------------------------------------------+ * Tailwind v4 must be imported FIRST so its layer ordering is correct.+ * (UN_SHADCN_IMPL_PLAN P0-10)+ * ------------------------------------------------------------------ */+@import "tailwindcss";+@plugin "tailwindcss-animate";+@plugin "@tailwindcss/typography";++@custom-variant dark (&:is(.dark *));++/* ------------------------------------------------------------------+ * `inline` is MANDATORY. With a plain `@theme`, Tailwind snapshots the+ * light value at build time and dark mode silently breaks. (P0-11)+ * ------------------------------------------------------------------ */+@theme inline {+ --color-background: var(--background);+ --color-foreground: var(--foreground);+ --color-card: var(--card);+ --color-card-foreground: var(--card-foreground);+ --color-popover: var(--popover);+ --color-popover-foreground: var(--popover-foreground);+ --color-primary: var(--primary);+ --color-primary-foreground: var(--primary-foreground);+ --color-secondary: var(--secondary);+ --color-secondary-foreground: var(--secondary-foreground);+ --color-muted: var(--muted);+ --color-muted-foreground: var(--muted-foreground);+ --color-accent: var(--accent);+ --color-accent-foreground: var(--accent-foreground);+ --color-destructive: var(--destructive);+ --color-destructive-foreground: var(--destructive-foreground);+ --color-success: var(--success);+ --color-warning: var(--warning);+ /* antd styles info alerts blue; success/warning already had tokens. */+ --color-info: var(--info);+ --color-info-bg: var(--info-bg);+ --color-border: var(--border);+ /* antd draws list/table separators at rgba(5,5,5,.06), which composites to+ * #f0f0f0 — a hairline four shades lighter than --border. Exposed as its+ * own token so `divide-separator` can match it without repainting every+ * card edge and <Separator> in the app. */+ --color-separator: var(--separator);+ /* Recessed surface a raised card/island sits IN (the list "well"). Needs a+ * clear gap from --card; --background is only two values off it. */+ --color-well: var(--well);+ --color-input: var(--input);+ --color-ring: var(--ring);+ --color-chart-1: var(--chart-1);+ --color-chart-2: var(--chart-2);+ --color-chart-3: var(--chart-3);+ --color-chart-4: var(--chart-4);+ --color-chart-5: var(--chart-5);+ --color-sidebar: var(--sidebar);+ --color-sidebar-foreground: var(--sidebar-foreground);+ --color-sidebar-primary: var(--sidebar-primary);+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);+ --color-sidebar-accent: var(--sidebar-accent);+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);+ --color-sidebar-border: var(--sidebar-border);+ --color-sidebar-ring: var(--sidebar-ring);++ --font-sans: var(--font-sans);+ --font-mono: var(--font-mono);++ /*+ * Body text at 14px, matching the antd reference.+ *+ * `text-sm` is the app's dominant size — nearly every label, table cell,+ * menu item and control renders through it — so this is the lever that+ * actually moves perceived text size.+ *+ * Deliberately NOT `html { font-size: 13px }`: Tailwind v4 spacing, gaps and+ * control heights are all rem-based, so changing the root would shrink the+ * entire UI (padding, button heights, icon boxes) rather than just the type.+ *+ * 14px is also Tailwind's stock `text-sm`, so the override is now a no-op in+ * value — kept explicit (with its line-height) so the intent is stated and a+ * future Tailwind default change cannot silently move the app's base size.+ *+ * Verified to still fit the reference-matched control heights: 14px at 22px+ * leading inside an h-8 (32px) control leaves 10px for padding and border,+ * which is what antd itself does.+ */+ --text-sm: 0.875rem; /* 14px — matches the antd reference exactly */+ --text-sm--line-height: calc(1.375 / 0.875); /* 22px */++ --radius-sm: calc(var(--radius) - 4px);+ --radius-md: calc(var(--radius) - 2px);+ --radius-lg: var(--radius);+ --radius-xl: calc(var(--radius) + 4px);+ --radius-2xl: var(--radius-2xl);+ --radius-full: var(--radius-full);+}++/* ------------------------------------------------------------------+ * Midnight Bloom — light (UN_SHADCN_SPEC §2.5.1, verbatim).+ * Type/spacing/leading scales are deliberately NOT declared: they are+ * identical to Tailwind v4 stock (§2.5.0).+ * ------------------------------------------------------------------ */+:root {+ /* Base palette */+ --violet-50: #f1effe;+ --violet-100: #e4e0fd;+ --violet-300: #b7adf6;+ --violet-500: #6f5cef; /* brand primary */+ --violet-600: #5a45e6;+ --violet-700: #4a37c8;+ --purple-200: #f1e5ff;+ --purple-400: #d9b8ff;+ --purple-500: #9747ff;+ --purple-600: #8638e5;+ --sky-200: #d3e6fb;+ --sky-300: #97caf5; /* secondary */+ --sky-500: #5f8ad0;+ --neutral-0: #ffffff;+ --neutral-50: #fafafa;+ --neutral-100: #f5f5f5;+ --neutral-150: #f0f0f0;+ --neutral-200: #e5e5e5;+ --neutral-300: #d3d3d3;+ --neutral-400: #a1a1a1;+ --neutral-500: #737373;+ --neutral-700: #404040;+ --neutral-800: #262626;+ --neutral-850: #1f1f1f;+ --neutral-900: #1a1a1a;+ --neutral-925: #171717;+ --neutral-950: #0a0a0a;+ --red-600: #b41b30;+ --red-300: #fca5a5;++ /* Semantic aliases */+ --background: var(--neutral-50);+ --foreground: var(--neutral-900);+ /* Raised surfaces (cards, tables, modals) are WHITE, as in the reference:+ * page #e9e9e9 → content #f5f5f5 → surface #fff. #fcfcfc sat two shades+ * off --background (#fafafa), so a modal or table read as the same plane+ * as the page behind it and the main area never looked like a panel. */+ --card: var(--neutral-0);+ --card-foreground: var(--neutral-900);+ --popover: var(--neutral-0);+ --popover-foreground: #19191a;+ --primary: var(--violet-500);+ --primary-foreground: var(--neutral-50);+ --secondary: var(--sky-300);+ --secondary-foreground: #19191a;+ --muted: var(--neutral-100);+ --muted-foreground: var(--neutral-500);+ --accent: var(--neutral-100);+ --accent-foreground: #6161cc;+ --destructive: var(--red-600);+ --destructive-foreground: var(--neutral-0);+ --success: #15803d;+ --warning: #b45309;+ /* antd v5 info tokens: colorInfo #1677ff on colorInfoBg #e6f4ff. */+ --info: #1677ff;+ --info-bg: #e6f4ff;+ --border: var(--neutral-200);+ --separator: var(--neutral-150);+ --well: var(--neutral-200);+ --input: var(--neutral-300);+ --ring: var(--primary);++ --chart-1: #a7c7ea;+ --chart-2: #5f8ad0;+ --chart-3: #4d73c7;+ --chart-4: #4060b4;+ --chart-5: #3b4e91;++ --sidebar: var(--neutral-0);+ --sidebar-foreground: var(--neutral-900);+ --sidebar-primary: var(--primary);+ --sidebar-primary-foreground: var(--neutral-50);+ --sidebar-accent: var(--neutral-100);+ --sidebar-accent-foreground: var(--neutral-900);+ --sidebar-border: var(--neutral-200);+ --sidebar-ring: var(--primary);++ --radius: 10px;+ --radius-2xl: 16px;+ --radius-full: 9999px;++ --font-sans:+ "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,+ "Helvetica Neue", sans-serif;+ --font-display:+ "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;+ --font-mono:+ "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,+ monospace;++ --font-weight-normal: 400;+ --font-weight-medium: 500;+ --font-weight-semibold: 600;+ --font-weight-bold: 700;++ --tracking-tighter: -0.04em;+ --tracking-tight: -0.02em;+ --tracking-normal: 0em;+ --tracking-wide: 0.025em;++ --shadow-2xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);+ --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);+ --shadow-sm:+ 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);+ --shadow-md:+ 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);+ --shadow-lg:+ 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);+ --shadow-xl:+ 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);+ --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);+}++/* Midnight Bloom — dark (UN_SHADCN_SPEC §2.5.2, verbatim).+ * The rgba() values are INTENTIONAL, not opaque colours (§2.5.3b). */+.dark {+ --background: var(--neutral-900);+ --foreground: var(--neutral-50);+ --card: #19191a;+ --card-foreground: var(--neutral-50);+ --popover: var(--neutral-925);+ --popover-foreground: var(--neutral-50);+ --primary: var(--violet-500);+ --primary-foreground: var(--neutral-50);+ --secondary: rgba(255, 255, 255, 0.06);+ --secondary-foreground: var(--neutral-50);+ --muted: var(--neutral-800);+ --muted-foreground: var(--neutral-400);+ --accent: #2a2a2d;+ --accent-foreground: #c1c5fb;+ --destructive: #e5484d;+ --destructive-foreground: var(--neutral-50);+ --success: #4ade80;+ --warning: #fbbf24;+ --info: #60a5fa;+ --info-bg: rgba(96, 165, 250, 0.12);+ --border: rgba(255, 255, 255, 0.1);+ /* Dark counterpart: lighter than --border for the same hairline effect. */+ --separator: rgba(255, 255, 255, 0.06);+ /* Dark: recess by going DARKER than --card, not lighter. */+ --well: var(--neutral-950);+ --input: #343434;+ --ring: var(--primary);++ --sidebar: var(--neutral-925);+ --sidebar-foreground: var(--neutral-50);+ --sidebar-primary: var(--primary);+ --sidebar-primary-foreground: var(--neutral-50);+ --sidebar-accent: rgba(255, 255, 255, 0.06);+ --sidebar-accent-foreground: var(--neutral-50);+ --sidebar-border: rgba(255, 255, 255, 0.1);+ --sidebar-ring: var(--primary);++ --shadow-2xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);+ --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.35);+ --shadow-sm:+ 0 1px 3px 0 rgba(0, 0, 0, 0.45), 0 1px 2px -1px rgba(0, 0, 0, 0.45);+ --shadow-md:+ 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);+ --shadow-lg:+ 0 10px 15px -3px rgba(0, 0, 0, 0.55), 0 4px 6px -4px rgba(0, 0, 0, 0.55);+ --shadow-xl:+ 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);+ --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);+}++/* ------------------------------------------------------------------+ * Default border colour.+ *+ * Tailwind's border utilities set WIDTH only; the colour falls back to+ * `currentColor`, which on this app resolves to black. So every `border`,+ * `border-b` or `divide-y` written without an explicit colour drew a solid+ * black line — most visibly as a black rule between every list row, where+ * antd had a near-invisible rgba(5,5,5,.06) hairline.+ *+ * `@layer base` is load-bearing, not tidiness. Unlayered rules beat layered+ * ones in the cascade no matter their specificity, so as a bare selector this+ * outranked Tailwind's `utilities` layer and repainted every explicitly+ * coloured border too. `border-input` was the visible casualty: form controls+ * resolved to `--border` (#e5e5e5) instead of `--input` (#d3d3d3), leaving+ * every input a full shade lighter than the antd reference (1.21 vs 1.41+ * contrast against the page). That reads as "the side borders aren't there",+ * because the thin left/right edges are the first to wash out at fractional+ * device-pixel widths.+ *+ * In `base` it still supplies the default for uncoloured borders, but any+ * `border-*` utility now wins, which is what shadcn intends.+ * ------------------------------------------------------------------ */+@layer base {+ *,+ ::after,+ ::before,+ ::backdrop,+ ::file-selector-button {+ border-color: var(--border);+ }++ /*+ * antd shipped its icons as a FONT: they sat on the text baseline and+ * inherited font-size, so `<span><Icon /></span> Label` rendered inline as a+ * matter of course. lucide ships SVGs, and Tailwind's preflight sets+ * `svg { display: block }` with a 24px default — a block element forces its+ * own line, so every such pair broke with the icon stacked ABOVE its text+ * ("Not Indexed"/"Not Summarized" in Manage Documents, "Yet to run" on the+ * prompt cards) and the glyph was oversized beside 14px copy.+ *+ * Restoring inline layout for icons that sit INSIDE a text flow fixes the+ * whole class at once. Icons in a flex/grid container are untouched: those+ * parents already align their children, and `display` is ignored for flex+ * items anyway.+ */+ :where(span, p, label, td, th, li, a):not(:where(.flex, .inline-flex, .grid))+ > svg.lucide,+ :where(span, p, label, td, th, li, a):not(:where(.flex, .inline-flex, .grid))+ > :where(span, i):not(:where(.flex, .inline-flex))+ > svg.lucide {+ display: inline-block;+ vertical-align: -0.145em; /* antd's icon baseline offset */+ width: 1em;+ height: 1em;+ }+}++/* ------------------------------------------------------------------+ * Existing Unstract rules — unchanged below this line, except the+ * body font-family fix noted in P0-12.+ * ------------------------------------------------------------------ */html,#root {@@ -6,18 +333,42 @@ html,}body {- font-family: var(--font-family) !important;+ /* P0-12: `!important` dropped and repointed at --font-sans; it otherwise+ * overrode the design token on every element. */+ font-family: var(--font-sans);+ /*+ * Base size for text that inherits rather than carrying a size class.+ *+ * `--text-sm` alone was not enough: it only reaches elements that use+ * `text-sm`, so anything relying on inheritance kept the UA default of+ * 16px. The "Owned By:" label in the project list rendered at 16px next+ * to 13px siblings for exactly that reason.+ *+ * Set on `body`, deliberately NOT on `html` — Tailwind v4 derives spacing,+ * gaps and control heights from rem, so moving the ROOT size would shrink+ * the whole UI rather than just the type. Body inheritance carries the+ * text without touching any of that.+ */+ font-size: var(--text-sm);+ line-height: var(--text-sm--line-height);-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;margin: 0;height: 100%;- background-color: var(--page-bg-2);+ background-color: var(--background);+ /* P0-12 / P2-02 — RESOLVED. The concern was that Radix's dialog scroll-lock+ * (which also sets body overflow, then restores the prior value on close)+ * could restore the wrong value here and leave the fixed app shell+ * scrollable. Verified in antd-overlays.scrolllock.test.jsx: body overflow+ * stays `hidden` before, during and after a dialog's lifecycle, survives+ * repeated open/close cycles, and is NOT left hidden on pages that never+ * pinned it. Safe to keep. */min-width: 1024px;overflow: hidden;}.page-bg-2 {- background-color: var(--page-bg-2);+ background-color: var(--background);}.center {@@ -31,12 +382,19 @@ body {/* Custom scroll bar css starts */* {scrollbar-width: thin;- scrollbar-color: #e8edf2 transparent;+ /* Thumb visible against the track. #e8edf2 on a near-white surface was+ * indistinguishable, which is what made scrollable areas look truncated. */+ scrollbar-color: var(--neutral-300) transparent;}::-webkit-scrollbar {- width: 3px;- height: 5px;+ /*+ * 8px, matching the reference. At the previous 3px the bar was thin enough+ * to read as absent — the emoji picker in "Choose icon" scrolls, but nobody+ * could tell, so the grid looked truncated rather than scrollable.+ */+ width: 8px;+ height: 8px;}/* Track */@@ -48,12 +406,12 @@ body {/* Handle */::-webkit-scrollbar-thumb {border-radius: 4px;- background: #e8edf2;+ background: var(--neutral-300);}/* Handle on hover */::-webkit-scrollbar-thumb:hover {- background: #d4dce5;+ background: var(--neutral-400);}/* Corner where both X and Y scroll bar meets */@@ -186,9 +544,17 @@ body {flex: 1;}-.border {- border-style: solid;-}+/*+ * `.border { border-style: solid }` was a legacy app utility from the antd+ * era. Its name now collides with Tailwind's `border` utility, and because it+ * is declared later it overrode `--tw-border-style` — so `border border-dashed`+ * rendered solid, which is why the Import Project drop zone had a solid edge+ * instead of antd's dashed one.+ *+ * Removed rather than renamed: every remaining `className="… border …"` in the+ * app is Tailwind's utility, which already sets `solid` by default, so nothing+ * relied on this rule for its own sake.+ */.overflow-hidden {overflow: hidden;@@ -252,6 +618,24 @@ body {z-index: 2000;}+/* Radix positions popovers/dropdowns/tooltips in this wrapper and gives it+ * `z-index: 50`. This app predates that scale and uses much larger values —+ * `.logs-container` alone is 999 — so a sidebar fly-out opened near the bottom+ * of the screen was clipped by the Logs footer. Sit above the app's legacy+ * z-indexes but below `.fullscreen-loader` (2000), which must still cover+ * everything.+ *+ * The layer ladder, for reference:+ * legacy app chrome 100–1000 (.logs-container 999, agency/settings 1000)+ * modal layer 1100 (dialog/alert-dialog/sheet overlay+content)+ * popper layer 1500 (this rule — must clear a modal above it)+ * fullscreen loader 2000+ * Modals were left on Radix's stock z-50 at first, which put them *under* the+ * Logs footer: the footer stayed bright white over the dimmed page. */+[data-radix-popper-content-wrapper] {+ z-index: 1500 !important;+}+.notification-id-line,.notification-id-line__value {font-size: 12px;@@ -274,3 +658,44 @@ body {.notification-id-line__value {word-break: break-all;}++/* Sonner's viewport is an ordinary body-level element, so the+ * `pointer-events: none` Radix puts on <body> while a modal Dialog is open+ * inherits straight into it and the toasts stop taking clicks — their own+ * close buttons included. An open modal is exactly when error toasts pile up+ * (a rejected form re-renders the dialog and toasts the backend error), so the+ * stack has to stay operable through one. Same reasoning as+ * `.notification-clear-all` below.+ *+ * `auto` here only restores sonner's own default; the <ol> is 0px tall+ * (toasts inside it are absolutely positioned), so this adds no dead zone over+ * the page. App.jsx wraps the toaster in a DismissableLayer.Branch so the+ * clicks it regains are not read as "outside" and dismiss the dialog under it.+ */+[data-sonner-toaster] {+ pointer-events: auto;+}++/* Sits in the band `<Toaster offset>` reserves above the toast stack (App.jsx);+ * the offset and this `top` are a pair. Sonner's viewport is z-index+ * 999999999, so this has to clear it to stay clickable. */+.notification-clear-all {+ position: fixed;+ top: 24px;+ right: 24px;+ z-index: 1000000000;+ display: flex;+ justify-content: flex-end;+ /* Radix sets `pointer-events: none` on <body> while a modal dialog is open,+ * and that inherits down to here. Re-enable it: a modal open is exactly when+ * toasts pile up, so the control has to stay clickable through one. */+ pointer-events: auto;+}++@media (max-width: 600px) {+ /* Sonner drops to a 16px viewport offset on narrow screens. */+ .notification-clear-all {+ top: 16px;+ right: 16px;+ }+}diff --git a/frontend/src/index.jsx b/frontend/src/index.jsxindex 608edbf95..0c0c6e566 100644--- a/frontend/src/index.jsx+++ b/frontend/src/index.jsx@@ -1,6 +1,16 @@// Install the global `Prism` at bootstrap, before any lazy chunk (incl. the// shared one holding prismjs add-ons) can load. See helpers/prismSetup.js.import "./helpers/prismSetup";++// Self-hosted fonts (P0-04). Deliberately NOT a Google Fonts / CDN link: prod+// serves built assets through nginx and must not depend on an external host.+// Weights match the --font-weight-* tokens in index.css (400/500/600/700).+import "@fontsource/inter/400.css";+import "@fontsource/inter/500.css";+import "@fontsource/inter/600.css";+import "@fontsource/inter/700.css";+import "@fontsource/geist-mono/400.css";+import posthog from "posthog-js";import { PostHogProvider } from "posthog-js/react";import React from "react";@@ -10,7 +20,7 @@ import { GenericLoader } from "./components/generic-loader/GenericLoader";import { LazyLoader } from "./components/widgets/lazy-loader/LazyLoader.jsx";import config from "./config.js";import { getDeployment } from "./helpers/PostHogDeployment.js";-import { SocketProvider } from "./helpers/SocketContext.js";+import { SocketProvider } from "./helpers/SocketContext.jsx";import "./index.css";// Runtime config (containerized deployments) wins when it carries adiff --git a/frontend/src/layouts/content-center-layout/ContentCenterLayout.jsx b/frontend/src/layouts/content-center-layout/ContentCenterLayout.jsxindex 6461aba45..c400048c7 100644--- a/frontend/src/layouts/content-center-layout/ContentCenterLayout.jsx+++ b/frontend/src/layouts/content-center-layout/ContentCenterLayout.jsx@@ -1,6 +1,6 @@import PropTypes from "prop-types";+import { Typography } from "@/components/ui/shims/antd-typography";import "./ContentCenterLayout.css";-import { Typography } from "antd";function ContentCenterLayout({ children, headerText, mainText, subText }) {return (diff --git a/frontend/src/layouts/fullpage-payout/FullPageLayout.css b/frontend/src/layouts/fullpage-payout/FullPageLayout.cssindex 826d4cc9d..98b0ac75e 100644--- a/frontend/src/layouts/fullpage-payout/FullPageLayout.css+++ b/frontend/src/layouts/fullpage-payout/FullPageLayout.css@@ -1,4 +1,9 @@-.container {+/*+ * Not `.container`: Tailwind v4 ships `container` as a utility that caps width+ * at the current breakpoint (1536px at 2xl). This class sits on the app shell,+ * so the collision clamped every page and left a dead strip on wider screens.+ */+.full-page-layout {background: #eceff3;height: 100%;width: 100%;diff --git a/frontend/src/layouts/fullpage-payout/FullPageLayout.jsx b/frontend/src/layouts/fullpage-payout/FullPageLayout.jsxindex 31ef2ffaa..2ce83d07f 100644--- a/frontend/src/layouts/fullpage-payout/FullPageLayout.jsx+++ b/frontend/src/layouts/fullpage-payout/FullPageLayout.jsx@@ -1,11 +1,11 @@-import { Layout } from "antd";+import { Layout } from "@/components/ui/shims/antd-structure";import "./FullPageLayout.css";import { LazyOutlet } from "../../components/error/LazyOutlet/LazyOutlet.jsx";function FullPageLayout() {return (- <Layout className="container">+ <Layout className="full-page-layout"><LazyOutlet /></Layout>);diff --git a/frontend/src/layouts/island-layout/IslandLayout.css b/frontend/src/layouts/island-layout/IslandLayout.cssindex 945484a3b..92d0a3c07 100644--- a/frontend/src/layouts/island-layout/IslandLayout.css+++ b/frontend/src/layouts/island-layout/IslandLayout.css@@ -2,11 +2,24 @@.island-layout {padding: 12px;+ /*+ * NOT `height: 100%` alone. The island sits in a column flex container next+ * to ToolNavBar, where 100% resolves against the container's FULL height and+ * ignores the ~42px the nav bar already took — so the island overflowed its+ * parent by exactly the nav bar's height and its last row sat below the+ * fold, unreachable because `body` is `overflow-y: hidden`.+ *+ * `flex: 1` wins on the main axis wherever the parent is a flex column (all+ * 22 call sites today); `height` is kept as the fallback for any parent that+ * is not, where `flex` is inert.+ */+ flex: 1;+ min-height: 0;height: 100%;}.island-layout > div {- background-color: var(--white);+ background-color: var(--card);height: 100%;overflow-y: auto;}diff --git a/frontend/src/layouts/menu-layout/MenuLayout.css b/frontend/src/layouts/menu-layout/MenuLayout.cssindex 31622e5c2..2d84777f8 100644--- a/frontend/src/layouts/menu-layout/MenuLayout.css+++ b/frontend/src/layouts/menu-layout/MenuLayout.css@@ -17,7 +17,7 @@}.appBody {- background-color: var(--page-bg-2);+ background-color: var(--background);overflow: hidden;height: 100%;}diff --git a/frontend/src/layouts/menu-layout/MenuLayout.jsx b/frontend/src/layouts/menu-layout/MenuLayout.jsxindex 9a35b7a9d..b400689a6 100644--- a/frontend/src/layouts/menu-layout/MenuLayout.jsx+++ b/frontend/src/layouts/menu-layout/MenuLayout.jsx@@ -1,8 +1,12 @@-import { QuestionCircleOutlined } from "@ant-design/icons";-import { Button, Form, Input, Modal, Space } from "antd";+import { CircleHelp } from "lucide-react";import PropTypes from "prop-types";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useLocation, useNavigate } from "react-router-dom";+import { Button } from "@/components/ui/shims/antd-button";+import { Form } from "@/components/ui/shims/antd-form";+import { Input } from "@/components/ui/shims/antd-inputs";+import { Space } from "@/components/ui/shims/antd-layout";+import { Modal } from "@/components/ui/shims/antd-overlays";import { ToolNavBar } from "../../components/navigations/tool-nav-bar/ToolNavBar";import { workflowService } from "../../components/workflows/workflow/workflow-service";@@ -98,7 +102,7 @@ function MenuLayout({ children }) {<Space><Buttonkey="help"- icon={<QuestionCircleOutlined />}+ icon={<CircleHelp />}disabled={true}type={activeTab === "help" ? "primary" : "default"}>diff --git a/frontend/src/layouts/page-layout/PageLayout.css b/frontend/src/layouts/page-layout/PageLayout.cssindex e31d920b1..fca5f2f64 100644--- a/frontend/src/layouts/page-layout/PageLayout.css+++ b/frontend/src/layouts/page-layout/PageLayout.css@@ -5,8 +5,21 @@grid-template-rows: auto 1fr;}+/*+ * The top bar is a LIGHT surface; the violet is the sidebar's alone.+ *+ * This was `var(--primary)`, which put a full-width violet strip above the+ * sidebar. The Figma design (node 586-119) keeps the brand colour to the+ * sidebar and renders the top row as part of the page.+ *+ * `--card` rather than `--background`: the bar is a raised surface over the+ * page, the same plane as tables and modals. The hairline below is what+ * separates the two planes -- without it the bar dissolves into any content+ * that is also white, so it is not decorative.+ */.topNav {- background-color: var(--primary);+ background-color: var(--card);+ border-bottom: 1px solid var(--border);padding-block: 14px;padding-inline-start: 20px;padding-inline-end: 12px;diff --git a/frontend/src/layouts/page-layout/PageLayout.jsx b/frontend/src/layouts/page-layout/PageLayout.jsxindex 63bccb877..54de5c161 100644--- a/frontend/src/layouts/page-layout/PageLayout.jsx+++ b/frontend/src/layouts/page-layout/PageLayout.jsx@@ -1,6 +1,6 @@-import { Layout } from "antd";import PropTypes from "prop-types";import { useEffect, useState } from "react";+import { Layout } from "@/components/ui/shims/antd-structure";import "./PageLayout.css";import { LazyOutlet } from "../../components/error/LazyOutlet/LazyOutlet.jsx";diff --git a/frontend/src/layouts/rjsf-form-layout/CustomFieldTemplate.jsx b/frontend/src/layouts/rjsf-form-layout/CustomFieldTemplate.jsxindex 80386d6d6..1ebfcc92e 100644--- a/frontend/src/layouts/rjsf-form-layout/CustomFieldTemplate.jsx+++ b/frontend/src/layouts/rjsf-form-layout/CustomFieldTemplate.jsx@@ -1,5 +1,5 @@-import { Alert } from "antd";import PropTypes from "prop-types";+import { Alert } from "@/components/ui/shims/antd-leaves";import "./CustomFieldTemplate.css";const CustomFieldTemplate = (props) => {diff --git a/frontend/src/layouts/rjsf-form-layout/CustomObjectFieldTemplate.jsx b/frontend/src/layouts/rjsf-form-layout/CustomObjectFieldTemplate.jsxindex 87f07bbc9..99777d9ff 100644--- a/frontend/src/layouts/rjsf-form-layout/CustomObjectFieldTemplate.jsx+++ b/frontend/src/layouts/rjsf-form-layout/CustomObjectFieldTemplate.jsx@@ -1,5 +1,5 @@-import { Col, Row } from "antd";import PropTypes from "prop-types";+import { Col, Row } from "@/components/ui/shims/antd-layout";import "./CustomFieldTemplate.css";const CustomObjectFieldTemplate = (props) => {diff --git a/frontend/src/layouts/rjsf-form-layout/RjsfFormLayout.jsx b/frontend/src/layouts/rjsf-form-layout/RjsfFormLayout.jsxindex 644b763d3..385551350 100644--- a/frontend/src/layouts/rjsf-form-layout/RjsfFormLayout.jsx+++ b/frontend/src/layouts/rjsf-form-layout/RjsfFormLayout.jsx@@ -1,8 +1,12 @@-import Form from "@rjsf/antd";+// P3-05: @rjsf/core instead of @rjsf/antd. This layout already supplies its own+// `widgets` and `templates` for every field type, so the antd theme was only+// contributing the wrapper chrome — there is no widget registry to rebuild.+import Form from "@rjsf/core";import validator from "@rjsf/validator-ajv8";-import { Alert, Space } from "antd";import PropTypes from "prop-types";import { useCallback, useMemo } from "react";+import { Space } from "@/components/ui/shims/antd-layout";+import { Alert } from "@/components/ui/shims/antd-leaves";import CustomMarkdown from "../../components/helpers/custom-markdown/CustomMarkdown.jsx";import { AltDateTimeWidget } from "../../components/rjsf-custom-widgets/alt-date-time-widget/AltDateTimeWidget.jsx";diff --git a/frontend/src/layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx b/frontend/src/layouts/rjsf-widget-layout/RjsfWidgetLayout.jsxindex 6a6991fbd..74c5b03d8 100644--- a/frontend/src/layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx+++ b/frontend/src/layouts/rjsf-widget-layout/RjsfWidgetLayout.jsx@@ -1,5 +1,6 @@-import { Form, Typography } from "antd";import PropTypes from "prop-types";+import { Form } from "@/components/ui/shims/antd-form";+import { Typography } from "@/components/ui/shims/antd-typography";import "./RjsfWidgetLayout.css";import CustomMarkdown from "../../components/helpers/custom-markdown/CustomMarkdown";diff --git a/frontend/src/lib/utils.js b/frontend/src/lib/utils.jsnew file mode 100644index 000000000..05681ccc4--- /dev/null+++ b/frontend/src/lib/utils.js@@ -0,0 +1,10 @@+import { clsx } from "clsx";+import { twMerge } from "tailwind-merge";++/**+ * Merge conditional class names, with later Tailwind utilities winning over+ * earlier conflicting ones. Standard shadcn/ui helper.+ */+export function cn(...inputs) {+ return twMerge(clsx(inputs));+}diff --git a/frontend/src/pages/ConnectorsPage.css b/frontend/src/pages/ConnectorsPage.cssindex 6963363ab..85bc68888 100644--- a/frontend/src/pages/ConnectorsPage.css+++ b/frontend/src/pages/ConnectorsPage.css@@ -5,7 +5,7 @@}.connectors-pg-layout {- background-color: var(--page-bg-2);+ background-color: var(--background);padding: 12px;height: 100%;overflow-y: auto;@@ -13,7 +13,7 @@}.connectors-pg-body {- background-color: var(--white);+ background-color: var(--card);height: 100%;display: flex;flex-direction: column;diff --git a/frontend/src/pages/ConnectorsPage.jsx b/frontend/src/pages/ConnectorsPage.jsxindex 5e9535182..d637a7273 100644--- a/frontend/src/pages/ConnectorsPage.jsx+++ b/frontend/src/pages/ConnectorsPage.jsx@@ -1,6 +1,6 @@-import { PlusOutlined } from "@ant-design/icons";-import { Button } from "antd";+import { Plus } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";+import { Button } from "@/components/ui/shims/antd-button";import { groupsService } from "../components/groups/groups-service.js";import { AddSourceModal } from "../components/input-output/add-source-modal/AddSourceModal";@@ -290,11 +290,7 @@ function ConnectorsPage() {};const newConnectorButton = (- <Button- type="primary"- icon={<PlusOutlined />}- onClick={handleCreateConnector}- >+ <Button type="primary" icon={<Plus />} onClick={handleCreateConnector}>New Connector</Button>);@@ -330,6 +326,7 @@ function ConnectorsPage() {)}{!loadError && displayList?.length > 0 && (<ResourceTable+ testIdPrefix="connector-list"dataSource={displayList}loading={loading}pagination={pagination}diff --git a/frontend/src/routes/Router.jsx b/frontend/src/routes/Router.jsxindex 2111417bc..7bf1858fe 100644--- a/frontend/src/routes/Router.jsx+++ b/frontend/src/routes/Router.jsx@@ -8,16 +8,16 @@ import {} from "../components/error/LazyOutlet/LazyOutlet.jsx";import { NotFound } from "../components/error/NotFound/NotFound.jsx";import { GenericLoader } from "../components/generic-loader/GenericLoader.jsx";-import { PersistentLogin } from "../components/helpers/auth/PersistentLogin.js";-import { RequireAuth } from "../components/helpers/auth/RequireAuth.js";-import { RequireGuest } from "../components/helpers/auth/RequireGuest.js";+import { PersistentLogin } from "../components/helpers/auth/PersistentLogin.jsx";+import { RequireAuth } from "../components/helpers/auth/RequireAuth.jsx";+import { RequireGuest } from "../components/helpers/auth/RequireGuest.jsx";import { OAuthStatus } from "../components/oauth-ds/oauth-status/OAuthStatus.jsx";import { ErrorBoundary } from "../components/widgets/error-boundary/ErrorBoundary.jsx";import { lazyNamed } from "../helpers/lazyNamed.js";import { isModuleMissing } from "../helpers/pluginLoader.js";import { lazyPlugin } from "../helpers/pluginRegistry.js";import { LandingPage } from "../pages/LandingPage.jsx";-import { useMainAppRoutes } from "./useMainAppRoutes.js";+import { useMainAppRoutes } from "./useMainAppRoutes.jsx";// Heavy route pages are code-split so the unauthenticated /landing page does// not download their chunks (PDF viewer, Monaco, charts) before login. Thediff --git a/frontend/src/routes/useMainAppRoutes.js b/frontend/src/routes/useMainAppRoutes.jsxsimilarity index 99%rename from frontend/src/routes/useMainAppRoutes.jsrename to frontend/src/routes/useMainAppRoutes.jsxindex 6d3d245a1..42c4d0461 100644--- a/frontend/src/routes/useMainAppRoutes.js+++ b/frontend/src/routes/useMainAppRoutes.jsx@@ -1,8 +1,8 @@import { lazy } from "react";import { Route } from "react-router-dom";-import { RequireAdmin } from "../components/helpers/auth/RequireAdmin.js";-import { CustomToolsHelper } from "../components/helpers/custom-tools/CustomToolsHelper.js";-import { ProjectHelper } from "../components/helpers/project/ProjectHelper.js";+import { RequireAdmin } from "../components/helpers/auth/RequireAdmin.jsx";+import { CustomToolsHelper } from "../components/helpers/custom-tools/CustomToolsHelper.jsx";+import { ProjectHelper } from "../components/helpers/project/ProjectHelper.jsx";import { DefaultTriad } from "../components/settings/default-triad/DefaultTriad.jsx";import { PlatformSettings } from "../components/settings/platform/PlatformSettings.jsx";import { deploymentTypes } from "../helpers/GetStaticData.js";diff --git a/frontend/src/variables.css b/frontend/src/variables.cssdeleted file mode 100644index c4dc72bfb..000000000--- a/frontend/src/variables.css+++ /dev/null@@ -1,43 +0,0 @@-:root {- --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;- --white: #ffffff;- --black: #000000;-- --primary: #092c4c;- --secondary: #0c3861;-- --font-color-1: #ffffff;-- /* font sizes */- --font-size-16: 16px;- --font-size-14: 14px;-- /* font weights */- --font-weight-400: 400;- --font-weight-500: 500;- --font-weight-600: 600;-- --page-bg-1: #ffffff;- --page-bg-2: #e9e9e9;- --page-bg-3: #f5f7f9;-- --border-color-1: #e1e1e1;- --border-color-2: #efeaea;-}--.dark {- --white: #000000;- --black: #ffffff;-- --primary: #092c4c;- --secondary: #0c3861;-- --font-color-1: #ffffff;-- --page-bg-1: #000000;- --page-bg-2: #141414;- --page-bg-3: #111418;-- --border-color-1: #1d1d1d;- --border-color-2: #383535;-}diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.jsnew file mode 100644index 000000000..adcf58870--- /dev/null+++ b/frontend/tailwind.config.js@@ -0,0 +1,23 @@+/** @type {import('tailwindcss').Config} */+export default {+ content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],+ theme: {+ extend: {+ keyframes: {+ "accordion-down": {+ from: { height: "0" },+ to: { height: "var(--radix-accordion-content-height)" },+ },+ "accordion-up": {+ from: { height: "var(--radix-accordion-content-height)" },+ to: { height: "0" },+ },+ },+ animation: {+ "accordion-down": "accordion-down 0.2s ease-out",+ "accordion-up": "accordion-up 0.2s ease-out",+ },+ },+ },+ plugins: [],+};diff --git a/frontend/test-results/.last-run.json b/frontend/test-results/.last-run.jsonnew file mode 100644index 000000000..544c11fbc--- /dev/null+++ b/frontend/test-results/.last-run.json@@ -0,0 +1,4 @@+{+ "status": "failed",+ "failedTests": []+}diff --git a/frontend/tsconfig.json b/frontend/tsconfig.jsonnew file mode 100644index 000000000..f7e7014f4--- /dev/null+++ b/frontend/tsconfig.json@@ -0,0 +1,48 @@+{+ "compilerOptions": {+ "target": "ES2022",+ "lib": ["ES2022", "DOM", "DOM.Iterable"],+ "module": "ESNext",+ "moduleResolution": "bundler",+ "jsx": "react-jsx",++ /*+ * The app is still ~370 JavaScript files. `allowJs` lets TypeScript see+ * them so imports resolve, while `checkJs: false` keeps them unchecked —+ * this is a targeted conversion of the shim layer, not a whole-repo+ * migration.+ */+ "allowJs": true,+ "checkJs": false,++ /* Vite/esbuild strip types without checking them, so `vite build`+ * passing proves nothing about type safety. `tsc --noEmit` (the+ * `typecheck` script) is what actually enforces these settings. */+ "noEmit": true,+ "skipLibCheck": true,+ "esModuleInterop": true,+ "allowSyntheticDefaultImports": true,+ "resolveJsonModule": true,+ "isolatedModules": true,+ "forceConsistentCasingInFileNames": true,++ "strict": true,+ /*+ * The shims deliberately accept and forward unknown props, so an+ * unused-parameter error would fire on every prop consumed purely to+ * keep it off the DOM. Those are intentional, so the check is off.+ */+ "noUnusedLocals": false,+ "noUnusedParameters": false,++ /* Must mirror the Vite alias (and jsconfig.json), or every `@/…`+ * import fails to resolve for tsc even though it builds fine.+ * `baseUrl` was removed in TypeScript 6, so the paths are relative to+ * this file's directory. */+ "paths": {+ "@/*": ["./src/*"]+ }+ },+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts"],+ "exclude": ["node_modules", "build", "dist"]+}diff --git a/frontend/vite.config.js b/frontend/vite.config.jsindex 395fee7b5..af124153f 100644--- a/frontend/vite.config.js+++ b/frontend/vite.config.js@@ -1,7 +1,8 @@+import tailwindcss from "@tailwindcss/vite";import react from "@vitejs/plugin-react";import fs from "fs";import path from "path";-import { defineConfig, loadEnv } from "vite";+import { defineConfig, loadEnv, transformWithEsbuild } from "vite";import svgr from "vite-plugin-svgr";const EMPTY_MODULE_ID = "\0optional-plugin-empty";@@ -79,6 +80,60 @@ function optionalPluginImports() {};}+/*+ * Transforms JSX that lives in plain `.js` files.+ *+ * This is NOT transitional. The OSS tree's own JSX-bearing `.js` files were+ * renamed to `.jsx`, but this build also compiles `src/plugins/`, which is+ * copied in from the separate unstract-cloud repo at Docker build time. Nine+ * of those plugin files put JSX in `.js`, and they are invisible from here —+ * the first sign of trouble is a Docker build failing with+ * "content contains invalid JS syntax".+ *+ * Deleting this to "clean up" therefore breaks the cloud image, not the OSS+ * one. Renaming the cloud files instead would impose an unwritten rule (no+ * JSX in `.js`, anywhere, ever) that nothing enforces and cloud developers+ * cannot see.+ *+ * Scoped to `.js` on purpose. Vite's own `esbuild` option cannot express this:+ * its `include` REPLACES the default filter, and its `loader` is one string+ * applied to every matched file, so covering `.js` there would hand `.ts` to+ * the JSX parser.+ */+function jsxInJs() {+ return {+ name: "jsx-in-js",+ async transform(code, id) {+ if (id.includes("/node_modules/")) {+ return null;+ }+ const [filepath] = id.split("?");+ if (!/\/src\/.*\.js$/.test(filepath)) {+ return null;+ }+ return transformWithEsbuild(code, filepath, {+ loader: "jsx",+ /*+ * `jsx: "automatic"` is load-bearing, and its absence does NOT fail+ * the build — it produces a white screen at runtime.+ *+ * esbuild defaults to the classic runtime, emitting+ * `React.createElement(...)`. These files use JSX without importing+ * React (the automatic runtime injects `jsx-runtime` itself), so the+ * classic output referenced an undefined binding and threw+ * `ReferenceError: React is not defined` while rendering the router —+ * killing the whole app, with a green build and HTTP 200 throughout.+ *+ * The old `esbuild` block never hit this because Vite applies its own+ * resolved `jsx` setting to that path; a standalone+ * transformWithEsbuild call does not inherit it.+ */+ jsx: "automatic",+ });+ },+ };+}+// https://vite.dev/config/export default defineConfig(({ mode }) => {// Load env file based on `mode` in the current working directory.@@ -87,20 +142,43 @@ export default defineConfig(({ mode }) => {return {plugins: [optionalPluginImports(),+ // Tailwind v4. Must come after optionalPluginImports() so missing+ // cloud-plugin imports are still resolved to stubs first.+ tailwindcss(),+ // Must precede react(): it turns JSX-bearing .js into plain JS, which is+ // what the React transform (and Rollup's import analysis) then expect.+ jsxInJs(),react({- // Include .js files for JSX transformation- include: "**/*.{jsx,js}",+ // Include .js files for JSX transformation, plus the TypeScript+ // shim layer so it gets Fast Refresh in dev like everything else.+ include: "**/*.{jsx,js,tsx,ts}",}),// SVG as React component support (for `import Logo from './logo.svg?react'`)svgr(),],- // ESBuild configuration to handle JSX in .js files- esbuild: {- loader: "jsx",- include: /src\/.*\.jsx?$/,- exclude: [],- },+ /*+ * No `esbuild` override here, deliberately — Vite's defaults+ * (`include: /\.(m?ts|[jt]sx)$/`, and a loader derived per-file from the+ * extension) are exactly right once TypeScript is in the tree.+ *+ * This block previously read `{ loader: "jsx", include: /src\/.*\.jsx?$/ }`+ * to cope with .js files that contain JSX. Both halves break TypeScript,+ * and each cost a build to diagnose:+ *+ * - `include` REPLACES Vite's default filter rather than extending it,+ * so .ts/.tsx were never transformed at all and failed to parse with a+ * bare "Expected ';', '}' or <eof>".+ * - `loader` reaches esbuild's single-file transform API, where it must+ * be a string (the per-extension map form is bundle-API only) and is+ * applied to every matched file. One blanket "jsx" hands TypeScript to+ * the JSX parser, which misreads the `<` in+ * `React.forwardRef<HTMLButtonElement, Props>(…)` as an opening tag.+ *+ * JSX-in-.js is handled by jsxInJs() above instead — see the note there+ * for why the cloud plugin tree makes that a permanent requirement rather+ * than a transitional one.+ */// Resolve configurationresolve: {@@ -179,7 +257,6 @@ export default defineConfig(({ mode }) => {// Manual chunk splitting for better cachingmanualChunks: {"react-vendor": ["react", "react-dom", "react-router-dom"],- "antd-vendor": ["antd", "@ant-design/icons"],"pdf-vendor": ["@react-pdf-viewer/core","@react-pdf-viewer/default-layout",@@ -192,15 +269,6 @@ export default defineConfig(({ mode }) => {},},- // CSS configuration- css: {- preprocessorOptions: {- less: {- javascriptEnabled: true,- },- },- },-// Define global constantsdefine: {"process.env": {}, // For compatibility with some libraries expecting process.env@@ -208,13 +276,7 @@ export default defineConfig(({ mode }) => {// Optimize dependenciesoptimizeDeps: {- include: [- "react",- "react-dom",- "react-router-dom",- "antd",- "@ant-design/icons",- ],+ include: ["react", "react-dom", "react-router-dom"],exclude: [],esbuildOptions: {loader: {diff --git a/frontend/vitest.config.mjs b/frontend/vitest.config.mjsindex b31588666..128c7f042 100644--- a/frontend/vitest.config.mjs+++ b/frontend/vitest.config.mjs@@ -1,19 +1,114 @@+import fs from "node:fs";+import path from "node:path";import react from "@vitejs/plugin-react";+import { transformWithEsbuild } from "vite";import { defineConfig } from "vitest/config";+/*+ * Mirror of jsxInJs() in vite.config.js — see the long note there.+ *+ * Kept here even though no OSS `.js` file currently contains JSX: the cloud+ * plugin tree (copied into src/plugins/ at Docker build time) has nine that+ * do, and this config must be able to load them. Vitest does not read+ * vite.config.js, so anything fixed only there is missing here — that+ * asymmetry once left the suite silently loading 126 of 248 tests while+ * still reporting all green.+ */+function jsxInJs() {+ return {+ name: "jsx-in-js",+ async transform(code, id) {+ if (id.includes("/node_modules/")) {+ return null;+ }+ const [filepath] = id.split("?");+ if (!/\/src\/.*\.js$/.test(filepath)) {+ return null;+ }+ // jsx: "automatic" — see the note in vite.config.js. Without it esbuild+ // emits classic React.createElement against a React these files never+ // import, which throws at render rather than failing the build.+ return transformWithEsbuild(code, filepath, {+ loader: "jsx",+ jsx: "automatic",+ });+ },+ };+}++/*+ * Mirror of optionalPluginImports() in vite.config.js — the same asymmetry the+ * note above warns about, in a second place.+ *+ * `src/helpers/GetStaticData.js` does `try { await import("../plugins/...") }`,+ * which the build resolves to an empty module when the cloud plugin tree is+ * absent. Vitest does not read vite.config.js, so in the OSS-only checkout any+ * test importing a component that reaches GetStaticData failed to COLLECT —+ * reported as a failed file, not a failed assertion, and easy to read as+ * unrelated infrastructure noise.+ */+function optionalPluginImports() {+ return {+ name: "optional-plugin-imports",+ resolveId(source, importer) {+ if (!importer || !source.startsWith(".")) {+ return null;+ }+ const sourcePath = source.split("?")[0].split("#")[0];+ const resolved = path.resolve(path.dirname(importer), sourcePath);+ if (!resolved.includes("/plugins/")) {+ return null;+ }+ const exists = ["", ".js", ".jsx", ".ts", ".tsx"].some(+ (ext) =>+ fs.existsSync(resolved + ext) ||+ fs.existsSync(path.join(resolved, `index${ext || ".js"}`)),+ );+ return exists ? null : `\0optional-plugin:${resolved}`;+ },+ load(id) {+ return id.startsWith("\0optional-plugin:") ? "export default {};" : null;+ },+ };+}+export default defineConfig({plugins: [+ // Must precede react(), as in vite.config.js.+ jsxInJs(),+ optionalPluginImports(),react({- include: "**/*.{jsx,js}",+ include: "**/*.{jsx,js,tsx,ts}",}),],- esbuild: {- loader: "jsx",- include: /src\/.*\.jsx?$/,+ /*+ * No `esbuild` override — see the matching note in vite.config.js. In short:+ * `include` REPLACES Vite's default filter (so a `.jsx?`-only regex hides+ * .ts/.tsx from the transform entirely), and `loader` must be a single+ * string applied to every matched file (so "jsx" misparses TypeScript+ * generics). Vite's defaults derive the loader per file extension; JSX in+ * `.js` is handled by jsxInJs() above.+ */+ // P0-14: the `@` alias exists in vite.config.js but was missing here, so the+ // first test importing `@/components/ui/*` would fail to resolve.+ resolve: {+ alias: {+ "@": path.resolve(import.meta.dirname, "./src"),+ },},test: {globals: true,environment: "happy-dom",setupFiles: "./src/setupTests.js",+ // Tailwind v4's `@import "tailwindcss"` / `@plugin` at-rules are not+ // processable by vitest's CSS pipeline; stub CSS imports in tests.+ css: false,+ /*+ * The Playwright suite (the rig's `ui` group) lives in `tests/e2e/ui`, out+ * of this tree entirely, so vitest's default glob no longer reaches it.+ * `build/` is listed because a production build lands there and its+ * bundled chunks would otherwise be walked.+ */+ exclude: ["**/node_modules/**", "**/dist/**", "**/build/**"],},});diff --git a/tests/README.md b/tests/README.mdindex 0d3d762a3..bdd20fe47 100644--- a/tests/README.md+++ b/tests/README.md@@ -100,6 +100,7 @@ Optional knobs (see `groups.yaml` for examples):| Key | Purpose ||---|---|+| `runner` | `pytest` (default), `hurl`, `vitest`, `playwright`. See "Frontend groups". || `markers` | Forwarded to pytest `-m` (e.g. `"unit and not slow"`). || `pytest_extra` | Extra pytest CLI flags. || `env` | Env vars set for this group's pytest process. |@@ -114,6 +115,57 @@ Optional knobs (see `groups.yaml` for examples):| `timeout_seconds` | Override the default 600s. || `optional` | Two effects: (1) skip silently if paths/workdir are missing (placeholders, gitignored cloud-only dirs); (2) **non-blocking** — if the group runs and fails, its red result still shows in the summary but does not gate the overall exit code. Use for groups that need infra CI doesn't provision (e.g. live-DB connector tests) where a red run shouldn't block merge. |+### Frontend groups (`vitest` / `playwright`)++Two groups run Node suites rather than pytest:++| Group | Tier | Runner | What it covers |+|---|---|---|---|+| `frontend` | unit | `vitest` | Vitest + React Testing Library over jsdom — the antd→shadcn shims and the components on top of them. Workdir `frontend`. |+| `ui` | e2e | `playwright` | Browser e2e against the real UI. Specs live in `tests/e2e/ui/`, beside the other e2e suites. |++```bash+python -m tests.rig run frontend # the whole vitest suite+python -m tests.rig run ui # boots the platform, then playwright+cd frontend && npm test # unchanged; the rig is additive+cd tests/e2e/ui && npm install # one-off: @playwright/test+cd tests/e2e/ui && npx playwright install chromium+```++`tests/e2e/ui` is self-contained — specs, `playwright.config.js` and its own+`node_modules` — so it resolves without reaching into `frontend/`.++Both emit **real JUnit**, so `parse_junit` reports per-test counts exactly like+a pytest group (unlike `hurl`, which gets one synthetic row). Vitest takes+`--outputFile`; Playwright reads `PLAYWRIGHT_JUNIT_OUTPUT_NAME`, which the rig+exports — that is why the config reads it.++Both are `optional`, deliberately. They shell out via `npx --no-install`, so a+machine or CI image without `node_modules` (or without the browser binaries)+**skips** instead of failing the build. The runner returns exit 5 — the rig's+"nothing collected" convention — when `npx` is missing entirely. If a Node+runner dies before its reporter flushes, the rig backfills a synthetic junit so+the failure still shows in the summary rather than vanishing as a missing group.++**Auth.** The `ui` suite runs against both deployments. `UNSTRACT_AUTH_MODE`+picks the flow, or it auto-detects:++| Mode | Flow |+|---|---|+| `oss` | Django mock-login: form POST to `/api/v1/login`, then the org handshake. Mirrors `tests/e2e/conftest.py::authed_session`, so a change to that flow breaks both suites together. |+| `auth0` | Enterprise. The IdP owns the credential exchange, so the hosted login form is driven in the browser and the app completes its own callback. |+| _auto_ (default) | Try OSS first; a backend that 302s on login but then 401s on `/api/v1/organization` is cloud-auth, so fall through to `auth0`. |++Credentials come from `UNSTRACT_ADMIN_USER`/`UNSTRACT_ADMIN_PASSWORD` (or the+`UNSTRACT_AUTH0_*` pair). Specs **skip** rather than fail when authentication+does not succeed, matching the group's `optional` flag.++Why `ui` exists at all: jsdom computes no layout, so overflow, positioning and+visual state are unobservable in the `frontend` group. Every UI defect found+during the shadcn migration — a toggle rendering blank, a nav arrow anchored to+the wrong month, a filter row breaking on a date range — was caught by a human+in a browser, not by the unit suite. That is the gap `ui` is for.+### `critical_paths.yaml` — what we promise not to breakEach entry is a high-value user or system flow with an `id`, an `entry` (HTTP endpoint or internal hop), and a list of `covered_by` groups. The rig reports each path as:diff --git a/tests/compose/docker-compose.test.yaml b/tests/compose/docker-compose.test.yamlindex 8b18a3ca4..78713fefa 100644--- a/tests/compose/docker-compose.test.yaml+++ b/tests/compose/docker-compose.test.yaml@@ -31,3 +31,18 @@ services:worker-api-deployment-v2:environment:- MAX_PARALLEL_FILE_BATCHES=${MAX_PARALLEL_FILE_BATCHES:-3}++ # The `ui` Playwright group drives a browser at the frontend's OWN origin, and+ # the app derives every API URL from window.location.origin. The production+ # nginx config serves only static files plus an SPA fallback, so `/api/v1/*`+ # came back as index.html and authenticated specs never got past login. This+ # mounts a test-only config that proxies the API prefixes to the backend,+ # giving the suite a single origin. See frontend-nginx.test.conf for why the+ # Traefik origin the compose stack already provides is not usable here.+ frontend:+ volumes:+ # Relative to the PROJECT directory (docker/, from the first -f), not to+ # this file — Compose resolves every path against the project dir, so a+ # bare ./ here would silently resolve to docker/ and Docker would create+ # an empty directory at the mount target rather than error.+ - ../tests/compose/frontend-nginx.test.conf:/etc/nginx/nginx.conf:rodiff --git a/tests/compose/frontend-nginx.test.conf b/tests/compose/frontend-nginx.test.confnew file mode 100644index 000000000..b9e805e95--- /dev/null+++ b/tests/compose/frontend-nginx.test.conf@@ -0,0 +1,100 @@+# Test-only nginx config for the frontend container. Mounted over+# /etc/nginx/nginx.conf by docker-compose.test.yaml.+#+# WHY THIS EXISTS+# The `ui` Playwright group drives a real browser at the frontend's own origin,+# and the app builds every API URL from `window.location.origin` — see+# `getBaseUrl()` in frontend/src/helpers/GetStaticData.js. The production config+# serves static files plus an SPA fallback and nothing else, so `/api/v1/*`+# returned index.html: session setup failed and every authenticated spec landed+# on the login screen while the document-only smoke test still passed.+#+# A developer avoids this by reaching the app through Traefik at+# `frontend.unstract.localhost`, which docker-compose.yaml already labels to+# route /api/v1, /deployment and /public to the backend. The rig cannot use that+# origin: `*.localhost` resolves to ::1 for Node's resolver while compose+# publishes IPv4 only, so fixtures.js would get ECONNREFUSED. Proxying at :3000+# keeps the suite on one deterministic origin.+#+# THIS IS NOT A MIRROR OF frontend/nginx.conf. It is deliberately minimal — one+# origin for the suite, not a reproduction of the production cache and security+# headers. Do not sync changes between the two files in either direction.++worker_processes auto;+# The image runs as USER nginx, which cannot write the default /var/run prefix.+pid /tmp/nginx.pid;++events {+ worker_connections 1024;+}++http {+ include /etc/nginx/mime.types;+ default_type application/octet-stream;++ access_log /dev/stdout;+ sendfile on;+ keepalive_timeout 65;++ # Same reason as `pid` above: the nginx user has no access to /var/cache.+ client_body_temp_path /tmp/client_temp;+ proxy_temp_path /tmp/proxy_temp;+ fastcgi_temp_path /tmp/fastcgi_temp;+ uwsgi_temp_path /tmp/uwsgi_temp;+ scgi_temp_path /tmp/scgi_temp;++ server {+ listen 80;+ root /usr/share/nginx/html;++ # Docker's embedded DNS. Resolving through a variable rather than+ # inlining the host in proxy_pass means nginx does NOT resolve `backend`+ # at startup, so the frontend still boots when it wins the race against+ # the backend container (`depends_on` waits for start, not readiness).+ resolver 127.0.0.11 valid=10s ipv6=off;+ set $backend_upstream http://backend:8000;++ # The three prefixes Traefik sends to the backend in+ # docker/docker-compose.yaml. Written as prefix matches without a+ # trailing slash so they behave like that file's PathPrefix() rules+ # (`/api/v1` itself matches, not just `/api/v1/...`). Keep the list+ # in step with those labels.+ location /api/v1 {+ proxy_pass $backend_upstream$request_uri;+ proxy_set_header Host $host;+ proxy_set_header X-Real-IP $remote_addr;+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;+ proxy_set_header X-Forwarded-Proto $scheme;+ # File uploads: the default 1m rejects the fixtures' sample PDFs.+ client_max_body_size 100m;+ proxy_read_timeout 300s;+ }++ location /deployment {+ proxy_pass $backend_upstream$request_uri;+ proxy_set_header Host $host;+ proxy_set_header X-Real-IP $remote_addr;+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;+ proxy_set_header X-Forwarded-Proto $scheme;+ client_max_body_size 100m;+ proxy_read_timeout 300s;+ }++ location /public {+ proxy_pass $backend_upstream$request_uri;+ proxy_set_header Host $host;+ proxy_set_header X-Real-IP $remote_addr;+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;+ proxy_set_header X-Forwarded-Proto $scheme;+ }++ location /assets/ {+ try_files $uri =404;+ }++ # SPA fallback, as in production: a React route is not a file on disk.+ location / {+ try_files $uri /index.html;+ }+ }+}diff --git a/tests/e2e/ui/.gitignore b/tests/e2e/ui/.gitignorenew file mode 100644index 000000000..f763e0a3a--- /dev/null+++ b/tests/e2e/ui/.gitignore@@ -0,0 +1,5 @@+node_modules/+test-results/+playwright-report/+blob-report/+reports/diff --git a/tests/e2e/ui/agentic-prompt-studio.spec.js b/tests/e2e/ui/agentic-prompt-studio.spec.jsnew file mode 100644index 000000000..2fb89ce47--- /dev/null+++ b/tests/e2e/ui/agentic-prompt-studio.spec.js@@ -0,0 +1,121 @@+import { expect, test } from "./fixtures.js";++/**+ * Agentic Prompt Studio — listing and the project authoring surface.+ *+ * The critical path here is the one that broke: listing → open a project → the+ * authoring surface renders. Opening a project died with "Couldn't load this+ * page" because the Skeleton shim never defined `<Skeleton.Button>`, and an+ * undefined element type takes down the whole route.+ *+ * That class of failure is invisible to the vitest suite unless something+ * renders the exact sub-component, and it is invisible to `shim-completeness`+ * because that guard scans OSS `src/` while these plugins live in a gitignored+ * tree. A browser opening the real page is what catches it.+ */++/** Open the first project, or skip when the org has none. */+async function openFirstProject(page, app) {+ await app.goto("agentic-prompt-studio/projects");++ /*+ * Was `.list-view-row, .ant-list-item` — neither exists any more, so this+ * skipped rather than failed rather than surfacing anything.+ */+ const project = page+ .locator('[data-testid^="aps-project-list-row-"]')+ .first();+ if ((await project.count()) === 0) {+ test.skip(true, "no agentic prompt studio projects in this org");+ }+ await project.click();+ return project;+}++test.describe("agentic prompt studio", () => {+ test("the listing loads and offers project creation", async ({+ page,+ app,+ }) => {+ await app.goto("agentic-prompt-studio/projects");++ await expect(+ page.getByRole("button", { name: /New Project/i }).first(),+ "no way to create a project",+ ).toBeVisible({ timeout: 20000 });+ });++ /*+ * The regression test for the #130 crash. Asserting the error boundary is+ * ABSENT as well as that the surface rendered: an undefined component swaps+ * the whole route for that boundary, so its presence is the precise symptom.+ */+ test("a project opens on its authoring surface", async ({ page, app }) => {+ await openFirstProject(page, app);++ await expect(+ page.getByText(/Couldn't load this page/i),+ "project route hit the error boundary",+ ).toHaveCount(0);++ await expect(+ page.getByRole("tab", { name: /^Status$/ }),+ "authoring surface did not render",+ ).toBeVisible({ timeout: 30000 });+ });++ /*+ * The eight tabs are the project's whole surface. Checking they are all+ * present catches a tab whose panel throws — each one lazily renders+ * different components, so a missing shim shows up per-tab, not globally.+ */+ test("every authoring tab is present", async ({ page, app }) => {+ await openFirstProject(page, app);+ await expect(page.getByRole("tab", { name: /^Status$/ })).toBeVisible({+ timeout: 30000,+ });++ for (const name of [+ "Status",+ "Schema",+ "Extraction Prompt",+ "Verified Data",+ "Extracted Data",+ "Analytics",+ "Mismatch Matrix",+ "Settings",+ ]) {+ await expect(+ page.getByRole("tab", { name, exact: true }),+ `${name} tab missing`,+ ).toBeVisible();+ }+ });++ /*+ * Switching tabs is where a per-tab crash surfaces. Schema and Extraction+ * Prompt are the two authoring tabs; both were verified against the+ * reference to expose these controls.+ */+ test("the Schema and Extraction Prompt tabs render their controls", async ({+ page,+ app,+ }) => {+ await openFirstProject(page, app);+ await expect(page.getByRole("tab", { name: /^Status$/ })).toBeVisible({+ timeout: 30000,+ });++ await page.getByRole("tab", { name: "Schema", exact: true }).click();+ await expect(+ page.getByRole("button", { name: /Generate Schema/i }).first(),+ ).toBeVisible({ timeout: 20000 });++ await page+ .getByRole("tab", { name: "Extraction Prompt", exact: true })+ .click();+ await expect(+ page.getByRole("button", { name: /Regenerate/i }).first(),+ ).toBeVisible({ timeout: 20000 });+ });+});diff --git a/tests/e2e/ui/bun.lock b/tests/e2e/ui/bun.locknew file mode 100644index 000000000..528ca1c82--- /dev/null+++ b/tests/e2e/ui/bun.lock@@ -0,0 +1,21 @@+{+ "lockfileVersion": 1,+ "configVersion": 1,+ "workspaces": {+ "": {+ "name": "@unstract/ui-e2e",+ "dependencies": {+ "@playwright/test": "^1.49.0",+ },+ },+ },+ "packages": {+ "@playwright/test": ["@playwright/[email protected]", "", { "dependencies": { "playwright": "1.62.1" }, "bin": { "playwright": "cli.js" } }, "sha512-DTcUc8qii+cpHvtOwggMtBRMjKZHXYWdw8syRYu2vtzuq4Wxphqq4NfCs5Zt44L6mA8rfDfj+PHnxFc/FeK6mQ=="],++ "fsevents": ["[email protected]", "", { "os": "darwin" }, "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="],++ "playwright": ["[email protected]", "", { "dependencies": { "playwright-core": "1.62.1" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-0M+L3LAD8/nm554LOla9Ayx0j0tmFZ0FBcoQ7F1VuVHpM/XpiC8RcDzBQB8W5+hA8L22THxELzeF+2WcUzvcLg=="],++ "playwright-core": ["[email protected]", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw=="],+ }+}diff --git a/tests/e2e/ui/fixtures.js b/tests/e2e/ui/fixtures.jsnew file mode 100644index 000000000..c449fe4bc--- /dev/null+++ b/tests/e2e/ui/fixtures.js@@ -0,0 +1,172 @@+import { expect, test as base } from "@playwright/test";++/**+ * Shared fixtures for the `ui` rig group.+ *+ * Every page is behind login AND org-scoped (`/<orgId>/<route>`), so a spec+ * that calls `page.goto("/dashboard")` lands on the login screen and asserts+ * nothing. This module performs the handshake once per worker and exposes an+ * `app` helper that resolves org-relative paths.+ *+ * TWO auth modes, because the suite has to run against both deployments:+ *+ * oss Django mock-login. Form POST to /api/v1/login, then the org+ * handshake. Mirrors tests/e2e/conftest.py::authed_session+ * deliberately — a change to that flow breaks both suites together+ * rather than silently skipping this one.+ *+ * auth0 Enterprise. The IdP owns the credential exchange, so there is no+ * API to POST to. Drive the hosted login form in the browser, then+ * let the app complete its own callback.+ *+ * Selected by UNSTRACT_AUTH_MODE, or auto-detected: a backend that answers+ * /api/v1/login with a 302 *and* then serves /api/v1/organization is OSS;+ * anything else is treated as auth0. Auto-detection matters because dev and CI+ * differ and neither should need a bespoke invocation.+ */++const BACKEND =+ process.env.UNSTRACT_BACKEND_URL?.replace(/\/$/, "") ??+ "http://localhost:8000";++/** Credentials. OSS defaults are the seeded dev pair; auth0 needs real ones. */+const USERNAME =+ process.env.UNSTRACT_ADMIN_USER ??+ process.env.UNSTRACT_AUTH0_USER ??+ "unstract";+const PASSWORD =+ process.env.UNSTRACT_ADMIN_PASSWORD ??+ process.env.UNSTRACT_AUTH0_PASSWORD ??+ "unstract";++/**+ * Fetch the org id from the API. Also the OSS liveness probe: a 401 here means+ * the session did not take, which is exactly how a cloud-auth backend behaves+ * when handed OSS mock-login credentials.+ */+async function fetchOrgId(context) {+ const res = await context.request+ .get(`${BACKEND}/api/v1/organization`, { failOnStatusCode: false })+ .catch(() => null);+ if (!res?.ok()) {+ return null;+ }+ return (await res.json())?.organizations?.[0]?.id ?? null;+}++/** OSS mock-login: form POST, then set the active organization. */+async function loginOss(context) {+ const login = await context.request+ .post(`${BACKEND}/api/v1/login`, {+ form: { username: USERNAME, password: PASSWORD },+ maxRedirects: 0,+ failOnStatusCode: false,+ })+ .catch(() => null);+ // 200 means the login form re-rendered: bad credentials.+ if (login?.status() !== 302) {+ return null;+ }++ const orgId = await fetchOrgId(context);+ if (!orgId) {+ return null;+ }++ const csrf = (await context.cookies()).find((c) => c.name === "csrftoken")+ ?.value;+ await context.request.post(`${BACKEND}/api/v1/organization/${orgId}/set`, {+ headers: csrf ? { "X-CSRFToken": csrf } : {},+ failOnStatusCode: false,+ });+ return orgId;+}++/**+ * Auth0: drive the hosted login form in a real browser.+ *+ * The IdP owns the credential exchange and sets its own cookies across a+ * redirect chain, so this cannot be done over the request API. Navigating to+ * the app root triggers the redirect to Auth0; filling the form there returns+ * through the app's callback with a session.+ */+async function loginAuth0(page, context) {+ await page.goto("/", { waitUntil: "domcontentloaded" }).catch(() => {});++ // Field names are stable across Auth0's templates (Universal Login and the+ // classic Lock widget).+ const user = page+ .locator('input[name="username"], input[name="email"], input#username')+ .first();+ if (!(await user.count())) {+ // Already authenticated (reused storage state), or not an Auth0 screen.+ return await fetchOrgId(context);+ }++ await user.fill(USERNAME);+ await page+ .locator('input[name="password"], input#password')+ .first()+ .fill(PASSWORD);+ await page+ .locator('button[type="submit"], button[name="action"]')+ .first()+ .click();++ // The callback bounces through the app; wait for it to settle rather than+ // guessing at a landing URL, which differs by tenant config.+ await page.waitForLoadState("networkidle").catch(() => {});+ return await fetchOrgId(context);+}++/** Resolve the auth mode, honouring an explicit override. */+function authMode() {+ const explicit = process.env.UNSTRACT_AUTH_MODE?.toLowerCase();+ return explicit === "oss" || explicit === "auth0" ? explicit : "auto";+}++async function authenticate(page, context) {+ const mode = authMode();++ if (mode === "oss" || mode === "auto") {+ const orgId = await loginOss(context);+ if (orgId) {+ return { orgId, mode: "oss" };+ }+ if (mode === "oss") {+ return { orgId: null, mode: "oss" };+ }+ // auto: OSS mock-login did not take — fall through to auth0.+ }++ const orgId = await loginAuth0(page, context);+ return { orgId, mode: "auth0" };+}++export const test = base.extend({+ /** `app.goto(route)` — navigate to an org-scoped route, or skip. */+ app: async ({ page, context }, use) => {+ const { orgId, mode } = await authenticate(page, context);+ await use({+ orgId,+ authMode: mode,+ async goto(route) {+ test.skip(+ !orgId,+ `could not authenticate against ${BACKEND} (mode=${mode}). ` ++ "Set UNSTRACT_AUTH_MODE=oss|auth0 plus credentials, or let the " ++ "rig boot a stack (`python -m tests.rig run ui`).",+ );+ const response = await page.goto(`/${orgId}/${route}`, {+ waitUntil: "domcontentloaded",+ });+ // The SPA renders after hydration; wait for the shell rather than a+ // fixed timeout so slow CI does not flake.+ await page.waitForLoadState("networkidle").catch(() => {});+ return response;+ },+ });+ },+});++export { expect };diff --git a/tests/e2e/ui/navigation.spec.js b/tests/e2e/ui/navigation.spec.jsnew file mode 100644index 000000000..4c1e624e0--- /dev/null+++ b/tests/e2e/ui/navigation.spec.js@@ -0,0 +1,80 @@+import { expect, test } from "./fixtures.js";++/**+ * Navigation — the sidebar is how every other page is reached.+ *+ * Not a critical path in its own right, but a break here blocks all of them, so+ * it earns a place in a deliberately small suite. One test walks the primary+ * destinations; the second covers the Platform fly-out, which is the only route+ * to the settings screens.+ */++/** Primary destinations, and a landmark that proves each one actually rendered. */+const DESTINATIONS = [+ { menu: "Prompt Studio", route: "tools", landmark: /New Project/i },+ { menu: "Workflows", route: "workflows", landmark: /New Workflow/i },+ { menu: "API Deployments", route: "api", landmark: /API Deployment/i },+ // "ETL Executions" is a Logs-only tab; a bare /Logs/ would also match the+ // Logs footer panel, which is present on every page.+ { menu: "Logs", route: "logs", landmark: /ETL Executions/i },+];++test.describe("navigation", () => {+ for (const { menu, route, landmark } of DESTINATIONS) {+ test(`the sidebar reaches ${menu}`, async ({ page, app }) => {+ // Start somewhere else so the click has to actually navigate.+ await app.goto("workflows");++ const item = page.locator(+ `[data-testid='sidebar-${menu.toLowerCase().replaceAll(/\s+/g, "-")}']`,+ );+ if ((await item.count()) === 0) {+ test.skip(true, `${menu} not present for this user/plan`);+ }+ await item.scrollIntoViewIfNeeded();+ await item.click();++ await expect(page, `${menu} did not navigate`).toHaveURL(+ new RegExp(`/${route}(/|$|\\?)`),+ { timeout: 20000 },+ );+ await expect(+ page.getByText(landmark).first(),+ `${menu} navigated but did not render`,+ ).toBeVisible({ timeout: 20000 });+ });+ }++ /*+ * The settings screens have no top-level sidebar entry — the Platform+ * fly-out is the only way in, so a user locked out of it cannot configure+ * adapters, users or platform keys at all.+ */+ test("the Platform fly-out reaches the settings screens", async ({+ page,+ app,+ }) => {+ await app.goto("tools");++ const item = page.locator("[data-testid='sidebar-platform']");+ if ((await item.count()) === 0) {+ test.skip(true, "Platform menu not present for this user");+ }+ await item.scrollIntoViewIfNeeded();+ await item.hover();++ /*+ * Was `.settings-sidebar-popover`, which the HITL fly-out ALSO uses — so+ * the locator was ambiguous the moment both were rendered. Each panel now+ * has its own id, and its entries derive theirs from the menu item keys.+ */+ const menu = page.getByTestId("platform-menu");+ await expect(menu, "Platform fly-out did not open").toBeVisible({+ timeout: 10000,+ });++ await menu.getByTestId("platform-menu-item-users").click();+ await expect(page).toHaveURL(/\/users(\/|$|\?)/, { timeout: 20000 });+ await expect(page.getByText(/Manage Users/i).first()).toBeVisible();+ });+});diff --git a/tests/e2e/ui/package.json b/tests/e2e/ui/package.jsonnew file mode 100644index 000000000..ded1ea963--- /dev/null+++ b/tests/e2e/ui/package.json@@ -0,0 +1,9 @@+{+ "name": "@unstract/ui-e2e",+ "private": true,+ "type": "module",+ "//": "These specs live here to sit alongside the other e2e suites, but the Playwright binary and @playwright/test are installed in ../../../frontend. This manifest points Node's resolver there so the specs can import them from outside that tree; frontend/playwright.config.js supplies testDir.",+ "dependencies": {+ "@playwright/test": "^1.49.0"+ }+}diff --git a/tests/e2e/ui/playwright.config.js b/tests/e2e/ui/playwright.config.jsnew file mode 100644index 000000000..e6ba12b2b--- /dev/null+++ b/tests/e2e/ui/playwright.config.js@@ -0,0 +1,72 @@+import { defineConfig, devices } from "@playwright/test";++/**+ * Playwright config for the `ui` rig group (tier: e2e).+ *+ * This is the tier the 348 Vitest tests structurally cannot cover: jsdom+ * computes no layout, so overflow, positioning and visual state are+ * unobservable there. Every UI defect found during the shadcn migration — a+ * toggle rendering blank, a nav arrow anchored to the wrong month, a filter row+ * breaking on a date range — was spotted by a human in a browser.+ *+ * Run it through the rig, which boots the platform and exports the URLs:+ * python -m tests.rig run ui+ *+ * Or standalone against an already-running stack:+ * UNSTRACT_FRONTEND_URL=http://localhost:3000 npx playwright test+ */++/*+ * The rig exports UNSTRACT_FRONTEND_URL when it brings the platform up; the+ * fallback matches the port compose publishes the frontend on.+ *+ * Deliberately no UNSTRACT_BACKEND_URL fallback. The frontend has its own+ * origin (:3000 vs the backend's :8000), and the rig always exports the backend+ * URL — so accepting it here would silently point every spec at the API and+ * make the :3000 default unreachable in exactly the case it exists for.+ */+const baseURL = process.env.UNSTRACT_FRONTEND_URL ?? "http://localhost:3000";++export default defineConfig({+ // Specs sit beside this config; `@playwright/test` is installed here too, so+ // the suite is self-contained and resolves without reaching into frontend/.+ testDir: ".",+ /*+ * `fullyParallel` off by default: these tests drive a shared platform with+ * shared org state, so parallel specs can see each other's writes. Turn it on+ * per-file once the suite has isolation.+ */+ fullyParallel: false,+ forbidOnly: Boolean(process.env.CI),+ retries: process.env.CI ? 1 : 0,+ workers: 1,+ /*+ * JUnit so the rig's `parse_junit` reads these results exactly like every+ * other group's. The rig sets PLAYWRIGHT_JUNIT_OUTPUT_NAME to the group's+ * junit.xml; the default keeps standalone runs from writing to the repo root.+ */+ reporter: [+ ["list"],+ [+ "junit",+ {+ outputFile:+ process.env.PLAYWRIGHT_JUNIT_OUTPUT_NAME ??+ "reports/ui/junit.xml",+ },+ ],+ ],+ use: {+ baseURL,+ // Artefacts only for failures — a green suite should leave nothing behind.+ trace: "on-first-retry",+ screenshot: "only-on-failure",+ video: "retain-on-failure",+ },+ projects: [+ {+ name: "chromium",+ use: { ...devices["Desktop Chrome"] },+ },+ ],+});diff --git a/tests/e2e/ui/prompt-studio.spec.js b/tests/e2e/ui/prompt-studio.spec.jsnew file mode 100644index 000000000..8d9378bfe--- /dev/null+++ b/tests/e2e/ui/prompt-studio.spec.js@@ -0,0 +1,89 @@+import { expect, test } from "./fixtures.js";++/**+ * Prompt Studio — the app's primary authoring surface.+ *+ * Covers the `prompt-studio-author` critical path from the UI side: a user can+ * reach the listing, open the create-project form, and the form enforces its+ * required fields. The API-side equivalent lives in tests/e2e/prompt_studio.+ *+ * Scope is deliberately narrow. Per tests/critical_paths.yaml: "We+ * intentionally do NOT chase 100% coverage." These assert that the critical+ * affordances exist and respond, not that every control is pixel-correct.+ */+test.describe("prompt studio", () => {+ test("the listing loads and offers project creation", async ({ page, app }) => {+ await app.goto("tools");++ await expect(+ page.getByRole("button", { name: /New Project/i }),+ "no way to create a project",+ ).toBeVisible();+ });++ /*+ * The create form is the entry point to `prompt-studio-author`. Asserting+ * that it validates — rather than that a project can be created — keeps the+ * test read-only, so it can run against any environment without leaving+ * fixtures behind.+ */+ test("the create-project form requires its mandatory fields", async ({+ page,+ app,+ }) => {+ await app.goto("tools");+ await page.getByRole("button", { name: /New Project/i }).click();++ const dialog = page.getByTestId("add-prompt-project-modal");+ await expect(dialog).toBeVisible();+ await expect(dialog.getByText(/Prompt Studio project name/i)).toBeVisible();++ /*+ * Submitting empty must surface field errors and keep the dialog open,+ * not silently close or POST a half-built project.+ *+ * The message asserted here is the SERVER's ("This field may not be+ * blank."), verified against a running app — the client-side string in+ * AddCustomToolFormModal.jsx never renders, because the submit reaches the+ * API before antd's own validation shows.+ */+ // The footer button reads "Save" here and "Update" in the edit flow, so+ // its id is the stable handle, not its label.+ await dialog.getByTestId("add-prompt-project-modal-ok").click();+ await expect(+ dialog.getByText(/may not be blank/i).first(),+ ).toBeVisible();+ await expect(dialog).toBeVisible();+ });++ /*+ * Opening a project is the gateway to every prompt operation. The Document+ * Parser tab is the authoring surface itself, so its absence means the+ * project failed to load rather than merely rendering oddly.+ */+ test("an existing project opens on the Document Parser", async ({+ page,+ app,+ }) => {+ await app.goto("tools");++ /*+ * Was `.list-view-row`, which stopped matching anything when the listing+ * moved to ResourceTable — so this test silently SKIPPED rather than+ * failing. Rows now carry an id minted from the project's tool_id.+ */+ const project = page+ .locator('[data-testid^="prompt-studio-list-row-"]')+ .first();+ if ((await project.count()) === 0) {+ test.skip(true, "no prompt studio projects in this org");+ }+ await project.click();++ await expect(+ page.getByText("Document Parser").first(),+ "project did not open on its authoring surface",+ ).toBeVisible({ timeout: 20000 });+ await expect(page.getByText("Combined Output").first()).toBeVisible();+ });+});diff --git a/tests/e2e/ui/settings.spec.js b/tests/e2e/ui/settings.spec.jsnew file mode 100644index 000000000..fdb33cb64--- /dev/null+++ b/tests/e2e/ui/settings.spec.js@@ -0,0 +1,60 @@+import { expect, test } from "./fixtures.js";++/**+ * Adapter settings — the UI side of `adapter-register-llm`.+ *+ * Adapters are a hard prerequisite: with no LLM configured, Prompt Studio and+ * every workflow that calls a model are dead. This asserts each adapter screen+ * loads and offers registration; the credential round-trip itself is covered+ * API-side in integration-backend, where it belongs.+ */++/*+ * `type` is the value the route passes to ToolSettings, which is what the add+ * button's id is built from — the button's LABEL ("New Text Extractor") is+ * per-route copy and the first thing i18n would break.+ */+const ADAPTERS = [+ { route: "settings/llms", type: "llm" },+ { route: "settings/vectorDbs", type: "vector_db" },+ { route: "settings/embedding", type: "embedding" },+ { route: "settings/textExtractor", type: "x2text" },+];++test.describe("adapter settings", () => {+ for (const { route, type } of ADAPTERS) {+ test(`${route} loads and offers registration`, async ({ page, app }) => {+ await app.goto(route);++ await expect(+ page.getByTestId(`${type}-adapter-add-btn`),+ `${route} offers no way to add an adapter`,+ ).toBeVisible({ timeout: 20000 });+ });+ }++ /*+ * Opening the picker is where registration actually begins: it lists the+ * available providers. An empty or absent list means the adapter registry+ * did not load, which is indistinguishable from "no adapters supported".+ */+ test("the LLM picker lists providers to choose from", async ({+ page,+ app,+ }) => {+ await app.goto("settings/llms");+ await page.getByTestId("llm-adapter-add-btn").click();++ const dialog = page.getByTestId("add-source-modal");+ await expect(dialog).toBeVisible({ timeout: 20000 });+ /*+ * Was `img, [class*='card']` — a substring match on a class name, which+ * would match any styled box in the dialog (or nothing, after a restyle).+ * Provider cards now carry an id built from the adapter's own id.+ */+ await expect(+ dialog.locator('[data-testid^="ds-card-"]').first(),+ "provider list did not render",+ ).toBeVisible();+ });+});diff --git a/tests/e2e/ui/smoke.spec.js b/tests/e2e/ui/smoke.spec.jsnew file mode 100644index 000000000..bc57f3249--- /dev/null+++ b/tests/e2e/ui/smoke.spec.js@@ -0,0 +1,46 @@+import { expect, test } from "@playwright/test";++/**+ * Scaffolding smoke test for the `ui` rig group.+ *+ * Deliberately minimal: it proves the harness works end to end — config+ * resolves, a browser launches, the app is reachable, and JUnit lands where the+ * rig expects it — without asserting anything about a specific screen. Real UI+ * assertions go in sibling spec files.+ *+ * It skips rather than fails when nothing is serving, so running the specs+ * directly on a machine with no platform reports "skipped", not a red build.+ * The group is `optional` in groups.yaml for the same reason.+ *+ * That skip is gated on UNSTRACT_RIG_SESSION_ID, which `tests/rig/cli.py` sets+ * unconditionally for every group that declares `requires_platform`. When it+ * is present the rig booted the stack and `_wait_ready` already proved the+ * frontend answers, so an unreachable app is a REAL failure — swallowing it+ * there let the whole group report success without ever opening the UI.+ */+const RIG_MANAGED = Boolean(process.env.UNSTRACT_RIG_SESSION_ID);++test.describe("ui harness", () => {+ test("the app serves a document", async ({ page, baseURL }) => {+ let response;+ try {+ response = await page.goto("/", { waitUntil: "domcontentloaded" });+ } catch (err) {+ if (RIG_MANAGED) {+ throw new Error(+ `the rig reported the platform up, but nothing is serving at ` ++ `${baseURL}: ${err.message}`,+ );+ }+ test.skip(true, `no app reachable at ${baseURL}: ${err.message}`);+ return;+ }++ // A redirect to the login page is a perfectly good "it's alive" — assert+ // reachability, not a particular route.+ expect(response?.status(), `unexpected status from ${baseURL}`).toBeLessThan(+ 400,+ );+ await expect(page).toHaveTitle(/.+/);+ });+});diff --git a/tests/e2e/ui/workflows.spec.js b/tests/e2e/ui/workflows.spec.jsnew file mode 100644index 000000000..49fccf9d7--- /dev/null+++ b/tests/e2e/ui/workflows.spec.js@@ -0,0 +1,126 @@+import { expect, test } from "./fixtures.js";++/**+ * Workflows — authoring and the API-deployment surface.+ *+ * Covers the UI side of `workflow-author` and `api-deployment-provision`. The+ * execution half (`workflow-create-execute`) is API-driven and already lives in+ * tests/e2e/workflows; duplicating it through a browser would be slower and+ * flakier for no extra signal.+ */+test.describe("workflows", () => {+ test("the listing loads and offers workflow creation", async ({+ page,+ app,+ }) => {+ await app.goto("workflows");++ await expect(+ page.getByRole("button", { name: /New Workflow/i }),+ "no way to create a workflow",+ ).toBeVisible();+ });++ /*+ * Read-only check of the `workflow-author` entry point: the form opens and+ * enforces its required fields, so a half-built workflow cannot be POSTed.+ */+ test("the create-workflow form requires its mandatory fields", async ({+ page,+ app,+ }) => {+ await app.goto("workflows");+ await page.getByRole("button", { name: /New Workflow/i }).click();++ const dialog = page.getByTestId("new-workflow-modal");+ await expect(dialog).toBeVisible();++ /*+ * Asserting the dialog STAYS OPEN, not that a particular message appears.+ * Verified against a running app: submitting this form empty renders no+ * error text at all — the guard is that it refuses to proceed, which is+ * what actually protects against a half-built workflow being created.+ */+ // "Create Workflow" here, "Edit Workflow" in the edit flow — same button.+ await dialog.getByTestId("new-workflow-modal-ok").click();+ await expect(dialog, "empty form was accepted").toBeVisible();+ await expect(page).toHaveURL(/\/workflows(\/|$|\?)/);+ });++ /*+ * Opening a workflow must reach its builder. The Actions menu is the entry+ * point for running it and for viewing file history, so its presence is the+ * cheapest proof the detail page wired up rather than half-rendering.+ */+ test("a workflow opens and exposes its actions", async ({ page, app }) => {+ await app.goto("workflows");++ // Was `.list-view-row` — dead since the ResourceTable migration, which+ // made this test skip instead of fail. See prompt-studio.spec.js.+ const card = page.locator('[data-testid^="workflow-list-row-"]').first();+ if ((await card.count()) === 0) {+ test.skip(true, "no workflows in this org");+ }+ await card.click();++ const actions = page.getByTestId("workflow-actions-btn");+ await expect(actions, "workflow detail has no Actions menu").toBeVisible({+ timeout: 20000,+ });++ // The menu is portalled; its entries derive their ids from the Dropdown's.+ await actions.click();+ await expect(+ page.getByTestId("workflow-actions-item-run-workflow"),+ ).toBeVisible();+ });+});++/**+ * API deployments — `api-deployment-provision` from the UI side.+ *+ * The deployment's endpoint and key are what downstream callers depend on, so+ * the listing surfacing them is the thing worth guarding here. Actually calling+ * the endpoint is covered API-side in tests/e2e/api_deployment.+ */+test.describe("api deployments", () => {+ test("the listing loads and offers a new deployment", async ({+ page,+ app,+ }) => {+ await app.goto("api");++ await expect(+ page.getByRole("button", { name: /API Deployment/i }).first(),+ "no way to create an API deployment",+ ).toBeVisible();+ });++ test("a deployment exposes its endpoint and management controls", async ({+ page,+ app,+ }) => {+ await app.goto("api");++ /*+ * Scope to ONE deployment card rather than taking `.first()` of a+ * page-wide `[role=switch]`: that locator would happily match a switch+ * belonging to a different card, or to no card at all.+ */+ const card = page+ .locator('[data-testid^="api-deployment-list-card-"]')+ .first();+ if ((await card.count()) === 0) {+ test.skip(true, "no API deployments in this org");+ }++ await expect(card.getByText(/API Endpoint/i).first()).toBeVisible();++ // The enable/disable toggle is the control that takes a deployment in and+ // out of service — the single most consequential switch on this page.+ await expect(+ card.locator('[data-testid^="api-deployment-toggle-"]'),+ "deployment has no enable/disable control",+ ).toBeVisible();+ });+});diff --git a/tests/groups.yaml b/tests/groups.yamlindex d2c35e34d..24e07e940 100644--- a/tests/groups.yaml+++ b/tests/groups.yaml@@ -46,6 +46,22 @@ defaults:groups:# ── Unit tier: pure pytest, no external services ───────────────────────────+ frontend:+ # Vitest + React Testing Library over jsdom — the antd→shadcn shims and the+ # components built on them. Node, not Python: no uv_sync_group, and the+ # runner points vitest's own JUnit reporter at the group's junit.xml, so+ # results come through per-test rather than as one synthetic row.+ #+ # `optional` because CI images without `node_modules` should skip this+ # rather than fail: the runner exits 5 ("nothing collected") when npx is+ # absent, and optional keeps that from gating the overall result.+ tier: unit+ runner: vitest+ workdir: frontend+ paths: [src]+ timeout_seconds: 900+ optional: true+unit-rig:# Rig self-tests. Run from repo root so the `tests.rig` import resolves.tier: unit@@ -236,3 +252,28 @@ groups:requires_platform: truedepends_on: [e2e-smoke]optional: true++ ui:+ # Playwright browser e2e over the real UI. Scaffolding only for now — the+ # spec directory holds a single smoke test; extend it here.+ #+ # This is the tier that the 348 vitest tests structurally cannot cover:+ # jsdom computes no layout, so overflow, positioning and visual state are+ # unobservable there. Every UI defect found during the shadcn migration was+ # spotted by a human in a browser, not by the unit suite.+ #+ # `requires_platform` so the rig boots the stack and exports the endpoints:+ # the Playwright config takes its baseURL from UNSTRACT_FRONTEND_URL, and+ # fixtures.js drives the API through UNSTRACT_BACKEND_URL.+ # `optional` until the suite is real: no browsers installed (or no+ # node_modules) must skip, not gate merges.+ tier: e2e+ runner: playwright+ # Self-contained: specs, playwright.config.js and @playwright/test all live+ # in tests/e2e/ui, colocated with the other e2e suites.+ workdir: tests/e2e/ui+ paths: ["."]+ requires_platform: true+ depends_on: [e2e-smoke]+ timeout_seconds: 1800+ optional: truediff --git a/tests/rig/cli.py b/tests/rig/cli.pyindex caeafae07..6c4f2e160 100644--- a/tests/rig/cli.py+++ b/tests/rig/cli.py@@ -912,6 +912,7 @@ def _execute_group(env.update(group_env)if endpoints is not None:env.setdefault("UNSTRACT_BACKEND_URL", endpoints.backend_url)+ env.setdefault("UNSTRACT_FRONTEND_URL", endpoints.frontend_url)env.setdefault("UNSTRACT_PROMPT_SERVICE_URL", endpoints.prompt_service_url)env.setdefault("UNSTRACT_PLATFORM_SERVICE_URL", endpoints.platform_service_url)env.setdefault("UNSTRACT_RUNNER_URL", endpoints.runner_url)@@ -938,6 +939,19 @@ def _execute_group(cmd = _hurl_command(group, workdir)exit_code = _spawn(cmd, env=env, cwd=workdir, timeout=timeout)_write_synthetic_junit_safe(junit, group.name, exit_code)+ elif group.runner in ("vitest", "playwright"):+ # Playwright's JUnit path comes from its config, not a flag; the config+ # reads this. Harmless for vitest, which takes --outputFile.+ env.setdefault("PLAYWRIGHT_JUNIT_OUTPUT_NAME", str(junit))+ cmd = _node_command(group, junit=junit)+ exit_code = _spawn(cmd, env=env, cwd=workdir, timeout=timeout)+ # Both runners write real JUnit themselves, so there is nothing to+ # synthesise on the happy path. A crash before the reporter flushes+ # (missing node_modules, a config error) leaves no file at all, which+ # `parse_junit` reports as a missing group rather than a failure — so+ # backfill one to keep a red run visible in the summary.+ if not junit.exists():+ _write_synthetic_junit_safe(junit, group.name, exit_code)elif (isolation_error := _config_isolation_error(group, workdir)) is not None:print(isolation_error, file=sys.stderr)# 4 is pytest's usage-error code, so this gates like any hard failure.@@ -1199,6 +1213,54 @@ def _pytest_command(return cmd+def _node_command(+ group: GroupDefinition,+ *,+ junit: Path,+) -> list[str]:+ """Build the command for a Node-based group (`vitest` / `playwright`).++ Both write JUnit natively, so the rig points their reporter straight at the+ same `junit.xml` every other group writes and `parse_junit` reads it+ unchanged — vitest's `<testsuites>` root is already the shape it expects.++ `npx --no-install` on purpose: silently downloading a runner mid-run would+ turn a missing dependency into a slow, network-dependent surprise. Without+ `node_modules` this exits non-zero and the caller backfills a red junit.+ """+ if not shutil.which("npx"):+ # Same convention as `_hurl_command`'s empty-file case: exit 5 reads as+ # "nothing collected" rather than a failure, so a machine without Node+ # does not turn the whole run red.+ print(+ f"[rig] npx not found; skipping {group.name} (runner={group.runner})",+ file=sys.stderr,+ )+ return ["sh", "-c", "exit 5"]++ if group.runner == "vitest":+ cmd = [+ "npx",+ "--no-install",+ "vitest",+ "run",+ "--reporter=junit",+ f"--outputFile={junit}",+ ]+ # `paths` are optional for vitest: with none it runs the whole suite,+ # which is what the `frontend` group wants.+ cmd += [str(p) for p in group.paths if p not in (".", "")]+ return cmd++ # Playwright takes its reporter output path from config, not a CLI flag, so+ # the config reads PLAYWRIGHT_JUNIT_OUTPUT_NAME — which the rig exports in+ # `_group_env`. `--timeout` is per-test milliseconds, distinct from the+ # rig's whole-group timeout, so it is deliberately not derived from it.+ cmd = ["npx", "--no-install", "playwright", "test"]+ cmd += [str(p) for p in group.paths if p not in (".", "")]+ return cmd++def _hurl_command(group: GroupDefinition, workdir: Path) -> list[str]:files: list[str] = []for p in group.paths:diff --git a/tests/rig/groups.py b/tests/rig/groups.pyindex c7ee09ed3..46084b7a7 100644--- a/tests/rig/groups.py+++ b/tests/rig/groups.py@@ -19,7 +19,11 @@ from typing import Any, Literal, get_argsimport yamlTier = Literal["unit", "integration", "e2e"]-Runner = Literal["pytest", "hurl"]+# `vitest` and `playwright` drive the frontend suites, which are Node projects+# rather than Python ones: their `workdir` is `frontend`, they take no+# `uv_sync_group`, and both emit real JUnit that `parse_junit` reads directly —+# so unlike `hurl` they report per-test results, not one synthetic row.+Runner = Literal["pytest", "hurl", "vitest", "playwright"]TIERS: tuple[Tier, ...] = get_args(Tier)RUNNERS: tuple[Runner, ...] = get_args(Runner)diff --git a/tests/rig/runtime.py b/tests/rig/runtime.pyindex 5fbb5ce3e..64aeb7e1d 100644--- a/tests/rig/runtime.py+++ b/tests/rig/runtime.py@@ -124,6 +124,10 @@ class PlatformEndpoints:platform_service_url: strrunner_url: strx2text_url: str+ # Served on its own origin, not behind the backend: compose publishes the+ # frontend on :3000 and the backend on :8000. Browser-driven groups need+ # this one — pointing them at `backend_url` lands on the API instead.+ frontend_url: str = "http://localhost:3000"admin_user: str = "unstract"admin_password: str = "unstract"infra: InfraEndpoints = field(default_factory=InfraEndpoints)@@ -145,6 +149,9 @@ class PlatformEndpoints:),runner_url=os.environ.get("UNSTRACT_RUNNER_URL", "http://localhost:5002"),x2text_url=os.environ.get("UNSTRACT_X2TEXT_URL", "http://localhost:3004"),+ frontend_url=os.environ.get(+ "UNSTRACT_FRONTEND_URL", "http://localhost:3000"+ ),admin_user=os.environ.get("UNSTRACT_ADMIN_USER", "unstract"),admin_password=os.environ.get("UNSTRACT_ADMIN_PASSWORD", "unstract"),infra=infra or InfraEndpoints(),@@ -409,11 +416,18 @@ def health_targets(endpoints: PlatformEndpoints) -> list[tuple[str, str]]:and there is no standalone prompt-service (folded into workers). The runneris intentionally absent — container-based execution is being retired infavour of in-worker execution, so e2e must not depend on it being up.++ The frontend probes ``/`` rather than a health path: it is nginx serving a+ static SPA, so there is no health endpoint to hit and index.html answering+ 200 is exactly the liveness signal. Without it the browser-driven ``ui``+ group would sail past ``_wait_ready`` with nothing serving on :3000 and+ then skip itself, reporting success while never opening the app."""return [("backend", endpoints.backend_url.rstrip("/") + "/health"),("platform-service", endpoints.platform_service_url.rstrip("/") + "/health"),("x2text-service", endpoints.x2text_url.rstrip("/") + "/api/v1/x2text/health"),+ ("frontend", endpoints.frontend_url.rstrip("/") + "/"),]diff --git a/tests/rig/tests/test_cli.py b/tests/rig/tests/test_cli.pyindex 53495a24d..13fbb349f 100644--- a/tests/rig/tests/test_cli.py+++ b/tests/rig/tests/test_cli.py@@ -838,6 +838,64 @@ def test_failed_gate_blocks_dependents_and_cascades(tmp_path: Path, monkeypatch)assert (reports_dir / "e2e-leaf" / "junit.xml").exists()+def test_node_command_vitest_points_reporter_at_group_junit(tmp_path: Path) -> None:+ """The whole reason `vitest` is a first-class runner rather than a synthetic+ one-row wrapper: it writes real JUnit, so `parse_junit` reports per-test+ counts. That only holds if the reporter is aimed at the group's junit.xml.+ """+ import tests.rig.cli as cli_mod+ from tests.rig.groups import GroupDefinition++ group = GroupDefinition(+ name="frontend", tier="unit", paths=("src",), runner="vitest",+ workdir="frontend",+ )+ junit = tmp_path / "frontend" / "junit.xml"+ cmd = cli_mod._node_command(group, junit=junit)++ assert cmd[:4] == ["npx", "--no-install", "vitest", "run"]+ assert "--reporter=junit" in cmd+ assert f"--outputFile={junit}" in cmd+ assert cmd[-1] == "src"+++def test_node_command_playwright_takes_junit_from_env_not_flag(tmp_path: Path) -> None:+ """Playwright reads its reporter path from config (PLAYWRIGHT_JUNIT_OUTPUT_NAME),+ not a CLI flag — passing --outputFile would make it fail to parse args.+ """+ import tests.rig.cli as cli_mod+ from tests.rig.groups import GroupDefinition++ group = GroupDefinition(+ name="ui", tier="e2e", paths=("tests/ui",), runner="playwright",+ workdir="frontend",+ )+ cmd = cli_mod._node_command(group, junit=tmp_path / "junit.xml")++ assert cmd[:4] == ["npx", "--no-install", "playwright", "test"]+ assert not any(c.startswith("--outputFile") for c in cmd)+ assert cmd[-1] == "tests/ui"+++def test_node_command_without_npx_collects_nothing(+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch+) -> None:+ """A machine with no Node must SKIP these groups, not fail them: exit 5 is+ the rig's "nothing collected" convention (same as an empty hurl group).+ """+ import tests.rig.cli as cli_mod+ from tests.rig.groups import GroupDefinition++ monkeypatch.setattr(cli_mod.shutil, "which", lambda _: None)+ group = GroupDefinition(+ name="frontend", tier="unit", paths=("src",), runner="vitest",+ workdir="frontend",+ )+ assert cli_mod._node_command(group, junit=tmp_path / "junit.xml") == [+ "sh", "-c", "exit 5",+ ]++def _make_group(name: str, workdir: str):from tests.rig.groups import GroupDefinition