Skip to content

Commit b505ef6

Browse files
fix(tables): reset the announce latch when leaving a table
The tableId cleanup dismissed the notice on departure but left the latch holding that table's id, so returning before another table announced — a quick there-and-back, or a second table that never loaded — found the latch matching and stayed silent. Leaving ends the visit, so clear the latch with it.
1 parent d2d2156 commit b505ef6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/tables/[tableId]

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/table.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,9 +653,11 @@ export function Table({
653653

654654
// A notice must not outlive the table it describes — its action targets
655655
// whichever table is current. Keyed on `tableId` so an embedded swap that
656-
// changes the prop without a route change is covered too.
656+
// changes the prop without a route change is covered too. Leaving ends the
657+
// visit, so the latch resets and coming back announces again.
657658
useEffect(
658659
() => () => {
660+
announcedLockTableIdRef.current = null
659661
if (!blockedToastIdRef.current) return
660662
toast.dismiss(blockedToastIdRef.current)
661663
blockedToastIdRef.current = null

0 commit comments

Comments
 (0)