Studio Agentic UI: Define signed-out experience for Agentic UI chat - #4183
Conversation
…experience-for-agentic-ui
I just did the rebase 👍
I have not tested the offline mode yet, I will take a look now. I will check if it makes sense to handle this as a part of this PR or open a completely new issue to handle the offline mode across the whole agentic UI |
|
@bcotrim for the offline mode, I think we need a separate issue. I will create one in Linear, there are multiple elements that need to de handled holistically e.g. Log in button, Publish button, New chat button, some sort of indication that the user is offline. I think we can focus on logged out screen in this PR, and handle the offline mode separately. What do you think? |
📊 Performance Test ResultsComparing 328973c vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
Yes, I think it makes sense to address offline mode in a separate issue. |
…experience-for-agentic-ui
I think that's good for now, we can ask @shaunandrews for a review to get his thoughts on it. However the request to fetch the sites is still being made, so we get this on the logs: I think we should prevent the request from being made, if possible. |
Agreed, I am taking a look now 👀 |
9d9cb50 to
e8933b2
Compare
|
It should now be addressed @bcotrim - let me know what you think |
|
Thanks for addressing the issue @katinthehatsite, I no longer see the network request when opening the publish menu.
|
- Revert sidebar header to simple "+" button (trunk version) - Disable preview update button when signed out - Disable pull/push/disconnect when signed out - Show "Log in" button instead of "Publish" when signed out Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3aa3cce to
5f85bf5
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@bcotrim I made some more changes based on your feedback, let me know what you think! Feel free to take over while I am AFK |
bcotrim
left a comment
There was a problem hiding this comment.
Pushed some smaller fixes.
LGTM 👍
…#4130) ## Related issues - Related to STU-1985 — extracted from #3998 as part of splitting it into smaller PRs. ## How AI was used in this PR The core change was cherry-picked from #3998 (authored there with AI assistance). Claude Code ported it onto trunk, resolved merge conflicts (including the moves to id-based session↔site matching from #4131 and the signed-out gates from #4183), addressed review feedback, and wrote the unit tests for the redirect logic. All code was reviewed and verified locally (lint, typecheck, apps/ui test suite). ## Proposed Changes Studio's agentic UI always lands on the first site (in raw fetch order) at launch, regardless of where the user was working. This PR makes the app reopen on the site the user last worked with: - The dashboard remembers the last visited site in `localStorage`. - On launch, the `/` index route opens that site's newest active chat (or a new chat if it has none) — matching exactly what clicking the site in the site-centric sidebar (#4191) does. - If the remembered site no longer exists (deleted) or nothing is stored yet, it falls back to the **top site in sidebar order**, respecting the manual ordering from #4134 instead of raw fetch order. - The sidebar auto-scrolls to keep the restored site's row visible when it sits below the fold (thanks @sejas for catching this!). An earlier revision restored the exact last-visited *session*. We simplified to site-level restore to stay consistent with the site-centric sidebar model: sites are the primary navigation unit, and a site always opens its newest active chat. No launch-time cost: the index route already fetched sites and sessions before redirecting; this adds only a synchronous `localStorage` read. ## Testing Instructions 1. Launch Studio with the agentic UI and open a chat on a site other than the top one in the sidebar. 2. Quit and relaunch — you should land on that same site (its newest active chat). 3. With enough sites to make the sidebar scroll, work on a site near the bottom, relaunch — the sidebar should scroll so the selected site's row is visible. 4. Archive the chat you were on, relaunch — you should land on that site's newest remaining active chat, or a new chat if none are left. 5. Delete the site you were on, relaunch — you should land on your sidebar's top site, with no errors. 6. Drag a different site to the top of the sidebar, clear the app's localStorage, relaunch — the fallback should follow your sidebar order. ## Pre-merge Checklist - [x] Have you checked for TypeScript, React or other console errors? 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Shaun Andrews <shaun@automattic.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>







Related issues
Fixes STU-1898
How AI was used in this PR
It was used to extract the changes that were suggested in the exploration from #3975
Proposed Changes
This PR adds a logged-out experience for the users for the agentic UI:
Testing Instructions
npm startAgentic UIfeature flag fromStudio -> Feature flagsfrom the topbarNew chatbutton is disabledLog inbutton in the sidebarSharebutton for the previews is disabled and it asks you to log in to share the linkPre-merge Checklist