-
Notifications
You must be signed in to change notification settings - Fork 140
adds --detailed status command flag that prints diffs between local and project config #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 adds a --long flag to the entire status command that provides detailed status information showing the effective settings plus separate status for project and local settings files. Without the flag, the command shows only the effective (merged) status.
Changes:
- Added
--longboolean flag tostatuscommand that shows detailed per-file settings - Refactored status output to support both short (effective only) and long (effective + per-file) modes
- Added
loadSettingsFromFilehelper function to load settings from individual files
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/entire/cli/setup.go | Added --long flag to status command, split status logic into runStatus (short mode) and runStatusLong (detailed mode), added formatSettingsStatusShort function |
| cmd/entire/cli/config.go | Added loadSettingsFromFile helper function to load settings from a specific file path |
| cmd/entire/cli/setup_test.go | Updated all existing status tests to pass the new long parameter, added comprehensive test coverage for both short and long modes |
…roject config Entire-Checkpoint: 7514bb56ca11
1d4c494 to
5880bb5
Compare
|
suggestion: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
cmd/entire/cli/setup_test.go:562
- This test only covers the long mode (
long=trueon line 546). For consistency with other test pairs likeTestRunStatus_Enabled/TestRunStatus_Enabled_LongandTestRunStatus_BothProjectAndLocal/TestRunStatus_BothProjectAndLocal_Short, consider adding a correspondingTestRunStatus_LocalSettingsOnly_Shorttest or renaming this test toTestRunStatus_LocalSettingsOnly_Longto make it clear it's testing long mode specifically.
func TestRunStatus_LocalSettingsOnly(t *testing.T) {
setupTestRepo(t)
writeLocalSettings(t, `{"strategy": "auto-commit", "enabled": true}`)
var stdout bytes.Buffer
if err := runStatus(&stdout, true); err != nil {
t.Fatalf("runStatus() error = %v", err)
}
output := stdout.String()
// Should show effective status first
if !strings.Contains(output, "Enabled (auto-commit)") {
t.Errorf("Expected output to show effective 'Enabled (auto-commit)', got: %s", output)
}
// Should show per-file details
if !strings.Contains(output, "Local, enabled") {
t.Errorf("Expected output to show 'Local, enabled', got: %s", output)
}
if strings.Contains(output, "Project,") {
t.Errorf("Should not show Project settings when only local exists, got: %s", output)
}
}
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
e728858 to
f8eeb9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Entire-Checkpoint: 7514bb56ca11
Note
Introduces a more informative
entire statusand consolidates settings loading.--detailedflag tostatusshowing effective state first, then per-file:Project, ...andLocal, ...statusnow outputsEnabled/Disabled (strategy)(capitalized), removing source labels; tests updated accordinglyloadSettingsFromFileandapplyDefaultStrategy;LoadEntireSettingsuses them and merges local overridesformatSettingsStatusShort/formatSettingsStatus; integrates intorunStatusand newrunStatusDetailedWritten by Cursor Bugbot for commit 2559369. This will update automatically on new commits. Configure here.