Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
592daca
Start adding changes to address json fields
olaservo Feb 26, 2025
0e29e2c
Resolve issues where JSON fields are not being rendered in form mode
olaservo Feb 27, 2025
0b105b2
Extract functions
olaservo Feb 27, 2025
0747479
Handle edge case and add tests for functions
olaservo Feb 27, 2025
ede1ea0
Merge branch 'main' into handle-empty-json-fields
olaservo Feb 27, 2025
d4a64fb
Add client tests to workflow
olaservo Feb 27, 2025
90ce628
Test workflow in my branch
olaservo Feb 27, 2025
426fb87
Remove comment ans trigger workflow run
olaservo Feb 27, 2025
238c228
Fix formatting
olaservo Feb 27, 2025
8ac7ef0
Fix path to client
olaservo Feb 27, 2025
720480c
Remove console.warn and extra comments to reduce code noise
olaservo Feb 27, 2025
d1f5b3b
Fix formatting
olaservo Feb 27, 2025
abd4877
Revert to only run on main
olaservo Feb 27, 2025
6ec82e2
Remove some fluff
olaservo Feb 27, 2025
44982e6
Default to nulls and update tests
olaservo Feb 28, 2025
82bbe58
Fix formatting
olaservo Feb 28, 2025
a1eb343
Remove unused function plus tests
olaservo Feb 28, 2025
0e50b68
Fix formatting
olaservo Feb 28, 2025
36aa731
Fix issue where array type defaults to object
olaservo Feb 28, 2025
e7f55f0
Fix formatting
olaservo Feb 28, 2025
b01e386
Always use JSON mode if the schema type is object and has no properties
olaservo Feb 28, 2025
06773bb
Fix formatting
olaservo Feb 28, 2025
1ae77e9
Merge branch 'main' into handle-empty-json-fields
olaservo Mar 1, 2025
f9b105c
Use debounce instead
olaservo Mar 5, 2025
dd02b69
Merge branch 'handle-empty-json-fields' of https://github.com/olaserv…
olaservo Mar 5, 2025
00836db
Fix formatting
olaservo Mar 5, 2025
4efe7d7
Merge branch 'main' into handle-empty-json-fields
olaservo Mar 5, 2025
b9b116a
Remove duplicate react-dialog from merge
olaservo Mar 5, 2025
1ff410c
Merge branch 'main' into handle-empty-json-fields
olaservo Mar 10, 2025
1f214de
Merge branch 'main' into handle-empty-json-fields
olaservo Mar 13, 2025
a3740c4
Remove unneeded DynamicJsonForm.tsx
olaservo Mar 16, 2025
7c4ed6a
Use working-directory instead of cd to client
olaservo Mar 16, 2025
e1b015e
Add comments explaining extra parsing logic
olaservo Mar 16, 2025
50a65d0
Use generateDefaultValue for object and array defaults
olaservo Mar 16, 2025
cae7c76
Fix formatting
olaservo Mar 16, 2025
28978ea
Update package lock after re-running npm install
olaservo Mar 16, 2025
50131c6
Merge branch 'main' into handle-empty-json-fields
olaservo Mar 16, 2025
7ddba51
Generate empty objects and arrays for non required object and array f…
olaservo Mar 17, 2025
a85d5e7
Fix formatting
olaservo Mar 17, 2025
c463dc5
Simplify check for defaults and add another test
olaservo Mar 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
# Working around https://github.com/npm/cli/issues/4828
# - run: npm ci
- run: npm install --no-package-lock

- name: Run client tests
working-directory: ./client
run: npm test

- run: npm run build

publish:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ server/build
client/dist
client/tsconfig.app.tsbuildinfo
client/tsconfig.node.tsbuildinfo
.vscode
37 changes: 37 additions & 0 deletions client/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "jsdom",
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
"^../components/DynamicJsonForm$":
"<rootDir>/src/utils/__mocks__/DynamicJsonForm.ts",
"^../../components/DynamicJsonForm$":
"<rootDir>/src/utils/__mocks__/DynamicJsonForm.ts",
},
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
useESM: true,
jsx: "react-jsx",
tsconfig: "tsconfig.jest.json",
},
],
},
extensionsToTreatAsEsm: [".ts", ".tsx"],
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
// Exclude directories and files that don't need to be tested
testPathIgnorePatterns: [
"/node_modules/",
"/dist/",
"/bin/",
"\\.config\\.(js|ts|cjs|mjs)$",
],
// Exclude the same patterns from coverage reports
coveragePathIgnorePatterns: [
"/node_modules/",
"/dist/",
"/bin/",
"\\.config\\.(js|ts|cjs|mjs)$",
],
};
11 changes: 9 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
"preview": "vite preview",
"test": "jest --config jest.config.cjs",
"test:watch": "jest --config jest.config.cjs --watch"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.6.1",
Expand All @@ -35,8 +37,8 @@
"clsx": "^2.1.1",
"cmdk": "^1.0.4",
"lucide-react": "^0.447.0",
"prismjs": "^1.29.0",
"pkce-challenge": "^4.1.0",
"prismjs": "^1.29.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-simple-code-editor": "^0.14.1",
Expand All @@ -48,18 +50,23 @@
},
"devDependencies": {
"@eslint/js": "^9.11.1",
"@types/jest": "^29.5.14",
"@types/node": "^22.7.5",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@types/serve-handler": "^6.1.4",
"@vitejs/plugin-react": "^4.3.2",
"autoprefixer": "^10.4.20",
"co": "^4.6.0",
"eslint": "^9.11.1",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.12",
"globals": "^15.9.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.13",
"ts-jest": "^29.2.6",
"typescript": "^5.5.3",
"typescript-eslint": "^8.7.0",
"vite": "^5.4.8"
Expand Down
Loading