Skip to content

refactor(apps)!: unify local setup with shared app declarations - #159

Merged
francoischalifour merged 5 commits into
mainfrom
fc/audit-app-api
Nov 18, 2026
Merged

francoischalifour merged 5 commits into
mainfrom
fc/audit-app-api

Conversation

@francoischalifour

Copy link
Copy Markdown
Member

Local servers now take the same app declaration used for browser mounting: serveLocalApp({ page, app: dataApp }). All starters, previews, fixtures, and docs use this API. Local starter evidence also derives its query names from operations, matching hosted apps and removing duplicated registries.

Breaking change: replace the separate title and queries options in existing serveLocalApp() calls with app: dataApp.

Also marks initial loading boundaries as busy for assistive technology, fixes filter merging and input reads to use own properties, and removes __proto__-specific runtime, type, and manifest restrictions.

Allow filters such as toString without collisions with Object.prototype. Reject prototype setter declarations at runtime and ignore inherited operation input fields, matching the public filter contract.
Mark the section content boundary busy during its initial load as well as updates. Verify that the public loading workflow clears busy state once results are rendered.
Use the same app declaration for local serving and browser mounting. Derive local starter evidence from operation queryNames, matching hosted starters and removing duplicated query registries.

Migrate every starter, fixture, gallery server, and authoring example. Verify the full public API suite, static checks, starter builds, packed consumers, and the running local connection workflow.

BREAKING CHANGE: serveLocalApp now accepts { page, app: dataApp } instead of separate title and queries options. Existing local servers must pass their shared app declaration through app.
Remove __proto__-specific runtime, type-level, and manifest tooling guards together with their rejection tests. Keep general own-property lookups and unknown query and route validation.
@francoischalifour
francoischalifour merged commit dec99a2 into main Nov 18, 2026
13 checks passed
@francoischalifour
francoischalifour deleted the fc/audit-app-api branch November 18, 2026 14:22

@albert20260301 albert20260301 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two public-API regressions remain at d5a775b after removing the prototype-name restrictions:

  1. overrideDataAppManifest() accepts a JSON manifest with an own queries.__proto__ entry and emits queries: { __proto__: { statement: 'SELECT 1', ... } }. The emitted object literal sets a prototype instead of declaring a query. extractDataAppManifest() then reports that same query as an own entry with no diagnostics, while evaluating the rewritten declaration through the real defineDataApp() produces Object.keys(app.queries) === []. Before this change, the override rejects the input rather than silently changing its meaning. Please preserve rejection or implement an own-data-property representation consistently across extraction, rewriting and runtime semantics, with round-trip coverage.

  2. A public defineOperation({ queries: {}, filters: { ['__proto__']: choiceFilter(...) }, ... }) plus createDataClient().query('probe', JSON.parse('{"__proto__":"alpha"}')) reaches run() with no own filter property: Object.hasOwn(input, '__proto__') === false, Object.keys(input) === [], and input.__proto__ is an object rather than 'alpha'. The response still records the requested input as 'alpha'. The own-property reads do not fix assignment into the ordinary objects in parseFilterInput() and combineOperationFilters(). Please either retain the restriction or preserve these keys as own data properties end to end, and cover the public operation path.

The ordinary gates pass: local static checks, 139 focused manifest/operation/contract/authoring/preview tests, packed consumers and all three starter gates. The independent probes above exercise the removed boundary cases and expose silent data loss; no global prototype-pollution claim is made.

@albert20260301

Copy link
Copy Markdown
Contributor

Follow-up repair: #160 preserves own filter values and conflict detection, and restores the manifest prototype-setter rejection without reverting the shared local app API. Five public API regressions fail on merged main; full local bun run check passes with the repair (1,198 tests, packed consumers, and three starters). Required CI is pending.

francoischalifour pushed a commit that referenced this pull request Nov 19, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.78.0](v0.77.0...v0.78.0)
(2026-11-19)


### ⚠ BREAKING CHANGES

* **apps:** unify local setup with shared app declarations
([#159](#159))
* run embedded page actions from the host
([#151](#151))

### Features

* improve data app starters and chart exploration
([#162](#162))
([c57a557](c57a557))
* run embedded page actions from the host
([#151](#151))
([8e496b8](8e496b8))
* show horizontal grids by default on Cartesian charts
([#157](#157))
([bfd12a7](bfd12a7))


### Bug Fixes

* correct comparison math, date range edge cases, and stale docs
([#154](#154))
([6ec7c6b](6ec7c6b))
* polish component states, focus rings, and alignment
([#161](#161))
([202074e](202074e))
* resolve packed manifest dependency before publication
([#158](#158))
([75f57eb](75f57eb))
* stacked bar tooltip inspection across sparse hourly data
([#156](#156))
([e917ff0](e917ff0))


### Code Refactoring

* **apps:** unify local setup with shared app declarations
([#159](#159))
([dec99a2](dec99a2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

3 participants