Skip to content

Conversation

@ironAiken2
Copy link
Contributor

@ironAiken2 ironAiken2 commented Nov 25, 2025

resolves (FR-1296)

Improve vfolder notification and error handling

This PR adds support for virtual folder notifications in the UI, allowing users to see detailed information about folder operations and errors.

Key changes:

BAIVirtualFolderNodeNotification provides a common interface for notifications targeting vfolders. Currently, actions for the vfolder explorer are not included; only the message, description, progress, and extraDescription features are provided.

  • Created a new BAIVirtualFolderNodeNotificationItem component to display folder-specific notifications
  • Added a reusable BAINotificationBackgroundItem component to show progress indicators
  • Enhanced error handling in folder operations to provide more context
  • Added support for showing mounted sessions when a folder cannot be deleted
  • Improved the notification system to handle both string and React node content in extraDescription

image.png

image.png

Checklist:

  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

@github-actions github-actions bot added area:ux UI / UX issue. area:i18n Localization size:L 100~500 LoC labels Nov 25, 2025
Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.38% (-0.01% 🔻)
517/11802
🔴 Branches
3.57% (-0.01% 🔻)
297/8317
🔴 Functions
2.55% (-0% 🔻)
92/3612
🔴 Lines
4.36% (-0.01% 🔻)
503/11543
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / BAINotificationBackgroundItem.tsx
0% 0% 0% 0%
🔴
... / BAIVirtualFolderNodeNotificationItem.tsx
0% 0% 0% 0%

Test suite run success

118 tests passing in 13 suites.

Report generated by 🧪jest coverage report action from 7742549

@ironAiken2 ironAiken2 marked this pull request as ready for review November 25, 2025 09:32
Copilot AI review requested due to automatic review settings November 25, 2025 09:32
Copilot finished reviewing on behalf of ironAiken2 November 25, 2025 09:35
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 enhances the error handling and notification system for virtual folder operations, specifically improving the user experience when attempting to delete a folder that is currently in use. The key improvement is showing users which sessions are mounted to the folder, allowing them to navigate directly to those sessions.

Key changes:

  • Extended notification system to support React nodes in extraDescription field for richer content display
  • Added new reusable notification components for virtual folders and background tasks
  • Enhanced error handling to parse and display mounted session information when folder deletion fails

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
react/src/hooks/useBAINotification.tsx Changed extraDescription type from string to ReactNode to support richer notification content; added 'use memo' directive
react/src/components/VFolderNodes.tsx Enhanced error handling to parse mounted session IDs and display them as clickable links in notifications
react/src/components/BAIVirtualFolderNodeNotificationItem.tsx New component for displaying virtual folder-specific notifications with folder details and navigation
react/src/components/BAINotificationBackgroundItem.tsx New reusable component extracted for displaying background task progress indicators
react/src/components/BAINodeNotificationItem.tsx Updated to support VirtualFolderNode notifications using the new notification item component
react/src/components/BAIGeneralNotificationItem.tsx Refactored to use new BAINotificationBackgroundItem component and support ReactNode in extraDescription
resources/i18n/*.json Added translations for "MountedSessions" and "Folder" keys across all supported languages

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@ironAiken2 ironAiken2 force-pushed the feat/FR-1296-improve-error-message-for-deleting-vfolder branch from ab031bd to c6bef5a Compare November 25, 2025 09:43
@ironAiken2 ironAiken2 requested a review from agatha197 November 26, 2025 09:43
@ironAiken2 ironAiken2 force-pushed the feat/FR-1296-improve-error-message-for-deleting-vfolder branch from c6bef5a to 55d04bf Compare November 26, 2025 09:43
Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

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

image.png

(max) width needed.

@ironAiken2 ironAiken2 force-pushed the feat/FR-1296-improve-error-message-for-deleting-vfolder branch from 55d04bf to 7742549 Compare December 2, 2025 01:24
@ironAiken2 ironAiken2 requested a review from agatha197 December 2, 2025 01:24
Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

area:i18n Localization area:ux UI / UX issue. size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants