Current Changes
ImpactLens combines supported tracked changes from the Git working tree and index against HEAD. Deleted and unsupported files are not included in normal analysis.
For Analyze All Changes, Quick Pick offers to run analysis, preview the changed files, copy their list, or cancel. For a single file, you can analyze that file, open it, copy its path, or cancel. Clicking in the sidebar does not start analysis by itself.
Pull Requests
ImpactLens shows and analyzes pull requests through an available VS Code GitHub integration or GitHub CLI gh. If neither an integration nor an authenticated gh is available, the sidebar remains available and shows a clear state.
For the selected pull request, Quick Pick offers analysis, a preview of changed files, opening the PR in a browser, copying its URL, or cancelling. The base branch comes from PR metadata; the general PR analysis command uses impactlens.git.baseBranch, then gh pr view, origin/HEAD, and the common branches main, master, develop and their origin/* variants.
If the PR branch, base, or head ref is unavailable locally, ImpactLens does not guess the result and offers to fetch it. The user can explicitly fetch pull/<number>/head into the local ref impactlens/pr-<number>, copy the fetch command, open the PR, or cancel.
How to read the report
The report shows an impact summary, readiness for review, analysis quality, changed and affected files, routes and code elements, recommended tests, and AI recommendations. From it, you can open a file and related code, run one or all recommended tests, copy the report, and request AI recommendations.
Summary and review gate
Start with the counts of changed and affected files, API routes, functions, classes, methods, and suggested tests. The risk level, risk factors, and checklist help prioritize work, but they do not replace review and testing.
Scope and performance
The report shows analysis quality, analysis context, performance, skipped files, and result limits. Context records the compared refs, the Fast check, Normal analysis, or Deep analysis mode, depth, supported-file count, and stage timings. Depth can be 1, 2, or 3 levels, or all dependency levels.
On large projects, limit depth, set exclude patterns, and configure limits for displayed code elements and tests. This balances report speed, completeness, and readability.
Impact reasons
A changed file is marked as a direct change; an affected file is linked to one or more changed files. This explains why an item entered the review scope.
Files and semantic changes
Changed files, Affected files, and File impact separate analysis roots from discovered dependencies. If the report includes semantic context, use it as guidance for manually checking behavior.
Routes and code elements
For Python/FastAPI, the report connects API routes, handlers, functions, classes, and methods to files and lines. TypeScript, JavaScript, Go, Java, C#, and C/C++ have basic dependency, code-element, and test-file support without framework-route extraction.
Suggested tests
Each suggested test includes a reason and a command. Open opens the file, Run starts one test, and Run all suggested tests starts all relevant tests. If they fail, Fix failed tests sends compact run results and analysis facts to the configured LLM to obtain a repair plan.
Copying
Copy report copies the Markdown report. Review Summary and PR summary provide shorter versions for review and pull request discussion when they are present in the report.
Optional AI suggestions
- Generate review summary — a concise summary, risks, and checks before merge.
- Generate test plan — a test plan and additional checks.
- Fix failed tests — a repair plan for failed tests. It is available only after Run all suggested tests; without results, the extension first asks you to run the suggested tests.
Configure impactlens.ai.baseUrl, impactlens.ai.apiKey, and impactlens.ai.model for an OpenAI-compatible /chat/completions endpoint. All three values must be set. impactlens.ai.apiKey is stored as an ordinary VS Code setting, not in Secret Storage; keep that in mind when choosing User or Workspace scope.
Core analysis runs locally. AI starts only after an explicit user action. The provider receives compact analysis facts — changed_files, affected_files, file_impacts, affected_routes, affected_symbols, and suggested_tests — plus compact run results for Fix failed tests. Project source code is not included in a standard AI request. AI creates a review summary, risks, a test plan, or a repair plan for failed tests on top of facts already found.
Cancellation
The analysis notification supports Cancel. Cancelling before the analyzer starts ends the action quietly; cancelling a running process stops it. In both cases, cancellation is a user state, not an analysis error.
Recovering from problems
No workspace folder:
open the project folder in VS Code and try the action again.
No supported tracked changes:
modify or stage a supported file, or run the Current Changes command for an active supported file. Add an untracked file to Git first or analyze it as the active file.
Python not found:
run Check Setup, verify Python 3.11+, and set impactlens.pythonPath.
Git, base ref, or head ref unavailable:
check the repository and refs, set impactlens.git.baseBranch when needed, or explicitly fetch the suggested PR ref.
AI provider error:
check the base URL, API key, model, and /chat/completions compatibility; the core static report remains available.
If an API key from an environment variable is not detected, check its name in impactlens.ai.apiKeyEnvVar and restart VS Code or Kodik after changing the system variable.
Analysis cancelled:
run it again when you are ready. Cancellation does not mean the project or report is damaged.