Fix empty Snapshots list: read snapper's JSON output #38
No reviewers
Labels
No labels
breadbug
bug
displays
enhancement
keybinds
network
phase-1
power
privacy
recovery
search
snapshots
sound
ui
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Breadway/bos-settings!38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/snapshots-list-parse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
get_snapshotssplit snapper's table on ASCII|, but snapper 0.13 draws it with U+2502, so every row was dropped and Snapshots always said "No snapshots yet" (hermes has 5).Now it runs
snapper --jsonout listand parses the machine output (keyed by config,rootpreferred, first config as fallback). Snapshot 0 ("current") is still dropped.SnapshotRowkeepsnumber,date,descriptionand gainskind,pre_number,cleanup(additive, unused by the current UI).Interaction with BSET-22/BSET-23 (PR #24, snapshot restore): that PR only adds a
restore_snapshotcommand next to this one and a Snapshots.svelte action; it does not touch the parser, and the row shape it consumes (number,date,description) is unchanged, so the two are independent and merge in either order. Once this lands the restore action finally has rows to act on.Tests: 5 new unit tests including verbatim
snapper --jsonout listoutput and a box-drawn table that must now be rejected instead of silently yielding an empty list.Verification:
npm run check(0 errors),npm run build,cargo fmt --all -- --check,cargo clippy --all-targets --locked -- -D warnings,cargo test --locked(80 passed).Closes BSET-25