From 4b03789ef2ca6383e9285e99ae27cc8ff8753666 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 21 Sep 2026 15:47:58 +0000 Subject: [PATCH] Hand over the whole item from the info panel The panel is where you go to see exactly what the server said about a video, and every time that is worth reporting somewhere it has to be retyped from the screen. Copy JSON hands over the object instead: the listing item, plus the extractor's payload once that has resolved. What it copies is built where the rows are built, so the button and the panel can't disagree about what "this video" means -- and it is the values rather than the rendering, so a duration of 0 stays 0 instead of becoming the panel's dash. navigator.clipboard needs a secure context, which the app has on https and does not on a plain-http LAN address, so the old execCommand path sits behind it. The test drives the real clipboard rather than the function, and the awkward parts of a real item -- nested http_headers, a tag array, a zero, an empty string -- are in the fixture for that reason. It and two others also pick up smoke_grid's lean Chromium flags, without which they get themselves killed when run alongside everything else. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01MPZFnNdHbPGDTqQUNiE4ZN --- frontend/css/style.css | 24 ++++++- frontend/index.html | 5 +- frontend/js/ui.js | 81 ++++++++++++++++++++- tests/smoke_channels.py | 9 ++- tests/smoke_info.py | 151 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 264 insertions(+), 6 deletions(-) create mode 100644 tests/smoke_info.py diff --git a/frontend/css/style.css b/frontend/css/style.css index 0191870..d1f1d57 100644 --- a/frontend/css/style.css +++ b/frontend/css/style.css @@ -1393,18 +1393,40 @@ body.theme-light .favorite-btn { font-family: var(--font-display); font-size: 18px; margin: 0 0 16px 0; + /* Clear of the copy/close buttons parked in the corner. */ + padding-right: 140px; } -.info-close { +/* Copy and close sit together in the card's top corner, above the title. */ +.info-actions { position: absolute; right: 16px; top: 16px; + display: flex; + align-items: center; + gap: 8px; +} + +.info-copy { + width: auto; + padding: 6px 12px; + font-size: 12px; + white-space: nowrap; +} + +.info-copy.is-copied { + border-color: var(--border-hover); + color: var(--accent); +} + +.info-close { border: none; background: var(--bg-tertiary); color: var(--text-primary); border-radius: 50%; width: 32px; height: 32px; + flex-shrink: 0; cursor: pointer; } diff --git a/frontend/index.html b/frontend/index.html index fbfbc4c..42410a8 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -184,7 +184,10 @@