From 93a3b74011ad23a4c4f32443905d0e3050f57056 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 13 Sep 2026 02:47:48 +0200 Subject: [PATCH] fix: a link inside the split pane just goes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Beside what you are reading, or in a tab?" is a question with one real answer for somebody who is already beside what they were reading. Inside the pane the card offered Split view — which replaced the pane they were in — and the click that would have simply followed the link opened a card instead. So inside the pane the link goes: the pane follows it, the trail records it, and Back returns to the reference that sent you. The hover card is still what happens everywhere else, where the question is real. One of the tests covering this was passing without testing anything. It held ⌘ with `userEvent.keyboard('{Meta>}')` and then clicked with a *different* `userEvent` session, and modifier state lives on the session — so the "modified click" it asserted about was an ordinary one. It holds the key now. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN --- frontend/src/components/ArticleLink.jsx | 11 +++++++++- frontend/src/components/ArticleLink.test.jsx | 21 +++++++++++++------- frontend/src/pages/ArticleSplitView.test.jsx | 20 ++++++++++++++++--- 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/ArticleLink.jsx b/frontend/src/components/ArticleLink.jsx index c6a5750..7c65814 100644 --- a/frontend/src/components/ArticleLink.jsx +++ b/frontend/src/components/ArticleLink.jsx @@ -114,6 +114,15 @@ export default function ArticleLink({ slug, sectionId = null, children, classNam setOpen(false) return } + // Already reading in the pane? Then the pane is where this goes, and the + // click says so. There is no second pane to offer, and asking "beside what + // you are reading, or in a tab?" of somebody who is already beside what + // they were reading is a question with one real answer. + if (split?.inPane) { + setOpen(false) + split.open(slug) + return + } reveal() } @@ -134,7 +143,7 @@ export default function ArticleLink({ slug, sectionId = null, children, classNam {preview.status !== 'published' && ' · draft'} - {split && ( + {split && !split.inPane && (