Skip to content

published ESM contains directory imports, so no node-environment spec can render Dialog or CommandDialog #118

Description

@woksin

Describe the bug

This issue is filed from a production Cratis consumer. The complete measured, source-traced, cold-read report follows.

Status: OPEN — filed 2026-08-07. Kind: defect (packaging). Package: @cratis/components (/Dialogs, /CommandDialog).

The defect

Both barrels that reach Dialog import PrimeReact submodules as directory specifiersprimereact/progressspinner, primereact/stepper — rather than full file specifiers. Node's ESM resolver refuses a directory import, and vi.mock cannot intercept it because the package is externalized.

Consequence for any consumer whose test environment is node: Dialog and CommandDialog cannot be rendered in a spec at all.

Where Ada paid the cost

Source/Core/Compliance/Retention/Confirm/ConfirmDialog.tsx — the dialog that authorises irreversible deletion of a person's personal data, the only path by which that happens (D82).

A review found a one-keystroke destruction path there (autoFocus on the OK button plus a repeating Enter). Ada closed it with an acknowledgement gate, and specced its own half — the gate is shut at mount, the acknowledgement is present, gate and checkbox move as one state. ⚠️ The upstream half — that Cratis honours a shut gate (disabled: !isDialogValid || isBusy) — is verified by READING Dialog.js and is unspecifiable in Ada. So the safety property of the erasure screen rests on a source read that no gate re-checks, and a change to that expression would be invisible to Ada's entire suite.

The seam wanted

Emit full specifiers in the published ESM (primereact/progressspinner/progressspinner.esm.js, or whatever the correct entry is). Nothing about the components changes; the ask is packaging only.

⚠️ Not a request for a jsdom environment on Ada's side. Ada's environment choice is Ada's, and the same defect blocks every node-environment consumer; a consumer working around a packaging bug by changing its test runtime is not a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions