Skip to content

Replace JSON tree view with a themed OS-style file tree - #88

Merged
wparad merged 1 commit into
mainfrom
claude/ui-ux-collapsed-elements-roqsvx
Aug 26, 2026
Merged

Replace JSON tree view with a themed OS-style file tree#88
wparad merged 1 commit into
mainfrom
claude/ui-ux-collapsed-elements-roqsvx

Conversation

@wparad

@wparad wparad commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Follow-up to Enlarge JSON tree collapse handles and rework signal object modal #87. The bigger click targets fixed the tap-size problem, but the actual color mismatch complaint remained: vue-json-pretty was pinned to theme="dark", so colors like row-highlight and bracket text came from the library's own hardcoded dark palette, not this app's Catppuccin theme — wrong (and only accidentally close) even in Mocha, and clearly broken in Latte/Frappé/Macchiato. CSS overrides on top of a foreign theme system were whack-a-mole.
  • Removed vue-json-pretty entirely and replaced it with a small recursive component (JsonTreeNode.vue) that renders the JSON as an OS-style file explorer tree: objects/arrays are folders (open/closed icon + disclosure chevron), primitives are files, with indentation guide lines. Every color is one of this app's own --ctp-* variables, so it's automatically correct in all four themes instead of overriding a bundled palette.
  • JsonView.vue keeps the same public props (data, collapsedKeys, collapseStringsOver) and the same "click to expand" truncation behavior for long strings (e.g. email body), so EmailSignalCard.vue needed no changes.

Test plan

  • npm run typecheck
  • npx eslint on the changed files
  • npm run build
  • Manual visual check via a temporary Playwright screenshot harness (not committed) confirming the tree renders correctly, colors adapt correctly switching between Mocha (dark) and Latte (light) themes, and folder/file icons + expand/collapse work

Generated by Claude Code

vue-json-pretty was pinned to theme="dark", so its colors (row
highlight, brackets, etc.) came from the library's own hardcoded dark
palette rather than the app's Catppuccin theme — wrong and illegible
in Latte/Frappé/Macchiato, and only accidentally close in Mocha.
Overriding individual classes was whack-a-mole against a foreign
theme system.

Replace it with a small recursive tree component (JsonTreeNode.vue)
that renders objects/arrays as folders and primitives as files, like
an OS file explorer: disclosure chevrons, folder icons that open/close,
and indentation guide lines. Every color comes from this app's own
--ctp-* CSS variables, so it's correct in all four themes automatically
instead of fighting another library's palette. Same props API
(collapsedKeys/collapseStringsOver) as before, so callers are
unaffected. Drops the vue-json-pretty dependency entirely.
@github-actions

Copy link
Copy Markdown

@wparad
wparad merged commit dbf5de6 into main Aug 26, 2026
3 checks passed
@wparad
wparad deleted the claude/ui-ux-collapsed-elements-roqsvx branch August 26, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants