… @pierre/theming 1.0.0
Retune buildLineBgOverrides for the 1.3.x hover pipeline: per-selector
hover mix rules are gone; hover is now one central rule mixing the
active-line bg 97% (light) / 91% (dark) toward --diffs-hover-mix-target.
Emitted hover --mix-* values are divided by those factors so the final
rendered hover bg shares match 1.2.12 exactly at normal and strong, and
subtle pins the 1.2.x hover finals (deletion 80/75, addition 80/70).
Also add @pierre/theme and @pierre/theming to the bunfig minimumReleaseAge
excludes (review follow-up from #1188).
Stage 2 of the @pierre/diffs upgrade. Bumps
@pierre/diffs1.2.12 -> 1.3.1 (newest stable; 1.3.2 does not exist, and all 1.3.0 betas/rcs were skipped) together with its pinned transitive majors@pierre/theme@2.0.0and@pierre/theming@1.0.0.Edit mode is NOT enabled. No
EditProvider, noeditprops, no@pierre/diffs/editimports anywhere in this PR (verified by grep; thedist/editentry ships in the package but nothing references it).What 1.3.x delivers for our usage
Per the stage audit: SlotPortals memoization (fewer portal re-renders in the all-files view), annotation wrap fixes, and the split-view offset fix. Plus the hover pipeline rework described below. SSR also picked up a dehydrated split-scroll shared-grid layout to prevent pre-hydration row shift (not exercised by our current preloadFile usage, which is unified single-file).
Hover-styling re-tune (the real work of this stage)
At 1.2.12, hovered changed lines were styled by per-selector rules (
[data-hovered] { --mix-light: 80% ... }) that ourbuildLineBgOverridesinpackages/review-editor/hooks/usePierreTheme.tssimply out-specified. In 1.3.x those rules are gone: hover is one central@media (pointer: fine)rule that re-mixes--diffs-computed-editor-active-line-bg97% (light) / 91% (dark) toward--diffs-hover-mix-target(the addition/deletion base color on changed lines). Our hovered--mix-*values now feed the rest formula first and get multiplied by 0.97 / 0.91 on the way to the screen, so unchanged overrides would render hover slightly too strong (and asymmetrically: -1.35pp bg share in light, -3.15pp in dark at "normal").Because
color-mix(in lab, ...)is linear, the compensation is exact: the re-tune divides the target final bg shares by 0.97 / 0.91 (hoverEmittedMix()). Additionally,subtle(which used to ride Pierre's own per-selector hover values and would otherwise silently shift to 1.3's weaker defaults, 85.4%/72.8% effective vs the old 80%/75% deletion and 80%/70% addition) now pins the 1.2.x hover finals explicitly, preserving the old per-type split. Rest-state values are untouched at all intensities.Measured before/after (CDP, headless Chrome 150, computed
background-colorof changed[data-line]s, default color theme)Rest colors: byte-identical in all 12 configurations (dE(lab) = 0.000).
Hovered colors (before = 1.2.12 build, after = 1.3.1 build + re-tune):
Max dE(lab) 0.004 across all 24 measurements (rest + hovered), pure rounding residue from the two-decimal emitted percentages; the perceptibility threshold is ~1.0. Hover screenshots (rest + hovered, all 12 configs, both versions) captured as evidence during verification.
Theme major (1.1.0 -> 2.0.0) verification
@pierre/theming@1.0.0still registers Pierre themes under kebab ids (pierre-dark,pierre-light, ...); onlydisplayNameuses the "Pierre Dark" format. Our fallback lookup keys are unchanged and correct.@pierre/theme@2.0.0exports./pierre-darkand./pierre-lightsubpaths that theming imports; both resolve.SHIKI_THEME_MAPexist in the installed@shikijs/themes@3.23.0bundle: zero missing.bunfig.toml change
@pierre/themeand@pierre/themingadded tominimumReleaseAgeExcludesalongside@pierre/diffs(review follow-up from #1188). Publish-date disclosure:Lockfile forensics (every changed line)
bun.lockchanges are exactly nine lines, nothing else:1-6. The six workspace
"@pierre/diffs": "1.2.12"pins ->"1.3.1"(root, packages/ui, packages/server, packages/review-editor, apps/review, apps/pi-extension).7.
@pierre/diffspackage entry: version 1.2.12 -> 1.3.1, its pinned deps@pierre/theme1.1.0 -> 2.0.0 and@pierre/theming0.0.2 -> 1.0.0, new integrity hash. All other deps of the entry unchanged (diff@9.0.0scoped override intact).8.
@pierre/themeentry: 1.1.0 -> 2.0.0, new hash.9.
@pierre/themingentry: 0.0.2 -> 1.0.0, new hash (peer range on@pierre/themestill^1.1.0, see supply-chain note).Invariants held: root
diffstays 8.0.4;shikistays 3.23.0 (3.x; nothing dragged shiki or@shikijs/*to 4.x); no other package added, removed, or re-resolved.Verification battery
bun run typecheck(official script)controlledSelection/createEditor/onSelectedLinesChangeabsent fromAllFilesCodeViewoptions)tsc -p packages/review-editorerrors are byte-identical to the 1.2.12 baseline, all pre-existing)bun test(full)DOM_TESTS=1, exact CI file lists)VITE_PIERRE_VALIDATE_HEIGHTS=1, live dev server, scrolled full list)itemMetricsconstants left unchanged[data-separator],[data-expand-button],[data-diff-span],[data-line],diffs-container,[data-hovered])DiffHunksRenderer/FileRendererpool options only honor explicituseTokenTransformer); the forceduseTokenTransformer: trueworkaround is keptparseLineTypenoise and two 404s occur identically on both versions)bun pm packof apps/pi-extension, clean-cache npm install of the tarball,preloadFileexecuted under plain Node 24 (prerenderedHTMLlength 53063, no module-resolution errors){ disableFileHeader: true })npm audit signatures: 0 invalid/missing; publisheramadeusdemarzifor all three versions; maintainer set identical to @pierre/diffs' known six accounts (fat, imownbey, mdo, nicolas.pierreco, slexaxton, amadeusdemarzi); zero lifecycle scripts in all three manifests; no new dependencies vs 1.2.12SSR parity: structural changes in preloadFile output
\nnow renders one extra empty trailing context line (grid-row span +1). Every SSR-preloaded file preview of a newline-terminated file shows one extra blank row under 1.3.1. Cosmetic, but real.--diffs-hover-mix-target,--diffs-computed-editor-active-line-bg,--diffs-editor-active-line-source-mix,--diffs-selection-emphasis-mix-target,--diffs-warning-light,--diffs-warning-dark.[data-editor-overlay],[data-editor-active-line], dehydrated split-scroll grid, aninput, buttonfont reset.Supply-chain note (upstream packaging defect, not a compromise)
@pierre/theming@1.0.0still declares its optional peer@pierre/theme: ^1.1.0, not bumped for the theme 2.0.0 major. Bun accepts this; a strictnpm installof the three exact pins standalone hits ERESOLVE (needs--legacy-peer-deps), and the pi-extension tarball install resolves it by hoisting a separate@pierre/theme@1.1.0for theming while@pierre/diffsgets its nested 2.0.0. The fresh-install smoke test passes regardless. Worth reporting upstream.What remains for human visual QA
The CDP measurements cover computed colors of changed code lines at all three intensities in both modes, DOM parity, and console cleanliness. They do NOT cover: perceived hover feel while actually mousing across a large diff (gutter/line-number hover, selected-plus-hovered combinations, decoration-stacked lines), non-default color themes interacting with the new hover target chain, the extra SSR trailing blank line in reference previews, split-view hover, and general 1.3.x rendering polish across real-world diffs. A human pass over a real review session in light and dark at each intensity is still warranted before release.