Skip to content

Use URL run IDs for shareable flight booking sessions#35

Open
pranaygp wants to merge 1 commit intomainfrom
pranaygp/codex/url-runid-shareable-flight-booking
Open

Use URL run IDs for shareable flight booking sessions#35
pranaygp wants to merge 1 commit intomainfrom
pranaygp/codex/url-runid-shareable-flight-booking

Conversation

@pranaygp
Copy link
Copy Markdown
Collaborator

Summary

  • store the flight booking workflow run ID in the runId URL query param instead of localStorage
  • keep stream reconnection wired through the existing /api/chat/[id]/stream path without changing startIndex handling
  • clear the runId query param when the workflow ends or the user starts a new chat

Testing

  • pnpm build

Screenshot

  • No visual UI changes. Local verification screenshot captured from the running app: .codex-artifacts/flight-booking-home.png

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR makes multi-turn flight booking chat sessions shareable by persisting the workflow run ID in the page URL (runId query param) instead of localStorage, while keeping stream reconnection behavior on /api/chat/[id]/stream intact.

Changes:

  • Added helpers to read/write the workflow run ID to the runId URL query parameter.
  • Updated session initialization/resume to derive the run ID from the URL (and clear it when the session ends).
  • Updated stream reconnection logic to use the current run ID (via a ref/URL fallback) without altering SDK reconnect request data like startIndex.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants