Skip to content

fix(lang-core): report empty index expressions as parser errors - #1279

Closed
AbhinRustagi wants to merge 2 commits into
mainfrom
fix/lang-core-empty-index
Closed

AbhinRustagi wants to merge 2 commits into
mainfrom
fix/lang-core-empty-index

Conversation

@AbhinRustagi

Copy link
Copy Markdown
Contributor

Generated chart expressions such as metrics.daily[].day silently evaluated to null, leaving charts blank while parser validation reported success. Report these as invalid-expression errors with the statement ID and guidance to use metrics.daily.day for array projection.

Both one-shot and streaming parsers surface the error. Automatically closed unfinished indexes remain tolerated, and a later replacement statement clears its old diagnostics. Includes a patch changeset and updates the validation-error counters.

Validation: lang-core build and typecheck; all 115 existing tests; inline regression checks for raw/nested empty indexes, valid indexes/projections/empty arrays, chunked streaming, and corrective patches. Verified Muse's existing assertValidOpenUILang rejects the malformed expression and accepts its correction using the built package. No Muse dependency change or package publication is included.

@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
openui-docs Ready Ready Preview Sep 30, 2026 9:04pm UTC

Request Review

@AbhinRustagi

Copy link
Copy Markdown
Contributor Author

Moved the parser fix, correction examples, and patch changeset into #1268. Closing this duplicate PR; the changes will ship with the renderer work.

This branch was successfully deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant