Skip to content

refactor: nix-files feedback reusing git status, eliminate resulting dead code#278

Merged
cooper (czxtm) merged 5 commits into
developfrom
06-02-scott-nix-diffs-refactor
Jun 5, 2026
Merged

refactor: nix-files feedback reusing git status, eliminate resulting dead code#278
cooper (czxtm) merged 5 commits into
developfrom
06-02-scott-nix-diffs-refactor

Conversation

@scottmcmaster

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

Copy link
Copy Markdown
Collaborator

Summary

Rewrite the feedback gathering for nix file diffs to reuse the revamped git::query::status, then get rid of all the code that deads, thereby avoiding having to port it to git2.

Test Plan

Updated and added unit tests.

Docs

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

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

Scott McMaster (scottmcmaster) commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

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 2, 2026

Copy link
Copy Markdown
Contributor

📋 PR Overview

Lines changed 221 (+98 / -123)
Files 0 added, 3 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 no
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.3% 26.4% 24.2% 17.9%

Generated by 🚫 dangerJS against dea858b

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

Refactors feedback collection for “changed nix files” to reuse the git2-based git::query::status() implementation, and removes the now-dead CLI diff helpers/tests from the git exec layer.

Changes:

  • Removes git::get_nix_diff (and its helper functions/tests) from git/exec.rs.
  • Adds a feedback-local get_nix_diff() that derives .nix diffs from git::status().changes.
  • Updates unit tests to cover the new diff-gathering path.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
apps/native/src-tauri/src/git/mod.rs Stops re-exporting the removed get_nix_diff from the git exec surface.
apps/native/src-tauri/src/git/exec.rs Deletes unused nix-diff generation helpers and their associated unit tests.
apps/native/src-tauri/src/feedback.rs Reimplements nix diff gathering via git::status() and adds/updates tests for the new behavior.

Comment thread apps/native/src-tauri/src/feedback.rs Outdated
Comment thread apps/native/src-tauri/src/feedback.rs

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.

Nice!

@czxtm cooper (czxtm) force-pushed the 06-03-scott-fix-made-edit-or-build-check branch from 834dc3b to 0c09458 Compare June 4, 2026 11:29
@czxtm cooper (czxtm) force-pushed the 06-02-scott-nix-diffs-refactor branch from d9a6fb9 to c9e6df7 Compare June 4, 2026 11:42
Base automatically changed from 06-03-scott-fix-made-edit-or-build-check to develop June 4, 2026 11:52
@czxtm cooper (czxtm) added this pull request to the merge queue Jun 4, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jun 4, 2026
@czxtm cooper (czxtm) added this pull request to the merge queue Jun 5, 2026
Merged via the queue into develop with commit 157e4ff Jun 5, 2026
8 checks passed
@czxtm cooper (czxtm) deleted the 06-02-scott-nix-diffs-refactor branch June 5, 2026 00:19
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.

4 participants