@@ -2241,7 +2241,6 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
22412241 threadKey,
22422242 currentThreadKey : readRouteThreadKey ( router ) ,
22432243 action : "snooze" ,
2244- // oxlint-disable-next-line react/purity -- runs in an event handler (oxc#27309)
22452244 now : new Date ( ) . toISOString ( ) ,
22462245 thread : readThreadShell ( threadRef ) ,
22472246 } )
@@ -2250,26 +2249,28 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
22502249 }
22512250 return { status : "success" } as const ;
22522251 } ;
2253- const attemptSnooze = (
2254- threadRef : ScopedThreadRef ,
2255- preset : Pick < SnoozePreset , "snoozedUntil" > ,
2256- opts : { coSnoozingKeys ?: ReadonlySet < string > } = { } ,
2257- ) => {
2258- void ( async ( ) => {
2259- const outcome = await performSnooze ( threadRef , preset , opts ) ;
2260- if ( outcome . status === "failure" ) {
2261- toastManager . add (
2262- stackedThreadToast ( {
2263- type : "error" ,
2264- title : "Failed to snooze thread" ,
2265- description :
2266- outcome . error instanceof Error ? outcome . error . message : "An error occurred." ,
2267- } ) ,
2268- ) ;
2269- return ;
2270- }
2271- } ) ( ) ;
2272- } ;
2252+ const attemptSnooze = useStableCallback (
2253+ (
2254+ threadRef : ScopedThreadRef ,
2255+ preset : Pick < SnoozePreset , "snoozedUntil" > ,
2256+ opts : { coSnoozingKeys ?: ReadonlySet < string > } = { } ,
2257+ ) => {
2258+ void ( async ( ) => {
2259+ const outcome = await performSnooze ( threadRef , preset , opts ) ;
2260+ if ( outcome . status === "failure" ) {
2261+ toastManager . add (
2262+ stackedThreadToast ( {
2263+ type : "error" ,
2264+ title : "Failed to snooze thread" ,
2265+ description :
2266+ outcome . error instanceof Error ? outcome . error . message : "An error occurred." ,
2267+ } ) ,
2268+ ) ;
2269+ return ;
2270+ }
2271+ } ) ( ) ;
2272+ } ,
2273+ ) ;
22732274
22742275 const handleMultiSelectContextMenu = useStableCallback (
22752276 async ( position : { x : number ; y : number } ) => {
@@ -2281,7 +2282,6 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
22812282 ) ;
22822283 if ( threadKeys . length === 0 ) return ;
22832284 const count = threadKeys . length ;
2284- // oxlint-disable-next-line react/purity -- runs in an event handler (oxc#27309)
22852285 const selectionNow = new Date ( ) ;
22862286 const selectedThreads = threadKeys . flatMap ( ( threadKey ) => {
22872287 const thread = threadByKeyRef . current . get ( threadKey ) ;
@@ -2312,7 +2312,6 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
23122312 pinnedCount : pinnedSelectedThreads . length ,
23132313 } ) ;
23142314 // Presets sync across environments, so the first selected thread's stand for all.
2315- // oxlint-disable-next-line react/purity -- runs in an event handler (oxc#27309)
23162315 const menuOpenedAt = new Date ( ) ;
23172316 const snoozePresets = resolveSnoozePresets (
23182317 menuOpenedAt ,
0 commit comments