Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

This is a rebased version of PR #5626 to resolve merge conflicts.

Original PR: #5626

Original Title: Files Changed Overview feature

What was done:

  • Successfully rebased the Files Changed Overview feature onto the latest main branch
  • Resolved 25+ batches of merge conflicts through the rebase process
  • Preserved all FCO implementation details while integrating with recent main changes

Changes included:

  • Complete Files Changed Overview UI component implementation (410 lines)
  • Comprehensive test suite (1,314 lines)
  • Checkpoint system integration with FCO tracking
  • File change management and state persistence
  • Settings integration for FCO toggle
  • Translation files for all 18 locales
  • Type definitions and interfaces for FCO support

Known Issues:

  • TypeScript compilation errors need to be fixed (duplicate function implementations)
  • These errors resulted from the merge conflict resolution and will need manual cleanup

Stats:

  • Files changed: 139
  • Insertions: 9,092
  • Deletions: 3,093

Closes #5626 when merged.

hannesrudolph and others added 30 commits September 8, 2025 16:57
…Code decorations to prevent import-time failures; update DiffViewProvider test mock for decoration type
…s (short/long path and case-insensitive) to stabilize tests
…n hook, clean up UISettings and SettingsView imports/tests; fix lint unused args in FilesChangedOverview
…Dir for absolute paths (avoid /private/tmp vs /tmp mismatch)
…ew with CSS utility classes where feasible; keep dynamic styles for virtualization
…yload alias; clarify ExtensionMessage header comment
- Added more tests for checkpoints
- Fixed bug where fco was not updating after checkpoints properly.
- It would include all previous edits from the previous checkpoint on tasks that were mid edit.
- Added timestamp checking to cover the edge case.
- Added tests for the edge cases covered.
- Bug fix for users enabling FCO after some time using the task.
- One more edge case being covered when the user enables fco after talking with the task for a while.
- To solve this, added test cases and have the settings enabled to set the timestamp if it was previously disabled.
- Added better separation of concerns for testing of FCO web ui.
- Change getCurrentCline() to getCurrentTask()
- Fix Promise return type in test mock

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Applies commits 04bd21403 and 3d15bba1d from backup branch:

FCO Edge Case Fixes:
- Add .roo/ exclusion to checkpoint diffs
- Filter out directories from ShadowCheckpointService.getDiff()
- Implement improved line-by-line diff calculation in FileChangeManager
- Add comprehensive FileChangeManager tests (70+ test cases)

Windows Compatibility:
- Fix 'core.bare and core.worktree do not make sense' error
- Add core.bare=false configuration for shadow git repos

LLM-Only Filtering:
- Complete async integration of getLLMOnlyChanges() in FCO handlers
- Fix getCurrentCline → getCurrentTask method name alignment
- Update all FCO message handlers to use LLM-only filtering

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
From commit 71c63f9 'language files, theming, bug fix, Test improvements':

Theming Updates:
- Convert from Tailwind CSS classes to inline styles for consistent theming
- Make Files Changed Overview match TodoList theming (slim and compact)
- Simplify formatLineChanges to show only '+X, -Y' format (no translations)
- Remove parentheses from count format in summary
- Update FileItem to use thinner rows (32px instead of 60px)
- Apply compact padding and margins throughout component

Visual Changes:
- Smaller button sizes and padding for compact look
- Consistent inline styling using CSS variables
- Better alignment with VS Code theming system
- Matches TodoList component styling for unified look

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Added more test cases missing and removed cases in case nothing was changed. and made it so those get ignored by the fco
  - Remove duplicate enableCheckpoints check in checkpoints/index.ts
  - Remove unused _CheckpointEventData interface from
  FilesChangedOverview.tsx
  - Fix message type naming consistency: checkpoint_created ->
  checkpointCreated, checkpoint_restored -> checkpointRestored
  - Remove debug console.log statements from checkpoints/index.ts
- Reduced from 21 to 4 inline styles (only dynamic ones remain)
  - Converted static styles to Tailwind CSS classes:
    - Container styles: border, px-2.5, py-1.5, m-0, etc.
    - Flexbox layouts: flex, justify-between, items-center, gap-2
    - Button styles: Consistent classes for primary/secondary/icon buttons
    - Text styles: font-mono, text-xs, font-medium, etc.
  - Preserved dynamic styles for runtime calculations:
    - Virtualization: height, transform
    - State-based: opacity, borderBottom
  - Updated tests to check for CSS classes instead of inline styles
- Fix checkpoint memory leak by making
  ongoingCheckpointSaves task-scoped
- Moved ongoingCheckpointSaves Map from module-level to
  Task class property
- Add cleanup in Task.dispose() method to prevent memory
   leaks
- Update checkpoint functions to use task-scoped Map
- Fix test mock to include ongoingCheckpointSaves
  property
Pathing shows up on a separate line from the file name
Problem:
  - FCO missing last edited file (calculated at checkpoint creation before tools execute)
  - FCO disappears when tasks are aborted (state not preserved)
  - Manual user edits must remain protected during rollback (issue #4827)

  Solution:
  - Add immediate FCO updates after each file editing tool execution
  - Preserve FCO state during task abort and restore on resume
  - Maintain checkpoint timing BEFORE edits for rollback safety
  - Add final checkpoint on task completion to capture all changes

  Changes:
  - Add updateFCOAfterEdit helper to calculate and display changes without checkpoints
  - Update presentAssistantMessage to call FCO updates after file tools
  - Add final checkpoint in attemptCompletionTool
  - Preserve/restore FCO state in ClineProvider during abort/resume
  - Add test utilities for checkpoint functionality

  This separates FCO visibility (immediate updates) from checkpoint safety (before edits),
  solving both user experience issues while maintaining rollback protection.
…t logic for Files Change Overview

• Replace dual Set<string> (acceptedFiles/rejectedFiles) with single Map<string, string> (acceptedBaselines) for cleaner state management
• Remove complex hiding/unhiding logic in applyPerFileBaselines()
• Rejected files are simply removed from changeset and reappear naturally when edited again via update FCOAfterEdit
• Accepted files get per-file baselines to show only incremental changes
• Self-correcting system: file visibility determined by diffs, not flags
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Hannes Rudolph <[email protected]>
mrubens and others added 12 commits September 8, 2025 17:32
* Disconnect extension bridge on logout

* Remove bad test

* Cleanup
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>
#7555)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
ClineProvider creation was moved before CloudService which broke
the old way of doing things.
* fix: add cache reporting support for OpenAI-Native provider

- Add normalizeUsage method to properly extract cache tokens from Responses API
- Support both detailed token shapes (input_tokens_details) and legacy fields
- Calculate cache read/write tokens with proper fallbacks
- Include reasoning tokens when available in output_tokens_details
- Ensure accurate cost calculation using uncached input tokens

This fixes the issue where caching information was not being reported
when using the OpenAI-Native provider with the Responses API.

* fix: improve cache token normalization and add comprehensive tests

- Add fallback to derive total input tokens from details when totals are missing
- Remove unused convertToOpenAiMessages import
- Add comment explaining cost calculation alignment with Gemini provider
- Add comprehensive test coverage for normalizeUsage method covering:
  - Detailed token shapes with cached/miss tokens
  - Legacy field names and SSE-only events
  - Edge cases including missing totals with details-only
  - Cost calculation with uncached input tokens

* fix: address PR review comments

- Remove incorrect fallback to missFromDetails for cache write tokens
- Fix cost calculation to pass total input tokens (calculateApiCostOpenAI handles subtraction)
- Improve readability by extracting cache detail checks to intermediate variables
- Remove redundant ?? undefined
- Update tests to reflect correct behavior (miss tokens are not cache writes)
- Add clarifying comments about cache miss vs cache write tokens
…ebase

- Remove deprecated BridgeOrchestrator imports and usage from Task.ts, extension.ts
- Replace removed getUserSettings() method calls with fallbacks
- Fix type compatibility issues with clineMessages parameter
- Fix FileChangeManager baseline assignment and rejection logic
  - Auto-assign fromCheckpoint as initial baseline when files enter FCO
  - Fix rejection to preserve existing baselines
  - Fix acceptance to properly update baselines to current checkpoint
  - Add missing mock setups in tests for applyPerFileBaselines calls
  - Update test expectations to match calculated line differences
- All TypeScript type checking now passes (11/11 packages)
Copilot AI review requested due to automatic review settings September 8, 2025 23:38
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Sep 8, 2025
@hannesrudolph hannesrudolph mentioned this pull request Sep 8, 2025
6 tasks
@dosubot dosubot bot added the enhancement New feature or request label Sep 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR rebases the Files Changed Overview (FCO) feature from PR #5626 onto the latest main branch to resolve merge conflicts. The PR includes the complete FCO implementation with UI components, comprehensive testing, checkpoint system integration, and localization support across 18 languages.

Key Changes

  • Complete Files Changed Overview UI implementation with 410 lines of code
  • Comprehensive test suite covering FCO functionality with 1,314 lines
  • Updated contributor tables in localized README files across multiple language versions

Reviewed Changes

Copilot reviewed 16 out of 139 changed files in this pull request and generated no comments.

File Description
locales/ru/README.md Updated contributors table formatting and alignment
locales/pt-BR/README.md Updated contributors table formatting and alignment
locales/pl/README.md Updated contributors table formatting and alignment
Comments suppressed due to low confidence (2)

locales/pt-BR/README.md:1

  • The LICENSE file path is incorrect for the pt-BR locale. It should reference ../../LICENSE to correctly point to the root LICENSE file from the nested locale directory.
<div align="center">

locales/pl/README.md:1

  • The LICENSE file path is incorrect for the pl locale. It should reference ../../LICENSE to correctly point to the root LICENSE file from the nested locale directory.
<div align="center">

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Sep 8, 2025

⚠️ This PR is too big for Ellipsis, but support for larger PRs is coming soon. If you want us to prioritize this feature, let us know at [email protected]


Generated with ❤️ by ellipsis.dev

@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Sep 8, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2025

🚀 Preview deployed!

Your changes have been deployed to Vercel:

Preview URL: https://roo-code-website-j8ejyvy4q-roo-code.vercel.app

This preview will be updated automatically when you push new commits to this PR.

Copy link
Contributor

@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.

Thank you for rebasing the Files Changed Overview feature! This is a substantial feature that adds great value for tracking file modifications. However, there are critical TypeScript compilation errors that need to be resolved before this can be merged.

Critical Issues

The PR has several compilation errors that prevent the code from building successfully. These must be fixed before merging.

Positive Aspects

  • Comprehensive test suite with 1,314 lines of test coverage
  • Well-structured code with clear separation of concerns
  • Performance optimizations with virtualization for large file lists
  • Complete internationalization support for all 18 locales
  • Good use of TypeScript types and interfaces

Please address the critical issues identified in the inline comments below.

}

