···635635 // This catches duplicate windows even when no key was provided.
636636 // Skip this check for reopen-last-closed (trackingSource: 'reopen') — the user
637637 // explicitly wants a new window for the URL they previously closed.
638638- if ((url.startsWith('http://') || url.startsWith('https://')) && options.trackingSource !== 'reopen') {
638638+ // Skip when the caller passed an explicit `key` — a key signals "I manage
639639+ // window identity by key, not by URL." Otherwise a slide (key=address:edge)
640640+ // whose window was just transient-closed will fall through here and get
641641+ // attached to whatever unrelated http window happens to share its URL.
642642+ if ((url.startsWith('http://') || url.startsWith('https://')) && options.trackingSource !== 'reopen' && !options.key) {
639643 const existingByUrl = findWindowByUrl(url);
640644 if (existingByUrl) {
641645 DEBUG && console.log('Reusing existing window with same URL:', url);