fix: restore UI resizing and filtering + add cross-platform QA gate#24
Conversation
Reviewer's GuideRestores default file filtering semantics (custom includes/excludes and .gitignore), converts the renderer layout to a fully flex-based, viewport-height UI, and introduces a cross-platform QA GitHub Actions workflow that builds, tests, and captures Playwright-based UI screenshots. Sequence diagram for the new cross-platform UI screenshot capturesequenceDiagram
actor Developer
participant GitHubActionsRunner as GitHubActionsRunner
participant NodeQAJob as Node_QA_job
participant CaptureScript as capture_ui_screenshot_js
participant StaticServer as Static_HTTP_Server
participant Playwright as Playwright_chromium
participant RendererFiles as Renderer_src_renderer
participant ScreenshotFile as dist_qa_screenshots
Developer->>GitHubActionsRunner: push_or_PR_to_main
GitHubActionsRunner->>NodeQAJob: start_QA_matrix_job(os=ubuntu/windows/macos)
NodeQAJob->>NodeQAJob: npm_ci / lint / test / build
NodeQAJob->>CaptureScript: npm_run_qa_colon_screenshot
CaptureScript->>StaticServer: createStaticServer()
StaticServer-->>CaptureScript: server_listening_on_PORT
CaptureScript->>Playwright: chromium.launch(headless=true)
Playwright-->>CaptureScript: browser_instance
CaptureScript->>Playwright: newPage(viewport=1440x900)
Playwright->>StaticServer: GET_/index.html
StaticServer->>RendererFiles: read(index.html)
RendererFiles-->>StaticServer: HTML_content
StaticServer-->>Playwright: 200_index.html
Playwright->>StaticServer: GET_/bundle.js_and_assets
StaticServer->>RendererFiles: read(static_assets)
RendererFiles-->>StaticServer: asset_bytes
StaticServer-->>Playwright: 200_assets
Playwright->>Playwright: waitForSelector(#app)
Playwright->>Playwright: waitForTimeout(1000ms)
Playwright->>ScreenshotFile: screenshot(fullPage=true,path=SCREENSHOT_PATH)
Playwright-->>CaptureScript: close_page_and_browser
StaticServer-->>CaptureScript: server_closed
CaptureScript-->>NodeQAJob: exit_code_0_or_1
NodeQAJob->>GitHubActionsRunner: upload_artifact(ui-screenshot-${runner.os})
Class diagram for updated filtering configuration and utilitiesclassDiagram
class ConfigObject {
+boolean use_custom_includes [optional]
+boolean use_custom_excludes [optional]
+boolean use_gitignore [optional]
+string[] include_extensions [optional]
+string[] exclude_patterns [optional]
}
class FilterPatternBundle {
string[] array_base (array base)
string[] includePatterns [optional]
string[] includeExtensions [optional]
}
class filter_utils {
+getRelativePath(filePath string, rootPath string) string
+shouldExcludeByExtension(itemPath string, config ConfigObject) boolean
+shouldExclude(itemPath string, rootPath string, config ConfigObject, gitignorePath string) boolean
+matchesExcludePatterns(normalizedPath string, itemName string, patterns string[]) boolean
}
ConfigObject "1" --> "0..1" FilterPatternBundle : derives_excludePatterns
filter_utils --> ConfigObject : reads_filter_settings
filter_utils --> FilterPatternBundle : builds_customExcludes
%% Key behavioral changes
class shouldExcludeByExtension {
+useCustomIncludes = config.use_custom_includes != false
+lowercase include_extensions
+return true if extension not in include_extensions
}
class shouldExclude {
+useCustomExcludes = config.use_custom_excludes != false
+customExcludes = useCustomExcludes ? exclude_patterns : []
+always apply customExcludes when length > 0
+filter gitignore patterns against customExcludes
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
Review Summary by QodoRestore filtering behavior, fix responsive UI layout, and add cross-platform QA gate
WalkthroughsDescription• Restore default filtering behavior for custom excludes/includes and .gitignore patterns • Fix UI layout to use responsive flex sizing instead of fixed-height panes • Add cross-platform QA workflow matrix for Linux/Windows/macOS testing • Add UI screenshot capture script with Playwright for visual regression testing Diagramflowchart LR
A["Filter Logic"] -->|"Default behavior"| B["shouldExclude Function"]
B -->|"Applies by default"| C["Custom Excludes"]
B -->|"Applies by default"| D["Include Extensions"]
B -->|"Applies by default"| E["Gitignore Patterns"]
F["UI Components"] -->|"Responsive flex layout"| G["App Container"]
G -->|"Full height"| H["Tab Content"]
H -->|"Flexible sizing"| I["FileTree & ProcessedTab"]
J["QA Workflow"] -->|"Multi-platform"| K["Linux/Windows/macOS"]
K -->|"Runs tests & builds"| L["Capture Screenshots"]
L -->|"Upload artifacts"| M["Screenshot Storage"]
File Changes1. src/main/index.ts
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThis pull request introduces a new GitHub Actions QA workflow for cross-platform testing with automated screenshot capture, reorganizes layout styling for responsive design across multiple React components, and refactors filter pattern logic to change default behavior and simplify conditional handling. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @Mehdi-Bl, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses critical functional and UI issues by rectifying file filtering logic and implementing a more robust, responsive layout for the application's user interface. Additionally, it significantly boosts the project's quality assurance process by integrating a new cross-platform UI screenshot capture mechanism, which will help prevent future regressions and ensure consistent visual presentation across different operating systems. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `tests/unit/utils/filter-utils.test.ts:111` </location>
<code_context>
+ expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(true);
});
test('should include files with matching extensions when use_custom_includes is true', () => {
</code_context>
<issue_to_address>
**suggestion (testing):** Add a test to verify extension matching is case-insensitive for both config and file extension
The code now lowercases both the file extension and `include_extensions`, but there’s no test covering mixed-case values (e.g. `.JS` on disk or `'.JS'` in config). Please add a test like the one below to exercise this behavior and guard against regressions:
```ts
test('should treat include_extensions as case-insensitive', () => {
const itemPath = '/project/src/FILE.JS';
const rootPath = '/project';
const excludePatterns: string[] = [];
const config = {
use_custom_includes: true,
include_extensions: ['.Js'],
};
expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(false);
});
```
```suggestion
test('should include files with matching extensions when use_custom_includes is true', () => {
expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(false);
});
test('should treat include_extensions as case-insensitive', () => {
const itemPath = '/project/src/FILE.JS';
const rootPath = '/project';
const excludePatterns: string[] = [];
const config = {
use_custom_includes: true,
include_extensions: ['.Js'],
};
expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(false);
});
test('should apply include extension filtering by default when use_custom_includes is undefined', () => {
```
</issue_to_address>
### Comment 2
<location> `tests/unit/utils/filter-utils.test.ts:134-136` </location>
<code_context>
expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(false);
});
+ test('should apply custom excludes by default when use_custom_excludes is undefined', () => {
+ const itemPath = '/project/build/output.log';
+ const rootPath = '/project';
+ const excludePatterns = [];
+ const config = {
+ exclude_patterns: ['**/*.log'],
+ };
+
+ expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(true);
+ });
+
</code_context>
<issue_to_address>
**suggestion (testing):** Add a test that covers the default behavior of gitignore filtering when `use_gitignore` is undefined
You’ve added coverage for explicit `use_gitignore` values and defaulted custom includes/excludes. Please also add a test that verifies gitignore excludes are applied when `use_gitignore` is omitted, mirroring the new defaulted custom-excludes test so the default gitignore behavior is explicitly locked in.
```suggestion
test('should exclude files that match gitignore patterns when use_gitignore is true', () => {
const itemPath = '/project/logs/error.log';
const rootPath = '/project';
expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(false);
});
test('should apply gitignore excludes by default when use_gitignore is undefined', () => {
const itemPath = '/project/logs/error.log';
const rootPath = '/project';
const configWithDefaultGitignore = { ...config, use_gitignore: undefined };
expect(shouldExclude(itemPath, rootPath, excludePatterns, configWithDefaultGitignore)).toBe(true);
});
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(true); | ||
| }); | ||
|
|
||
| test('should include files with matching extensions when use_custom_includes is true', () => { |
There was a problem hiding this comment.
suggestion (testing): Add a test to verify extension matching is case-insensitive for both config and file extension
The code now lowercases both the file extension and include_extensions, but there’s no test covering mixed-case values (e.g. .JS on disk or '.JS' in config). Please add a test like the one below to exercise this behavior and guard against regressions:
test('should treat include_extensions as case-insensitive', () => {
const itemPath = '/project/src/FILE.JS';
const rootPath = '/project';
const excludePatterns: string[] = [];
const config = {
use_custom_includes: true,
include_extensions: ['.Js'],
};
expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(false);
});| test('should include files with matching extensions when use_custom_includes is true', () => { | |
| test('should include files with matching extensions when use_custom_includes is true', () => { | |
| expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(false); | |
| }); | |
| test('should treat include_extensions as case-insensitive', () => { | |
| const itemPath = '/project/src/FILE.JS'; | |
| const rootPath = '/project'; | |
| const excludePatterns: string[] = []; | |
| const config = { | |
| use_custom_includes: true, | |
| include_extensions: ['.Js'], | |
| }; | |
| expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(false); | |
| }); | |
| test('should apply include extension filtering by default when use_custom_includes is undefined', () => { |
| test('should exclude files that match gitignore patterns when use_gitignore is true', () => { | ||
| const itemPath = '/project/logs/error.log'; | ||
| const rootPath = '/project'; |
There was a problem hiding this comment.
suggestion (testing): Add a test that covers the default behavior of gitignore filtering when use_gitignore is undefined
You’ve added coverage for explicit use_gitignore values and defaulted custom includes/excludes. Please also add a test that verifies gitignore excludes are applied when use_gitignore is omitted, mirroring the new defaulted custom-excludes test so the default gitignore behavior is explicitly locked in.
| test('should exclude files that match gitignore patterns when use_gitignore is true', () => { | |
| const itemPath = '/project/logs/error.log'; | |
| const rootPath = '/project'; | |
| test('should exclude files that match gitignore patterns when use_gitignore is true', () => { | |
| const itemPath = '/project/logs/error.log'; | |
| const rootPath = '/project'; | |
| expect(shouldExclude(itemPath, rootPath, excludePatterns, config)).toBe(false); | |
| }); | |
| test('should apply gitignore excludes by default when use_gitignore is undefined', () => { | |
| const itemPath = '/project/logs/error.log'; | |
| const rootPath = '/project'; | |
| const configWithDefaultGitignore = { ...config, use_gitignore: undefined }; | |
| expect(shouldExclude(itemPath, rootPath, excludePatterns, configWithDefaultGitignore)).toBe(true); | |
| }); |
There was a problem hiding this comment.
Code Review
This pull request is a significant improvement, successfully restoring file filtering logic and refactoring the UI to be fully responsive with a flexbox layout. The addition of a Playwright-based QA script for capturing UI screenshots across different platforms is also a valuable enhancement for ensuring visual consistency. My review includes two suggestions: one to make the new QA script more robust by avoiding fixed delays, and another to improve the layout of the 'Processed' tab to be more consistent with the new flex-based design and prevent potential layout issues.
| try { | ||
| await page.goto(`http://127.0.0.1:${PORT}/index.html`, { waitUntil: 'networkidle' }); | ||
| await page.waitForSelector('#app', { timeout: 10000 }); | ||
| await page.waitForTimeout(1000); |
There was a problem hiding this comment.
Using a fixed waitForTimeout can lead to flaky tests. If the UI takes longer than 1 second to render (e.g., on a slower machine), the screenshot might be captured prematurely. Conversely, the script waits unnecessarily if the UI renders faster.
A better practice is to wait for a specific element to be visible, which ensures the UI is ready before capturing the screenshot. This makes the test more robust and efficient.
| await page.waitForTimeout(1000); | |
| await page.waitForSelector('#app > div', { state: 'visible', timeout: 10000 }); |
| <div | ||
| id='processed-content' | ||
| className='max-h-96 overflow-auto rounded-md border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-700 p-4 shadow-sm' | ||
| className='max-h-[45vh] min-h-48 overflow-auto rounded-md border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-700 p-4 shadow-sm' |
There was a problem hiding this comment.
Using viewport height units (vh) within a scrollable flex container can lead to layout issues like double scrollbars or content being cut off. This is because vh units are relative to the viewport, not the parent container.
To align with the other responsive improvements in this PR, I recommend refactoring this component to use a flex column layout. This would make the "Processed Content" and "Files by Token Count" sections properly share the available space.
Here's an example of how you could restructure the component:
// Make the root div a flex container that fills the height
<div className='flex h-full min-h-0 flex-col'>
{/* ...action buttons... */}
{/* Make content sections flexible */}
<div className='mb-4 flex flex-1 flex-col min-h-0'>
{/* ...label... */}
<div id='processed-content' className='flex-1 min-h-0 overflow-auto ...'>
{/* ...pre... */}
</div>
</div>
<div className='mt-6 flex flex-1 flex-col min-h-0'>
{/* ...h3... */}
<div className='flex-1 min-h-0 overflow-y-auto ...'>
{/* ...table... */}
</div>
</div>
</div>There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/index.ts (1)
128-174:⚠️ Potential issue | 🔴 CriticalSpread operator drops custom properties from
FilterPatternBundle.When
excludePatternsis reassigned via spread on Line 146 or Line 162, it creates a plainstring[], discarding any.includeExtensionsor.includePatternsproperties previously attached to the old reference. Specifically, ifincludeExtensionsis set on Line 155 and then gitignore patterns are merged on Line 162, the new array loses.includeExtensions.Consider using a proper object to hold these separate concerns instead of augmenting an array:
Proposed refactor
-type FilterPatternBundle = string[] & { includePatterns?: string[]; includeExtensions?: string[] }; +interface FilterPatternBundle { + excludePatterns: string[]; + includePatterns: string[]; + includeExtensions: string[]; +} // ... -let excludePatterns: FilterPatternBundle = []; +let filterBundle: FilterPatternBundle = { + excludePatterns: [], + includePatterns: [], + includeExtensions: [], +};Then accumulate into the separate arrays without risk of property loss on spread.
🤖 Fix all issues with AI agents
In `@package.json`:
- Line 162: The package.json lists "playwright": "^1.58.2" which is invalid
because 1.58.2 doesn't exist; update the dependency to "playwright": "^1.58.1"
in the package.json (locate the "playwright" entry) and then run your package
manager (npm install or yarn install) to update lockfiles and ensure
consistency.
In `@src/renderer/components/FileTree.tsx`:
- Line 275: The FileTree root div currently applies rounded-md border
border-gray-200 dark:border-gray-700 which duplicates the identical classes
applied by the parent container in SourceTab; remove the duplicated border
styling from one side—either delete the border and rounded classes from the
FileTree root div in component FileTree (the div with className 'file-tree ...')
or remove them from the parent wrapper in SourceTab (the div that wraps FileTree
and also has rounded-md border border-gray-200 dark:border-gray-700 shadow-sm)
so only one element retains the border/rounded classes to avoid the double
border.
🧹 Nitpick comments (3)
src/renderer/components/ProcessedTab.tsx (1)
214-214:max-h-[45vh]is effectively unused here.With
h-[35vh], the element's height is fixed at 35vh. Themax-h-[45vh]constraint can never be reached sinceh-[35vh]already sets it to a smaller value. If the intent is to let the table grow up to 45vh, consider replacingh-[35vh]withmin-h-[35vh]or removing the redundantmax-h.src/main/index.ts (1)
180-182: Redundant YAML parse — config is parsed twice.The config is already parsed at Lines 130–132 inside the same handler scope. This second parse on Lines 180–182 is redundant and wasteful. Hoist the first
configdeclaration to the outer scope (or reuse it) instead of re-parsing..github/workflows/qa-matrix.yml (1)
23-24: Pinned action SHAs are a good security practice.Consider adding a comment with the version tag next to each SHA for maintainability (e.g.,
# v4.2.2), so future maintainers can easily identify which version is pinned.
| "jest": "^29.7.0", | ||
| "jest-environment-jsdom": "^29.7.0", | ||
| "lint-staged": "^15.2.2", | ||
| "playwright": "^1.58.2", |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
playwright npm package latest version 2026
💡 Result:
As of February 8, 2026, the latest stable version of the playwright npm package is 1.58.1. [1]
If you’re looking at pre-releases, there are newer 1.59.0-alpha builds available. [2]
Sources: [1] [2]
Update playwright version from ^1.58.2 to ^1.58.1.
Playwright version 1.58.2 does not exist. The latest stable version as of February 2026 is 1.58.1.
🤖 Prompt for AI Agents
In `@package.json` at line 162, The package.json lists "playwright": "^1.58.2"
which is invalid because 1.58.2 doesn't exist; update the dependency to
"playwright": "^1.58.1" in the package.json (locate the "playwright" entry) and
then run your package manager (npm install or yarn install) to update lockfiles
and ensure consistency.
|
|
||
| return ( | ||
| <div className='file-tree rounded-md border border-gray-200 dark:border-gray-700'> | ||
| <div className='file-tree flex min-h-0 flex-1 flex-col rounded-md border border-gray-200 dark:border-gray-700'> |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Find FileTree usage in SourceTab and check the structure
rg -n 'FileTree' --type=tsx -B3 -A3 src/renderer/components/SourceTab.tsxRepository: codingworkflow/ai-code-fusion
Length of output: 100
🏁 Script executed:
# Check the specific area in FileTree.tsx around line 275
sed -n '270,280p' src/renderer/components/FileTree.tsxRepository: codingworkflow/ai-code-fusion
Length of output: 621
🏁 Script executed:
# Check SourceTab.tsx around line 395
sed -n '390,400p' src/renderer/components/SourceTab.tsxRepository: codingworkflow/ai-code-fusion
Length of output: 436
Remove duplicate border styling between FileTree and parent container.
The FileTree root element (line 275) has rounded-md border border-gray-200 dark:border-gray-700, and its parent container in SourceTab.tsx (line 395-399) wraps it with identical border classes rounded-md border border-gray-200 dark:border-gray-700 shadow-sm. This creates a visually doubled border.
Remove the border classes from one of the two elements—either from the FileTree root or the parent div in SourceTab.
🤖 Prompt for AI Agents
In `@src/renderer/components/FileTree.tsx` at line 275, The FileTree root div
currently applies rounded-md border border-gray-200 dark:border-gray-700 which
duplicates the identical classes applied by the parent container in SourceTab;
remove the duplicated border styling from one side—either delete the border and
rounded classes from the FileTree root div in component FileTree (the div with
className 'file-tree ...') or remove them from the parent wrapper in SourceTab
(the div that wraps FileTree and also has rounded-md border border-gray-200
dark:border-gray-700 shadow-sm) so only one element retains the border/rounded
classes to avoid the double border.
Code Review by Qodo
1. UI_SCREENSHOT_NAME path not sanitized
|
| const SCREENSHOT_NAME = | ||
| process.env.UI_SCREENSHOT_NAME || `ui-${process.platform}-${process.arch}.png`; | ||
| const SCREENSHOT_PATH = path.join(SCREENSHOT_DIR, SCREENSHOT_NAME); | ||
| const PORT = Number(process.env.UI_SCREENSHOT_PORT || 4173); |
There was a problem hiding this comment.
1. ui_screenshot_name path not sanitized 📘 Rule violation ⛨ Security
• SCREENSHOT_NAME is taken directly from process.env.UI_SCREENSHOT_NAME and used in path.join(SCREENSHOT_DIR, SCREENSHOT_NAME), allowing path traversal (e.g., ../...) and unintended writes outside dist/qa/screenshots. • This violates the requirement to validate/sanitize external inputs (environment variables) and can create a security risk in CI runners or other environments where env vars can be influenced.
Agent Prompt
## Issue description
`scripts/capture-ui-screenshot.js` uses `process.env.UI_SCREENSHOT_NAME` directly when creating `SCREENSHOT_PATH`, which can allow path traversal and writing files outside the intended screenshots directory.
## Issue Context
Environment variables are external inputs. The script should only allow a safe filename (e.g., `ui-linux.png`) and disallow `..`, absolute paths, or path separators.
## Fix Focus Areas
- scripts/capture-ui-screenshot.js[11-14]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| const useCustomIncludes = config?.use_custom_includes !== false; | ||
|
|
||
| if ( | ||
| config?.use_custom_includes && | ||
| useCustomIncludes && | ||
| config?.include_extensions && | ||
| Array.isArray(config.include_extensions) && | ||
| config.include_extensions.length > 0 && | ||
| path.extname(itemPath) | ||
| ) { | ||
| const ext = path.extname(itemPath).toLowerCase(); | ||
| return !config.include_extensions.includes(ext); | ||
| const includeExtensions = config.include_extensions.map((includeExt) => includeExt.toLowerCase()); | ||
| return !includeExtensions.includes(ext); |
There was a problem hiding this comment.
2. Include filter regression 🐞 Bug ✓ Correctness
• shouldExcludeByExtension now skips extension filtering when include_extensions is empty, which can cause the directory tree to include all files even though the UI states “Only process files with these extensions”. • This also makes behavior inconsistent with repository analysis: FileAnalyzer will still exclude everything when use_custom_includes is enabled and the extension list is empty (and it also does not normalize include_extensions casing, unlike the updated filter-utils). • Impact: confusing UX (tree shows selectable files that will never be analyzed) and possible performance/memory issues when rendering a huge tree unexpectedly.
Agent Prompt
## Issue description
`shouldExcludeByExtension` currently **disables** extension filtering when `include_extensions` is an empty array. That contradicts the UI’s “Only process files with these extensions” wording and diverges from `FileAnalyzer` behavior (which still filters when the array exists, even if empty). Also, `filter-utils` now lowercases `include_extensions` entries, but `FileAnalyzer` does not, which can create mismatches.
## Issue Context
This impacts both the directory tree (main process uses `shouldExclude`) and analysis (uses `FileAnalyzer`). In the empty-include-list case, the tree may show many files that analysis will later skip.
## Fix Focus Areas
- src/utils/filter-utils.ts[12-25]
- src/utils/file-analyzer.ts[80-90]
- src/renderer/components/ConfigTab.tsx[410-416]
- src/main/index.ts[184-200]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Summary
Validation
Summary by Sourcery
Restore default file filtering behavior and improve the renderer layout to be fully responsive while adding cross-platform QA automation with UI screenshot capture.
Bug Fixes:
Enhancements:
Build:
CI:
Tests:
Summary by CodeRabbit
Release Notes
Improvements
Chores
Tests