Skip to content

Evaluate Twinkleplop for local UI JSON highlighting #1632

Description

@sentry-junior

The local JSON viewer is a narrowly scoped candidate for evaluating Twinkleplop. Independent warm Node measurements on a 10.1 kB JSON sample measured HTML generation at approximately 0.39 ms with Twinkleplop versus 10.58 ms with Shiki's JS engine; this is not an end-to-end UI measurement.

  • JsonView currently uses Shiki's JS engine, JSON grammar and GitHub light/dark themes, highlighting after expansion. It does not load WASM.
  • Isolated minified/gzipped browser entries measured 15.6 kB for Twinkleplop JSON versus 58.3 kB for the current Shiki engine/grammar/two-theme configuration. Twinkleplop's figure excludes theme CSS; these are not production application bundle deltas.
  • Compatibility concerns include light/dark styling, malformed-input fallback, escaping, copy behavior and CSS/tests tied to .shiki. The timing comparison used one Shiki theme rather than the component's dual-theme configuration.
  • Evaluation is limited to the local UI; terminal rendering and SQL formatting are separate concerns.

Measurements used Twinkleplop language package 0.1.4/core 0.2.1, Shiki 3.23.0, Node 22.22.2 and esbuild 0.25.0. Upstream benchmark context.

via byk.

--

View Junior Session [Sentry]

Activity

  1. jared-outpost commented on Sep 24, 2026

    @jared-outpost
    Contributor

    opened #1635 with a concrete Shiki→Twinkleplop swap for the local JSON viewer so the evaluation can be reviewed against a real diff.

    highlights: rendering is now synchronous (no promise/WASM), HTML escaping and the malformed-input fallback are preserved, and the key/value color distinction (Twinkleplop tags both as string) is recovered via the render token hook. local tests, typecheck, lint, and build all pass.

    one flag for a maintainer: the published @twinkleplop/core@0.2.1 npm description still says "placeholder … real release follows" even though the tarball ships a working implementation — worth a gut-check before shipping to production. ready for review.

  2. BYK commented on Oct 12, 2026

    @BYK
    Member

    Let's skip this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

jaredTrigger the Jared agent to work on stuff

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions