-
Notifications
You must be signed in to change notification settings - Fork 78
feat(FR-1560): auto-dismiss running notification with timeout animation #4411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: graphite-base/4411
Are you sure you want to change the base?
feat(FR-1560): auto-dismiss running notification with timeout animation #4411
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 4.69% (+0% 🔼) |
532/11355 |
| 🔴 | Branches | 3.78% (+0% 🔼) |
302/7996 |
| 🔴 | Functions | 2.9% | 102/3517 |
| 🔴 | Lines | 4.63% (+0% 🔼) |
514/11096 |
Test suite run success
121 tests passing in 14 suites.
Report generated by 🧪jest coverage report action from 5488e1c
There was a problem hiding this 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 refactors the BAIComputeSessionNodeNotificationItem component to use modern React patterns and simplify the session status polling mechanism.
- Replaced manual polling with
useRefetchableFragmentfor better integration with Relay - Introduced
useEffectEventfor notification updates without dependency tracking - Added React 19's
'use memo'directive for component memoization
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| useEffect(() => { | ||
| if ( | ||
| !node?.status || | ||
| node?.status === 'TERMINATED' || | ||
| node?.status === 'CANCELLED' | ||
| ) { | ||
| setDelay(null); | ||
| } else if (node?.status === 'RUNNING') { | ||
| setDelay(15000); | ||
| } else { | ||
| setDelay(3000); | ||
| if (node?.status === 'RUNNING') { | ||
| closeNotificationWithProgress(); | ||
| } | ||
| }, [node?.status]); |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dependency array is incomplete. closeNotificationWithProgress should be included in the dependencies, or if using the experimental useEffectEvent, you need to ensure the React version supports it. With current stable React, this could cause stale closure issues where closeNotificationWithProgress references outdated values of notification or upsertNotification.
| BAINodeNotificationItemProps | ||
| > = ({ sessionFrgmt, showDate, notification }) => { | ||
| const { destroyNotification } = useSetBAINotification(); | ||
| 'use memo'; |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unknown directive: 'use memo'.
| 'use memo'; |

Resolves #4403 (FR-1560)
Summary
This PR implements auto-dismissing functionality for session "Running" notifications with a timeout animation. The notification now automatically closes after 10 seconds with a progress bar animation, and pauses when the user hovers over it.
Changes
pauseOnHoverfunctionality to prevent auto-close on hoveruseRefetchableFragmentfor cleaner implementationuseEffectEventfor stable callback referenceTesting