Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Bolt's Journal

## 2025-02-17 - Global process.platform Interleaving in Concurrent Testing
**Learning:** Redefining global state properties like `process.platform` in async/concurrent test suites causes state pollution and race conditions across test blocks. In Bun, concurrent test execution means async describes/its yield control, causing different platform-based mock suites to run concurrently and override the shared `process.platform` back and forth.
**Action:** Isolate mock configurations inside test execution contexts or run tests using strict serial execution (or stub process/platform on a per-function dependency injection basis) rather than mutating global/process-level state.
7 changes: 6 additions & 1 deletion packages/mcp/src/shared/list-files-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,11 @@ function longestPathLength(entries: LeanRepoFileEntry[]): number {
return max;
}

/**
* Optimized padding using native `String.prototype.padEnd`.
* Built-in native implementation in C++ is faster and more efficient
* than manually concatenating strings via `repeat` inside loops.
*/
function padRight(text: string, width: number): string {
return text.length >= width ? text : text + " ".repeat(width - text.length);
return text.padEnd(width);
}