Skip to content

Fix metered update billing and dashboard cycles UX#42

Merged
humandebri merged 8 commits into
mainfrom
fix/cycles-billing-charge-accounting
Jun 3, 2026
Merged

Fix metered update billing and dashboard cycles UX#42
humandebri merged 8 commits into
mainfrom
fix/cycles-billing-charge-accounting

Conversation

@humandebri
Copy link
Copy Markdown
Collaborator

@humandebri humandebri commented Jun 2, 2026

Summary

  • Switch metered update billing from same-message canister cycle balance deltas to instruction counter deltas plus the 13-node update execution base fee.
  • Optimize billed write paths by replacing full-database checksum scans for logical size refreshes with SQLite page-count/page-size reads.
  • Compress database charge bookkeeping from balance SELECT + account UPDATE + ledger INSERT to UPDATE RETURNING + ledger INSERT while preserving overdraw and suspension behavior.
  • Make OISY wallet popup cleanup non-fatal so disconnect failures do not mask connect, approve, or purchase errors.
  • Clean up the dashboard/home database table: prioritize lifecycle status, shorten cycle balances, remove Registry/Open columns, make database names open the wiki, and keep Top up buttons from wrapping.

Testing

  • CI=true pnpm --dir wikibrowser test
  • CI=true pnpm --dir wikibrowser typecheck
  • cargo test -p vfs-store
  • cargo test -p vfs-runtime
  • cargo test -p vfs-runtime logical_size
  • cargo test -p vfs-runtime charge_database_update_reports_missing_cycle_account
  • cargo test -p vfs-runtime zero_cycle_charge_skips_cycle_ledger
  • cargo test -p vfs-canister instruction_charge
  • cargo test -p vfs-canister write_nodes_records_instruction_charge_and_writes_nodes
  • cargo test -p vfs-canister write_node_overdrawn_charge_consumes_balance_and_suspends_database
  • git diff --check

@humandebri humandebri changed the title Fix cycles accounting and OISY wallet cleanup Fix metered update billing and dashboard cycles UX Jun 3, 2026
@humandebri humandebri self-assigned this Jun 3, 2026
@humandebri humandebri marked this pull request as ready for review June 3, 2026 04:31
@humandebri humandebri merged commit a5a1d40 into main Jun 3, 2026
10 checks passed
@humandebri humandebri deleted the fix/cycles-billing-charge-accounting branch June 3, 2026 04:43
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