Skip to content

feat(gui): Leftovers, Similar Photos, and Network panes (conductor discovery follow-ups)#273

Merged
caezium merged 1 commit into
mainfrom
feat/discovery-panes
Jul 12, 2026
Merged

feat(gui): Leftovers, Similar Photos, and Network panes (conductor discovery follow-ups)#273
caezium merged 1 commit into
mainfrom
feat/discovery-panes

Conversation

@caezium

@caezium caezium commented Jul 12, 2026

Copy link
Copy Markdown
Owner

What

Three new GUI panes surfacing the conductor's discovery commands, all read-only v1 (the only action anywhere is Reveal in Finder):

Pane Tool case Command Accent
Leftovers orphans burrow orphans <dir> olive 0xB7BE5A
Similar Photos photos burrow photos <dir> (600 s timeout — dHash is slow) orchid 0xD57BC4
Network net burrow net indigo 0x6E8FE0

Pattern provenance

Copied from the post-#266 Duplicates pane (DupesView.swift / DupesModel.swift), the canonical conductor-tool surface:

  • Analyze-style toolbar: up arrow + breadcrumbs + mono summary + folder/refresh icon buttons (Network drops the folder machinery — the sample is machine-wide).
  • The same state ladder: conductorMissing / idle / scanning / error / clean / results.
  • BurrowConductor.capture off the main thread with a monotonic scanGen supersede token; OperationCenter begin/end around every scan.
  • Pure JSONSerialization parsers (OrphansReport.parse, PhotosReport.parse, NetReport.parse) — loose everywhere except the spine, Int64-exact byte counts, garbage → nil never a crash.
  • NSLocalizedString on every user string, Brand.* styling, Tool accents/tints/taglines.
  • Network auto-samples on first activation via PortsView's isActive idiom (cheap, no timers); manual refresh after.

Tool gains three cases; verified no exhaustive Tool switches exist outside Tool.swift, so the growth is additive. Nav order: the discovery pair (Leftovers, Similar Photos) follows Duplicates; Network sits beside Ports.

Tests (written first)

OrphansModelTests / PhotosModelTests / NetModelTests, in the DupesModelTests style: canned CLI-shaped reports, spine reads, ordering (confidence tier / cluster size / total bytes), loose-field degradation, Int64 precision above Int32, garbage-is-nil. Shapes verified against the vendored burrow-cli source (orphan.rs::OrphanHit, photos.rs::Group — note: groups serialize as {paths: [...]} objects, net.rs::ProcNet under by_total_bytes).

Local verification: macos/scripts/build.sh Debug and xcodebuild build-for-testing both green (the suite itself runs in CI — no PTY locally).

Notes / deviations

  • Network's nav glyph is arrow.up.arrow.down, not network — Ports already owns network and two identical rail icons would be indistinguishable.
  • Photos thumbnails decode off-main via CGImageSourceCreateThumbnailAtIndex (max 64 px, bounded NSCache) — deliberately not NSImage(contentsOfFile:), which full-decodes and would hang on large originals.

Follow-ups (out of scope here)

  • Leftovers: a CleanReview-style checklist + Move-to-Trash flow honoring default_selected and the CLI's volatile-roots policy; surface inventory_sources; an "add scan root" multi-root mode.
  • Similar Photos: a side-by-side compare view; keep-best selection + Trash flow; HEIC support once burrow-cli grows its heif feature; recursive scan option.
  • Network: repeat-sample deltas (rates, not one-shot totals); jump-to-Ports for a process; kill/quiet actions with the Ports pane's confirm gating; a --limit control (CLI default caps at 15 rows).

…scovery)

Three new read-only tool panes copying the post-#266 Duplicates pattern —
Analyze-style toolbar, the conductorMissing/idle/scanning/error/clean state
ladder, BurrowConductor.capture off-main with a scanGen supersede token,
OperationCenter begin/end, NSLocalizedString throughout, Brand styling:

* Leftovers (`burrow orphans <dir>`): folder picker + Caches/Logs quick
  chips; hits grouped into confidence tiers (medium > low > weak) with
  evidence on hover and Reveal in Finder. Pure OrphansReport.parse.
* Similar Photos (`burrow photos <dir>`, 600 s timeout — dHash is slow):
  clusters as cards, members with async ImageIO thumbnails (bounded
  NSCache, never a main-thread decode), 100-group render cap. Pure
  PhotosReport.parse.
* Network (`burrow net`): refresh-driven ranked table of nettop byte
  counters (name / pid / in / out / total via Fmt.bytes), metric_note
  surfaced when a degraded source swaps bytes for connection counts;
  auto-samples on first activation (PortsView's isActive idiom). Pure
  NetReport.parse.

Tool gains orphans/photos/net cases (olive/orchid/indigo accents, dark
tint tops, taglines); navOrder slots the discovery pair after Duplicates
and Network beside Ports. No exhaustive Tool switches exist outside
Tool.swift, so the enum growth is additive.

Tests first: OrphansModelTests / PhotosModelTests / NetModelTests cover
the spine, tier/size/total ordering, loose-field degradation, Int64
precision, and garbage-to-nil for every parser. Local Debug build +
build-for-testing both verified green.
@caezium
caezium merged commit 2ee1832 into main Jul 12, 2026
1 check passed
@caezium
caezium deleted the feat/discovery-panes branch July 12, 2026 08:37
caezium added a commit that referenced this pull request Jul 13, 2026
Version bump (macOS project.yml, Windows appxmanifest + csproj) + RELEASES.md.
Carries everything since v0.10.0 (a8074d2): the Leftovers/Similar Photos/Network
panes (#273) plus fclones bundling (#278), HEIC surfacing (#283), the HUD popover
+ lazy-mount fixes (#274/#275/#277), and the Finder-launch PATH fix (#279).
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