Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions packages/extension/src/components/HistoryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@ export function HistoryList({
role="button"
tabIndex={0}
onClick={() => onSelect(session.id)}
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the onKeyDown handler breaks keyboard activation for an element using role=\"button\" + tabIndex={0} (Enter/Space will no longer trigger selection). To keep this accessible, either restore the Enter/Space key handling, or change the element to a semantic <button type=\"button\"> (and then you can drop role/tabIndex and rely on native keyboard behavior).

Suggested change
onClick={() => onSelect(session.id)}
onClick={() => onSelect(session.id)}
onKeyDown={(event) => {
if (event.key === 'Enter' || event.key === ' ') {
event.preventDefault()
onSelect(session.id)
}
}}

Copilot uses AI. Check for mistakes.
onKeyDown={(e) => {
if (e.target !== e.currentTarget) return
if (e.key !== 'Enter' && e.key !== ' ') return
e.preventDefault()
onSelect(session.id)
}}
className="w-full text-left px-3 py-2.5 border-b hover:bg-muted/50 transition-colors cursor-pointer flex items-start gap-2 group"
>
{/* Status icon */}
Expand Down
Loading