Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

fix: address expert review findings round 1 (PR #806)#807

Closed
github-actions[bot] wants to merge 7 commits into
mainfrom
fix/issue-698-1ee0d31b
Closed

fix: address expert review findings round 1 (PR #806)#807
github-actions[bot] wants to merge 7 commits into
mainfrom
fix/issue-698-1ee0d31b

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Addresses 5 of 6 expert review findings from round 1 on PR #806.

Findings addressed

# Severity Finding Fix
1 🟡 MODERATE Advanced nav button visible in Remote/Demo with no section Added settings.Mode guard matching the section's IsVisible
2 🟡 MODERATE SyncCliConfig() only called on toggle change — config drifts Call SyncCliConfig() on OnInitialized() in non-Remote/Demo modes
3 🟡 MODERATE Parse failure silently drops non-PolyPilot config keys Return early on parse failure instead of overwriting
5 🟢 MINOR Integration tests log but never assert Added Assert.True() calls
6 🟢 MINOR Non-atomic File.WriteAllBytes risks torn reads Write to temp file then File.Move(overwrite)

Finding skipped

# Severity Finding Reason
4 🟡 MODERATE No test-isolation override for ~/.copilot/ default path SyncCliConfig already accepts copilotConfigDir param; tests use temp dirs. Speculative concern per disputed findings evaluation.

Tests

All 3662 tests pass including new test for parse-failure abort behavior.

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • 192.0.2.1

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "192.0.2.1"

See Network Configuration for more information.

Generated by Review & Fix · ● 14.9M ·

github-actions Bot and others added 7 commits April 29, 2026 19:10
…bleAllHooks) in Settings UI

Add an Advanced section to the Settings page with toggles for three
Copilot CLI configuration options:

- **Compact Paste**: collapse large pasted content to save context tokens
- **Respect .gitignore**: exclude gitignored files from working-tree context
- **Disable All Hooks**: globally disable all CLI hooks

Implementation:
- Add CompactPaste, RespectGitignore, DisableAllHooks bool properties to
  ConnectionSettings with JSON round-trip support
- Add SyncCliConfig() method that merges these values into
  ~/.copilot/config.json (preserving existing keys)
- Register three new SettingDescriptors under 'Advanced' category in
  SettingsRegistry (hidden in Remote/Demo modes)
- Add Advanced nav item, section heading, and SettingEditor rendering
  in Settings.razor
- Wire OnSettingChanged to call SyncCliConfig() for advanced.* settings
- Add unit tests: defaults, round-trip, backward compat, SyncCliConfig
  write + merge, registry get/set/visibility/search
- Add integration test for Advanced section rendering

Fixes #698

Co-authored-by: copilot-agentic-workflow[bot] <224017+copilot-agentic-workflow[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Advanced nav button was visible in Remote/Demo modes even though
the Advanced section itself was hidden (settings have IsVisible guards
that exclude Remote/Demo). This left a nav button pointing to nothing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SyncCliConfig() was only called when a toggle changed, so if config.json
was externally deleted or modified, PolyPilot's values would drift until
the user toggled a setting. Now syncs on OnInitialized() as well.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When config.json was malformed, the catch block silently swallowed the
error and the method proceeded to overwrite the file with only the 3
PolyPilot keys — dropping all other CLI configuration. Now returns
early on parse failure to preserve the existing file contents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The integration tests logged results via Output.WriteLine but never
called Assert, so they always passed regardless of actual behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace File.WriteAllBytes with write-to-temp + File.Move(overwrite)
pattern so concurrent readers never see a partially-written file.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verifies that when config.json contains malformed JSON, SyncCliConfig
returns early and preserves the original file instead of overwriting
it with only PolyPilot keys.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen

Copy link
Copy Markdown
Owner

Stale fix-round PR — fixes were pushed to the main PR branch.

@PureWeen PureWeen closed this Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant