Skip to content

feat(database): use Desktop host configuration for currency display - #15

Merged
mlhiter merged 1 commit into
mainfrom
kinshasa/sealos-desktop-currency-symbol
Oct 16, 2026
Merged

mlhiter merged 1 commit into
mainfrom
kinshasa/sealos-desktop-currency-symbol

Conversation

@mlhiter

@mlhiter mlhiter commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Both source workspaces now use published Desktop SDK 0.1.24 and one in-memory HostConfig request for currency display and subscription state, with shellCoin fallback for missing currency or failed requests.
This removes duplicated SDK workspaces and legacy currency configuration, preserves supported v5.1 quota kinds, and adds regression coverage and upgrade documentation.

Upgrade

Upgrade Desktop first for CNY/USD and remove database.ui.currencySymbol from manually mounted main configuration before startup, as the strict schema rejects the obsolete field.

Validation

Passed: 16 HostConfig tests, 4 deployment compatibility tests including Helm rendering, both workspace typechecks, both Helm lints, and commit-time secret scanning; embedded Desktop integration remains untested.

Sequence Diagram

sequenceDiagram
    participant App as Database app
    participant Store as Shared HostConfig store
    participant SDK as Desktop SDK 0.1.24
    participant Desktop as Sealos Desktop
    participant UI as Price and quota UI
    App->>SDK: Initialize
    App->>Store: Load host configuration once
    Store->>SDK: getHostConfig()
    SDK->>Desktop: Request host configuration
    alt Host configuration received
        Desktop-->>Store: Currency and subscription via SDK
        Store->>Store: Use shellCoin when currency is absent
    else Request fails
        Store->>Store: Default to shellCoin and subscription enabled
    end
    Store-->>UI: Shared currency and subscription state
Loading

@mlhiter
mlhiter merged commit 25416d1 into main Oct 16, 2026
16 checks passed
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