openova/core/admin
e3mrah 9964ceeba2
fix(admin,billing): drop unsafe state-write in snippet — spinner stays forever (#1000) (#1001)
BillingPage's data fetch was gated on `userRole`, a $state seeded by
`{@const _ = (userRole = user.role)}` inside the AdminShell snippet's
template. Svelte 5 treats $state writes during render as
state_unsafe_mutation and the parent's $effect did not re-fire — so
load() never ran, /billing/admin/promos and /billing/admin/settings
were never called, and the inner spinner sat forever on
admin.openova.io/nova/billing.

Replace the cross-component reactivity coupling with BillingPage's own
getMe() inside its initial $effect (mirrors RevenuePage). Drop the
@const assignment from the snippet. Existing save/upsert/delete
handlers still use `userRole` for post-mutation reload and now read
the value seeded by the initial effect — same end state, no behaviour
change for the working sections.

Co-authored-by: hatiyildiz <hatice@openova.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 23:36:50 +04:00
..
public feat(consolidation): Phase 1 — move Catalyst-Zero apps + CI + manifests into public monorepo 2026-04-28 12:08:09 +02:00
src fix(admin,billing): drop unsafe state-write in snippet — spinner stays forever (#1000) (#1001) 2026-05-05 23:36:50 +04:00
astro.config.mjs feat(consolidation): Phase 1 — move Catalyst-Zero apps + CI + manifests into public monorepo 2026-04-28 12:08:09 +02:00
Containerfile feat(consolidation): Phase 1 — move Catalyst-Zero apps + CI + manifests into public monorepo 2026-04-28 12:08:09 +02:00
nginx.conf feat(consolidation): Phase 1 — move Catalyst-Zero apps + CI + manifests into public monorepo 2026-04-28 12:08:09 +02:00
package-lock.json feat(consolidation): Phase 1 — move Catalyst-Zero apps + CI + manifests into public monorepo 2026-04-28 12:08:09 +02:00
package.json feat(consolidation): Phase 1 — move Catalyst-Zero apps + CI + manifests into public monorepo 2026-04-28 12:08:09 +02:00
tsconfig.json feat(consolidation): Phase 1 — move Catalyst-Zero apps + CI + manifests into public monorepo 2026-04-28 12:08:09 +02:00