Symptom
Observed on Arc (not an officially supported edition — see README).
- On a watch page, press YouTube's native
i shortcut to send the current
video to the miniplayer.
- Open the queue overlay (
Ctrl+A p), type a label for a different video.
- The previous / original video (the one now in the miniplayer) is added
to the queue, not the newly labelled one. Effectively a cached / stale
enqueue.
Suspected mechanism (to be proven, not assumed)
i triggers a YouTube SPA transition (watch -> miniplayer + browse surface).
yt-lockup-view-model nodes recycle; ytd-popup-container may or may not be
a fresh instance.
activateQueueTarget (src/ui/queue-overlay.js) opens a card's … menu and
clicks popup position 0. The hypothesis: the popup that opens — or its
position-0 endpoint — is still bound to the original video now in the
miniplayer.
- Module-level singletons
lastActivatedItem and activationInFlight don't
observe or survive the native transition; lastActivatedItem is only
compared by node identity against the last queue-overlay activation, so an
intervening native menu open is invisible to it.
labelState.pairs in content.js snapshots element refs at overlay-open
time.
- Arc likely aggravates this via its own content-script / DOM suspension
lifecycle; hence Arc-first sighting.
First step: deep investigation + research (subagents)
Follow the project Debug Strategy in CLAUDE.md — prove the root cause with
observable evidence before any fix.
- Capture state. Save real snapshots of
window.location,
ytd-popup-container outerHTML, and the clicked card's outerHTML at three
points: before i, after i (miniplayer active), and at label activation.
- Smoking gun. Read the
videoId on the position-0 menu item's
addToQueue / queueAdd service endpoint — does it carry the original
video's id or the target card's?
- One variable at a time. Reproduce with the extension disabled (native
… -> "Add to queue" after i) to separate a YouTube menu-binding bug from
our activation path.
- Singleton survival. Check
lastActivatedItem staleness across an
intervening native menu open, and whether the queue-overlay.js module
singletons persist across the SPA transition.
- Research subagent (separate context, per global strategy):
- YouTube miniplayer (
i) SPA lifecycle — does it reload content scripts?
Is ytd-popup-container re-instantiated?
- Arc's content-script / DOM lifecycle vs stock Chromium.
- Whether the endpoint
videoId is readable from the isolated world.
- Scope. Reproduce on Chrome + Firefox to confirm whether this is
Arc-only or universal.
Deliverable for this issue
A written root-cause with evidence (snapshots + endpoint videoId), a note on
whether it reproduces on supported editions, then reassess the fix at the right
abstraction level (stale target ref vs popup binding vs singleton lifecycle).
Symptom
Observed on Arc (not an officially supported edition — see README).
ishortcut to send the currentvideo to the miniplayer.
Ctrl+A p), type a label for a different video.to the queue, not the newly labelled one. Effectively a cached / stale
enqueue.
Suspected mechanism (to be proven, not assumed)
itriggers a YouTube SPA transition (watch -> miniplayer + browse surface).yt-lockup-view-modelnodes recycle;ytd-popup-containermay or may not bea fresh instance.
activateQueueTarget(src/ui/queue-overlay.js) opens a card's…menu andclicks popup position 0. The hypothesis: the popup that opens — or its
position-0 endpoint — is still bound to the original video now in the
miniplayer.
lastActivatedItemandactivationInFlightdon'tobserve or survive the native transition;
lastActivatedItemis onlycompared by node identity against the last queue-overlay activation, so an
intervening native menu open is invisible to it.
labelState.pairsincontent.jssnapshots element refs at overlay-opentime.
lifecycle; hence Arc-first sighting.
First step: deep investigation + research (subagents)
Follow the project Debug Strategy in CLAUDE.md — prove the root cause with
observable evidence before any fix.
window.location,ytd-popup-containerouterHTML, and the clicked card's outerHTML at threepoints: before
i, afteri(miniplayer active), and at label activation.videoIdon the position-0 menu item'saddToQueue/queueAddservice endpoint — does it carry the originalvideo's id or the target card's?
…-> "Add to queue" afteri) to separate a YouTube menu-binding bug fromour activation path.
lastActivatedItemstaleness across anintervening native menu open, and whether the
queue-overlay.jsmodulesingletons persist across the SPA transition.
i) SPA lifecycle — does it reload content scripts?Is
ytd-popup-containerre-instantiated?videoIdis readable from the isolated world.Arc-only or universal.
Deliverable for this issue
A written root-cause with evidence (snapshots + endpoint videoId), a note on
whether it reproduces on supported editions, then reassess the fix at the right
abstraction level (stale target ref vs popup binding vs singleton lifecycle).