fix(schemas): Phase 2.K cascade — flip deferred 10 wire keys#1435
fix(schemas): Phase 2.K cascade — flip deferred 10 wire keys#1435leecalcote merged 3 commits intomasterfrom
Conversation
…erage Pulls in the 10 canonical camelCase wire keys added in meshery/schemas PR #834 (MesheryPattern / Design counts, designType, TeamMember.joinedAt, Schedule.lastRun / nextRun). No source changes in this commit — the consuming flips land in the follow-up. Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
…e 2.K cascade) Completes the Option B Phase 2.K cascade now that meshery/schemas PR #834 (v1.2.0) publishes the canonical camelCase wire keys. Surgical field-rename only — no behavioural or structural changes. Flips (46 sites across 9 files): • view_count → viewCount (MesheryPattern / Design v1beta3) • download_count → downloadCount (MesheryPattern / Design v1beta3) • clone_count → cloneCount (MesheryPattern / Design v1beta3) • deployment_count → deploymentCount (MesheryPattern / Design v1beta3) • share_count → shareCount (MesheryPattern / Design v1beta3) • design_type → designType (MesheryPattern / Design v1beta3) • joined_at → joinedAt (TeamMember / Team v1beta2) • last_run → lastRun (Schedule v1beta2) • next_run → nextRun (Schedule v1beta2) Intentionally NOT flipped in this PR (documented inline with TODOs): • team_name (src/custom/Workspaces/types.ts) — deferred until meshery-cloud renames the SQL alias on Team; flipping without the server rename would break the wire. • team_ids / team_names (src/custom/TeamTable/TeamTableConfiguration.tsx) — deferred until the meshery-cloud bulk-delete handler lands dual-accept (camel + legacy snake) to avoid a client-only flip breaking the POST body. Refs: meshery/schemas#832 (closed), meshery/schemas#834 (canonical coverage, merged) Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
Minor bump (0.19.1 → 0.20.0). Treated as a breaking change for external consumers that read these snake_case keys off typed Sistent responses — they must move to the canonical camelCase field names shipped in this PR. Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
There was a problem hiding this comment.
Code Review
This pull request bumps the package version to 0.20.0 and updates the @meshery/schemas dependency. The primary change involves a widespread refactor to transition property names from snake_case to camelCase across several components, including CatalogCard, CatalogDesignTable, and UsersTable, to ensure consistent naming conventions. Additionally, TODO comments have been added to identify fields like team_name that require server-side alignment before they can be safely renamed. I have no feedback to provide as there were no review comments to assess.
There was a problem hiding this comment.
Pull request overview
This PR completes the Phase 2.K casing migration by upgrading @meshery/schemas and flipping remaining snake_case wire keys to their canonical camelCase equivalents across Sistent’s catalog/team/user UI components.
Changes:
- Bump
@meshery/schemasto^1.2.0and Sistent version to0.20.0. - Update UI metric field accesses and table column identifiers from snake_case to camelCase (e.g.,
view_count→viewCount,joined_at→joinedAt,last_run→lastRun). - Add inline TODO notes for intentionally deferred snake_case keys that still depend on meshery-cloud server behavior.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/custom/Workspaces/types.ts | Documents intentional retention of team_name until server-side alias changes. |
| src/custom/UsersTable/UsersTable.tsx | Updates table column keys from joined_at to joinedAt. |
| src/custom/TeamTable/TeamTableConfiguration.tsx | Adds TODO clarifying deferred outbound body key flips for bulk delete. |
| src/custom/ResponsiveDataTable.tsx | Updates date-column detection list to use joinedAt / lastRun / nextRun. |
| src/custom/PerformersSection/PerformersSection.tsx | Updates metric countKey fields to camelCase for ordering and display. |
| src/custom/CustomCatalog/CustomCard.tsx | Updates Pattern interface + metric rendering to camelCase count fields. |
| src/custom/CatalogDetail/MetricsDisplay.tsx | Updates details metric reads to camelCase. |
| src/custom/CatalogDesignTable/columnConfig.tsx | Updates column identifiers and responsive view keys to camelCase. |
| src/custom/CatalogCard/CatalogCard.tsx | Updates displayed metric field accesses to camelCase. |
| package.json | Bumps package version to 0.20.0 and updates @meshery/schemas to ^1.2.0. |
| package-lock.json | Updates lockfile for new version and dependency graph reflecting @meshery/schemas@1.2.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
leecalcote
left a comment
There was a problem hiding this comment.
Phase 2.K cascade — 46 sites flipped; Sistent 0.20.0. Matches schemas v1.2.0 canonical coverage.
Summary
Completes the Option B Phase 2.K cascade now that
meshery/schemasPR #834 has merged and@meshery/schemas@1.2.0is published. Flips the last 10 snake_case wire keys that schemas now covers on the canonical camelCase contract.Refs:
Changes
chore(deps)— bump@meshery/schemasfrom^1.1.1→^1.2.0.fix(schemas)— 46 surgical site flips across 9 files:MesheryPattern/Designv1beta3view_count→viewCountMesheryPattern/Designv1beta3download_count→downloadCountMesheryPattern/Designv1beta3clone_count→cloneCountMesheryPattern/Designv1beta3deployment_count→deploymentCountMesheryPattern/Designv1beta3share_count→shareCountMesheryPattern/Designv1beta3design_type→designTypeTeamMember/Teamv1beta2joined_at→joinedAtSchedulev1beta2last_run→lastRunSchedulev1beta2next_run→nextRunTouched files:
src/custom/CustomCatalog/CustomCard.tsx(10 sites —Patterntype + render)src/custom/CatalogCard/CatalogCard.tsx(5 sites)src/custom/CatalogDetail/MetricsDisplay.tsx(5 sites)src/custom/PerformersSection/PerformersSection.tsx(5 sites —countKey+order)src/custom/CatalogDesignTable/columnConfig.tsx(12 sites —colViews+ columnnameidentifiers)src/custom/UsersTable/UsersTable.tsx(2 sites)src/custom/ResponsiveDataTable.tsx(3 sites — date-render sort literals)chore(release)— bump Sistent0.19.1→0.20.0(minor; treated as breaking for external consumers that read these keys off typed Sistent responses).Intentional non-flips (preserved with inline TODOs)
Two sites in the audit were deliberately not flipped in this PR to avoid client-only changes that would break the wire:
team_nameinsrc/custom/Workspaces/types.ts— this is a SQL alias ofTeam.nameon the meshery-cloud side. Flipping toteamNamehere without a coordinated server rename would desync the wire. TODO left in-file.team_ids/team_namesinsrc/custom/TeamTable/TeamTableConfiguration.tsx— outbound POST body keys for bulk team-delete; awaiting the meshery-cloud handler PR that lands dual-accept (camel + legacy snake). TODO left in-file.Both will be flipped in a later coordinated PR once the server-side changes land.
Test plan
npm install --legacy-peer-deps— resolves@meshery/schemas@1.2.0npm run build— tsup CJS / ESM / DTS all succeednpm run lint— ESLint cleannpm test— 7 suites / 21 tests passinggrep -rn "view_count|download_count|clone_count|deployment_count|share_count|design_type|joined_at|last_run|next_run" src/— zero remaining matches (confirms no stray snake_case references)Release
Do NOT cut a release from this PR — leaving that to the maintainer so they can coordinate with the meshery-cloud server migrations and the consumer repos that pin Sistent.