[iOS] Use ?sidebar=open URL parameter for View All Chats and fix contextual sheet issues#4473
Open
SabrinaTardio wants to merge 5 commits intomainfrom
Open
[iOS] Use ?sidebar=open URL parameter for View All Chats and fix contextual sheet issues#4473SabrinaTardio wants to merge 5 commits intomainfrom
SabrinaTardio wants to merge 5 commits intomainfrom
Conversation
… queuing, and fix contextual sheet issues
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6ddb6b3. Configure here.
…lementation, and mock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Task/Issue URL: https://app.asana.com/1/137249556945/project/1204186595873227/task/1214118261014133?focus=true
Tech Design URL: N/A
CC: N/A
Description
shouldToggleSidebarJS bridge approach with a?sidebar=openURL parameter when opening Duck.ai from "View all chats", removing timing dependencies on frontend readinessisFrontendReady,pendingSidebarToggle, andflushPendingActionsqueuing logic fromAIChatContentHandlersince the URL parameter eliminates the need to coordinate post-load JS calls?sidebar=openso the user sees the chat history instead of the inputTesting Steps
?sidebar=opensupport in production)Impact and Risks
Impact Level: Medium
What could go wrong?
?sidebar=openparameter depends on frontend support which is currently in staging only; until FE ships to production, the sidebar won't auto-open but the rest of the flow works correctlyisFrontendReadyqueuing means other callers ofsubmitToggleSidebarActionnow call through directly without checking readiness, but all remaining callers operate on already-loaded tabsQuality Considerations
AIChatURLParameters.sidebarName/sidebarOpenValueconstants andURL.isDuckAISidebarOpenhelper to avoid hardcoded stringsmax()so devices without a dynamic island are unaffectedNotes to Reviewer
?sidebar=opensupport is currently on staging (euw-serp-dev-testing8.duck.ai) only -- tested and confirmed working there. Once FE ships to production, the full flow will work end-to-end.Note
Medium Risk
Changes navigation/UI behavior around expanding Duck.ai and removes sidebar-toggle coordination code, which could affect how AI tabs refresh and whether the sidebar opens depending on frontend support for
?sidebar=open.Overview
Switches the “View all chats” expand flow from a JS bridge sidebar toggle to a URL-driven approach by adding
?sidebar=openhelpers (AIChatURLParameters.sidebarOpenURL,URL.isDuckAISidebarOpen) and using that URL when opening Duck.ai from the recent chats popup.Removes the associated frontend-readiness queuing/toggle plumbing (
isFrontendReady/pending actions,shouldToggleSidebardelegate plumbing, andtabDidRequestToggleSidebarOnCurrentTab), and updates refresh logic to avoid auto-expanding/keyboard focus when?sidebar=openis present. Also fixes recent chats popup positioning to respect safe area and tweaks “Summarize Page” to sentence case; tests are updated accordingly.Reviewed by Cursor Bugbot for commit 074e0f0. Bugbot is set up for automated code reviews on this repo. Configure here.