Skip to content

fix(cli): correct Dialog onClose → onOpenChange in styling docs - #5605

Merged
cixzhang merged 2 commits into
mainfrom
navi/fix/vibe-test-20260827
Sep 3, 2026
Merged

cixzhang merged 2 commits into
mainfrom
navi/fix/vibe-test-20260827

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Summary

The "Compound Components" code example in the styling CLI doc (astryx docs styling) used the deprecated onClose prop on <Dialog>. The correct prop is onOpenChange (unified in v0.0.2 via the unify-visibility-to-onOpenChange codemod).

Agents discovering the API via npx astryx docs styling would see:

<Dialog isOpen={isOpen} onClose={close} xstyle={overrides.dialog}>

…and produce TS2322 because onClose doesn't exist on DialogProps.

Fix

onClose → onOpenChange in the code example. One-line change.

Evidence (vibe test 2026-08-27)

Before (nightly run, unfixed origin/main):

  • Prompt wd-4 failed in both Astryx iteration 588bb19b and Astryx+TW iteration 491de8f1 with identical error:
    Type '{ children: Element; title: string; isOpen: true; onClose: () => void; }'
    is not assignable to type 'IntrinsicAttributes & DialogProps'.
    
  • Reproduced 2/2 independent iterations → real issue, not variance.

After (fixed worktree):

  • npx astryx docs styling now outputs onOpenChange={close} (verified via CLI output).
  • Dialog.doc.mjs already correctly documents onOpenChange — no conflict between component doc and styling doc.

Risk

None. Documentation-only change to a code example. No component behavior or type change.

@cixzhang
cixzhang requested a review from josephfarina as a code owner August 27, 2026 14:12
@cixzhang cixzhang added the documentation Improvements or additions to documentation label Aug 27, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 27, 2026
@vercel

vercel Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Sep 3, 2026 5:15pm UTC

Request Review

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Aug 27, 2026

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semantic verdict: approve

Thanks, this fixes the styling example so builders copy the Dialog prop that actually compiles.

[Reviewed by Robohands]

@cixzhang
cixzhang merged commit 9643689 into main Sep 3, 2026
29 checks passed
@github-actions
github-actions Bot deleted the navi/fix/vibe-test-20260827 branch September 4, 2026 06:23

This branch was successfully deployed

1 active deployment
Preview — 4bf444fe Deployed Sep 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant