mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-01 20:56:02 +09:00
## What this PR does backup-utils.ts (in the in-tree console dashboard) had no test file at all, despite sibling files in the same directory (dynamic-options.test.ts, crd-option-sources.test.ts, immutable-paths.test.ts) establishing that convention. Adds backup-utils.test.ts covering enrichSchemaWithEnums: the non-object passthrough, a path with no match in the enum map, a top-level enum attach, a nested one, and that the caller's path array is not mutated (verified by reading the function, it builds a new array via spread on every recursive call rather than mutating the one it receives). Test-only change, no production code touched. Verified with vitest run src/lib/backup-utils.test.ts (5 tests pass) and tsc --noEmit (no new errors). ### Screenshots N/A, test-only change, no UI impact. ### Downstream repositories Walked the trigger map in docs/agents/contributing.md against the diff. This is a single new test file for a pure function, no production code, schema, API, CRD, annotation, or naming changed. - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note NONE ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Tests** - Added coverage for schema enum enrichment, including top-level and nested paths. - Verified that unrelated schemas remain unchanged. - Confirmed unmatched paths and caller-provided path arrays are handled safely. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
cozystack-ui
Cozystack Marketplace and Console UI — a pure SPA that talks directly to the
Kubernetes API. No BFF, no controller-generated configuration: all UI entities
are discovered dynamically from ApplicationDefinitions in the cluster.
Structure
apps/console— React + Vite SPApackages/k8s-client— fetch-based Kubernetes client with watchpackages/ui— shared UI components (Tailwind + Base UI)packages/types— shared TypeScript types
Requirements
- Node.js ≥ 20
- pnpm ≥ 9
kubectl proxyfor local development (proxies/apiand/apis)
Development
pnpm install
# in one terminal:
kubectl proxy --port 8001
# in another terminal:
pnpm dev
The app becomes available at http://localhost:3001/.
Build
pnpm build
The console is built into apps/console/dist/.
Test
pnpm test
Runs the workspace test suites (vitest + jsdom for the console).