fix(outline): keep outline valid on the todos sidebar panel (Opus follow-up)
This commit is contained in:
@@ -19,10 +19,14 @@ function _currentSid() {
|
||||
function _outlineAllowed() {
|
||||
const compact = window.matchMedia && window.matchMedia('(max-width:900px)').matches;
|
||||
// The outline is a chat-view affordance only — never show the toggle or panel
|
||||
// while another main panel (settings, tasks, insights, …) is active. _currentPanel
|
||||
// while another MAIN panel (settings, tasks, insights, …) is active. _currentPanel
|
||||
// is owned by panels.js; treat an undefined/absent value as the chat default.
|
||||
// 'todos' is a sidebar-only panel that leaves the chat transcript in <main>, so
|
||||
// the outline stays valid there too (and switching to it emits no <main> class
|
||||
// mutation for the observer, so allowing it keeps the toggle stable).
|
||||
const panel = (typeof _currentPanel === 'undefined') ? 'chat' : (_currentPanel || 'chat');
|
||||
return window._showConversationOutline === true && !compact && panel === 'chat';
|
||||
const onChatView = panel === 'chat' || panel === 'todos';
|
||||
return window._showConversationOutline === true && !compact && onChatView;
|
||||
}
|
||||
|
||||
function _syncOutlinePosition() {
|
||||
|
||||
Reference in New Issue
Block a user