Skip to content

Improve snapshot browser single-child expansion - #1266

Open
jaysonsantos wants to merge 1 commit into
garethgeorge:mainfrom
jaysonsantos:auto-expand-snapshot-single-child
Open

Improve snapshot browser single-child expansion#1266
jaysonsantos wants to merge 1 commit into
garethgeorge:mainfrom
jaysonsantos:auto-expand-snapshot-single-child

Conversation

@jaysonsantos

@jaysonsantos jaysonsantos commented Jun 29, 2026

Copy link
Copy Markdown

Summary

  • Auto-expand single-child snapshot browser paths on the backend until the listing reaches a directory with multiple entries, a file, an empty directory, or the max expansion depth.
  • Return the deepest expanded path from ListSnapshotFiles so the frontend can reconstruct and render the collapsed path chain with one API request per click.
  • Add tests for snapshot path normalization and direct-child filtering.
  • Ignore .direnv/ for local Nix/direnv development state.

Testing

  • gzip -c /dev/null > webui/dist/index.html.gz && nix shell nixpkgs#go --command go test ./...
  • nix shell nixpkgs#go --command go test -race ./internal/orchestrator/repo ./internal/api ./webui
  • cd webui && npm run check
  • cd webui && npm run build
  • Manual browser test of the snapshot browser against a dev Backrest instance.

Disclosure

This change was implemented with the help of an AI coding agent. I manually reviewed the code and manually tested the feature before opening this PR.

Example

Screen.Recording.2026-06-29.at.17.46.06.mov

@garethgeorge
garethgeorge force-pushed the main branch 3 times, most recently from 1a75a0a to aeade74 Compare July 10, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant