Skip to content

Conversation

@SgtPooki
Copy link
Collaborator

@SgtPooki SgtPooki commented Nov 10, 2025

Refresh payments status CLI output

Changes

  • wallet section now labels the owner address and shows FIL/USDFC balances with consistent formatting, while the Filecoin Pay block highlights balance, locked reserve, available funds, and epoch/daily/monthly spend.
  • WarmStorage usage displays a bigint-precise stored GiB estimate (documented via JSDoc), plus runway and a rephrased capacity line (“Funding could cover ~X TiB per month”) to clarify what the deposit affords.
  • Payment rail stats are no longer printed by default; users can opt in with --include-rails

Fixes #69

Output

New payments status output

╰─ ✔ ❯ npm run build && npx filecoin-pin payments status

> filecoin-pin@0.11.1 build
> tsc

┌  Filecoin Onchain Cloud Payment Status
│
◇  ✓ Configuration loaded
│
│  ━━━ Current Status ━━━
│  Wallet
│    Owner address: 0x2B3d0b827BAded638279C637d7ef21a266994c9E
│    Network: calibration
│    FIL: 149.9995 tFIL
│    USDFC: 192.7380 USDFC
│
│  Filecoin Pay
│    Balance: 1.9999 USDFC
│    Locked: 0.1200 USDFC (30-day reserve)
│    Available: 1.8799 USDFC
│    Spend rate: 0.000001 USDFC/epoch
│    Daily cost: 0.0040 USDFC
│    Monthly cost: 0.1200 USDFC
│
│  WarmStorage Usage
│    Stored: ~49.2 GiB
│    Runway: ~1 year(s) 3 month(s) 14 day(s)
│    Funding could cover ~0.7 TiB per month
│
└  Status check complete

With new --include-rails option

╰─ ✔ ❯ npm run build && npx filecoin-pin payments status --include-rails

> filecoin-pin@0.11.1 build
> tsc

┌  Filecoin Onchain Cloud Payment Status
│
◇  ✓ Configuration loaded
│
│  ━━━ Current Status ━━━
│  Wallet
│    Owner address: 0x2B3d0b827BAded638279C637d7ef21a266994c9E
│    Network: calibration
│    FIL: 149.9995 tFIL
│    USDFC: 192.7380 USDFC
│
│  Filecoin Pay
│    Balance: 1.9999 USDFC
│    Locked: 0.1200 USDFC (30-day reserve)
│    Available: 1.8799 USDFC
│    Spend rate: 0.000001 USDFC/epoch
│    Daily cost: 0.0040 USDFC
│    Monthly cost: 0.1200 USDFC
│    Payment Rails
│      2 active, 0 terminated
│      Pending settlement: 0.0420 USDFC
│      2 rail(s) need settlement
│
│  WarmStorage Usage
│    Stored: ~49.2 GiB
│    Runway: ~1 year(s) 3 month(s) 14 day(s)
│    Funding could cover ~0.7 TiB per month
│
└  Status check complete

@SgtPooki SgtPooki linked an issue Nov 10, 2025 that may be closed by this pull request
@FilOzzy FilOzzy added team/filecoin-pin "Filecoin Pin" project is a stakeholder for this work. team/fs-wg FOC working group is a stakeholder for this work, and thus wants to track it on their project board. labels Nov 10, 2025
@FilOzzy FilOzzy added this to FS Nov 10, 2025
@github-project-automation github-project-automation bot moved this to 📌 Triage in FS Nov 10, 2025
@SgtPooki SgtPooki requested a review from Copilot November 10, 2025 18:48
@SgtPooki SgtPooki changed the title fix: payments status is more communicative fix: refresh payments status CLI output Nov 10, 2025
@SgtPooki SgtPooki self-assigned this Nov 10, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the payment status display command to provide a more structured and detailed view of Filecoin Pay balances, storage usage, and costs. It also adds an optional --include-rails flag to conditionally display payment rail information.

  • Adds a new formatStorageGiB function to calculate and display warm storage size from spend rates
  • Restructures the status output with separate sections for Wallet, Filecoin Pay, and WarmStorage Usage
  • Introduces the --include-rails option to conditionally display payment rail details
  • Refactors displayPaymentRailsSummary to support nested indentation and removes daily/monthly cost calculations from rails (moved to main Filecoin Pay section)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/payments/status.ts Adds storage size calculation, restructures status display with detailed cost breakdowns, conditionally fetches payment rails data, and refactors the rails summary display function for flexible indentation
src/commands/payments.ts Adds the --include-rails option to the status command to allow users to opt-in to viewing payment rail details

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@BigLep BigLep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Output generally looks good to me.

Only area want to fix is around payment rail rates so we get consistency:

We currently have:

│    Spend rate: 0.000001 USDFC/epoch
│    Daily cost: 0.0040 USDFC
│    Monthly cost: 0.1200 USDFC

All 3 of these are rates, so I think can be made consistent.

Option 1:

│    Epoch cost: 0.000001 USDFC
│    Daily cost: 0.0040 USDFC
│    Monthly cost: 0.1200 USDFC

Option 2:

│    Spend rate: 0.000001 USDFC/epoch | 0.0040 USDFC/day | 0.1200 USDFC/month

@github-project-automation github-project-automation bot moved this from 📌 Triage to ✔️ Approved by reviewer in FS Nov 10, 2025
@SgtPooki SgtPooki merged commit 13f557e into master Nov 10, 2025
12 checks passed
@SgtPooki SgtPooki deleted the 69-payments-status-output-adjustments branch November 10, 2025 20:54
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FS Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team/filecoin-pin "Filecoin Pin" project is a stakeholder for this work. team/fs-wg FOC working group is a stakeholder for this work, and thus wants to track it on their project board.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

payments status output adjustments

4 participants