Conversation
- Updated the logic to detect test suites instead of just tests for each file. - Introduced a new TreeItem representation for test suites, including descriptions and icons. - Added functionality to display tests within a suite, with detailed step breakdowns. - Improved error handling for test detection.
…" in package.json and extension.ts for improved clarity and consistency.
…esults - Added a new WebviewViewProvider for rendering test results in a webview. - Removed the previous TreeDataProvider implementation for open files and tests. - Updated package.json to specify the type of the sidebar as "webview". - Implemented message handling for refreshing the webview content. - Enhanced the HTML structure for displaying JSON results in the webview.
…g of the webview when the active editor changes.
- Removed pretty-printed JSON string and replaced it with a dynamic rendering function. - Implemented a recursive function to render JSON objects with collapsible nodes for better readability. - Added CSS styles for collapsible elements and JSON data types (string, number, boolean, null). - Enabled interactive expansion and collapse of nested JSON structures in the webview.
…dentation, and add bracket and comma styling
- Updated version in package.json and package-lock.json to 0.0.2 - Changed dependency "doc-detective-resolver" from "^3.0.0-dev.1" to "^3.0.0" - Added "js-yaml" dependency with version "^4.1.0" - Updated "@types/node" from "22.15.18" to "22.15.21" - Updated "webpack" from "^5.99.8" to "^5.99.9" - Updated ESLint and TypeScript ESLint plugin versions - Refactored YAML rendering logic in extension.ts for improved readability and functionality
- Added a helper function to check for nested objects/arrays. - Improved rendering logic to handle simple objects and arrays more effectively. - Introduced a toggle feature for objects with nested structures. - Simplified display of single-key objects on the same line. - Enhanced styling for simple objects in the rendered output.
- Improved handling of nested objects and arrays in the renderYAML function. - Updated CSS styles for better indentation and toggle visibility. - Enhanced the display of simple objects and arrays, ensuring proper formatting. - Simplified the logic for rendering key-value pairs, especially for nested structures.
…tyling with CSS variables, and handle theme changes dynamically
…dd transition for improved user experience.
…webview handling - Added new commands: "Refresh Doc Detective Panel" and "Use Simple View" with icons. - Implemented a menu for the new commands in the view title. - Improved logging throughout the extension for better debugging. - Enhanced webview HTML structure with loading and error states. - Added methods for simplified view rendering and error handling. - Updated content security policy for webview. - Refactored updateWebview method to handle errors and loading states more gracefully.
- Updated package.json to provide a clearer description of the extension. - Modified webview HTML to include a message about automatic updates when files are saved. - Implemented an event listener to refresh the webview content upon saving a file.
- Refine introduction to better explain the extension's purpose - Streamline features section for improved readability - Remove unnecessary sections and tips to focus on essential information - Add a heartfelt closing message from the Doc Detective team
- Add entries for /.vscode-test and /out to .gitignore - Include test/** in .vscodeignore - Replace icon.svg with a new SVG graphic
- Include the full text of the GNU Affero General Public License version 3 - Ensure compliance with open-source licensing requirements
- Added repository information for the project. - Updated the commands and menus structure for better organization. - Added @vscode/vsce as a dependency for packaging the extension.
- Removed reference to Doc Detective Companion browser extension - Deleted release notes section for version 0.0.2
…ctivation of the extension.
- Introduced a configuration option to specify a custom path for the Doc Detective configuration file in package.json. - Implemented functions to load and parse configuration files in JSON or YAML format. - Added logic to find the configuration file either from a custom path or default locations in the workspace root. - Updated the test detection logic to utilize the loaded configuration. - Implemented event listener to refresh the webview when configuration changes.
- Replace sidebar icon path in package.json to use new image - Add new icon file dd-mono.png to media directory
…e to version 4.17.2
- Changed package name from "doc-detective-vsc" to "doc-detective". - Updated display name to "Doc Detective" and added publisher information. - Revised description to clarify functionality. - Added sponsor URL for GitHub sponsorship. - Included "Testing" in categories. - Updated license information to "AGPL-3.0-only".
|
Warning Rate limit exceeded@hawkeyexl has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 23 minutes and 50 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThis update restructures the project as a Visual Studio Code extension, replacing legacy JavaScript files with a TypeScript-based implementation, new build and linting configurations, and modernized VS Code integration. It introduces a sidebar webview for test detection, updates dependencies, revises documentation, modifies licensing to AGPLv3, and adds comprehensive CI/CD workflows. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant VSCode
participant DocDetectiveExtension
participant WebviewPanel
participant TestDetector
User->>VSCode: Opens workspace / activates extension
VSCode->>DocDetectiveExtension: activate(context)
DocDetectiveExtension->>VSCode: Register webview and commands
User->>DocDetectiveExtension: Runs command or opens sidebar
DocDetectiveExtension->>WebviewPanel: resolveWebviewView()
WebviewPanel->>DocDetectiveExtension: request update
DocDetectiveExtension->>TestDetector: detectTests(openFiles, config)
TestDetector-->>DocDetectiveExtension: test results/errors per file
DocDetectiveExtension->>WebviewPanel: Render results (HTML/JSON)
WebviewPanel-->>User: Display test detection results
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
…orkflow - Changed node versions to only include 22 - Reformatted os matrix for better readability
There was a problem hiding this comment.
Pull Request Overview
This PR completely rewrites the Doc Detective VSCode extension to use a bundled TypeScript build, introduce a sidebar webview for test results, enhance configuration and commands, update documentation, bump dependencies, and clean up obsolete files.
- Add Webpack configuration and TypeScript build pipeline
- Redesign extension activation, commands, and sidebar webview
- Remove legacy files, update tests, docs, and CI workflows
Reviewed Changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.config.js | Add Webpack config to bundle extension TypeScript into dist |
| vsc-extension-quickstart.md | Remove outdated quickstart guide |
| src/test/extension.test.ts | Introduce basic sample test suite stub |
| package.json | Update metadata, commands, config defaults, scripts, and deps |
| jsconfig.json | Remove legacy JS project config |
| eslint.config.mjs | Add ESLint configuration for TypeScript |
| config.json | Remove default configuration file |
| README.md | Rewrite documentation to reflect new features |
| CHANGELOG.md | Remove outdated changelog |
| .vscodeignore | Update ignore patterns for packaging |
| .vscode/tasks.json | Add NPM watch tasks for dev workflow |
| .vscode/settings.json | Add workspace-specific VS Code settings |
| .vscode/launch.json | Update launch config for compiled output |
| .vscode/extensions.json | Update recommended extensions |
| .vscode-test.mjs | Add VS Code test CLI configuration |
| .github/workflows/test-publish.yaml | Introduce CI workflow for testing and publishing |
| .github/copilot-instructions.md | Add workspace-specific Copilot instructions |
| .coderabbit.yaml | Add CodeRabbit AI review configuration |
Comments suppressed due to low confidence (3)
src/test/extension.test.ts:8
- [nitpick] Current tests only cover a trivial sample. Add tests that exercise the new webview commands and rendering logic to ensure the rewritten features are properly validated.
suite('Extension Test Suite', () => {
package.json:22
- [nitpick] The command namespace
doc-detective-vscdiffers from the extension'sdoc-detectivename. Consider unifying the prefix to avoid confusion for users and maintainers.
"command": "doc-detective-vsc.helloWorld",
…node-version correctly - Omit ubuntu-latest from the OS matrix due to compatibility issues with X server - Set node-version in the setup-node action
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Docstrings generation was requested by @hawkeyexl. * #1 (comment) The following files were modified: * `src/extension.ts`
|
Note Generated docstrings for this pull request at #2 |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (12)
README.md (1)
53-53: Refine footer emphasis usage
Bold emphasis on a line by itself triggers a markdownlint warning (MD036). Consider switching to italics or a heading for better style.- **Made with ❤️ by the Doc Detective team** + _Made with ❤️ by the Doc Detective team_.github/copilot-instructions.md (1)
2-2: Clarify Copilot usage instructions
Consider elaborating on when and how to invokeget_vscode_api, and include a brief example to guide Copilot’s behavior..vscode/launch.json (1)
9-13: Consider adding a test debug configuration
If you need to debug extension tests interactively, you may want to reintroduce a separate launch configuration using--extensionTestsPathpointing to your new.vscode-test.mjs.tsconfig.json (2)
12-14: Consider enabling additional type checksThese commented options would provide more rigorous type checking. Consider enabling them to catch potential issues early in development.
- // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ + "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + "noUnusedParameters": true, /* Report errors on unused parameters. */
2-15: Add outDir and exclude configurationsConsider adding an output directory specification and exclusion patterns to prevent unnecessary compilation.
"compilerOptions": { "module": "Node16", "target": "ES2022", "lib": [ "ES2022" ], "sourceMap": true, "rootDir": "src", "strict": true, /* enable all strict type-checking options */ + "outDir": "out", /* Specify an output folder for all emitted files. */ /* Additional Checks */ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ } +"exclude": [ + "node_modules", + ".vscode-test" +]webpack.config.js (1)
3-3: Remove redundant 'use strict' directiveJavaScript modules are automatically in strict mode, so this directive is unnecessary.
- 'use strict';🧰 Tools
🪛 Biome (1.9.4)
[error] 2-3: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
.github/workflows/test-publish.yaml (1)
25-27: Trailing whitespace violatesyamllintruleLine 25 (
os:) contains a stray space that trips thetrailing-spacesrule reported byyamllint 1.37.1. Removing it will silence the warning and keep CI green.- os: + os:🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 25-25: trailing spaces
(trailing-spaces)
src/extension.ts (2)
200-218: Run test detection in parallel to speed-up large workspacesFiles are processed serially; two dozen open files already add perceptible lag. A
Promise.allkeeps overall time bounded by the slowest file instead of the sum of all files.-const results: Record<string, any> = {}; -for (const file of uniquePaths) { - try { - ... - const suites = await detectTests({ config }); - results[file] = suites; - } catch (e) { - results[file] = { error: String(e) }; - } -} +const resultsArr = await Promise.all(uniquePaths.map(async (file) => { + const cfg = baseConfig ? { ...baseConfig, input: file } : { input: file }; + try { + return [file, await detectTests({ config: cfg })] as const; + } catch (e) { + return [file, { error: String(e) }] as const; + } +})); +const results = Object.fromEntries(resultsArr);
343-349: Current JSON escaping still allows</script>& newline injections
JSON.stringify(JSON.stringify(obj))plus manual slicing misses edge-cases (</script>,\u2028,\u2029).
Embedding raw data viawebview.postMessageis both safer and simpler:// inside updateWebview after generating results this._view.webview.postMessage({ type: 'results', data: results }); // in the HTML: window.addEventListener('message', (event) => { if (event.data?.type === 'results') { render(event.data.data); } });If you insist on inlining, Base64-encode the payload to make it delimiter-agnostic.
package.json (3)
7-9: Migratesponsortofundingfor npm compatibility
Thesponsorproperty is non-standard inpackage.json. Consider using thefundingfield (e.g.,"funding": { "url": "…" }) to ensure compatibility with npm and ecosystem tools.
18-21: Consider automatic activation on JSON/YAML files
To streamline UX, you could add"onLanguage:json"and"onLanguage:yaml"activation events so the extension loads whenever users open relevant files.
101-113: Prune unused testing devDependencies
It appears Mocha is no longer part of your test pipeline (now usingvscode-test); consider removing@types/mochato keep devDependencies lean.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (7)
dist/extension.jsis excluded by!**/dist/**dist/extension.js.LICENSE.txtis excluded by!**/dist/**dist/extension.js.mapis excluded by!**/dist/**,!**/*.mapicon.pngis excluded by!**/*.pngmedia/dd-mono.pngis excluded by!**/*.pngmedia/icon.svgis excluded by!**/*.svgpackage-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (24)
.coderabbit.yaml(1 hunks).github/copilot-instructions.md(1 hunks).github/workflows/test-publish.yaml(1 hunks).github/workflows/vsc-publish.yml(0 hunks).gitignore(2 hunks).vscode-test.mjs(1 hunks).vscode/extensions.json(1 hunks).vscode/launch.json(2 hunks).vscode/settings.json(1 hunks).vscode/tasks.json(1 hunks).vscodeignore(1 hunks)CHANGELOG.md(0 hunks)LICENSE(1 hunks)README.md(1 hunks)config.json(0 hunks)eslint.config.mjs(1 hunks)extension.js(0 hunks)jsconfig.json(0 hunks)package.json(1 hunks)src/extension.ts(1 hunks)src/test/extension.test.ts(1 hunks)tsconfig.json(1 hunks)vsc-extension-quickstart.md(0 hunks)webpack.config.js(1 hunks)
💤 Files with no reviewable changes (6)
- CHANGELOG.md
- jsconfig.json
- .github/workflows/vsc-publish.yml
- vsc-extension-quickstart.md
- config.json
- extension.js
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/test-publish.yaml
[error] 25-25: trailing spaces
(trailing-spaces)
🪛 markdownlint-cli2 (0.17.2)
README.md
52-52: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
🪛 Biome (1.9.4)
webpack.config.js
[error] 2-3: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.
(lint/suspicious/noRedundantUseStrict)
🔇 Additional comments (49)
LICENSE (1)
1-662:Details
❓ Verification inconclusive
Missing project-specific copyright notice
The LICENSE file contains the full AGPLv3 text but lacks a copyright statement for the Doc Detective project.Please add a project-specific copyright line, for example:
+Copyright (C) 2025 Doc Detective TeamAlso verify that the
licensefield inpackage.jsonis updated to"AGPL-3.0-or-later".
#!/bin/bash set -e # Check for project-specific copyright in LICENSE echo "LICENSE file copyright lines:" grep -n "^Copyright" LICENSE || echo "No copyright lines found in LICENSE." # Inspect the license field in package.json if [ -f package.json ]; then echo "package.json license field:" grep -n '"license"' package.json || echo "No license field found in package.json." else echo "package.json not found" fi
#!/bin/bash set -e echo "Checking LICENSE file for project-specific copyright..." grep -n -E "Copyright.*Doc Detective" LICENSE || echo "No project-specific copyright found" echo echo "Looking for package.json..." if [ -f package.json ]; then echo "Found package.json. Extracting license field:" grep -n '"license"\s*:' package.json || echo "No license field in package.json." else echo "package.json not present" fi
Add missing project-specific copyright and verify package.json license
The AGPLv3 text is present in LICENSE but lacks your project’s own copyright line, and the npm metadata should reflect the AGPL.• In LICENSE (top of file) add something like:
+Copyright (C) 2025 Doc Detective Team• In package.json ensure:
"license": "AGPL-3.0-or-later"README.md (10)
1-1: Approve updated title
Excellent clarity and specificity in the extension’s title.
3-3: Approve updated description
Clear overview of the extension’s purpose and VS Code integration.
7-10: Approve revised features list
The feature descriptions are concise and user-focused.
12-15: Approve “How It Works” section
Provides a clear explanation of the detection mechanism.
20-24: Approve usage instructions
Step-by-step guidance is clear and actionable.
27-30: Approve test scanning details
Supported test formats and detection patterns are well documented.
36-38: Approve “Related Projects” links
Links to ecosystem components are accurate and helpful.
43-45: Approve “Learn More” resources
External links offer valuable further reading.
49-49: Approve “Contributing” section
Clear call-to-action encouraging community involvement.
16-18:Details
❌ Incorrect review comment
Verify VS Code version requirement
Versionv1.100.0does not exist; please confirm the minimum supported version to avoid blocking users.
🏁 Script executed:
#!/bin/bash # Check if Visual Studio Code v1.100.0 exists among GitHub releases curl -s https://api.github.com/repos/microsoft/vscode/releases \ | jq -r '.[].tag_name' \ | grep -x '1.100.0' || echo "NOT FOUND"Length of output: 113
No changes needed: VS Code v1.100.0 is valid
A check of the official VS Code GitHub releases confirms that tag1.100.0exists. You can safely require VS Code v1.100.0 or higher.• README.md (lines 16–18): the “Visual Studio Code v1.100.0 or higher” requirement is correct and does not need updating.
Likely an incorrect or invalid review comment.
.github/copilot-instructions.md (1)
1-1: Approve Copilot comment reference
The HTML comment correctly links to Copilot customization documentation..gitignore (2)
4-4: Approvenode_modulesignore pattern
Using a broadnode_modulesentry ensures all nested directories are ignored.
14-15: Approve new ignore patterns
Ignoring/.vscode-testand/outaligns with the project’s build and test output directories..vscode-test.mjs (1)
1-5: Approve VS Code test runner configuration
The import and default export ofdefineConfigwith the correct test file glob are properly set up..vscode/settings.json (3)
3-6: files.exclude configuration is correct
Intentionally showing theoutanddistbuild output folders in the Explorer while managing their visibility via comments aligns with the documented workflow.
7-10: search.exclude configuration is appropriate
Excludingoutanddistfrom search results protects performance by avoiding unnecessary indexing of compiled artifacts.
12-12: Disable TypeScript auto-detection as intended
Turning offtypescript.tsc.autoDetectto rely on npm scripts for build/watch tasks matches the tasks defined in.vscode/tasks.json..vscode/extensions.json (1)
2-4: Recommended extensions updated correctly
Addingamodio.tsl-problem-matcherandms-vscode.extension-test-runneralongside ESLint enhances the developer experience for the new TypeScript and test workflows..vscodeignore (5)
1-1: Ignore GitHub metadata directory
Excluding.github/**prevents CI configuration and issue templates from being packaged into the extension.
4-6: Ignore build output and dependencies
Excludingout/**,node_modules/**, andsrc/**ensures only the production-readydistfolder is included in the published extension.
10-10: Ignore build tooling config
Excludingwebpack.config.jskeeps the bundler configuration out of the final package.
12-13: Exclude TypeScript and ESLint configs
Ignoring bothtsconfig.jsonandeslint.config.mjsprevents development-time configuration files from being shipped.
15-15: Ignore all TypeScript source files
Excluding**/*.tsensures only compiled JavaScript ends up in the extension package..vscode/launch.json (1)
15-18: Integrate build step and output mapping
AddingoutFilesto point atdist/**/*.jsand apreLaunchTaskto run the default build task ensures the extension is compiled before launch, matching the new Webpack/TypeScript workflow.eslint.config.mjs (4)
1-2: Imports for ESLint TypeScript plugin and parser
The imports from@typescript-eslint/eslint-pluginand@typescript-eslint/parserare correct and ready for use in the new config.
4-9: Base configuration and plugin registration
Scoping linting to**/*.tsand registering the@typescript-eslintplugin aligns with the project’s TypeScript focus.
11-15: Language options are properly set
Specifying the parser, ECMAScript 2022 syntax, and module source type matches the VS Code extension’s target environment.
17-27: Core linting rules make sense for consistency
Enabling naming-convention for imports, mandatory curly braces, strict equality, disallowing throw literals, and semicolons at warning level provides a solid baseline.src/test/extension.test.ts (1)
8-9: Well-structured test suite setupThe test suite is properly structured using Mocha's framework with clear notification of test startup.
.vscode/tasks.json (1)
4-39: Well-structured tasks configurationThe tasks configuration is properly set up for TypeScript development with webpack. It includes well-configured watch tasks for both source and test files, with appropriate problem matchers and presentation settings. The composite task provides a convenient way to start both watchers simultaneously.
tsconfig.json (1)
3-7: Good modern TypeScript configurationThe configuration correctly uses Node16 module system with ES2022 target, which is appropriate for a VS Code extension.
webpack.config.js (1)
10-46: Well-configured webpack setup for VS Code extensionThe webpack configuration is properly set up for a TypeScript-based VS Code extension. It correctly handles the entry point, output format, external dependencies, and TypeScript processing. The comments are helpful in explaining the purpose of each configuration section.
.github/workflows/test-publish.yaml (1)
25-30:Details
❌ Incorrect review comment
Node 22 is not yet available on GitHub Actions runners
actions/setup-node@v4currently supports the LTS and active versions published on nodejs.org. As of today, Node 22 has not reached an officially released status, so the runner will fail withVersion 22.x not foundand your matrix job will be skipped.- node: - - 22 + node: + # Use the latest *released* active/LTS versions + - 20 # current LTS + - 18 # maintenance LTSPlease verify the Node-22 availability before re-enabling it.
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "Checking Node 22 availability in official Node.js releases..." curl -s https://nodejs.org/dist/index.json \ | grep -E '"version":\s*"v22\.[0-9]+\.[0-9]+"' \ || echo "No Node 22 releases found"Length of output: 10273
Node.js 22 is now officially available and supported
The original blocker is outdated—Node.js v22 has been published (including LTS “Jod” since v22.14.0) andactions/setup-node@v4will install it successfully. You can safely re-enable:.github/workflows/test-publish.yaml (lines 25–30)
node: - 22If you want broader coverage, consider expanding your matrix:
node: - 22 # active/LTS - 20 # current LTS - 18 # maintenance LTSLikely an incorrect or invalid review comment.
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 25-25: trailing spaces
(trailing-spaces)
.coderabbit.yaml (1)
5-33: Configuration looks valid against the published schemaKeys and nesting levels match the current CodeRabbit schema. No action needed. 👍
src/extension.ts (1)
118-121: Relaxed Content-Security-Policy weakens defense-in-depth
script-src 'unsafe-inline'disables CSP’s primary XSS protection. VS Code recommends injecting a random nonce and allowing only that script:<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src vscode-webview:; style-src 'unsafe-inline'; script-src 'nonce-${nonce}';">Consider tightening the directive before publishing to the marketplace.
package.json (13)
4-4: Verify VS Code extension publisher ID
Ensure that thepublisherfield ("DocDetective") exactly matches your publisher ID on the VS Code Marketplace (including case sensitivity) to avoid packaging or publishing errors.
5-5: Extension description is concise and clear
The new description succinctly explains the extension’s purpose and adheres to VS Code Marketplace guidelines.
11-11: Confirmvscodeengine version requirement
Raising the minimum engine to^1.100.0may exclude users on older VS Code releases. Ensure that your new webview features or APIs indeed require VS Code 1.100.0 or higher.
18-21: Activation events correctly configured
The extension now activates on the defined commands and thedocDetectiveViewwebview, ensuring the sidebar panel loads when invoked.
23-23: Verifymainentrypoint aligns with build output
Ensure your webpack configuration emitsextension.jsinto thedistdirectory so that"main": "./dist/extension.js"correctly points to the bundled extension file.
25-40: Verify contributed commands and icons
Ensure each command ID is registered in your activation code (extension.ts) and that the specified icons ($(refresh),$(list-flat)) correspond to valid VS Code codicons.
46-48: EnsuredocDetective.configPathdefault is handled
With an empty-string default, confirm your extension code correctly falls back to searching for.doc-detective.json,.yaml, or.ymlin the workspace root when no path is provided.
51-63: Menu contributions look good
Theview/titlemenus correctly scope the refresh and simple view commands to thedocDetectiveViewcontext and group them under navigation.
65-73: Validate sidebar icon path
Ensure thatmedia/dd-mono.pngis included in your published package and renders correctly in the Activity Bar for thedocDetectiveSidebar.
75-83: Webview view registration is correct
ThedocDetectiveViewis properly declared under thedocDetectiveSidebarcontainer as a webview, matching your extension’s UI implementation.
88-88: Verify license field matches LICENSE file
Ensure that"license": "AGPL-3.0-only"aligns with the SPDX identifier and content in yourLICENSEfile.
90-99: Validate build and test scripts
Please verify thatnpm run compile,npm run pretest, andnpm testexecute successfully in CI, and that thevscode-testscript correctly runs your integration tests.
115-118: Runtime dependencies look appropriate
The extension’s runtime dependencies (@vscode/vsce,doc-detective-resolver,js-yaml) align with your build and configuration loading requirements.
📝 Add docstrings to `nect`
|
|
- Changed command identifiers from 'doc-detective-vsc' to 'doc-detective' for consistency. - Updated the activation function to reflect the new command names. - Enhanced test suite to verify extension activation and command registration. - Added tests to ensure the WebView provider is properly registered.
- Replaced synchronous file reading with asynchronous reading in loadConfigFile. - Introduced a new async function fileExists to check for file accessibility. - Updated findConfigFile to utilize the new fileExists function for checking config file existence.
- Introduce instructions for specifying a custom path to the Doc Detective configuration file. - Detail the options for absolute and relative paths. - Clarify the automatic search for configuration files in the workspace root.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
package.json (1)
7-9: Consider using a standardfundingfield instead ofsponsor
The npm ecosystem expects afundingproperty for sponsorship URLs. You may optionally rename this block to:"funding": { "url": "https://github.com/sponsors/doc-detective" },This will ensure compatibility with npm’s
npm fundcommand.README.md (1)
50-53: Signature styling triggers lint warning MD036
You’re using bold emphasis for a signature, which the linter may treat as a heading. Consider either disabling MD036 for this line or converting it into a regular paragraph or blockquote:- **Made with ❤️ by the Doc Detective team** + _Made with ❤️ by the Doc Detective team_ <!-- markdownlint-disable-line MD036 -->🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
52-52: Emphasis used instead of a heading
null(MD036, no-emphasis-as-heading)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
dist/extension.jsis excluded by!**/dist/**dist/extension.js.mapis excluded by!**/dist/**,!**/*.map
📒 Files selected for processing (4)
README.md(1 hunks)package.json(1 hunks)src/extension.ts(1 hunks)src/test/extension.test.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- src/test/extension.test.ts
- src/extension.ts
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
52-52: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
🔇 Additional comments (19)
package.json (10)
4-5: Publisher and description look good
Thepublisheranddescriptionfields accurately reflect the VS Code Marketplace metadata and new functionality.
11-12: Verify the VS Code engine requirement
You’ve bumped thevscodeengine to^1.100.0. Please confirm that this version aligns with the earliest VSCode release supporting your new Webview APIs—otherwise users on earlier versions won’t be able to install the extension.
23-24: Main entry point updated correctly
Switchingmainto./dist/extension.jsaligns with your new Webpack output.
44-48: Configuration defaults and description are clear
ThedocDetective.configPathdefault and its detailed description match the code’s fallback logic.
51-63: Menu contributions for the sidebar view look correct
IncludingrefreshandsimpleViewcommands in theview/titlemenu ensures a cohesive UX when thedocDetectiveViewis active.
65-82: Sidebar container and views are properly declared
The newviewsContainers.activitybarandviewsentries correctly register the webview in the activity bar and sidebar.
84-89: Repository and license fields updated
Switching tohttps://github.com/doc-detective/vscode.gitandAGPL-3.0-onlyaligns with your project restructure.
90-99: Build and test scripts are comprehensive
The newcompile,watch,package,compile-tests, andlintcommands reflect the TypeScript/Webpack setup.
101-113: DevDependencies align with the new toolchain
The updated ESLint, TypeScript, and VSCode test CLI packages match your modernized build pipeline.
115-118: Runtime dependencies correctly include new resolver and YAML support
Addingdoc-detective-resolverandjs-yamlis necessary for your scanning logic in the webview.README.md (9)
1-4: Title and introduction updated for clarity
The new heading “Doc Detective VSCode Extension” and descriptive paragraph clearly explain the extension’s purpose.
7-11: Features section is concise and focused
The bullet list covers real-time detection, sidebar integration, interactive explorer, and syntax highlighting—exactly what users need to know.
12-15: “How It Works” section aligns with implementation
Your description ofdoc-detective-resolverintegration matches the new scanning logic insrc/extension.ts.
16-19: Requirements reflect the updated engine version
Specifying “Visual Studio Code v1.100.0 or higher” matchespackage.json.
20-25: Usage instructions are clear and actionable
Step-by-step guidance helps users get started with minimal friction.
26-30: Supported test formats are accurately listed
Including HTML/markdown comments, YAML, and JSON specs aligns with your parser capabilities.
31-39: Related projects links are up-to-date
The GitHub URLs correctly point to the Doc Detective CLI, resolver, core, and common repos.
40-45: Learn More section provides essential resources
Linking to documentation, repo, and community ensures users can find additional help.
46-49: Contributing call-to-action is inviting
Directing contributors to the GitHub organization makes it easier to onboard new maintainers.
Improve test detection and rendering in the Doc Detective extension by introducing a webview for displaying results. Enhance YAML and JSON rendering with collapsible sections and better styling. Update commands, configuration support, and documentation for clarity. Bump version and update dependencies for improved functionality and performance. Remove outdated files and streamline the project structure.
Summary by CodeRabbit
New Features
Chores
Documentation
Refactor
Tests
Revert
Style
License