diff --git a/internal/cli/snapshot.go b/internal/cli/snapshot.go index 36b835c..890a3bc 100644 --- a/internal/cli/snapshot.go +++ b/internal/cli/snapshot.go @@ -512,18 +512,17 @@ func (app *SnapshotApp) List(ctx context.Context, jsonOutput bool) error { // Table output w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', 0) - if _, err := fmt.Fprintln(w, "SNAPSHOT ID\tTIMESTAMP\tCOMPRESSED SIZE"); err != nil { + if _, err := fmt.Fprintln(w, "SNAPSHOT ID\tTIMESTAMP"); err != nil { return err } - if _, err := fmt.Fprintln(w, "───────────\t─────────\t───────────────"); err != nil { + if _, err := fmt.Fprintln(w, "───────────\t─────────"); err != nil { return err } for _, snap := range snapshots { - if _, err := fmt.Fprintf(w, "%s\t%s\t%s\n", + if _, err := fmt.Fprintf(w, "%s\t%s\n", snap.ID, - snap.Timestamp.Format("2006-01-02 15:04:05"), - formatBytes(snap.CompressedSize)); err != nil { + snap.Timestamp.Format("2006-01-02 15:04:05")); err != nil { return err } } @@ -700,25 +699,8 @@ func (app *SnapshotApp) getSnapshots(ctx context.Context) ([]SnapshotInfo, error } } - // For each snapshot, download manifest and calculate total blob size + // Convert map to slice without downloading manifests for _, snap := range snapshotMap { - manifest, err := app.downloadManifest(ctx, snap.ID) - if err != nil { - log.Warn("Failed to download manifest", "id", snap.ID, "error", err) - continue - } - - // Calculate total size of referenced blobs - for _, blobHash := range manifest { - blobPath := fmt.Sprintf("blobs/%s/%s/%s", blobHash[:2], blobHash[2:4], blobHash) - info, err := app.S3Client.StatObject(ctx, blobPath) - if err != nil { - log.Warn("Failed to stat blob", "blob", blobHash, "error", err) - continue - } - snap.CompressedSize += info.Size - } - snapshots = append(snapshots, *snap) }