Follow-ups for the perspectives / AI First perspective feature
Author: ndoschekCreated Jul 31, 2026Updated Sep 30, 2026
Labelsui/uxtheia-ai
Feature Description:
Collects the follow-up items from the review of #17832 (perspectives + AI First perspective). The feature is marked experimental, so we merged with the main functionality, everything below was agreed to be handled in a follow-up.
Bugs:
- Restored perspective loses its active placement map after a reload.
onLayoutRestorednever callssetActivePlacementMap, so views land in the wrong area. Reproducible in AI First: close the Explorer and reopen it (lands on the right), reload, repeat, and it lands on the left. https://github.com/eclipse-theia/theia/pull/17832#discussion_r3681091234 - Perspective switching stalls.
activateWidgetis awaited serially for every mapped view and rejects ~2.25s after a widget does not take focus. In the browser app bothai-sessions-widgetandchat-view-widgetlog "did not accept focus after 2000ms" on each switch. Activate only a specific view and/or do not await. https://github.com/eclipse-theia/theia/pull/17832#discussion_r3681091482 - Reset opens views that are not part of a first open.
instanceof AbstractViewContributionover-includes (e.g. Bulk Edit, Getting Started), and a reset opens them. Consider an explicit, idempotentresetLayout?(app)hook next toinitializeLayoutinstead. https://github.com/eclipse-theia/theia/pull/17832#discussion_r3681091330 - Layout is not cleared when serialization fails. The old code cleared the storage key when a layout failed to serialize so it was not restored on next startup; now the stale value survives (same in
storePerspectiveLayouts). https://github.com/eclipse-theia/theia/pull/17832#discussion_r3681091879
Cleanups and refactors:
- Create the active-perspective context key once in a field and only
set()it on change, instead of callingcreateKeyon every perspective switch. https://github.com/eclipse-theia/theia/pull/17832#discussion_r3681091549 - Let the switch-perspective command honor an id argument so a perspective can be selected from a keybinding or programmatically, e.g.
execute: (id?) => id ? this.switchPerspective(id) : this.showPerspectivePicker(). https://github.com/eclipse-theia/theia/pull/17832#discussion_r3681091697 - Move the duplicated session row renderer (
renderSessionRowAtDepth,renderSessionRow,getSessionActions) into the sharedchat-session-list-components.tsxso the sessions widget and the welcome list do not drift. https://github.com/eclipse-theia/theia/pull/17832#discussion_r3681092103 - Rename the
theia-WelcomeMessage-*class names now that the list also renders in the AI Sessions side panel, e.g. totheia-ChatSessions-*, so the view stops inheriting welcome-screen styling. https://github.com/eclipse-theia/theia/pull/17832#discussion_r3681092193 - Unify how a session opens from both lists. The welcome provider inlines
handleSessionItemClickplus anopenViewwhile the sessions widget uses the command, and the two disagree onfocus. Have the welcome provider run the same command. https://github.com/eclipse-theia/theia/pull/17832#discussion_r3681092019
UX:
- In AI First the chat view still lists all sessions next to the dedicated sessions widget. The sessions list could be aware of perspectives (or simply skip rendering when the sessions widget is open). https://github.com/eclipse-theia/theia/pull/17832#issuecomment-5117500301
Source: eclipse-theia/theia