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.
|
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. |
The ID column carried the full 24-char ID but was still first in TruncOrder, so a narrow terminal would ellipsize it and defeat copy-paste into snapshot get/restore. Truncate NAME and SOURCE instead, and add a regression test. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>


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
CLI display-only change for snapshot list table formatting; no API or server behavior changes.
Overview
hypeman snapshot listnow prints the full 24-character snapshot ID in the table instead of a 12-characterTruncateIDvalue, so IDs copied from the list work withsnapshot getandsnapshot restore(which require the full ID).On narrow terminals,
TruncOrderis updated from ID+SOURCE to NAME+SOURCE, so column shrinking affects those fields while the ID column stays full width. A regression test (TestSnapshotListIDNotTruncated) asserts ID width and rendered output atCOLUMNS=40. Quiet (-q) output was already full IDs and is unchanged.Reviewed by Cursor Bugbot for commit f85254e. Bugbot is set up for automated code reviews on this repo. Configure here.