Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Not ready to approve: the new component:DiffViewer record is still a draft, so DiffViewer's Core API and behavior wait on an engineering owner's decision, and the blocking findings below need fixes either way.
Owner decision. Approval needs an engineering owner to approve docs/specs/components/DiffViewer/DiffViewer.spec.md as written (its Core exports, props and defaults, FR1–FR15, AR1–AR4, DEC-1, owners, and the stated FR42 coarse-pointer gap) or say what must change, by commenting /approve-spec <full head SHA> on this pull request; the author may do so if they are an engineering owner.
Blocking findings
data-diff-change(packages/core/src/DiffViewer/DiffViewer.tsx:723) is public surface (architecture:public-component-apiDEC-2): name it in a current record that says why, or drop it from the source (tests can query by role) or move it to a privatedata-astryx-*attribute under INV23.data-diff-pane(packages/core/src/DiffViewer/DiffViewer.tsx:1246) is public surface (architecture:public-component-apiDEC-2): name it in a current record that says why, or drop it from the source (tests can query by role) or move it to a privatedata-astryx-*attribute under INV23.data-diff-line-button(packages/core/src/DiffViewer/DiffViewer.tsx:1528) is public surface (architecture:public-component-apiDEC-2): name it in a current record that says why, or drop it from the source (tests can query by role) or move it to a privatedata-astryx-*attribute under INV23.data-diff-bar(packages/core/src/DiffViewer/DiffViewer.tsx:1571) is public surface (architecture:public-component-apiDEC-2): name it in a current record that says why, or drop it from the source (tests can query by role) or move it to a privatedata-astryx-*attribute under INV23.data-diff-sizer(packages/core/src/DiffViewer/DiffViewer.tsx:1966) is public surface (architecture:public-component-apiDEC-2): name it in a current record that says why, or drop it from the source (tests can query by role) or move it to a privatedata-astryx-*attribute under INV23.data-diff-split(packages/core/src/DiffViewer/DiffViewer.tsx:1997) is public surface (architecture:public-component-apiDEC-2): name it in a current record that says why, or drop it from the source (tests can query by role) or move it to a privatedata-astryx-*attribute under INV23.data-diff-fold(packages/core/src/DiffViewer/DiffViewer.tsx:2024) is public surface (architecture:public-component-apiDEC-2): name it in a current record that says why, or drop it from the source (tests can query by role) or move it to a privatedata-astryx-*attribute under INV23.- The new Core prop
headerEnd(DiffViewer.tsx:216) names the slot Core already callsendContent, as CodeBlock does (CodeBlock.tsx:649), so rename it toendContent(INV2, DEC-1). - Lab callers of
DiffViewerstart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:36), which needs an explicit owner decision forDiffViewer; Found by: deprecation rule. - Lab callers of
parseUnifiedDiffstart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:42), which needs an explicit owner decision forparseUnifiedDiff; Found by: deprecation rule. - Lab callers of
createDiffFilestart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:48), which needs an explicit owner decision forcreateDiffFile; Found by: deprecation rule. - Lab callers of
DiffViewerPropsstart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:54), which needs an explicit owner decision forDiffViewerProps; Found by: deprecation rule. - Lab callers of
DiffViewerViewModestart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:60), which needs an explicit owner decision forDiffViewerViewMode; Found by: deprecation rule. - Lab callers of
DiffViewerChangeIndicatorstart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:66), which needs an explicit owner decision forDiffViewerChangeIndicator; Found by: deprecation rule. - Lab callers of
DiffViewerInlineHighlightstart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:72), which needs an explicit owner decision forDiffViewerInlineHighlight; Found by: deprecation rule. - Lab callers of
CreateDiffFileOptionsstart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:78), which needs an explicit owner decision forCreateDiffFileOptions; Found by: deprecation rule. - Lab callers of
DiffViewerFilestart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:84), which needs an explicit owner decision forDiffViewerFile; Found by: deprecation rule. - Lab callers of
DiffViewerFileStatusstart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:90), which needs an explicit owner decision forDiffViewerFileStatus; Found by: deprecation rule. - Lab callers of
DiffViewerHunkstart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:96), which needs an explicit owner decision forDiffViewerHunk; Found by: deprecation rule. - Lab callers of
DiffViewerLinestart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:102), which needs an explicit owner decision forDiffViewerLine; Found by: deprecation rule. - Lab callers of
DiffViewerLineKindstart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:108), which needs an explicit owner decision forDiffViewerLineKind; Found by: deprecation rule. - Lab callers of
DiffViewerLineRefstart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:114), which needs an explicit owner decision forDiffViewerLineRef; Found by: deprecation rule. - Lab callers of
DiffViewerSidestart seeing it marked deprecated and lose it next release (packages/lab/src/DiffViewer/index.ts:120), which needs an explicit owner decision forDiffViewerSide; Found by: deprecation rule. parseUnifiedDiff(packages/core/src/DiffViewer/index.ts) is outside this pull request's scope (Components: DiffViewer): name it in the scope and get an owner decision, or split it into its own pull request.createDiffFile(packages/core/src/DiffViewer/index.ts) is outside this pull request's scope (Components: DiffViewer): name it in the scope and get an owner decision, or split it into its own pull request.CreateDiffFileOptions(packages/core/src/DiffViewer/index.ts) is outside this pull request's scope (Components: DiffViewer): name it in the scope and get an owner decision, or split it into its own pull request.
Non-blocking: a path-less file with headerEnd={false} still renders an empty header bar (DiffViewer.tsx:2073), and the record's "not yet released in Core" line (DiffViewer.spec.md:73) is temporary status. This pull request lands after #13699.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claims: DiffViewer, its two utilities and its types export from the new Core entry and the package root — verified.
- Claims: imports are Core-relative and strings use Core's component translator — verified.
- Claims: Core's stricter checks (readonly array types, ref names, renderable guards, host attribute fixture, message leading, doc literal values) apply — verified.
- Claims: the moved source cites no claim ids and its baseline entry is removed — verified.
- Claims: the Lab entry is a deprecated re-export with no runtime warning — verified in source; the deprecation decision itself is not cited (finding).
- Claims: stories, Chromium specs and the RTL target use the Core story ids — verified.
- Claims: the showcase block moves to the CLI blocks beside a new example, with sandbox routes — verified.
- Claims: the registry route moves and keeps the Lab path as an alias; the probe theme covers the three targets — verified.
- Claims: the keyword is removed and translator descriptions and the CodeBlock record drop the Lab wording — verified.
- Claims: props and defaults are unchanged — verified.
- Claims: a non-rendering header end leaves no wrapper — verified for the wrapper; the header row itself still renders for a path-less file (note).
- Claims: message rows take the supporting leading — verified in source; the pixel height was not measured.
- Claims: the three audit fixes are merged on main — verified.
- Claims: the Lab package stays private and canary-only — verified.
- Claims: bundle size, test counts, audits and browser runs — not reproduced here.
- Claims: both changesets describe the change accurately — verified.
- Files:
.changeset/diffviewer-core-blocks.md— clear - Files:
.changeset/promote-diffviewer-to-core.md— clear - Files:
apps/sandbox/scripts/next-export-routes.json— clear - Files:
apps/sandbox/src/app/(fullscreen)/pages/diffviewer-perf/benchmark.test.ts— clear - Files:
apps/sandbox/src/app/(fullscreen)/pages/diffviewer-perf/page.tsx— clear - Files:
apps/storybook/rtl-audit/targets.json— clear - Files:
apps/storybook/stories/DiffViewer.stories.tsx— clear - Files:
docs/specs/components/CodeBlock/CodeBlock.spec.md— clear - Files:
docs/specs/components/DiffViewer/DiffViewer.spec.md— owner decision; note (temporary status) - Files:
internal/eslint-plugin-astryx/no-comment-provenance.baseline.json— clear - Files:
internal/shadcn-registry/routes.lock.json— clear - Files:
packages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerShowcase.doc.mjs— clear - Files:
packages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerShowcase.tsx— clear - Files:
packages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerViewedFiles.doc.mjs— clear - Files:
packages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerViewedFiles.tsx— clear - Files:
packages/cli/test/__golden__/no-icon-set/search-close.json— clear - Files:
packages/cli/test/__golden__/no-icon-set/search-close.txt— clear - Files:
packages/cli/test/swizzle-proof/samples.mjs— clear - Files:
packages/core/locales/en.json— clear - Files:
packages/core/package.json— clear - Files:
packages/core/src/DiffViewer/DiffViewer.doc.mjs— finding (prop name) - Files:
packages/core/src/DiffViewer/DiffViewer.test.tsx— clear - Files:
packages/core/src/DiffViewer/DiffViewer.tsx— finding (data attributes, prop name, empty header note) - Files:
packages/core/src/DiffViewer/__tests__/DiffViewer.a11y.chromium.spec.ts— clear - Files:
packages/core/src/DiffViewer/__tests__/DiffViewerForcedColors.a11y.chromium.spec.ts— clear - Files:
packages/core/src/DiffViewer/createDiffFile.test.ts— clear - Files:
packages/core/src/DiffViewer/createDiffFile.ts— clear - Files:
packages/core/src/DiffViewer/diffTypes.ts— clear - Files:
packages/core/src/DiffViewer/index.ts— finding (scope) - Files:
packages/core/src/DiffViewer/inlineDiff.test.ts— clear - Files:
packages/core/src/DiffViewer/inlineDiff.ts— clear - Files:
packages/core/src/DiffViewer/parseUnifiedDiff.test.ts— clear - Files:
packages/core/src/DiffViewer/parseUnifiedDiff.ts— clear - Files:
packages/core/src/__tests__/hostDataAttributes.test.tsx— clear - Files:
packages/core/src/index.ts— clear - Files:
packages/lab/src/DiffViewer/index.test.ts— clear - Files:
packages/lab/src/DiffViewer/index.ts— finding (deprecation decision) - Files:
packages/themes/probe/src/probeTheme.ts— clear
|
Review fixes are in aa7000e, on this pull request only; #13699 is unchanged. Data attributes (DEC-2).
Lab deprecation (15 findings). The Lab entry is now a plain re-export of the Core exports, with no Scope (3 findings). The description's scope line now names Record note. "Released default preserved" now reads "not yet released", the template's own value for that lifecycle field. Still open for an engineering owner: Validation, on this head merged onto main at cd18d28 (clean merge):
|
There was a problem hiding this comment.
Not ready to approve yet: the new component:DiffViewer record is still a draft, so DiffViewer's Core API and behavior wait on an engineering owner's decision.
What is needed next
- An engineering owner reviews
docs/specs/components/DiffViewer/DiffViewer.spec.mdas written, including shipping in Core with its statedspec:AST-094FR42 gap (the disclosure and line-number buttons grow no hit area toward 44 px under a coarse pointer), and answers its OQ1: whether the Lab re-exports are deprecated, and when they are removed. - The owner records the decision by commenting
/approve-spec <full head SHA>on this pull request; the author may do so if they are an engineering owner.
No blocking findings remain: the public data attributes, the headerEnd name, the undecided Lab deprecations, the scope line and the empty header are all fixed. One optional suggestion: the 38-line file header in DiffViewer.tsx repeats the docs and the record, and could keep only its @file, @input, @output and @position lines and the SYNC list.
CI has not run on this head yet, and this pull request lands after #13699.
Claims and files checked
Review mode: full; reason: author-not-engowner
- Claim: The component, its utilities and model types move from Lab to Core and export from the
DiffViewersubpath and the package root: verified. - Claim: The component, utilities, their tests and the showcase block move as renames: verified.
- Claim: Imports become Core-relative and strings go through Core's component translator with registered English: verified.
- Claim: Core's stricter conventions apply (readonly array types, ref names, renderable guards, a host data-attribute fixture, supporting leading on the message row, no client directive on the pass-through barrel, literal values named in doc props): verified.
- Claim: The moved source cites no claim ids, so its comment-provenance baseline entry goes: verified.
- Claim: The Lab entry re-exports the Core exports with no deprecation marker until an owner decides one: verified.
- Claim: The header slot is
endContent, the name CodeBlock and Banner use, in place of Lab'sheaderEnd: verified. - Claim: DiffViewer renders no
data-diff-*attribute of its own; changed code cells keep thedata-diffattribute CodeBlock already renders: verified. - Claim: Stories, both Chromium specs and the RTL target take the Core story ids: verified.
- Claim: The showcase block moves to the CLI's component blocks beside a new Viewed files example, and the sandbox route list gains both: verified.
- Claim: The ShadCN route moves and keeps the Lab path as an alias; the probe theme covers the three targets: verified.
- Claim: The
code reviewkeyword is dropped: verified. - Claim: Translator descriptions and the CodeBlock record drop "Lab": verified.
- Claim: The new record states FR1–FR15, AR1–AR4, DEC-1, one FR42 gap and one open question on the Lab deprecation, and needs an engineering owner's approval: verified (draft, unapproved).
- Claim: The listed exports, props, unchanged defaults and three theme targets: verified against source.
- Claim: Two behavior effects only: a non-renderable
endContentleaves no wrapper and, with no path, no header; message rows take the supporting leading: verified in source; the 2.5 px measurement is the author's. - Claim: Lab callers get Core's API,
endContentincluded: verified. - Claim: Bundle size, pixel-identical screenshots, contrast measurements, audit and test results: stated by the author, not rechecked here.
- Claim: Lab stays private and canary-only; changesets are a component entry for Core and a docs entry for the CLI, neither breaking: verified.
- Claim: Core changeset: entry points, rendering, non-colour change cues and the shared collapsible config: verified.
- Claim: CLI changeset: the template listing gains the showcase and the Viewed files example, whose checkbox folds each file through
collapsible: verified. .changeset/diffviewer-core-blocks.md: clear (matches the two blocks).changeset/promote-diffviewer-to-core.md: clear (matches the Core entry and behavior)apps/sandbox/scripts/next-export-routes.json: clear (two block routes)apps/sandbox/src/app/(fullscreen)/pages/diffviewer-perf/benchmark.test.ts: clear (imports the Core utility)apps/sandbox/src/app/(fullscreen)/pages/diffviewer-perf/page.tsx: clear (Core import; waits on the root class)apps/storybook/rtl-audit/targets.json: clear (new story id)apps/storybook/stories/DiffViewer.stories.tsx: clear (Core/DiffViewer,endContent)docs/specs/components/CodeBlock/CodeBlock.spec.md: clear (two cells drop "Lab"; no requirement change)docs/specs/components/DiffViewer/DiffViewer.spec.md: held: new draft record awaiting an engineering owner, with its FR42 gap and OQ1internal/eslint-plugin-astryx/no-comment-provenance.baseline.json: clear (drops the moved file's entry)internal/shadcn-registry/routes.lock.json: clear (new route, Lab path kept as alias, example route)packages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerShowcase.doc.mjs: clear (template grade A)packages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerShowcase.tsx: clear (Core import; grade A)packages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerViewedFiles.doc.mjs: clear (template grade A)packages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerViewedFiles.tsx: clear (grade A)packages/cli/test/__golden__/no-icon-set/search-close.json: clear (match count 52 to 53)packages/cli/test/__golden__/no-icon-set/search-close.txt: clear (match count 52 to 53)packages/cli/test/swizzle-proof/samples.mjs: clear (sample key moves to Core)packages/core/locales/en.json: clear (descriptions drop "lab"; messages unchanged)packages/core/package.json: clear (adds the./DiffViewerentry)packages/core/src/DiffViewer/DiffViewer.doc.mjs: clear (props, defaults and theme targets match the source)packages/core/src/DiffViewer/DiffViewer.test.tsx: clear (queries by role and name; new empty-header case)packages/core/src/DiffViewer/DiffViewer.tsx: non-blocking: the 38-line file headerpackages/core/src/DiffViewer/__tests__/DiffViewer.a11y.chromium.spec.ts: clear (story id; buttons found by name)packages/core/src/DiffViewer/__tests__/DiffViewerForcedColors.a11y.chromium.spec.ts: clear (story id)packages/core/src/DiffViewer/createDiffFile.test.ts: clear (moved unchanged)packages/core/src/DiffViewer/createDiffFile.ts: clear (header paths only)packages/core/src/DiffViewer/diffTypes.ts: clear (header paths only)packages/core/src/DiffViewer/index.ts: clear (entry exports)packages/core/src/DiffViewer/inlineDiff.test.ts: clear (moved unchanged)packages/core/src/DiffViewer/inlineDiff.ts: clear (header paths and type spelling)packages/core/src/DiffViewer/parseUnifiedDiff.test.ts: clear (moved unchanged)packages/core/src/DiffViewer/parseUnifiedDiff.ts: clear (header paths only)packages/core/src/__tests__/hostDataAttributes.test.tsx: clear (adds the DiffViewer fixture)packages/core/src/index.ts: clear (root re-export)packages/lab/src/DiffViewer/DiffViewer.doc.mjs: clear (deleted; Core doc keeps the Lab route as alias)packages/lab/src/DiffViewer/index.test.ts: clear (identity and props checks)packages/lab/src/DiffViewer/index.ts: clear (plain re-export of Core)packages/themes/probe/src/probeTheme.ts: clear (generated probe entries for the three targets)
| * @output Exports DiffViewer component, DiffViewerProps, DiffViewerViewMode, | ||
| * DiffViewerChangeIndicator, DiffViewerInlineHighlight | ||
| * @position Lab implementation; read-only, syntax-highlighted file diff for | ||
| * @position Core implementation; read-only, syntax-highlighted file diff for |
There was a problem hiding this comment.
Non-blocking: this file header now runs to 38 lines, and its behavior paragraph (lines 14–30) repeats DiffViewer.doc.mjs and the component record. The source-comment rule in architecture:knowledge-contracts (INV29) keeps a header to about 12 lines. Consider keeping @file, @input, @output, @position and the SYNC list, and dropping the paragraph.
DiffViewer, parseUnifiedDiff, createDiffFile, and the diff model types move from Lab to Core, imported from `@astryxdesign/core/DiffViewer` or the package root. The component keeps its props, defaults, and behavior. Core's stricter rules bring two small visible changes: a `headerEnd` that renders nothing (`false`, `true`, or an empty string) no longer leaves an empty wrapper in the header, and the binary and no-change message takes the supporting text role's leading. The Lab exports become deprecated re-exports of the Core ones for one release. The Storybook stories move to Core/DiffViewer, the showcase block moves to the CLI's component blocks beside a new "Viewed files" example, and the ShadCN registry keeps the Lab route as an alias. The new `component:DiffViewer` record is a draft for an engineering owner's approval.
…plain Lab re-exports Review fixes for the move to Core: - The header's caller slot is `endContent`, the name Core gives this slot (CodeBlock, Banner), in place of `headerEnd`. A file with no path and nothing in `endContent` renders no header. - DiffViewer renders none of the seven `data-diff-*` hooks Lab had (`change`, `pane`, `line-button`, `bar`, `sizer`, `split`, `fold`). A data attribute outside `data-astryx-*` is public surface, and these only served tests, which now find each part by role, name, and structure. - The Lab entry re-exports the Core exports with no deprecation marker until an owner decides it (the record's OQ1).
aa7000e to
14e9088
Compare
|
Rebased onto main now that #13699 is merged (0c9df81). New head: 14e9088, on main at a2d5ef4.
Validation on the rebased tree:
It merges cleanly into main, including the two newer commits at 61725ae. The description now says it is based on main. Still open for an engineering owner: |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Not ready to approve yet: DiffViewer's Core API and behavior are decided only by the new component:DiffViewer record, which is still a draft, and one description claim needs correcting.
Blocking
- Miss: the description says
component:CodeBlocknames DiffViewer without "Lab", but its FR13 (docs/specs/components/CodeBlock/CodeBlock.spec.md:125) and DEC-4 (:248) still say "Lab'sDiffViewer", so either say that two cells drop "Lab" or update those two lines under the same owner approval.
What is needed next
- An engineering owner reviews
docs/specs/components/DiffViewer/DiffViewer.spec.mdas written, including shipping in Core with its statedspec:AST-094FR42 gap (the disclosure and line-number buttons grow no hit area toward 44 px under a coarse pointer), and answers its OQ1: whether the Lab re-exports are deprecated, and when they are removed. - The owner records the decision by commenting
/approve-spec <full head SHA>on this pull request; the author may do so if they are an engineering owner.
Optional: the 39-line file header in DiffViewer.tsx could keep only its @file, @input, @output and @position lines and the SYNC list, and the sandbox perf page's header still says it evaluates "the Lab DiffViewer".
Claims and files checked
Review mode: full; reason: author-not-engowner
- Claim: Title: DiffViewer moves to Core: verified (
packages/core/src/DiffViewer/,package.json./DiffViewer, rootindex.ts). - Claim: The component, utilities and model types move from Lab to Core and export from the DiffViewer subpath and the package root: verified (
packages/core/package.json,packages/core/src/index.ts,packages/core/src/DiffViewer/index.ts). - Claim: Git reads the component, utilities, their tests and the showcase block as renames: verified (rename entries in the changed-file list).
- Claim: Imports become Core-relative and strings go through Core's component translator with registered English: verified (
DiffViewer.tsximports,registerEnglishFallback,useComponentTranslator). - Claim: Core's stricter checks apply: readonly array types, ref names, renderable guards, a host data-attribute fixture, supporting leading on the message row, no client directive on the Core barrel, literal values named in doc props: verified in source; typecheck and lint pass in CI.
- Claim: The moved source cites no claim ids in comments, so its comment-provenance baseline entry goes: verified (no claim id in any moved file's comments; lint passes).
- Claim: The Lab entry re-exports the Core exports with no deprecation marker: verified (
packages/lab/src/DiffViewer/index.ts; identity test inindex.test.ts). - Claim: The header slot is
endContent, in place of Lab'sheaderEnd: verified (DiffViewer.tsx:216; noheaderEndcaller remains; typecheck passes). - Claim: DiffViewer renders no
data-diff-*attribute; Lab's seven hooks only served tests and the perf page; changed cells keep thedata-diffattribute CodeBlock renders: verified (repository search finds none of the seven names at the head; at the base only Lab tests, the Chromium spec and the perf page read them;CodeBlock.tsx:526). - Claim: Stories, both Chromium specs and the RTL target take the Core story ids: verified.
- Claim: The showcase block moves beside a new Viewed files example, and the sandbox route list gains both: verified.
- Claim: The ShadCN route moves and keeps the Lab path as an alias; the probe theme covers the three targets; the showcase route stays the same: verified (
routes.lock.json,probeTheme.ts). - Claim: The
code reviewkeyword goes; search still finds DiffViewer throughdiff,patchand its description: verified (doc keywords; search reads keywords). - Claim: Translator descriptions drop "lab": verified (
packages/core/locales/en.json). - Claim: The CodeBlock record names DiffViewer without "Lab": false: FR13 and DEC-4 still say "Lab's
DiffViewer". - Claim: The new record states FR1–FR15, AR1–AR4, DEC-1, one FR42 gap and one open question, and needs an engineering owner's approval: verified (draft, unapproved).
- Claim: The listed exports, props, unchanged defaults and three theme targets: verified against source.
- Claim: Only two behavior effects: a non-renderable
endContentleaves no wrapper and, with no path, no header; message rows take the supporting leading: verified (isRenderablereturns false forfalse,trueand''; annotation guards were already normalized; new header test); the 2.5 px figure is reported. - Claim: Lab callers get Core's API,
endContentincluded: verified. - Claim: Accessibility checklist: names, roles, states, keyboard, focus, reduced motion and strings: verified in source and unit tests; contrast, target-size and forced-colors measurements are reported.
- Claim: Lab stays private and canary-only; changesets are a Core component entry and a CLI docs entry, neither breaking: verified.
- Claim: Core changeset: entry points, rendering, non-colour change cues and the shared collapsible config: verified (unit tests for default, collapsed, controlled and off).
- Claim: CLI changeset: the template list gains the showcase and the Viewed files example: verified.
- Claim: The pull request's diff is unchanged since the rebase apart from the two golden counts: verified (range-diff and patch-ids).
- Claim: Bundle size, screenshots, contrast, audits, test runs, graduation vote and the CLI runs: reported.
.changeset/diffviewer-core-blocks.md: clear.changeset/promote-diffviewer-to-core.md: clearapps/sandbox/scripts/next-export-routes.json: clear (two block routes)apps/sandbox/src/app/(fullscreen)/pages/diffviewer-perf/benchmark.test.ts: clearapps/sandbox/src/app/(fullscreen)/pages/diffviewer-perf/page.tsx: non-blocking: header still says "Lab DiffViewer"apps/storybook/rtl-audit/targets.json: clearapps/storybook/stories/DiffViewer.stories.tsx: cleardocs/specs/components/CodeBlock/CodeBlock.spec.md: blocking: FR13 and DEC-4 still say "Lab'sDiffViewer" against the descriptiondocs/specs/components/DiffViewer/DiffViewer.spec.md: held: draft record awaiting an engineering owner, with its FR42 gap and OQ1internal/eslint-plugin-astryx/no-comment-provenance.baseline.json: clearinternal/shadcn-registry/routes.lock.json: clearpackages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerShowcase.doc.mjs: clear (template grade A)packages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerShowcase.tsx: clear (grade A)packages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerViewedFiles.doc.mjs: clear (grade A)packages/cli/assets/templates/blocks/components/DiffViewer/DiffViewerViewedFiles.tsx: clear (grade A)packages/cli/test/__golden__/no-icon-set/search-close.json: clear (54 to 55)packages/cli/test/__golden__/no-icon-set/search-close.txt: clear (54 to 55)packages/cli/test/swizzle-proof/samples.mjs: clearpackages/core/locales/en.json: clearpackages/core/package.json: clearpackages/core/src/DiffViewer/DiffViewer.doc.mjs: clearpackages/core/src/DiffViewer/DiffViewer.test.tsx: clearpackages/core/src/DiffViewer/DiffViewer.tsx: non-blocking: 39-line file headerpackages/core/src/DiffViewer/__tests__/DiffViewer.a11y.chromium.spec.ts: clearpackages/core/src/DiffViewer/__tests__/DiffViewerForcedColors.a11y.chromium.spec.ts: clearpackages/core/src/DiffViewer/createDiffFile.test.ts: clearpackages/core/src/DiffViewer/createDiffFile.ts: clearpackages/core/src/DiffViewer/diffTypes.ts: clearpackages/core/src/DiffViewer/index.ts: clearpackages/core/src/DiffViewer/inlineDiff.test.ts: clearpackages/core/src/DiffViewer/inlineDiff.ts: clearpackages/core/src/DiffViewer/parseUnifiedDiff.test.ts: clearpackages/core/src/DiffViewer/parseUnifiedDiff.ts: clearpackages/core/src/__tests__/hostDataAttributes.test.tsx: clearpackages/core/src/index.ts: clearpackages/lab/src/DiffViewer/DiffViewer.doc.mjs: clear (deleted; the Core doc keeps the Lab route as an alias)packages/lab/src/DiffViewer/index.test.ts: clearpackages/lab/src/DiffViewer/index.ts: clearpackages/themes/probe/src/probeTheme.ts: clear (generated)
…DEC-4 DiffViewer lives in Core, so `component:CodeBlock` FR13 and DEC-4 name it as `DiffViewer`, not Lab's, like the record's other two cells. The DiffViewer perf page's header says the same.
|
Fixed the CodeBlock record miss in 822f712, on top of 14e9088 (a fast-forward, no rebase).
The optional file-header trim in Validation on 822f712 merged onto main at 5d14a16 (clean merge): Still open for an engineering owner: |
There was a problem hiding this comment.
Not ready to approve yet: DiffViewer's Core API and behavior are decided only by the new component:DiffViewer record, which is still a draft, and the Core changeset needs one wording fix.
Owner decision needed. An engineering owner approves or amends the draft record, including its coarse-pointer hit-area gap (spec:AST-094 FR42) and OQ1 (whether the Lab re-exports are deprecated, and when they are removed), by commenting /approve-spec <full head SHA> on this pull request; the author may do so if they are an engineering owner.
Blocking:
- Miss: the Core changeset (
.changeset/promote-diffviewer-to-core.md) says DiffViewer shows a file header with the path and that the header is a disclosure that starts open, but a file with no path (a bare hunk fromparseUnifiedDiff, orcreateDiffFilewithoutpath) renders no header, or a header without a disclosure whenendContentrenders, andcollapsibledoes nothing for it (DiffViewer.tsx:1345), so say "when the file has a path", as the record's FR1 and FR7 do, and qualify the description's "Disclosure for the file header" line the same way.
The DiffViewer and Lab unit tests (97) pass in a local run, and in local captures the default, split, viewed-toggle and review-comments stories render pixel-identically to Lab's while the message rows grow by about 3 px each. The file-header length note from the earlier review still stands as a non-blocking suggestion.
Claims and files checked
Review mode: same-head; reason: none
- changed rules (1): Claim bounding in one round — finding: the Core changeset's header and disclosure sentence (blocking, above); every case listed: a path-less file with no end content (no header), one with end content (no disclosure), and any path-less file (the collapsible setting is inert)
- Claim, title: DiffViewer moves to Core — verified (Core entry point, root export, package exports map)
- Claim, Core changeset: imports from the Core entry and root with the parser, differ and model types — verified; header with path and a disclosure that starts open — false for path-less files (blocking); every changed line reads as added or removed without colour, also under forced colors — verified (hidden label in every indicator mode, forced-colors bar for tint-only changes); the collapsible setting takes the same config as Banner and Collapsible — verified
- Claim, CLI changeset: the template list shows the showcase and the new Viewed files block — verified from the block files and route lists
- Claim: the component, utilities, tests and showcase block move as renames — verified (file list)
- Claim: Core-relative imports, component translator with registered English — verified
- Claim: Core's stricter checks (read-only arrays, ref names, renderable guards, host data-attribute fixture, supporting leading on the message row, no client directive on the Core barrel, literal values in doc prop descriptions, no claim ids in source, baseline entry removed) — verified
- Claim: the Lab entry re-exports Core with no deprecation marker — verified (Lab index and its test)
- Claim: header slot renamed to the system's end-content name — verified
- Claim: DiffViewer renders no data-diff-* attribute of its own; the seven hooks served tests and the perf page; changed code cells keep the shared diff attribute — verified (repository search; 0 hooks on head stories, 7 to 40 on base stories, captured here)
- Claim: stories, Chromium specs and RTL target take the Core story ids — verified
- Claim: showcase and example blocks, sandbox route list, ShadCN route with Lab alias, probe theme for three targets — verified
- Claim: the review keyword goes; search still finds DiffViewer by diff and patch — verified (doc keywords)
- Claim: translator descriptions and the CodeBlock record no longer say Lab in four places; perf page header updated — verified
- Claim: new draft record with FR1–FR15, AR1–AR4, DEC-1, an FR42 gap and OQ1; decider pending — verified
- Claim: 12 new types, 15 props, defaults unchanged, three theme targets as in Lab — verified (source)
- Claim: behavior unchanged except the empty end-content header and the message-row leading — verified (whole component diff read; the annotation guard change is behavior-neutral)
- Claim: message rows 2.5 px taller, rows above pixel-identical — reported; measured here as about 2.9 px with rows above identical
- Claim: bundle size figures, contrast measurements, axe, RTL audit, Chromium spec runs, test totals, screenshots — reported
- Claim: Lab package stays private and canary-only; neither changeset is breaking — verified
- Claim: the last commit changes only record prose and the perf page comment — verified
- Files: all 39 changed files visited;
.changeset/promote-diffviewer-to-core.md— finding above;packages/core/src/DiffViewer/DiffViewer.tsx— non-blocking header-length note; every other file — clear
…le header to a file with a path A file with no path (a bare hunk, or `createDiffFile` without `path`) has no path in its header and no disclosure, and `collapsible` does nothing for it. The Core changeset and the summary row of `component:DiffViewer` now say "when the file has a path", as the record's FR1 and FR7 do.
|
Fixed the Core changeset wording in 60d2826, on top of 822f712 (a fast-forward, no rebase).
Validation, on this content merged onto main at 4d07b8a (clean):
The head also merges cleanly into main at 25e3032. The optional file-header trim stays out, as before. Still open for an engineering owner: |
There was a problem hiding this comment.
Not ready to approve yet: DiffViewer's Core API and behavior are decided only by the new component:DiffViewer record, which is still a draft, and the Core changeset needs one more wording fix.
Owner decision needed. An engineering owner approves or amends the draft record, including its coarse-pointer hit-area gap (spec:AST-094 FR42) and OQ1 (whether the Lab re-exports are deprecated, and when they are removed), by commenting /approve-spec <full head SHA> on this pull request; the author may do so if they are an engineering owner.
Blocking:
- Miss: the Core changeset (
.changeset/promote-diffviewer-to-core.md) says that for a file with a path the header "shows the path, status, and line counts", but a modified file shows no status (the token renders only for an added, deleted or renamed file,DiffViewer.tsx:2094) and a binary or no-change file shows no line counts (DiffViewer.tsx:2097), so say "a status token for an added, deleted, or renamed file, and the line counts when lines changed", and bound the record's FR1 counts the same way.
The path-less header wording from the last review is fixed, and in a local run the DiffViewer, Lab and host data-attribute tests pass while local Storybook captures show seven stories pixel-identical to Lab's and only the two message rows about 3 px taller.
Claims and files checked
Review mode: full; reason: author-not-engowner
- Title: DiffViewer moves to Core — verified (Core entry point, root export, exports map)
- Core changeset: imports from the Core entry and root with the parser, differ and model types — verified; read-only highlighted diff with annotation rows, line-number buttons and folds — verified; every changed line reads as added or removed without colour, also under forced colors — verified (hidden label in every indicator mode, forced-colors bar for tint-only changes, tests pass locally); header of a file with a path shows path, status and line counts — false for modified files (no status) and binary or no-change files (no counts), blocking; that header is a disclosure that starts open, configured like Banner's collapsible, off with false — verified
- CLI changeset: the template list shows the showcase and the new Viewed files block — verified (both listed at the head, neither at the base, run locally)
- Component, utilities, tests and showcase block move as renames — verified (file list)
- Core-relative imports and the component translator with registered English — verified
- Core's stricter checks (read-only arrays, ref names, renderable guards, host data-attribute fixture, supporting leading on the message rows, no client directive on the Core barrel, literal values in doc prop descriptions, no record ids in source, baseline entry removed) — verified
- Lab entry re-exports Core with no deprecation marker — verified (Lab index and its test)
- Header slot renamed to the system's end-content name — verified
- No data-diff-* attribute of its own; the seven hooks served only tests and the perf benchmark page; changed code cells keep the shared diff attribute — verified (repository search; 0 hooks on head stories against 7 to 40 on base stories, captured locally)
- Stories, Chromium specs and RTL target take the Core story ids — verified
- Showcase and example blocks, sandbox route list, ShadCN route with the Lab alias, probe theme for three targets — verified
- The review keyword goes; search still finds DiffViewer through diff — verified (keywords; search run locally)
- Translator descriptions, the CodeBlock record's four places and the perf page header no longer say Lab — verified
- New draft record with its requirements, one hit-area gap and one open question; decider pending — verified
- 12 new types, 15 props plus ref, defaults unchanged, three theme targets as in Lab — verified (generated API surface of both trees)
- Behavior unchanged except the empty end-content header and the message-row leading — verified (whole component diff read; the annotation guard change is behavior-neutral)
- Message rows about 3 px taller, rows above identical — verified (41.1 to 44 px, captured locally)
- Bundle size, contrast measurements, axe and RTL audits, Chromium spec runs, test totals, screenshots, graduation vote and audit fixes — reported
- Lab package stays private and canary-only; neither changeset is breaking — verified
- The last commit changes only the changeset and the record's summary row; the head merges cleanly into main — verified
- Files: all 39 changed files visited;
.changeset/promote-diffviewer-to-core.md— finding above;docs/specs/components/DiffViewer/DiffViewer.spec.md— FR1 counts wording, part of the finding above;packages/core/src/DiffViewer/DiffViewer.tsx— non-blocking header-length note; every other file — clear
… the line counts show A modified file shows no status token, which marks only an added, deleted, or renamed file, and a binary or no-change file shows no line counts. The Core changeset now names the status token for those three statuses and the line counts when lines changed, and the record's FR1 shows the counts only when any line was added or removed.
|
Fixed the changeset wording in aee7438, on top of 60d2826 (a fast-forward, no rebase).
Validation, on this head merged onto main at 01dcc33 (clean): This head awaits re-review. The engineering owner's |
There was a problem hiding this comment.
Not ready to approve yet: DiffViewer's Core API and behavior are decided only by the new component:DiffViewer record, which is still a draft; the changeset wording from the last review is fixed, and nothing else blocks.
Owner decision needed. An engineering owner approves or amends the draft record, including its coarse-pointer hit-area gap (spec:AST-094 FR42) and OQ1 (whether the Lab re-exports are deprecated, and when they are removed), by commenting /approve-spec <full head SHA> on this pull request; the author may do so if they are an engineering owner.
No blocking findings remain. In a local run, the DiffViewer, Lab and host data-attribute tests pass, and local Storybook captures show seven stories pixel-identical to Lab's with only the two message rows about 3 px taller.
Claims and files checked
Review mode: full; reason: author-not-engowner
- Title: DiffViewer moves to Core — verified (Core entry point, root export, exports map)
- Core changeset: imports from the Core entry and root with the parser, differ and model types — verified; read-only highlighted diff with annotation rows, line-number buttons and folds — verified; every changed line reads as added or removed without colour, also under forced colors — verified (hidden label in every indicator mode, forced-colors bar for tint-only changes, tests pass locally); header of a file with a path shows the path, a status token for an added, deleted or renamed file, and the counts when lines changed — verified (modified, added, renamed and binary files in the multi-file story, captured locally); that header is a disclosure that starts open, configured like Banner's collapsible, off with false — verified
- CLI changeset: the template list shows the showcase and the new Viewed files block — verified (both listed at the head, neither at the base, run locally)
- Component, utilities, tests and showcase block move as renames — verified (file list)
- Core-relative imports and the component translator with registered English — verified
- Core's stricter checks (read-only arrays, ref names, renderable guards, host data-attribute fixture, supporting leading on the message rows, no client directive on the Core barrel, literal values in doc prop descriptions, no record ids in source, baseline entry removed) — verified
- Lab entry re-exports Core with no deprecation marker — verified (Lab index and its test)
- Header slot renamed to the system's end-content name — verified
- No data-diff-* attribute of its own; the seven hooks served only tests and the perf page; changed code cells keep the shared diff attribute — verified (source search; 0 hooks on head stories against 7 to 40 on base stories, captured locally)
- Stories, Chromium specs and RTL target take the Core story ids — verified
- Showcase and example blocks, sandbox route list, ShadCN route with the Lab alias, probe theme for three targets — verified (probe theme check passes locally)
- The review keyword goes; search still finds DiffViewer through diff — verified (keywords; search run locally)
- Translator descriptions, the CodeBlock record's four places and the perf page header no longer say Lab — verified
- New draft record with its requirements, one hit-area gap and one open question; decider pending — verified
- 12 new types, 15 props plus ref, defaults unchanged, three theme targets as in Lab — verified (generated API surface of both trees)
- Behavior unchanged except the empty end-content header and the message-row leading — verified (whole component diff read; the annotation guard change is behavior-neutral)
- Message rows about 3 px taller, rows above identical — verified (41.1 to 44 px, captured locally)
- Accessibility checklist: names, bounded roles and states, native buttons with no arrow keys, focus kept on the header and fold buttons, reduced-motion chevron, forced-colors cases, catalog strings — verified by reading and tests; disclosure 20 px tall — verified (captured locally)
- Bundle size, contrast measurements, axe and RTL audits, Chromium spec runs, test totals, screenshots, graduation vote and audit fixes — reported
- Lab package stays private and canary-only; neither changeset is breaking — verified
- The last commit changes only the changeset and the record's line-count wording; the head merges cleanly into main — verified
- Files: all 39 changed files visited;
packages/core/src/DiffViewer/DiffViewer.tsx— non-blocking file-header length note; every other file — clear
User need
A code review surface (a pull request page, a review queue, an agent's proposed change) has to show what changed in each file: removed and added lines, syntax-highlighted, in one column or side by side, with room for review comments on any line. Core has CodeBlock's
isDifflayer for a short diff inside prose, but no component for a whole file's change with line numbers, folds for very large changes, header actions, and comment rows. DiffViewer does that job in Lab, and Lab is canary-only with no stability promise, so a product cannot build on it. This PR moves DiffViewer to Core, where it ships onlatestas a stable component.Problem and solution fit
DiffViewer,parseUnifiedDiff,createDiffFile, and the diff model types move frompackages/lab/src/DiffViewer/topackages/core/src/DiffViewer/, exported from@astryxdesign/core/DiffViewerand the package root. Git reads the component, its utilities, their tests, and the showcase block as renames.ReadonlyArraytypes,…Refnames,isRenderableguards, a host-data-attribute fixture, the supporting role's leading on the message row, no'use client'on the pass-through barrel, and doc prop descriptions that name the literal values their types hide. The moved source cites no claim ids any more, so its comment-provenance baseline entry goes, and the record links those claims instead.endContent, the name Core gives this slot on CodeBlock and Banner (architecture:public-component-apiINV2, DEC-1), in place of Lab'sheaderEnd.data-diff-*attribute of its own. A data attribute outsidedata-astryx-*is public surface (architecture:public-component-apiDEC-2), and Lab's seven hooks (change,pane,line-button,bar,sizer,split,fold) only served tests. The tests now find those parts by role, name, and structure, and the perf sandbox page watches for the root'sastryx-diff-viewerclass. Changed code cells keepdata-diff="added"or"removed", the attribute CodeBlock's diff rows already carry.Core/DiffViewer. The two Chromium specs and the RTL target take the new story ids.components/diff-viewerand keepscomponents/lab/diff-vieweras an alias. The probe theme covers the three targets.code reviewkeyword goes. In Core, a component's keywords tellastryx buildwhich ideas name a part, and "review" turned "quarterly business review" into a DiffViewer part. Search still finds DiffViewer throughdiff,patch, and its description.component:CodeBlocknames DiffViewer without "Lab" in all four places: an ownership line, FR13, a verification cell, and DEC-4. The DiffViewer perf page's header no longer calls it the Lab DiffViewer.component:DiffViewerrecord, a Core Changeset, and a CLI Changeset for the blocks.Current specification
collapsiblecame from feat(DiffViewer): one collapsible prop configures the file disclosure, as on Banner #13699, now on main as 0c9df81, decided byarchitecture:public-component-apiINV19 and INV21.component:DiffViewer(new,authority: draft) records the contract this PR ships: FR1–FR15, AR1–AR4, and DEC-1. Each row rests on DiffViewer's documented props and tests and on current records:component:CodeBlockFR12, FR13, and DEC-1 (languages and syntax slots), andspec:AST-025(scroll areas). It states one requirement gap,spec:AST-094FR42 (coarse-pointer hit areas, open finding 2), and one open question, OQ1: whether the Lab re-exports are deprecated, and when they are removed. It needs an engineering owner's/approve-spec. DEC-1's decider line reads "pending engineering-owner approval", andownerslists the schema's approval owners; please confirm or change both.Public delta and caller burden
New Core exports:
DiffViewer,parseUnifiedDiff,createDiffFile, and the typesDiffViewerProps,DiffViewerViewMode,DiffViewerChangeIndicator,DiffViewerInlineHighlight,CreateDiffFileOptions,DiffViewerFile,DiffViewerFileStatus,DiffViewerHunk,DiffViewerLine,DiffViewerLineKind,DiffViewerLineRef, andDiffViewerSide.Props:
file,viewMode,language,codeLanguages,hasLineNumbers,isWrapped,changeIndicator,inlineHighlight,hasChangeBackground,collapsible,endContent,renderLineAnnotation,onLineNumberClick,maxHeight,syntaxTheme, a rootref, and BaseProps. Defaults are unchanged.Theme targets:
diff-viewer(reflectsviewMode),diff-viewer-header, anddiff-viewer-path, as in Lab.Callsite:
Behavior is unchanged except two small effects of Core's rules:
endContentoffalse,true, or''leaves no empty wrapper in the header, and a file with no path and nothing inendContentrenders no header (Core's nullish-JSX lint; FR1).Lab: the
@astryxdesign/labexports re-export the Core ones (FR14), so Lab callers get Core's API,endContentincluded. They carry no@deprecatedmarker: deprecating and removing them waits for an owner decision (OQ1).Size:
@astryxdesign/core/DiffVieweralone bundles to 88.1 kB gzip of JavaScript (minified, React and StyleX external), most of it the CodeBlock tokenizer and syntax layer; next to CodeBlock it adds 12.8 kB. Only an importer pays it, as with the Lab component.Design and alternatives
code reviewas a keyword and changing the CLI's build test instead, because "performance review" and "quarterly business review" would then start as DiffViewer parts.Evidence
Before and after in a real browser
Re-checked at aa7000e, the head with the review fixes: all 16 states below are pixel-identical to these screenshots, and no story renders a
data-diff-*attribute.Chromium 155, static Storybook builds of #13699's head (
Lab/DiffViewer, the code now on main) and of this branch (Core/DiffViewer), each an element screenshot of#storybook-root. Every pair below is pixel-identical (pixelmatch, threshold 0), except the multi-file patch: its rows are identical down to the first message row (y = 1017), and then the two message rows are about 3 px taller each.The promotion's state matrix, each with its before pair (identical): default dark, Y2K theme, Gothic theme, split light, display options, review comments, large change, folded, right-to-left page, collapsed, viewed and folded, 320 px, and touch, 390 px,
pointer: coarsematched. Every before image sits beside its after image under the same name withcore-before-.Accessibility Checklist, item by item
collapsibleisfalse; Table for the hunks, with screen-reader column headers; and Button for the line numbers whenonLineNumberClickis set, and for the fold of a large change.aria-expanded. Added and removed are a hidden "Added" or "Removed" label on every changed line, beside the glyph or bar whenchangeIndicatorshows one, never colour alone. No loading, selected, or disabled state exists, so the busy item does not apply.spec:AST-025). The hunk area stays left to right in RTL, and no arrow keys are handled.0sunderprefers-reduced-motion: reduce.CanvasTextborders, and a tint-only change gets the bar (DiffViewerForcedColors.a11y.chromium.spec.ts, 5 cases). Glyphs are text.@astryx.diffViewer.*catalog key through Core's component translator.DiffViewer.a11y.chromium.spec.ts, LTR and RTL). The disclosure button is 20 px tall and as wide as its path; it meets WCAG 2.5.8 through the spacing exception, because a 24 px circle on it reaches no other target (the hunk header row sits between it and the first line number, andendContentsits at the far end of the row). The fold button is a 28 px Button. Under a coarse pointer, the disclosure and line-number buttons keep their own box, with no hit area toward 44 px (second open finding).Open findings for an owner.
--color-text-greenand--color-text-red, rgb(36 64 35) and rgb(74 37 32), on its header surface, rgb(16 19 20): 1.6:1 for+10and 1.4:1 for−8(see the Gothic screenshot). The counts are hidden from assistive technology, which hears the full sentence, but they are visible content. The pair is the same in Lab today. Gothic sets its hue text tokens dark, for text on its pastel fills (its--color-on-error-mutedisvar(--color-text-red)), while DiffViewer sets hue text on a surface, as the token's name suggests. Whether Gothic's hue text tokens change or DiffViewer's counts take another role is a theme or design decision, so this PR leaves it open.spec:AST-094FR42 asks that a touch target grow toward 44 × 44 px under a coarse pointer, through an invisible hit area, up to halfway to a neighbor. DiffViewer's disclosure button and line-number buttons are raw buttons without the shared hit area, as in Lab, so they keep their own box; the fold button is a Core Button and has it. The record states this as an FR42 gap. Adding the hit area is new behavior beyond the move, so it belongs in its own pull request if an owner wants it before or after graduation.Audits on this branch
.github/scripts/accessibility-audit.js --components DiffViewerwith the baseline gate: 15 stories, 0 violations.pnpm rtl:audit --filter DiffViewer: RTL-ready; 1 pass, 0 fail, 0 surprise; coverage 1 measured, 0 gap.DiffViewer.a11yandDiffViewerForcedColors.a11yagainst the Core build: 7 passed.Lifecycle evidence
packages/lab/package.jsonkeeps"private": trueand"canaryOnly": true.gh issue list --search DiffViewerfinds none), and no API arbitration record, vibe-test artifact, orhardening-labeled issue was found.[component]for Core and[docs]for the CLI. Nothing leaves Core, so neither is[breaking].Scope
Components: DiffViewer, parseUnifiedDiff, createDiffFile, CreateDiffFileOptions
Writing rubric results
docs/specs/components/DiffViewer/DiffViewer.spec.md(new):docs/specs/components/CodeBlock/CodeBlock.spec.md: an ownership line, FR13, a verification cell, and DEC-4 drop "Lab" before DiffViewer. R1–R7: none.Testing
pnpm test:uiandpnpm test:node: 1,173 files and 28,019 tests passed in the UI project; 1,944 files passed and 15 skipped in the Node project (30,573 tests passed, 3 expected failures, 111 skipped, 1 todo).pnpm vitest run packages/core/src/DiffViewer packages/lab/src/DiffViewer: 97 passed.ASTRYX_STRICT_LINT=1 eslintand Prettier on the changed files: clean.pnpm review:pre: 0 findings.pnpm check:knowledgeandpnpm check:repo: clean.node apps/docsite/scripts/generate-data.mjsandpnpm visual:probe-theme:checkpass without regenerating.astryx component DiffViewer --denseanswers from Core, andastryx template --listlists both blocks.pnpm storybook:build, then the screenshots, specs, and audits above.Rebased onto main at a2d5ef4, dropping #13699's commit. The only conflict was the
astryx search closegolden count, which main had moved from 52 to 54; with DiffViewer it is 55, and the golden test confirms it. Apart from those two lines, the pull request's diff is unchanged (patch-ids match). The screenshots above predate the rebase; local runs used the rebased tree.822f712 changes only record prose (CodeBlock's FR13 and DEC-4) and the perf page's header comment. On it, merged onto main at 5d14a16 (clean):
pnpm check:knowledge --base origin/main,pnpm check:repo,pnpm review:pre(0 findings), Prettier, and the DiffViewer and perf-page tests (121) pass.60d2826 changes only wording: the Core changeset and the record's Behavior summary row now give the file header and its disclosure only to a file with a path, as FR1 and FR7 do. Its content was validated merged onto main at 4d07b8a (clean):
pnpm check:changesets,pnpm check:knowledge --base origin/main,pnpm check:repo,pnpm review:pre(0 findings), Prettier, and 311 DiffViewer, Lab, doc-literal, and host-attribute tests pass. The head merges cleanly into main at 25e3032.aee7438 changes only wording: the Core changeset names the status token for an added, deleted, or renamed file and the line counts when lines changed, and the record's FR1 shows the counts only when any line was added or removed. On it, merged onto main at 01dcc33 (clean):
pnpm check:changesets,pnpm check:knowledge --base origin/main,pnpm check:repo,pnpm review:pre(0 findings), and Prettier pass.