You need to review a PR for the notification panel in an application built with Vue 3.5 + TypeScript 5.8. After the PR changes, users report two symptoms:
Context and requirements:
items via props and may be unmounted/mounted again.open = true, the panel must respond to Esc with exactly one active handler.read === false from the current props.items.props.items: Notice[], props.open: boolean, close event without payload.What needs to be done in the review:
Reproduction steps:
open=true and a list of three notifications, two of them unread.items with a new array with a different set of read values while the component is already mounted.Assumptions:
items array, not mutate the old one.window.addEventListener is used.Vue 3.5.13, TypeScript 5.8.2, Vite 5 browser dev mode, Composition API with . No additional setup is required beyond the standard Vue SFC environment.
Use line comments to explain the problem, its impact, the fix and how to test it.