Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 18, 2025

This PR reverts unrelated changes found in PR #5863 while preserving the intended Go diagnostics functionality.

Problem

PR #5863 was intended to add configurable diagnostic delay settings for Go diagnostics, but it included significant unrelated changes to test files that expanded test complexity unnecessarily.

Changes Made

  • Reverted massive test data expansion in ClineProvider.spec.ts that added unrelated properties:
    • Terminal settings (terminalOutputLineLimit, terminalShellIntegrationTimeout, etc.)
    • API configuration properties (currentApiConfigName, listApiConfigMeta, etc.)
    • UI settings (soundVolume, ttsSpeed, screenshotQuality, etc.)
    • Authorization settings (alwaysAllowModeSwitch, alwaysAllowSubtasks, etc.)
  • Preserved essential Go diagnostics functionality:
    • Kept diagnosticsEnabled: true property
    • Maintained DEFAULT_WRITE_DELAY_MS import
    • Preserved all core diagnostic delay functionality in other files
  • Restored original test structure and property organization
  • Reverted unrelated comment change in writeToFileTool.spec.ts

Impact

Files Changed

  • src/core/webview/__tests__/ClineProvider.spec.ts - Reverted unrelated test expansion
  • src/core/tools/__tests__/writeToFileTool.spec.ts - Reverted unrelated comment change

All other files from PR #5863 remain unchanged, preserving the core Go diagnostics functionality.

Fixes unrelated changes in PR #5863


Important

Reverts unrelated test changes from PR #5863 while preserving Go diagnostics functionality.

  • Revert Unrelated Test Changes:
    • Reverted test data expansion in ClineProvider.spec.ts for terminal, API, UI, and authorization settings.
    • Restored original test structure and property organization.
    • Reverted comment change in writeToFileTool.spec.ts.
  • Preserve Go Diagnostics Functionality:
    • Kept diagnosticsEnabled: true and DEFAULT_WRITE_DELAY_MS import.
    • Maintained core diagnostic delay functionality in other files.

This description was created by Ellipsis for b3cdcf0. You can customize this summary. It will automatically update as commits are pushed.

roomote added 7 commits July 18, 2025 00:32
…error reporting

- Add diagnosticsDelayMs setting (default: 2000ms) to allow linters time to process
- Add diagnosticsEnabled setting to optionally disable diagnostic checking entirely
- Update DiffViewProvider.saveChanges() to use configurable delay before checking diagnostics
- Update all tool files (writeToFile, searchAndReplace, insertContent, applyDiff, multiApplyDiff) to pass diagnostic settings
- Add comprehensive tests for new diagnostic functionality
- Fixes issue where Go diagnostics errors were submitted to LLM before linter could clean up unused imports

Resolves #5859
- Add diagnosticsDelayMs and diagnosticsEnabled to globalSettingsSchema
- Include properties in ExtensionState Pick type
- Add default values to EVALS_SETTINGS
- Fix VSCode mock to include DiagnosticSeverity for tests
- Resolves compilation errors in ClineProvider and webviewMessageHandler
- Add providerRef mock to insertContentTool and writeToFileTool tests
- Update mocks to include diagnosticsEnabled and diagnosticsDelayMs settings
- Fix test expectations to match new implementation with diagnostic configuration
- Resolves failing unit tests for insertContentTool.spec.ts and writeToFileTool.spec.ts
- Remove diagnosticsDelayMs setting in favor of existing writeDelayMs
- Add min(0) validation for writeDelayMs in global settings schema
- Add error handling around delay function calls in DiffViewProvider
- Create DEFAULT_WRITE_DELAY_MS constant (1000ms) to replace repeated defaults
- Update all tool files to pass writeDelayMs instead of diagnosticsDelayMs
- Remove diagnosticsDelayMs from webview message handlers and types
- Update test files to use writeDelayMs instead of diagnosticsDelayMs

This refactoring consolidates diagnostic delay functionality to use the
existing writeDelayMs setting as requested in PR feedback.
- Fix DiffViewProvider test to expect correct default delay (1000ms instead of 2000ms)
- Fix TypeScript type errors in ClineProvider test mock state object
- Correct terminalPowershellCounter and terminalZdotdir types to boolean
- Fix pinnedApiConfigs type from array to Record<string, boolean>
…nctionality

- Reverted massive test data expansion in ClineProvider.spec.ts that added
  unrelated properties like terminal settings, API configs, and UI settings
- Kept only the essential diagnosticsEnabled property for Go diagnostics feature
- Restored original test structure and property organization
- Reverted unrelated comment change in writeToFileTool.spec.ts
- Preserved all core Go diagnostics functionality in other files

This focuses the PR on its intended purpose: adding configurable diagnostic
delay settings for Go development without unnecessary test complexity.
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 18, 2025 18:58
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jul 18, 2025
@daniel-lxs daniel-lxs closed this Jul 18, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 18, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 18, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants