feat: use real system defaults scanner to populate items on the filesystem untracked tab#404
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
📋 PR Overview
🔬 Coverage
|
There was a problem hiding this comment.
Pull request overview
This PR wires the existing Rust “system defaults scanner” into the native app’s Filesystem → Untracked (“manage”) surface, so the “Custom macOS defaults” candidate is populated from real scan results (and reordered to appear earlier).
Changes:
- Added a frontend hook to invoke
scan_system_defaultsand plumb results into BeginStep + FilesystemStep. - Reworked Filesystem “Custom macOS defaults” candidate generation to be data-driven from
SystemDefaultsScan(including newCandidateItemsource metadata). - Updated stories, snapshots, and unit tests to reflect the new system-defaults candidate behavior.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/native/src/hooks/use-system-defaults-scan.ts | New React hook to call tauriAPI.scanner.scanDefaults() and expose {scan, error}. |
| apps/native/src/components/widget/steps/begin-step.tsx | Uses system-defaults scan to populate BeginStep’s untracked banner candidates. |
| apps/native/src/components/widget/filesystem/filesystem-step.tsx | Integrates system-defaults scan output into the Untracked/manage file list; tightens Homebrew tracking item typing. |
| apps/native/src/components/widget/filesystem/data.ts | Adds system-defaults candidate mapping + placeholder replacement; refactors CandidateItem into a discriminated union with source. |
| apps/native/src/components/widget/filesystem/data.test.ts | Adds unit coverage for system-defaults scan → FsFile mapping and placeholder replacement. |
| apps/native/src/components/widget/filesystem/untracked-card.stories.tsx | Updates story fixture to use systemDefaultsFileFromScan. |
| apps/native/src/components/widget/filesystem/untracked-banner.stories.tsx | Updates banner fixture to include system-defaults placeholder replacement. |
| apps/native/src/components/widget/filesystem/seed-prompt.stories.tsx | Updates seed prompt fixtures so defaults content comes from scan-based file generation. |
| apps/native/src/components/widget/filesystem/file-list.stories.tsx | Updates fixture manage files list to include scan-based defaults candidate. |
| apps/native/src/components/widget/filesystem/snapshots/untracked-card.stories.tsx.snap | Snapshot updates for scan-based defaults candidate rendering. |
| apps/native/src/components/widget/filesystem/snapshots/untracked-banner.stories.tsx.snap | Snapshot updates for new candidate counts/ordering. |
| apps/native/src/components/widget/filesystem/snapshots/seed-prompt.stories.tsx.snap | Snapshot updates for seed text ordering/content. |
| apps/native/src/components/widget/filesystem/snapshots/section-tabs.stories.tsx.snap | Snapshot updates for revised “Untracked” count. |
| apps/native/src/components/widget/filesystem/snapshots/file-list.stories.tsx.snap | Snapshot updates for manage list ordering/content. |
| apps/native/src-tauri/src/system/scanner.rs | Adds a manual debug scan helper in the test module. |
Merge activity
|

Summary
Leverage the existing "system defaults scanner" functionality to populate the untracked "defaults" item on the filesystem untracked tab. For now it uses prompt seeding to complete the tracking; I will follow up with another change to do the direct-edits.
I also moved the "defaults" section to the top since it will pop in faster than Homebrew info.
Test Plan
This one is primarily a manual thing.
Docs