Bug 2030005 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

- A single page navigation was triggering 3 conversation starter requests instead of one. Each failed request then retried twice (default max retries = 2 in the OpenAI client), resulting in up to 9 total requests for a single conversation starter attempt.
- The duplicate requests appear to stem from multiple triggers for the same tab:
  - On first sidebar open: both openSidebar -> onCreateNewChatClick and firstUpdated fire, causing a double request.
  - On tab switch: both tabSelect -> openSidebar and onLocationChange can fire.
  - On navigation with redirects (e.g., / to /home): onLocationChange fires for each redirect step, triggering requests before the final page title is available.
- Suspected bug in the onLocationChange handler triggering loadStarterPrompts more than once for the same tab.
- Short-term fix proposed: have loadStarterPrompts (which is now tab-aware) return early if it receives multiple requests for the same tab.
- Longer-term fix: investigate and prevent loadStarterPrompts from being invoked more than once per tab navigation.
slackbot summary
- A single page navigation was triggering 3 conversation starter requests instead of one. Each failed request then retried twice (default max retries = 2 in the OpenAI client), resulting in up to 9 total requests for a single conversation starter attempt.
- The duplicate requests appear to stem from multiple triggers for the same tab:
  - On first sidebar open: both openSidebar -> onCreateNewChatClick and firstUpdated fire, causing a double request.
  - On tab switch: both tabSelect -> openSidebar and onLocationChange can fire.
  - On navigation with redirects (e.g., / to /home): onLocationChange fires for each redirect step, triggering requests before the final page title is available.
- Suspected bug in the onLocationChange handler triggering loadStarterPrompts more than once for the same tab.
- Short-term fix proposed: have loadStarterPrompts (which is now tab-aware) return early if it receives multiple requests for the same tab.
- Longer-term fix: investigate and prevent loadStarterPrompts from being invoked more than once per tab navigation.

Back to Bug 2030005 Comment 2