Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Oct 6, 2025

Description

This PR attempts to address Issue #8527 where the VS Code extension becomes extremely laggy when viewing the extension details page.

Problem

When users click on the Roo extension in VS Code's Extensions view, the interface becomes very slow with noticeable delays in scrolling, clicking buttons, and typing. The issue was caused by the large CHANGELOG.md file (114KB with 2305 lines) that includes release images.

Solution

  • Created a script to generate a truncated CHANGELOG specifically for the VS Code extension
  • The truncated version includes only the 10 most recent releases
  • Removed all release images from the VS Code version
  • Added a link to the full changelog on GitHub for users who want to see the complete history
  • Modified the build process to use the truncated CHANGELOG when packaging the extension

Results

  • CHANGELOG size reduced from 114KB to 4.8KB (95.8% reduction)
  • Extension details page should load and render much faster
  • Users can still access the full changelog via the GitHub link

Testing

  • ✅ Build process tested and working
  • ✅ All existing tests pass (294 test files, 3858 tests)
  • ✅ Linting and type checking pass
  • ✅ Fallback to original CHANGELOG if generation fails

Fixes #8527

Feedback and guidance are welcome!


Important

Truncates VS Code extension's CHANGELOG.md to improve performance, using a script to generate a shortened version and modifying the build process to incorporate it.

  • Behavior:
    • Truncates CHANGELOG.md to the 10 most recent releases for VS Code extension, removing images.
    • Adds a link to the full changelog on GitHub in CHANGELOG.vscode.md.
    • Modifies esbuild.mjs to use truncated changelog during build, with fallback to original if generation fails.
  • Scripts:
    • Adds generate-vscode-changelog.js to create truncated changelog, handling up to 10 versions and excluding images.
  • Build Process:
    • Updates esbuild.mjs to execute the changelog generation script and copy the appropriate changelog file.

This description was created by Ellipsis for 391582f. You can customize this summary. It will automatically update as commits are pushed.

- Create script to generate truncated CHANGELOG (10 most recent versions)
- Remove release images from VS Code CHANGELOG
- Reduce CHANGELOG size from 114KB to 4.8KB (95.8% reduction)
- Add link to full changelog on GitHub

Fixes #8527
@roomote roomote bot requested review from cte, jr and mrubens as code owners October 6, 2025 09:22
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Oct 6, 2025
for (const line of lines) {
// Check if this is a version header
if (line.startsWith("## [")) {
versionCount++
Copy link
Contributor

Choose a reason for hiding this comment

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

The current logic increments versionCount for each version header and breaks when versionCount exceeds maxVersions. This causes versionCount to be one more than the number of versions actually included in the truncated file. If the note is intended to show the total number of releases in the full changelog, consider pre-counting the headers; otherwise, adjust the note for clarity.

Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Self-review initiated: auditing my own code like a deterministic rubber duck judging its creator.

truncatedLines.push("---")
truncatedLines.push("")
truncatedLines.push(
`*For the complete changelog with all ${versionCount} releases, please visit the [GitHub repository](https://github.com/RooCodeInc/Roo-Code/blob/main/CHANGELOG.md).*`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

P2: The release count in the footer is inaccurate: versionCount increments before the break, so this often reports 11 when only 10 versions are included, and it doesn't reflect total releases. Either compute a total in a separate pass or avoid the number entirely to prevent misleading output.

Suggested change
`*For the complete changelog with all ${versionCount} releases, please visit the [GitHub repository](https://github.com/RooCodeInc/Roo-Code/blob/main/CHANGELOG.md).*`,
'*For the complete changelog, please visit the [GitHub repository](https://github.com/RooCodeInc/Roo-Code/blob/main/CHANGELOG.md).*',

let changelogGenerated = false
try {
console.log("[extension] Generating truncated CHANGELOG for VS Code...")
execSync("node ../scripts/generate-vscode-changelog.js", {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

P3: execSync runs on every build (including watch/dev), adding overhead and blocking the event loop during iterative builds. Consider gating generation behind the existing production flag to avoid doing this work outside release packaging.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 6, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Oct 28, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[BUG] VS Code extension is very laggy on visit

3 participants