Align public-web clientConfig naming with the browser configuration global #1643

Open
opened 2026-10-24 06:30:54 +00:00 by forgejo-admin · 0 comments

Operator request from review of reference/capability-reference.md: publishStaticSite accepts clientConfig, but generateClientConfigJs writes window.MODULE_CONFIG into config.js. The two names obscure that these are the same configuration values.

Evidence: packages/capabilities/src/public-web.ts defines PublishStaticSiteRequest.clientConfig, generateClientConfigJs, and the publication path writing config.js to the state web overlay before upload.

Choose one coherent naming model: for example clientConfig/window.CLIENT_CONFIG, or moduleConfig/window.MODULE_CONFIG. Decide compatibility for existing callers and browser bundles before changing either public name; identify the required capability version change or migration. Update the canonical guide with a complete publication-to-browser example, including how the page loads config.js and reads its public values. Values are browser-visible and must never contain secrets.

Acceptance: the public API and browser-facing name clearly correspond; tests cover generated JavaScript and migrated consumers; existing deployments have an explicit migration path.

Operator request from review of reference/capability-reference.md: publishStaticSite accepts clientConfig, but generateClientConfigJs writes window.__MODULE_CONFIG__ into config.js. The two names obscure that these are the same configuration values. Evidence: packages/capabilities/src/public-web.ts defines PublishStaticSiteRequest.clientConfig, generateClientConfigJs, and the publication path writing config.js to the state web overlay before upload. Choose one coherent naming model: for example clientConfig/window.__CLIENT_CONFIG__, or moduleConfig/window.__MODULE_CONFIG__. Decide compatibility for existing callers and browser bundles before changing either public name; identify the required capability version change or migration. Update the canonical guide with a complete publication-to-browser example, including how the page loads config.js and reads its public values. Values are browser-visible and must never contain secrets. Acceptance: the public API and browser-facing name clearly correspond; tests cover generated JavaScript and migrated consumers; existing deployments have an explicit migration path.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
celilo/celilo#1643
No description provided.