Skip to content

Refresh the duplicate panel after quarantine and restore #117

Description

@Muawiya-contact

After a duplicate file is quarantined, its finding disappears but the duplicate panel still lists its old path and the old wasted-byte count.

app/src/App.jsx filters findings through quarantinedPaths, but sends the untouched scan snapshot to the duplicate panel:

const visibleFindings = report.findings.filter(
  (f) => !quarantinedPaths.has(f.entry.path)
);
// Later:
<DuplicatesSection sets={report.duplicate_sets} />

Reproduce: scan a fixture with two identical actionable files. Quarantine one. The findings show one remaining file; the duplicate panel still says two copies. Restore it and check that the two-copy set returns.

Small fix: derive visible duplicate sets from the scan snapshot and the same quarantined-path state. Recalculate wasted from remaining copies and hide sets with fewer than two paths. Preserve the original snapshot so restore can bring a set back.

Done when: two-copy and three-copy sets update correctly on quarantine and restore, with no stale paths or negative totals. Add a focused state/behavior test.

Confirmed by tracing the successful-quarantine state update and the duplicate-panel input on 8abd5cb.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appThe Tauri desktop appbugSomething isn't workingfrontendThe desktop app's UI layerhelp wantedExtra attention is neededlevel: intermediateNeeds familiarity with one cratepriority: mediumWorth doing, not urgentui/uxInterface design, usability, and visual polish

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions