🟠 High components/RightPanelTabs.tsx:437
Rendering RightPanelEmptyState throws a temporal-dead-zone ReferenceError before the launcher renders, because the focus effect evaluates its dependency array while shortcutActionsRef is still uninitialized. Move the ref declaration above that effect.
| 1 | const containerRef = useRef<HTMLDivElement | null>(null); |
| 2 | + const shortcutActionsRef = useRef(availableActions); |
| 3 | |
| 4 | useEffect(() => { |
| 5 | if (isPanelOpen) { |
| 6 | containerRef.current?.focus(); |
| 7 | @@ |
| 8 | - const shortcutActionsRef = useRef(availableActions); |
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/web/src/components/RightPanelTabs.tsx around lines 437-448: |
| 2 | |
| 3 | Rendering `RightPanelEmptyState` throws a temporal-dead-zone `ReferenceError` before the launcher renders, because the focus effect evaluates its dependency array while `shortcutActionsRef` is still uninitialized. Move the ref declaration above that effect. |
| … | … | @@ -246,17 +246,23 @@ function tabAudioState(overlay: DesktopPreviewOverlay | null): TabAudioState { | |
| 260 | + | if (!action.available) return false; | |
| 261 | + | const targetShortcut = action.shortcut.toLowerCase(); | |
| 262 | + | if (targetShortcut === layoutKey) return true; | |
| 263 | + | if (letterCode && !/^[a-z]$/.test(layoutKey) && targetShortcut === letterCode) return true; | |
🟡 Medium components/RightPanelTabs.tsx:263
A dead-key keydown activates the physical KeyT shortcut even though the user entered no shortcut character. Because KeyboardEvent.key is `
| 1 | if (letterCode && layoutKey.length === 1 && !/^[a-z]$/.test(layoutKey) && targetShortcut === letterCode) return true; |
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/web/src/components/RightPanelTabs.tsx around line 263: |
| 2 | |
| 3 | A dead-key `keydown` activates the physical `KeyT` shortcut even though the user entered no shortcut character. Because `KeyboardEvent.key` is ` |
| … | … | @@ -1405,6 +1422,7 @@ export function RightPanelTabs(props: RightPanelTabsProps) { | |
| 1405 | 1422 | <div className="flex min-h-0 flex-1 flex-col" data-right-panel-surface-content> | |
| 1406 | 1423 | {props.activeSurfaceId === null ? ( | |
| 1407 | 1424 | <RightPanelEmptyState | |
| 1425 | + | open={props.open} | |
🟡 Medium components/RightPanelTabs.tsx:1425
When the sheet is closed and has no surfaces, RightPanelEmptyState still handles launcher keys such as T, creating a surface and consuming the keystroke. The sheet-mode caller does not provide open, so this prop is undefined and is treated as open even while RightPanelSheet keeps the empty state mounted; pass rightPanelOpen through to RightPanelTabs.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/web/src/components/RightPanelTabs.tsx around line 1425: |
| 2 | |
| 3 | When the sheet is closed and has no surfaces, `RightPanelEmptyState` still handles launcher keys such as `T`, creating a surface and consuming the keystroke. The sheet-mode caller does not provide `open`, so this prop is `undefined` and is treated as open even while `RightPanelSheet` keeps the empty state mounted; pass `rightPanelOpen` through to `RightPanelTabs`. |
| … | … | @@ -75,22 +170,15 @@ export function ConfirmDialogHost() { | |
| 93 | - | </AlertDialogPopup> | |
| 173 | + | {isMounted ? ( | |
| 174 | + | <ConfirmDialogBody | |
| 175 | + | key={state.message} | |
🟡 Medium components/ConfirmDialogHost.tsx:175
Two queued confirmations with the same state.message reuse the same ConfirmDialogBody, so checkboxChecked remains true after the first dialog is cancelled. The next dialog therefore opens checked even when checkbox.checked is false, and confirming it can persist the wrong opt-out choice. Key the body with a unique confirmation/request identifier rather than state.message alone.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/web/src/components/ConfirmDialogHost.tsx around line 175: |
| 2 | |
| 3 | Two queued confirmations with the same `state.message` reuse the same `ConfirmDialogBody`, so `checkboxChecked` remains `true` after the first dialog is cancelled. The next dialog therefore opens checked even when `checkbox.checked` is `false`, and confirming it can persist the wrong opt-out choice. Key the body with a unique confirmation/request identifier rather than `state.message` alone. |