Files
pastilhasandClaude Opus 5 f24d583e67 the preview and the editor are a workspace inside a panel
`1 | [1 | 1]`, and the brackets are a real container this time.

Nesting them as a GROUP was the first attempt and looked identical — a horizontal group inside a
horizontal group renders three columns, because that is what it is. All it bought was which divider
moved what, which is invisible until you drag one.

So the pair is a panel whose component hosts its own WorkspaceView, the way DashboardPreview does. It
has its own chrome, its own divider and its own persisted sizes, and the root layout has two children
rather than three: the shape on screen is now the shape in the file.

`useAuthoredLayout` rather than `useDashboardState`, and its own key beside the root's. The structure is
the author's and comes from source every render; only sizes are the user's. Sharing one key would have
the inner and outer trees persisting over each other's sizes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 03:02:38 +01:00

40 lines
1.7 KiB
TypeScript

import type { LayoutNode } from 'officerdev';
/**
* A nav down the left, and beside it the pair that does the work.
*
* ── Two children, not three ──
*
* The preview and its editor are a WORKSPACE INSIDE A PANEL — see WorkPanel — rather than two more
* children here. Nesting them as a group was tried first and looked identical: a horizontal group in a
* horizontal group renders three columns, because that is what it is, and all the nesting bought was
* which divider moved what.
*
* A panel is a real container. The pair has its own chrome, its own dividers and its own persisted
* sizes, and this file has two children — so the shape on screen is the shape in the file.
*
* ── The nav is the narrow one ──
*
* Nine rows of two short lines, and nothing in it grows.
*
* ── The editor is a column, not a drawer ──
*
* It was under the preview and took its height from it: choosing a spacing shrank the page you were
* choosing it for, and on a laptop two dropdowns cost a third of the frame. The workspace already knows
* how to size and move panels — a drawer was a second, worse layout system living inside one.
*
* ── Still no chat panel ──
*
* `plugins/proxy-manager` puts one across the bottom and this does not, because there is no fofos skill
* for an agent to use yet. Worth adding on the day this plugin ships a `skills/` directory.
*/
export const defaultLayout: LayoutNode = {
type: 'group',
id: 'fofos-admin-root',
direction: 'horizontal',
children: [
{ node: { type: 'panel', id: 'fofos-admin-nav', appType: 'fofos-admin-nav' }, size: 22 },
{ node: { type: 'panel', id: 'fofos-admin-work', appType: 'fofos-admin-work' }, size: 78 },
],
};