cli: show full snapshot ID in snapshot list#55
Conversation
`snapshot list` truncated the ID to 12 chars (TruncateID), but `snapshot get`/`snapshot restore` require the full 24-char ID, so the displayed ID returned 404. Show the full ID in the list table; `-q` output was already full and is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: ID column still ellipsized
- Updated snapshot list table truncation order to only shrink the SOURCE column so full snapshot IDs are no longer ellipsized.
Or push these changes by commenting:
@cursor push 50baeafdb2
Preview (50baeafdb2)
diff --git a/pkg/cmd/snapshotcmd.go b/pkg/cmd/snapshotcmd.go
--- a/pkg/cmd/snapshotcmd.go
+++ b/pkg/cmd/snapshotcmd.go
@@ -343,7 +343,7 @@
}
table := NewTableWriter(os.Stdout, "ID", "NAME", "KIND", "SOURCE", "CREATED")
- table.TruncOrder = []int{0, 3}
+ table.TruncOrder = []int{3}
for _, snapshot := range *snapshots {
name := snapshot.Name
if name == "" {You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 6edb87a. Configure here.
| } | ||
| table.AddRow( | ||
| TruncateID(snapshot.ID), | ||
| snapshot.ID, |
There was a problem hiding this comment.
ID column still ellipsized
Medium Severity
The list table now passes the full snapshot.ID, but TruncOrder still treats column 0 as the first column to shrink when the table is wider than the terminal. Render can then ellipsize the ID to a few characters, so copy-paste from the table may still fail for snapshot get / restore on typical narrow widths.
Reviewed by Cursor Bugbot for commit 6edb87a. Configure here.
|
Created a monitoring plan for this PR. What this PR does: Fixes a UX bug where Intended effect:
Risks:
Status updates will be posted automatically on this PR as monitoring progresses. |



Summary
hypeman snapshot listtruncated the snapshot ID to 12 chars (TruncateID), butsnapshot get/snapshot restorerequire the full 24-char ID — so copying the displayed ID returned a 404. The list table now shows the full snapshot ID;-q/quiet output already printed the full ID and is unchanged.Found during QA of hypeman#277 (snapshot/standby flows).
Test
go build ./...+go test ./pkg/cmd/...green. Verified live:snapshot listnow shows the 24-char ID andsnapshot get <that id>succeeds.🤖 Generated with Claude Code
Note
Low Risk
Single-line CLI display change in snapshot list only; no API or auth impact.
Overview
Fixes a UX bug where
hypeman snapshot listshowed a shortened snapshot ID whilesnapshot get,snapshot restore, and related commands expect the full 24-character ID, so copy-paste from the table could 404.The list table’s ID column now passes
snapshot.IDdirectly instead ofTruncateID(snapshot.ID). Quiet mode (-q) was already printing full IDs and is unchanged.Reviewed by Cursor Bugbot for commit 6edb87a. Bugbot is set up for automated code reviews on this repo. Configure here.