IMPLEMENT: multi-schema rendering in Schema panel (closes #236)#242
Merged
DaveHudson merged 3 commits intomainfrom May 1, 2026
Merged
IMPLEMENT: multi-schema rendering in Schema panel (closes #236)#242DaveHudson merged 3 commits intomainfrom
DaveHudson merged 3 commits intomainfrom
Conversation
Add Zod / JSON Schema / Convex tab strip to SchemaPanel so users can switch between all three generated formats. Pre-warms the Shiki highlighter on component mount to eliminate the colour-delay UX snag. Key decisions: - Single `error` reflects Zod failure (all schemas share the same IR; if Zod fails the others almost certainly will too). JSON/Convex emit failures are non-fatal so their tabs just render empty. - `deriveFileName` maps the Zod filename to the per-type filename (`*.schema.ts` → `*.schema.json` / `convex/schema.ts`). - JSON lang added to the Shiki highlighter for JSON Schema syntax colouring. - `warmHighlighter()` exported for future use; pre-warm effect fires on SchemaPanel mount (app startup) rather than on first tab open. Files changed: - apps/desktop/src/renderer/src/components/schema/SchemaPanel.tsx - apps/desktop/src/renderer/src/components/schema/SchemaPanel.stories.tsx - apps/desktop/src/renderer/src/components/schema/shiki-highlighter.ts - apps/desktop/src/renderer/src/App.tsx - apps/desktop/tests/components/schema/SchemaPanel.test.tsx
…ck test - Replace nested ternary for activeSource with a Record<SchemaType, string> lookup — coding standards prohibit nested ternaries - Remove warmHighlighter() from shiki-highlighter: it was exported but never called; pre-warming already happens in SchemaPanel's mount effect - Add test covering deriveFileName's .ts → .json fallback branch (the path taken when schemaFileName is the default 'schema.ts', which has no '.schema.ts' segment)
…multi-schema-rendering # Conflicts: # apps/desktop/src/renderer/src/App.tsx
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
Closes #236