Skip to content

Conversation

@viktoravelino
Copy link
Collaborator

@viktoravelino viktoravelino commented Jan 27, 2026

Jira: LE-118
GH Issue: #8174

This pull request simplifies the logic for handling folder actions in the sidebar by removing checks and dependencies related to the default folder name and folder index. Now, actions like renaming and deleting folders are always available, regardless of the folder type or position. This streamlines the user experience and reduces unnecessary code.

Sidebar folder actions simplification:

  • Removed the dependency on useUtilityStore and the defaultFolderName check in both select-options.tsx and index.tsx, so the rename and delete options are now always shown for all folders. [1] [2] [3] [4] [5] [6]
  • Eliminated the use of the index prop in SelectOptions and its associated logic, allowing delete actions for all folders regardless of their position in the list. [1] [2] [3]

Summary by CodeRabbit

  • Bug Fixes

    • Fixed an issue preventing double-click actions on certain folders.
  • Improvements

    • Rename and Delete options are now consistently available for all folders in the sidebar menu.

✏️ Tip: You can customize this high-level summary in your review settings.

@viktoravelino viktoravelino self-assigned this Jan 27, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Walkthrough

These changes refactor the folder sidebar button components by removing the index parameter from the SelectOptions component and eliminating dependencies on the utility store. The components now unconditionally render folder action options while simplifying prop passing and internal guards.

Changes

Cohort / File(s) Summary
Sidebar folder button options simplification
src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/select-options.tsx
Removed index parameter from component signature and useUtilityStore import. Changed to always render Rename and Delete options (previously conditional based on index).
Sidebar folder button component cleanup
src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/index.tsx
Removed useUtilityStore import and defaultFolderName usage. Removed conditional guard in handleDoubleClick and index prop from SelectOptions render call.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Test Quality And Coverage ⚠️ Warning Pull request modifies SelectOptions and sideBarFolderButtons components for rename/delete functionality but lacks unit tests for these changes. Add Jest and React Testing Library unit tests for both components to verify prop signatures, option visibility, callbacks, and store dependency removal.
Test File Naming And Structure ⚠️ Warning Pull request removes conditional logic restricting rename/delete actions for certain folders but adds no unit tests for modified SelectOptions component behavior or E2E tests for Starter Project folder rename/delete capability. Create unit test file at src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/tests/select-options.test.tsx and extend folders.spec.ts with test verifying Starter Project folder rename/delete functionality.
Test Coverage For New Implementations ❓ Inconclusive Unable to access shell commands to verify test coverage. No test files related to modified components (SelectOptions, SidebarFolder, SidebarButton) could be identified in the repository structure. Manually review the PR diff to locate test files or check if test coverage for modified components exists in the repository.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: enabling rename and delete functionality for the Starter Project folder by removing previous restrictions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Excessive Mock Usage Warning ✅ Passed PR contains only implementation changes to component files; no test files were modified, making the excessive mock usage check not applicable.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/LE-118

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 27, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 17%
17.54% (5050/28780) 10.96% (2432/22170) 11.64% (733/6297)

Unit Test Results

Tests Skipped Failures Errors Time
2036 0 💤 0 ❌ 0 🔥 25.889s ⏱️

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 34.85%. Comparing base (a097b68) to head (75550e5).

❌ Your project check has failed because the head coverage (41.55%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #11462      +/-   ##
==========================================
- Coverage   34.88%   34.85%   -0.04%     
==========================================
  Files        1420     1420              
  Lines       68215    68179      -36     
  Branches     9984     9974      -10     
==========================================
- Hits        23797    23762      -35     
- Misses      43184    43193       +9     
+ Partials     1234     1224      -10     
Flag Coverage Δ
frontend 16.06% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...sideBarFolderButtons/components/select-options.tsx 0.00% <ø> (ø)
...omponent/components/sideBarFolderButtons/index.tsx 0.00% <ø> (ø)

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 27, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/select-options.tsx (1)

15-27: Guard against undefined delete handler or make it required.

Delete is now always visible, but handleDeleteFolder is optional in the prop definition. In handleSelectChange (line 12), the handler is invoked with the non-null assertion operator ! without checking if it's defined. Selecting Delete when the handler is undefined will throw a runtime error. Either:

  1. Make handleDeleteFolder required in the prop type, or
  2. Guard the delete case in handleSelectChange to check if the handler exists before calling it

@github-actions github-actions bot added the lgtm This PR has been approved by a maintainer label Jan 27, 2026
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants