Skip to content

Conversation

@code-crusher
Copy link
Member

No description provided.

@matter-code-review
Copy link
Contributor

matter-code-review bot commented Jan 4, 2026

Context

Summary By MatterAI MatterAI logo

🔄 What Changed

This release (v4.210.1) implements a strict "read-before-write" workflow for AI tools, optimizes code indexing performance through centralized batching constants, and refreshes the webview welcome UI with new messaging and an external link. E2E tests are synchronized to account for the UI changes.

🔍 Impact of the Change

  • Reliability: Reduces LLM errors via context verification and ensures E2E tests wait for UI readiness.
  • Performance: Optimizes indexing via batching and pending batch caps.
  • UX: Improved onboarding UI with clearer messaging and direct access to external resources.

📁 Total Files Changed

Click to Expand
File ChangeLog
Prompt Update edit_file.ts Enforce sequential edits and context verification.
Version Bump package.json Incremented version to 4.210.1.
Indexing Constants constants/index.ts Added BATCH_SEGMENT_THRESHOLD and MAX_PENDING_BATCHES.
Watcher Refactor file-watcher.ts Use global batching constants in constructor.
Scanner Refactor scanner.ts Use global batching constants in constructor.
Test Setup test-setup-helpers.ts Added synchronization for welcome text in E2E setup.
Chat Test chat.test.ts Updated E2E test to wait for new welcome message.
Auth UI KiloCodeAuth.tsx Enhanced welcome screen with new text and external link.

🧪 Test Added/Recommended

Added

  • Updated setupTestEnvironment and chat.test.ts to verify the presence of the welcome text.

Recommended

  • Integration Test: Verify MAX_PENDING_BATCHES backpressure in the Scanner.
  • Visual Regression: Ensure the new KiloCodeAuth layout renders correctly across themes.

🔒 Security Vulnerabilities

N/A

Implementation

The implementation centralizes indexing configuration and enforces tool usage patterns via prompt engineering. The UI was refactored to use Tailwind for layout and useAppTranslation for localized content, while E2E tests were updated to use waitForWebviewText for robust synchronization.

Screenshots

before after
N/A N/A

How to Test

  1. Run E2E tests: npx playwright test chat.test.ts.
  2. Open the extension webview and verify the new "Welcome to Axon Code" greeting and "Explore Matter AI" link.
  3. Verify indexing behavior on large repos (check logs for batching).

Get in Touch

Axon Code Discord

Copy link
Contributor

@matter-code-review matter-code-review bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 PR Review is completed: Review of code indexing service updates. Identified unused constructor parameters in processors and a potential performance optimization for batch sizing.

⬇️ Low Priority Suggestions (1)
src/services/code-index/constants/index.ts (1 suggestion)

Location: src/services/code-index/constants/index.ts (Lines 19-19)

🟡 Performance

Issue: BATCH_SEGMENT_THRESHOLD is set to 10, which is relatively low for batching embedding operations. Small batch sizes can lead to inefficient network usage and potential rate limiting.

Fix: Consider increasing the threshold (e.g., to 50) to improve throughput, while ensuring MAX_PENDING_BATCHES keeps memory usage in check.

Impact: Improved indexing performance and reduced API overhead

-  export const BATCH_SEGMENT_THRESHOLD = 10 // Number of code segments to batch for embeddings/upserts
+  export const BATCH_SEGMENT_THRESHOLD = 50 // Number of code segments to batch for embeddings/upserts

Comment on lines +44 to +46
_batchSegmentThreshold?: number,
) {
// Get the configurable batch size from VSCode settings, fallback to default
// If not provided in constructor, try to get from VSCode settings
if (batchSegmentThreshold !== undefined) {
this.batchSegmentThreshold = batchSegmentThreshold
} else {
try {
this.batchSegmentThreshold = vscode.workspace
.getConfiguration(Package.name)
.get<number>("codeIndex.embeddingBatchSize", BATCH_SEGMENT_THRESHOLD)
} catch {
// In test environment, vscode.workspace might not be available
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
}
}
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Code Quality

Issue: The constructor accepts _batchSegmentThreshold but ignores it, hardcoding this.batchSegmentThreshold to the constant. This prevents configuration overrides (e.g., for testing) and makes the parameter misleading.

Fix: Use the passed parameter if available, falling back to the constant. Remove the _ prefix to indicate it is used.

Impact: Improves code correctness and testability

Suggested change
_batchSegmentThreshold?: number,
) {
// Get the configurable batch size from VSCode settings, fallback to default
// If not provided in constructor, try to get from VSCode settings
if (batchSegmentThreshold !== undefined) {
this.batchSegmentThreshold = batchSegmentThreshold
} else {
try {
this.batchSegmentThreshold = vscode.workspace
.getConfiguration(Package.name)
.get<number>("codeIndex.embeddingBatchSize", BATCH_SEGMENT_THRESHOLD)
} catch {
// In test environment, vscode.workspace might not be available
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
}
}
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
batchSegmentThreshold?: number,
) {
this.batchSegmentThreshold = batchSegmentThreshold ?? BATCH_SEGMENT_THRESHOLD

Comment on lines +83 to +89
_batchSegmentThreshold?: number,
) {
this.ignoreController = ignoreController || new RooIgnoreController(workspacePath)
if (ignoreInstance) {
this.ignoreInstance = ignoreInstance
}
// Get the configurable batch size from VSCode settings, fallback to default
// If not provided in constructor, try to get from VSCode settings
if (batchSegmentThreshold !== undefined) {
this.batchSegmentThreshold = batchSegmentThreshold
} else {
try {
this.batchSegmentThreshold = vscode.workspace
.getConfiguration(Package.name)
.get<number>("codeIndex.embeddingBatchSize", BATCH_SEGMENT_THRESHOLD)
} catch {
// In test environment, vscode.workspace might not be available
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
}
}
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Code Quality

Issue: The constructor accepts _batchSegmentThreshold but ignores it, hardcoding this.batchSegmentThreshold to the constant. This prevents configuration overrides (e.g., for testing) and makes the parameter misleading.

Fix: Use the passed parameter if available, falling back to the constant. Remove the _ prefix to indicate it is used.

Impact: Improves code correctness and testability

Suggested change
_batchSegmentThreshold?: number,
) {
this.ignoreController = ignoreController || new RooIgnoreController(workspacePath)
if (ignoreInstance) {
this.ignoreInstance = ignoreInstance
}
// Get the configurable batch size from VSCode settings, fallback to default
// If not provided in constructor, try to get from VSCode settings
if (batchSegmentThreshold !== undefined) {
this.batchSegmentThreshold = batchSegmentThreshold
} else {
try {
this.batchSegmentThreshold = vscode.workspace
.getConfiguration(Package.name)
.get<number>("codeIndex.embeddingBatchSize", BATCH_SEGMENT_THRESHOLD)
} catch {
// In test environment, vscode.workspace might not be available
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
}
}
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
batchSegmentThreshold?: number,
) {
this.ignoreController = ignoreController || new RooIgnoreController(workspacePath)
if (ignoreInstance) {
this.ignoreInstance = ignoreInstance
}
this.batchSegmentThreshold = batchSegmentThreshold ?? BATCH_SEGMENT_THRESHOLD

@matter-code-review
Copy link
Contributor

✅ Reviewed the changes: The changes correctly update the branding text across UI and tests. I've added a minor suggestion to improve the styling implementation in the React component.

@code-crusher code-crusher merged commit d8a248e into main Jan 4, 2026
5 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants