Repository navigation
Conversation
Share UI, YAML editing, command redaction, and refresh logic while preserving existing behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues blocking the shared-helper consolidation.
No open issues 🎉
What changed in this PR
Consolidates duplicate helpers across the APM VS Code extension, with no intended user-visible behavior changes.
Changes:
- Reuses shared webview controls, YAML editing utilities, and validation helpers.
- Centralizes marketplace refresh logic and command redaction.
- Adds regression cases for command redaction and marketplace source parsing.
| File | Description |
|---|---|
| test/config/marketplaces.test.ts | Adds marketplace ref-splitting regression cases. |
| test/apm/redact.test.ts | Tests formatted command redaction. |
| src/webview/main.ts | Consolidates repeated UI controls and rendering helpers. |
| src/taskProvider.ts | Extracts shared cancellation and trust checks. |
| src/protocol.ts | Reuses control-character validation. |
| src/mcpManager.ts | Shares input prompts and command redaction. |
| src/marketplaceManager.ts | Consolidates output summaries and authentication dispatch. |
| src/manifestAssistance.ts | Reuses YAML rendering and comment helpers. |
| src/extension.ts | Consolidates catalog refresh and command formatting. |
| src/config/sync.ts | Reuses output summarization. |
| src/config/projectMarketplaces.ts | Shares YAML editing and marketplace validation helpers. |
| src/config/mcpServers.ts | Reuses object and control-character checks. |
| src/config/marketplaces.ts | Exports local-source detection and shares validation. |
| src/apm/yamlAssistance.ts | Adds shared YAML editing utilities. |
| src/apm/remoteMetadata.ts | Reuses control-character validation. |
| src/apm/redact.ts | Adds a shared redacted command formatter. |
| src/apm/adapters.ts | Adds control-character and output-summary helpers. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request
Summary
Consolidate repeated webview controls, YAML editing helpers, marketplace refresh logic, and command redaction while preserving behavior and safety checks. No user-visible behavior changes are intended.
The local Deslop scan decreased from 27 to 4 warnings; six additional loosely similar informational matches remain where the behavior or validation differs.
Related issue (if any): None.
Validation
rtk npm run typecheck— passed.rtk npm run lint— passed.set -o pipefail; npm test | tail -15— passed: 396 tests; 14 opt-in real, legacy, and private CLI tests skipped.rtk npm run build— passed.rtk npm run test:browser -- --output test-results/deslop-pr-0341af1f— passed: 13 tests.rtk npm run docs:screenshots -- --output test-results/deslop-screenshots-0341af1f— passed; generated fictional screenshots match the committed images byte-for-byte (rtk bypass diff -qr docs/images test-results/deslop-screenshots-0341af1f).npm run test:extension— not run locally; redirected HOME on macOS risks a Keychain prompt.npm run package— not run; packaging is unchanged.The screenshots below use fictional fixture data and are unchanged by this refactor:
Checklist