actually give existing users the live panel
The previous commit added it to defaultLayout, which anyone who has ever opened /chat never sees: useDashboardState seeds its default only when the key is ABSENT, so a stored layout keeps the shape it had when it was first written. appTypes/normalizeLayout does not cover this — it repairs which app a panel runs, never the tree — so the change was visible only on a fresh account. It was shipped with a note to reset the layout by hand, which is not a fix. The screen now replaces a layout with no chat-live panel. Replacing outright is safe here specifically because the screen is locked: the structure is dictated by code, and the only user contribution is column sizes. Terminates because the replacement contains the panel it tests for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import type { LayoutNode } from 'officerdev';
|
||||
|
||||
/** Does this tree contain a panel running `appType`? */
|
||||
export function hasAppType(node: LayoutNode, appType: string): boolean {
|
||||
if (node.type === 'panel') return node.appType === appType;
|
||||
return node.children.some((child) => hasAppType(child.node, appType));
|
||||
}
|
||||
|
||||
// The left column is itself a split: what is running now on top, the whole history below. They answer
|
||||
// different questions from different sources — the agent's in-memory map versus transcripts on disk —
|
||||
// and the live one is small and usually empty, hence the lopsided 25/75.
|
||||
|
||||
Reference in New Issue
Block a user