chore: upgrade @meshery/schemas to v1.0.5 and use View types#1396
Merged
leecalcote merged 2 commits intomasterfrom Apr 7, 2026
Merged
chore: upgrade @meshery/schemas to v1.0.5 and use View types#1396leecalcote merged 2 commits intomasterfrom
leecalcote merged 2 commits intomasterfrom
Conversation
Replace Pattern stand-in type with proper MesheryViewWithLocation from the dedicated view package in workspace View components. Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades @meshery/schemas and updates the workspace view-assignment hook to use the newly available View types from schemas v1.0.5, replacing the prior Pattern stand-in.
Changes:
- Bump
@meshery/schemasdependency from^1.0.4to^1.0.5. - Update
useViewsAssignment.tsxto useMesheryViewWithLocationfrom schemas instead ofPattern. - Add ID type-guards to handle
id?: stringin the View schema when computing added/removed IDs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/custom/Workspaces/hooks/useViewsAssignment.tsx | Switch hook generics/state to schema View types and add ID filtering to support optional id. |
| package.json | Upgrade @meshery/schemas to v1.0.5. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…wsAssignment Filter out views with undefined id when setting state to prevent unstable React keys downstream. Replace !!id with typeof id === 'string' for explicit type narrowing that correctly handles edge cases. Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@meshery/schemasfrom ^1.0.4 to ^1.0.5Patternstand-in type withMesheryViewWithLocationfrom schemas v1.0.5 inuseViewsAssignment.tsxidfield (schema View hasid?: stringvs Pattern's requiredid: string)The View components in Sistent were using the
Patterntype as a stand-in since no proper View types existed. Schemas v1.0.5 provides dedicated View types inv1beta1/view/View.ts.Resolves #1394
Resolves #1395
Test plan
npm run buildsucceeds afternpm installpulls v1.0.5