Skip to content

Show per-setting changes in grid setup's verbose summary - #264

Open
sanieldalib wants to merge 3 commits into
mainfrom
salib/grid-verbose-summary
Open

sanieldalib wants to merge 3 commits into
mainfrom
salib/grid-verbose-summary

Conversation

@sanieldalib

@sanieldalib sanieldalib commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

grid setup --verbose / --dry-run printed raw Config: … / Settings: … log lines between the per-harness rows. They listed every key Grid manages, whether or not it changes, used absolute paths, and wrapped across the whole terminal. The single Replaces row merged keys from all of a harness's files.

Plans now record a Changes list (add / update / remove per setting, no values), computed in Plan.encode so it stays right after credentials are staged. Owned-file plans (Codex catalog, OpenCode plugin files) report per file. The summary lists the changes per file, coloured, and skips settings that don't change.

After (grid setup --dry-run, trimmed):

claude
  Config            ~/.claude/settings.json
  Primary route     anthropic/claude-opus-5-5--anthropic (team default)
  Background route  zai-org/glm-5-3-flash--baseten (team default)
  Fallback route    anthropic/claude-opus-5-5--anthropic

  Changes in ~/.claude/settings.json (values hidden):
    update  apiKeyHelper
    update  availableModels
    add     env.CLAUDE_CODE_AUTO_MODE_MODEL
    update  model
    update  modelPicker.options
    ...

  Changes in ~/Library/Application Support/Claude-3p/configLibrary/_meta.json (values hidden):
    update  appliedId

  Result            Changes ready to apply

codex
  Config            ~/.codex/config.toml
  Primary route     openai/gpt-6-1-sol--openai (team default)

  Changes in ~/.codex/config.toml (values hidden):
    add     forced_login_method
    update  model
    add     model_provider
    ...

  Result            Changes ready to apply

Help text for setup and sync:

  • --dry-run reads "Show the changes without applying them or creating an API key."
  • The output descriptions say --dry-run lists each setting to add, update or remove and stops, and --verbose lists the same changes before asking to apply.
  • The long help's "Setup overwrites the harness's integration settings without saving their previous values" now matches Replace grid setup's overwrite warning with a plain notice and clearer prompts #262's notice: setup sets Grid as the gateway, teardown removes its settings but doesn't restore previous values, and --dry-run shows each change first.

JSON output is unchanged. Test_Grid_Setup_ReplacesSettingsAndPicker asserts update/add rows and that untouched settings aren't listed. Test_Grid_Setup_RealHarness and Test_Grid_ClaudeServedModel_RealClaudeCode fail locally the same way they do on main.

🤖 Generated with Claude Code

@sanieldalib sanieldalib changed the title Group grid setup's verbose summary by file Show per-setting changes in grid setup's verbose summary Nov 13, 2026
@sanieldalib
sanieldalib force-pushed the salib/grid-verbose-summary branch from 4f49da6 to a9ca1db Compare November 13, 2026 20:57
Base automatically changed from salib/grid-overwrite-warning to main November 13, 2026 22:17
sanieldalib and others added 3 commits November 13, 2026 14:19
The verbose and dry-run summary interleaved raw "Config:/Settings:" log
lines with the per-harness rows, so long setting lists wrapped across the
terminal unaligned. Each harness now lists the files it changes, with
"Replaces" and "Sets" rows wrapped to the terminal width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plans now record which settings they add, update or remove, and the
summary lists those per file, without values, instead of every key Grid
manages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--dry-run now reads "Show the changes without applying them", the output
descriptions say what --dry-run and --verbose list, and the long help
uses the same wording as setup's notice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sanieldalib
sanieldalib force-pushed the salib/grid-verbose-summary branch from a9ca1db to 299b8df Compare November 13, 2026 22:20
@sanieldalib
sanieldalib marked this pull request as ready for review November 13, 2026 22:33
@sanieldalib
sanieldalib requested review from cretz and a balanced review from Copilot November 13, 2026 22:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T22:34:04.802038Z 299b8df Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

🟡 Changes recommended

The dry-run confirmation preview incorrectly labels whole-file deletions as rewrites, obscuring which files will be removed.

1 open issue
What changed in this PR

This PR makes Grid setup and sync previews easier to read by replacing raw settings logs with per-file change summaries, building on the clearer setup notice from #262.

Changes:

  • Track added, updated, and removed settings without exposing values, plus changes to owned files.
  • Display sorted, colored changes per file in verbose and dry-run summaries, omitting unchanged settings.
  • Update help text and assertions for the new preview format while preserving JSON output.
File Description
internal/​harness/​harness.go Track setting and owned-file changes in plans.
internal/​harness/​claude_code.go Include teardown hook changes in plan tracking.
internal/​cmd/​command.grid.go Render per-file changes in verbose summaries.
internal/​cmd/​command.grid_test.go Assert add/update rows and omission of untouched settings.
cmd/​command.grid.go Clarify setup, sync, and dry-run help text.

Review effort: Balanced

Comment on lines +1350 to +1351
if len(p.Changes) == 0 {
ctx.Outputf("\n Rewrites %s\n", gridHarnessDisplayPath(p.Path))
@sanieldalib
sanieldalib added this pull request to stack #270 November 13, 2026 22:56
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.

2 participants