From ddd18cb12ffaffa4b2bfb4b67bc53d97da35ad54 Mon Sep 17 00:00:00 2001 From: Kpa-clawbot Date: Mon, 20 Apr 2026 22:13:52 -0700 Subject: [PATCH] fix(nodes): Details link opens full-screen on desktop (#823) (#824) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #823 ## What Remove the `window.innerWidth <= 640` gate on the `directNode` full-screen branch in `init()` so the 🔍 Details link works on desktop. ## Why - #739 (`e6ace95`) gated full-screen to mobile so desktop **deep links** would land on the split panel. - But the same gate broke the **Details link** flow (#779/#785): the click handler calls `init(app, pubkey)` directly. On desktop the gated branch was skipped, the list re-rendered with `selectedKey = pubkey`, and the side panel was already open → no visible change. - Dropping the gate makes the directNode branch the single, unambiguous path to full-screen for both the Details link and any deep link. ## Why the desktop split-panel UX is still preserved Row clicks call `selectNode()`, which uses `history.replaceState` — no `hashchange` event, no router re-init, no `directNode` set. Only the Details link handler (which calls `init()` explicitly) and a fresh deep-link load reach this branch. ## Repro / verify 1. Desktop, viewport > 640px, open `/#/nodes`. 2. Click a node row → split panel opens (unchanged). 3. Click 🔍 Details inside the panel → full-screen single-node view (was broken; now works). 4. Back button / Escape → back to list view. 5. Paste `/#/nodes/{pubkey}` directly → full-screen on both desktop and mobile. ## Tests `node test-frontend-helpers.js` → 553 passed, 0 failed. Co-authored-by: you --- public/nodes.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/nodes.js b/public/nodes.js index fd69754..93ed321 100644 --- a/public/nodes.js +++ b/public/nodes.js @@ -318,8 +318,11 @@ function init(app, routeParam) { directNode = routeParam || null; - if (directNode && window.innerWidth <= 640) { - // Full-screen single node view (mobile only) + if (directNode) { + // Full-screen single node view (desktop + mobile). + // Reached via the 🔍 Details link or a deep link to #/nodes/{pubkey}. + // Row clicks use history.replaceState (no hashchange → no re-init), + // so the split-panel UX on desktop is preserved. app.innerHTML = `