feat: json column type, structured example cells, syntax highlighting - #33
Merged
Conversation
Example cells went through String(value), so any nested value rendered as "[object Object]" — the frontmatter format accepted structured data that no surface could display. A structured cell now shows a truncated monospace preview with an expander that opens the pretty-printed document. The declared type licenses parsing a *string* as a document; nested values are recognised unconditionally, so an author who omits `json` still gets a readable cell. Entity and process tables share one ExampleCell. Modal keeps a stack and answers ESC only in its top-most instance — without that, a dialog opened from inside another closed both. Code fences were rendering as plain preformatted text; markdown-it was constructed with no highlight option. Two shiki entry points rather than one shared module: grammars are static imports that no bundler can tree-shake, so a single module carrying all six languages would put ~620KB in the browser bundle. Body markdown reaches the client as already-rendered bodyHtml, so the six-language set lives on the parse side and the browser needs json alone — 4.22MB -> 4.36MB. Both run the JavaScript raw engine over precompiled grammars. The default Oniguruma engine loads a WebAssembly blob, which would break the single-file export and its zero-network guarantee. defaultColor:false leaves both theme values on every token so styles.css resolves them off the existing .theme-* class, keeping code blocks on the in-app toggle rather than the OS scheme.
damusix
force-pushed
the
worktree-json-column-type
branch
from
August 21, 2026 23:11
1e93d92 to
312ddc5
Compare
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.
jsonjoins the column-type vocabulary, structured example values finally render, and code gets highlighted.Two triggers, deliberately. A nested YAML value is recognised on any column, so an author who never declares
jsonstill gets a readable cell instead of[object Object]. Declaringjsonadditionally licenses parsing a value written as a quoted JSON string — the declared type is the only thing that can distinguish a document from text that happens to start with{.Two shiki entry points, not one. Grammars are static imports no bundler can tree-shake, so a shared six-language module would put ~620KB in the browser bundle. Body markdown reaches the client as already-rendered
bodyHtml, so the six languages live on the parse side and the browser needs json alone: 4.22MB → 4.36MB. Both use the JavaScript raw engine — the default Oniguruma engine loads a WASM blob that would break the single-fileexportand its zero-network guarantee.Modal now keeps a stack and answers ESC only in its top-most instance; without it, a dialog opened from inside another closed both.
Body code fences had never been highlighted — markdown-it was constructed with no
highlightoption. The skill also warns offjsonas a normalization escape hatch: a fixed set of known fields is columns, a repeating group is a child entity.