优化泥点流水的素材消耗原因展示 #302
Reference in New Issue
Block a user
Delete Branch "fix/wallet-ledger-reason"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Close #296
问题
钱包流水目前只把素材类扣费暴露为
asset_operation_consume,共享账单组件统一显示“资产操作消耗”,无法说明本次泥点实际用于哪类素材生成。落地方案
assetKind,不修改 SpacetimeDB schema。api-server只将内部素材类型白名单映射为用户可见reason,不暴露原始 metadata、资源 ID 或任务 ID。当前进度
用户可见映射
验证
cargo fmt --all -- --checkcargo test -p api-server profile_wallet_ledger_reason_only_exposes_known_asset_operationscargo test -p api-server worker_billing_context_freezes_charge_and_preserves_job_metadatacargo test -p shared-contracts profile_wallet_ledger_response_uses_camel_case_fieldsnpx vitest run packages/shared/src/components/PlatformProfileWalletLedgerModal/index.test.tsxnpm run typechecknpx eslint packages/shared/src/components/PlatformProfileWalletLedgerModal/model.ts packages/shared/src/components/PlatformProfileWalletLedgerModal/index.test.tsx packages/shared/src/contracts/runtime.tsnpm run check:encodingnpm run check:spacetime-schemagit diff --check以上均通过;Rust 仅输出仓库已有 dead-code warnings。
未验证边界
8082/3101已由另一套本地栈占用,为避免当前分支挂接同一数据库并带起 worker 处理现有队列,本轮未启动npm run dev:api-server。不变项