Skip to content

finding(vscode-extension): nothing binds DESIGN.md's hand-copied Export-to-React preamble to the generator it mirrors #7976

Description

@claude

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

  1. Correct DESIGN.md by hand each time, as objectui#7837 did. Cheap, and it
    restores the drift the moment someone forgets.
  2. 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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationdomain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repofindingpriority:p3tooling

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions