packages/vscode-extension/DESIGN.md mirrors the preamble that
generateReactComponent() writes, verbatim, in its 4. Export to React section
(lines 266-281 at the time of filing). It is a second copy of the template text, kept
by hand.
Why this is filed rather than fixed in passing
objectui#7862 removes import React from 'react' from that template. Its dispatched
file surface is the template in src/extension.ts plus the pin tests in the same
package, so DESIGN.md is out of bounds for that PR and is left naming a line the
command no longer emits.
The precedent says it should move with the template. The changeset objectui#7837
landed states it in as many words:
packages/vscode-extension/DESIGN.md, which documented the identical two lines, is
corrected in the same commit so the design record does not freeze the defect.
The mechanism, which is the durable part
Nothing binds the mirror to the thing mirrored. The template lives inside a template
literal, so this package's tsc --noEmit sees a string; DESIGN.md is markdown in a
package whose README is the only file the doc gates' surfaces name. Both copies can
drift from each other indefinitely and every gate stays green. That is the same
mechanism as objectui#7837 and objectui#7862, one file over.
Two ways to close it, and the cost of each
- Correct DESIGN.md by hand each time, as objectui#7837 did. Cheap, and it
restores the drift the moment someone forgets.
- Bind them.
src/__tests__/export-to-react-compiles.test.ts already extracts
the template's product; a pin asserting DESIGN.md's fenced block equals that
product would make the mirror impossible to leave stale. That closes the class
rather than this instance, at the cost of one more assertion on a doc file.
Option 2 is the one worth a decision; option 1 is the minimum.
Severity
packages/vscode-extension is private: true and ships to the VS Code marketplace,
not npm. DESIGN.md is an internal design record, so the blast radius is contributors
reading a stale description, not users. Filed, not fixed, and unassigned.
Generated by Claude Code
packages/vscode-extension/DESIGN.mdmirrors the preamble thatgenerateReactComponent()writes, verbatim, in its 4. Export to React section(lines 266-281 at the time of filing). It is a second copy of the template text, kept
by hand.
Why this is filed rather than fixed in passing
objectui#7862 removes
import React from 'react'from that template. Its dispatchedfile surface is the template in
src/extension.tsplus the pin tests in the samepackage, so DESIGN.md is out of bounds for that PR and is left naming a line the
command no longer emits.
The precedent says it should move with the template. The changeset objectui#7837
landed states it in as many words:
The mechanism, which is the durable part
Nothing binds the mirror to the thing mirrored. The template lives inside a template
literal, so this package's
tsc --noEmitsees a string; DESIGN.md is markdown in apackage whose README is the only file the doc gates' surfaces name. Both copies can
drift from each other indefinitely and every gate stays green. That is the same
mechanism as objectui#7837 and objectui#7862, one file over.
Two ways to close it, and the cost of each
restores the drift the moment someone forgets.
src/__tests__/export-to-react-compiles.test.tsalready extractsthe template's product; a pin asserting DESIGN.md's fenced block equals that
product would make the mirror impossible to leave stale. That closes the class
rather than this instance, at the cost of one more assertion on a doc file.
Option 2 is the one worth a decision; option 1 is the minimum.
Severity
packages/vscode-extensionisprivate: trueand ships to the VS Code marketplace,not npm. DESIGN.md is an internal design record, so the blast radius is contributors
reading a stale description, not users. Filed, not fixed, and unassigned.
Generated by Claude Code