// File Change Manager methods
public getFileChangeManager(): any {
Copy link
Contributor

Choose a reason for hiding this comment

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

Critical Issue: Duplicate function implementations detected. The methods getFileChangeManager() and ensureFileChangeManager() are defined twice:

  • First at lines 2096-2107
  • Again at lines 2532-2546

This causes TypeScript compilation errors. Please remove one set of these duplicate methods. The second implementation (lines 2532-2546) appears to be the more complete version with proper typing.

openRouterImageGenerationSelectedModel,
openRouterUseMiddleOutTransform,
remoteControlEnabled,
filesChangedEnabled: this.getGlobalState("filesChangedEnabled") ?? true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Critical Issue: Duplicate property filesChangedEnabled in object literal. This property is already defined at line 1750. Having duplicate properties violates TypeScript rules and will cause compilation errors.

Please remove this duplicate property definition.

}
this.pendingOperations.clear()
this.log(`[clearAllPendingEditOperations] Cleared all pending operations`)
await this.getCurrentTask()?.resumePausedTask(lastMessage)
Copy link
Contributor

Choose a reason for hiding this comment

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

Critical Issue: The method resumePausedTask() is called here but doesn't exist on the Task class. This causes the TypeScript error: "Property 'resumePausedTask' does not exist on type 'Task'".

Did you mean to call a different method? Please either:

  1. Implement the resumePausedTask() method in the Task class, or
  2. Use the correct existing method name

const [isCollapsed, setIsCollapsed] = React.useState(true)

// Performance optimization: Use virtualization for large file lists
const VIRTUALIZATION_THRESHOLD = 50
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Good implementation of virtualization for performance! The threshold of 50 files is reasonable, but consider making this configurable through settings for users with different performance requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

9 participants