Skip to content

fix: consume repeated YouTube browser handoffs - #36

Merged
MyButtermilk merged 1 commit into
mainfrom
codex/youtube-handoff-query-navigation-fix
Aug 24, 2026
Merged

fix: consume repeated YouTube browser handoffs#36
MyButtermilk merged 1 commit into
mainfrom
codex/youtube-handoff-query-navigation-fix

Conversation

@MyButtermilk

Copy link
Copy Markdown
Owner

Summary

  • subscribe browser imports to search-string changes instead of pathname-only navigation
  • preserve a pending handoff while an earlier YouTube start request is in flight
  • add component regressions for an already-open /youtube route and deferred consumption

Installed failure evidence

  • v0.5.91 accepted the redacted shell handoff and opened /youtube, but created no new YouTube job
  • the exact v0.5.91 release was restored to draft without moving its immutable tag

Validation

  • npm run check
  • npm run lint
  • npm test (98 library + 73 component tests)
  • npm run build
  • focused new component tests: 2 passed
  • tests/test_frontend_type_gates.py: 104 passed
  • Chrome extension contract: 3 passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be5ba97d2e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

}

handledRequestRef.current = imported.requestId;
const nextSearch = stripBrowserYoutubeImportParams(search);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Parse the current search before consuming the handoff

When a second shell navigation arrives after this render captured request A but before the passive effect executes, window.location.search already contains request B while search still contains A. This line derives an empty query from stale A and the following replaceState overwrites B, so the newer handoff is never consumed or retained. Read and strip the current window.location.search inside the effect, using useSearch() only to trigger reruns.

AGENTS.md reference: AGENTS.md:L243-L247

Useful? React with 👍 / 👎.

@MyButtermilk
MyButtermilk merged commit 6a090af into main Aug 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant