From 54773cdf0f46620902e82e6bd35dd294de4d1058 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 22 Jun 2026 23:16:15 +0100 Subject: [PATCH] feat(wiki): open source view on card click (wiki viewer or normal view) Clicking a source card opens its view via the existing setDocumentToView handler (wiki -> WikiViewer, nested -> FileTree/ConnectorTree, else -> Chunks). The 3-dots Button and both DropdownMenuContent menus stopPropagation so clicks on the trigger or menu items don't bubble (through the React tree, even though Radix portals them) to the card's onClick. Adds cursor + keyboard/role a11y matching AgentCard. --- frontend/src/settings/Sources.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/settings/Sources.tsx b/frontend/src/settings/Sources.tsx index 7d8a8e23..3d77cf61 100644 --- a/frontend/src/settings/Sources.tsx +++ b/frontend/src/settings/Sources.tsx @@ -561,7 +561,17 @@ export default function Sources({ return (
setDocumentToView(document)} + onKeyDown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + setDocumentToView(document); + } + }} + className={`bg-muted dark:bg-accent focus-visible:ring-ring/50 flex h-[130px] w-full cursor-pointer flex-col rounded-2xl p-5 transition-all duration-200 outline-none focus-visible:ring-[3px] ${ actionMenuDocId === docId || syncMenuState.docId === docId ? 'scale-[1.05]' @@ -601,6 +611,7 @@ export default function Sources({ e.stopPropagation()} > {syncOptions.map((opt) => ( e.stopPropagation()} > {getActionOptions(index, document).map( (option, idx) => (