* fix(frontend): guard unknown workspace quota types
Ignore quota resources that an older frontend bundle does not recognize and make quota formatting resilient to new SDK fields. Add a regression test for pod and unknown quota types.
* build(client-sdk): bump package version to 0.1.22
While Brain (system-brain) is the topmost non-minimized window, AppDock
(collapse pill included, zIndex 1000) no longer renders, so nothing
overlays the Brain iframe. The dock returns as soon as Brain loses the
top layer, is minimized, or is closed. Other apps and the floating-button
shape are unaffected.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The official template one-click deploy lands in Brain via the OAuth page's
openBrainTemplateDeploy branch: `/oauth?login=github&openapp=system-brain&
templateName=...&templateForm=...` becomes an autolaunch for the Brain
`/deploy` route. GitHub one-click deploy (Brain #283) needs the same entry
point, but githubRepo/autoDeploy were silently ignored.
Add the symmetric openBrainGithubDeploy branch: when openapp is system-brain
and githubRepo is present, autolaunch Brain `/deploy?githubRepo=...&
autoDeploy=1` so the Brain GitHub deployer opens with the repo pre-filled and
auto-deploys once when autoDeploy=1. Works for both the token-login and
already-logged-in paths; anything malformed falls through to normal openapp
handling.
* feat(frontend): add Rybbit analytics integration with event forwarding
Integrate self-hosted Rybbit analytics as an additional sink alongside
the existing GTM pipeline, which remains fully unchanged:
- Add RybbitScript component to @sealos/gtm, driven by the
NEXT_PUBLIC_RYBBIT_HOST / NEXT_PUBLIC_RYBBIT_SITE_ID env vars;
loads nothing when unset
- Forward all track() events to window.rybbit.event() in addition to
dataLayer; object props are JSON-serialized and truncated at 512
chars per value (Rybbit caps properties at 2KB, primitives only)
- Mount RybbitScript in desktop / applaunchpad / dbprovider / template;
dbprovider and template get an analytics script for the first time
(their track() events previously had no consumer)
- Document the env vars in desktop/.env.template
Verified: @sealos/gtm, desktop, dbprovider and template production
builds pass. The applaunchpad build failure is a pre-existing echarts
SSR issue on main, confirmed unrelated via a stash control test.
* refactor(frontend): drive Rybbit config from runtime backend config
Address review feedback: replace build-time NEXT_PUBLIC_* env vars with
runtime configuration delivered by each app's existing config channel,
symmetric with how gtmId flows today. Config changes no longer require
a rebuild and can be toggled per environment at deploy time.
- RybbitScript is now props-driven (host / siteId); empty host or
siteId disables it. No process.env reads remain
- desktop: add layoutConfig.rybbitHost / rybbitSiteId (type, client
defaults, Helm values + configmap), passed through at the mount point
- applaunchpad: add analytics.rybbit.{host,siteId} to the config
schemas (server + client), example yaml and chart configmap; read in
getInitialProps alongside the existing gtm fields
- dbprovider / template: add optional analytics.rybbit section to the
config schemas, example yamls, chart configmaps and values; read in
getInitialProps and pass to the mount point
- New analytics sections are optional in the zod schemas so existing
deployments keep working when only the image is upgraded
- Drop the NEXT_PUBLIC_RYBBIT_* entries from desktop/.env.template;
document rybbitHost/rybbitSiteId in the Helm values guides
Verified: @sealos/gtm builds; desktop production build passes;
dbprovider / template / applaunchpad compile successfully
(applaunchpad still stops at the pre-existing echarts SSR issue on
/app/detail/monitor, unchanged from main).
* chore(desktop): restore .env.template to drop unrelated diff
* fix(frontend): buffer early Rybbit events and allowlist host in provider CSP
Review follow-up for the Rybbit integration:
- Queue events fired before the Rybbit script finishes loading and
flush them from RybbitScript onLoad, mirroring the dataLayer buffer
the GTM path already has
- Append the configured rybbitHost to script-src in both CSP
annotations (nginx snippet + higress) of the dbprovider/template/
applaunchpad ingresses, so /api/script.js is not blocked when the
integration is enabled; unset values render the CSP unchanged
- Wire applaunchpad rybbitHost/rybbitSiteId through values instead of
hardcoded empty strings in the configmap, matching dbprovider and
template (the config channel was previously broken)
* fix(desktop): expose pod workspace quota
* fix(providers): support pod quota in provider quota boxes
Adapt dbprovider, template and applaunchpad QuotaBoxes to render the
new pod workspace quota item: add sourceMap color / icon entries and
missing i18n keys, aligning zh label with the shared quota-dialog.
* fix(costcenter): embed Alipay cashier page via iframe
The Alipay payment URL from TradePagePay is a signed gateway URL over
900 characters long, which cannot be scanned as a QR code. Switch to
qr_pay_mode=4 (order code mode) so Alipay renders the official cashier
page, return its auto-submitting form HTML as the payment code, and
embed it in the frontend via an iframe. QR code rendering remains for
legacy data.
* refactor(pay): restore original alipay comments
* refactor(costcenter): load Alipay cashier page via iframe src
* feat(billing): route Stripe returns to declared app
Signed-off-by: aimeritething <aimeritething@gmail.com>
* fix(billing): persist Stripe callback app
Signed-off-by: aimeritething <aimeritething@gmail.com>
* fix(billing): address review feedback for Stripe payApp routing
- Fix golangci-lint issues: use NewRequestWithContext and
http.MethodPost in tests, drop a trailing blank line
- Normalize array-valued app query params in the desktop
Stripe callback resolver and cover it with a test
- Simplify pendingTransactionPromotionCode with strings.SplitN
- Rename the parser test to reflect it only verifies JSON binding
- Refresh the stale callback URL example comment in buildURLs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: aimeritething <aimeritething@gmail.com>
* docs(pay): use placeholder values in callback URL example
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: aimeritething <aimeritething@gmail.com>
---------
Signed-off-by: aimeritething <aimeritething@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* fix(user): make kube API client rate limit configurable
* fix(user): add cloudDomain and cloudApiServerPort fallbacks
Signed-off-by: Yun Pan <dinoallo@netc.it>
* fix(user): increase the default kubeAPI.qps and kubeAPI.burst
Signed-off-by: Yun Pan <dinoallo@netc.it>
---------
Signed-off-by: Yun Pan <dinoallo@netc.it>
* fix(account): make hourly billing reconciliation resumable and idempotent
- schedule every ready billing hour from a persisted Mongo checkpoint
- retry failed owner reconciliation and preserve checkpoint progress
- use stable billing IDs with Mongo upsert semantics
- recover stable unsettled billings independently from monitor data
- make Cockroach balance and credits deductions idempotent
- reconstruct historical debt and subscription state using transaction UpdatedAt
- scope subscription history queries to active workspaces in the target hour
- add focused unit and Testcontainers runtime coverage
* perf
* fix(account): restore hourly billing deduction semantics
* feat(account): bound billing checkpoint catch-up window
- add BILLING_MAX_CATCHUP_DURATION with a default of 24h
- limit historical billing replay to the configured duration
- preserve first-start behavior to process only the latest ready hour
- log skipped hours when the persisted checkpoint exceeds the replay window
- expose durable checkpoint lag and windowed pending checkpoint metrics
- wire the setting into the account controller Helm chart
- add bounded catch-up, first-start, validation, and metric tests
* fix: ci
* perf(account): optimize indexed historical billing queries
- replace full DebtStatusRecord loading with per-user LATERAL lookup
- use half-open billing time boundaries for historical debt state
- add composite indexes for debt, subscription, and credits queries
- add Testcontainers runtime and execution-plan coverage for billing paths
- verify Mongo billing indexes and repeated initialization behavior
* fix(applaunchpad): use Shanghai time for date ranges
* fix(costcenter): correct GTM currency field
* fix(applaunchpad): use browser timezone for date ranges
* fix(applaunchpad): reject nonexistent DST times
* fix(account): recover debt status after balance normalization
* fix(account): retry debt refresh when user lock is busy
* fix(account): verify workspace subscriptions during debt recovery