Skip to content

cli: carry a pull record's bundle-only fields on its bundle kind #2642

Closed

Description

@thiras

Follow-up to #2637.

Today. PullRecord (crates/cli/src/commands/activity.rs) carries files_started, files_landed and bundle on every run, and a blob or entry run writes them as 0, 0, null. The page gates them on kind === "bundle". The type review of #2637 rated moving them under the kind as optional; #2637 tied bundle to the run's end but left the fields where they are.

Ask. Make kind a tagged enum flattened into the record, with the bundle fields on its bundle variant only:

#[serde(tag = "kind", rename_all = "snake_case")]
enum PullKind {
    Blob,
    Entry,
    Bundle { files_started: u64, files_landed: u64, counts: Option<BundleCounts> },
}

Regenerate the dashboard-*.json fixtures (UPDATE_STATUS_FIXTURES=1 cargo nextest run -p decdn-cli status::) and make crates/cli/dashboard/src/api.ts a discriminated union on kind. Pre-mainnet, so no reader of the old shape needs to survive.

Done when

  • A blob or entry record carries no bundle fields.
  • The page's contract test pins the union.

🤖 Generated with Claude Code

Activity

  1. added
    area:cli
    prio:low
    kind:chore
    on Oct 27, 2026
  2. moved this from Backlog to In progress in deCDNon Oct 27, 2026
  3. added this to the v0.3 milestone on Oct 28, 2026
  4. moved this from In progress to Done in deCDNon Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clikind:choreprio:low

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions