Files

5.1 KiB

description, kind
description kind
Shell layout for the Web GUI: the three-column AppFrame with drag handles, concession behavior, the panel-geometry service, and theme presentation; for users and maintainers of the window chrome. package-reference

@deepseek-ai/dsh-client-ui-layout

English | 中文

Summary

This package provides the shell layout of the Web GUI: a three-column AppFrame with resizable sidebar and details panels, a concession chain that shrinks the details column and then auto-closes it when space runs out, and the ctx.layout panel-geometry service other plugins call to open or close the details column. It also seats the theme presenter, which projects the resolved color scheme, alias tokens, content font size, and theme-color metadata onto the document. Choose it for the standard window chrome; panel geometry is transient and resets on reload.

Table of Contents


Use this package

Mount this plugin at the root slot; it then renders the app frame around whatever occupies the sidebar, conversation, and details columns. Users resize the sidebar by dragging its invisible hit strip and the details panel by dragging its floating pill; when the window narrows, only details shrinks, then auto-closes. A closed sidebar retains a 56px control rail; details closes to zero width.

Theme presentation

The presenter consumes resolved theme snapshots and projects them onto the document: html { color-scheme } for native UA chrome, body[data-ds-dark-theme] from the active color scheme, the theme's alias tokens and --dsh-content-font-size as inline variables on body, and one owned <meta name="theme-color"> whose content follows the computed body background. Disposing the presenter removes its metadata node with its other global writes.


Understand the implementation

Implementation internals — click to expand

One register() call contributes AppFrame into the runtime's built-in 'root' slot and, in the same breath, declares the four child slots (sidebar, conversation, details, shell.overlay), seats the layout store (panel geometry), and wires the ctx.layout panel-action service. The transient layout store starts the sidebar at its default width and details closed, and never reads or writes localStorage. AppFrame always mounts the conversation and details columns; a connected Session renders through SessionProvider. It projects the selected Session title over the build-configured product title or the localized common.brand.localBuild fallback, so locale revisions update document metadata with the root entry. The theme presenter is a second effect: pure DOM writes from resolved snapshots — initial state through the getter once, then event-driven only, with no React path. It applies palette, font-size, and token variables before measuring the rendered background as the single color authority.


Further Exploration

Read these pages when the layout surface is not enough. They move from the frame to the columns it renders and the theme it presents.

  • ui-sidebar — occupies the sidebar column and its seats.
  • ui-conversation — occupies the conversation and details columns.
  • ui-theme — the theme seam whose resolved snapshots the presenter consumes.
  • Web client architecture — how browser plugin rows load and register slots.

Model Experience

None, as the layout shell manages browser viewing state; nothing here reaches a model request.

KV Cache effect

None; this package neither assembles nor sends a provider request.

Known Limitations and Deferred Work

These limits define the current layout behavior. They are current package constraints, not a general window-manager comparison or a task backlog.

  • Panel geometry is transient — reload restores the sidebar default and details closed; switching between distinct Session ids also closes details and forgets its dragged width, while unselected surfaces render details at zero width without modifying geometry.
  • Concession-chain auto-close derives a zero width without touching the preferred width — the panel restores itself when the window widens; consumers must not read the stored details width as the rendered truth.
  • No scroll anchoring during squeeze reflow — layout changes may move the reader's viewport.

Dev Note

Working context for maintainers — click to expand

None.