Skip to content

feat: use real system defaults scanner to populate items on the filesystem untracked tab#404

Open
Scott McMaster (scottmcmaster) wants to merge 3 commits into
06-12-scott-real-brew-on-untracked-tabfrom
06-12-scott-real-defaults-on-untracked-tab
Open

feat: use real system defaults scanner to populate items on the filesystem untracked tab#404
Scott McMaster (scottmcmaster) wants to merge 3 commits into
06-12-scott-real-brew-on-untracked-tabfrom
06-12-scott-real-defaults-on-untracked-tab

Conversation

@scottmcmaster

@scottmcmaster Scott McMaster (scottmcmaster) commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

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.

Screenshot 2026-06-12 at 1.29.30 PM.png

Test Plan

This one is primarily a manual thing.

  • No test plan needed

Docs

  • Docs updated (companion PR in darkmatter/nixmac-web: #___)
  • No docs update needed

Scott McMaster (scottmcmaster) commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

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.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • automerge - adds this PR to the back of the merge queue
  • urgent - for urgent changes, fast-track this PR to the front of 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.

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️

New TypeScript source files were added without any new tests:

  • apps/native/src/hooks/use-system-defaults-scan.ts

📋 PR Overview

Lines changed 513 (+428 / -85)
Files 1 added, 15 modified, 0 deleted
Draft / WIP no
Has Test Plan yes
No Test Plan Needed no
New UI components no
New Storybook stories no
New Rust modules no
New TS source files yes (1)
New tests no
package.json touched no
Cargo.toml touched no
Infra / CI touched no

🔬 Coverage

Report Lines Statements Functions Branches
apps/native/coverage/coverage-summary.json 26.0% 26.1% 25.1% 18.9%

Generated by 🚫 dangerJS against ee594f2

@scottmcmaster Scott McMaster (scottmcmaster) changed the title scott-real-defaults-on-untracked-tab feat: use real system defaults scanner to populate items on the filesystem untracked tab Jun 12, 2026
@scottmcmaster Scott McMaster (scottmcmaster) marked this pull request as ready for review June 12, 2026 05:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_defaults and plumb results into BeginStep + FilesystemStep.
  • Reworked Filesystem “Custom macOS defaults” candidate generation to be data-driven from SystemDefaultsScan (including new CandidateItem source 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.

Comment thread apps/native/src/components/widget/steps/begin-step.tsx
Comment thread apps/native/src-tauri/src/system/scanner.rs
@graphite-app

graphite-app Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • Jun 12, 11:54 PM UTC: czxtm added this pull request to the Graphite merge queue.
  • Jun 12, 11:55 PM UTC: CI is running for this pull request on a draft pull request (#408) due to your merge queue CI optimization settings.
  • Jun 12, 11:58 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #393.
  • Jun 12, 11:58 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #393.

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.

3 participants