- The main width controls restart their measurement when the body adopts its first Session, so a Session opened from the blank home reports its gutter without waiting for a resize. - ConversationLayout gains `shown`: the width controls report null when the body stops showing a Session, and a released Session publishes it as not shown before its layout is dropped. Layouts no longer outlive their Session's binding scope. - The overlay follows its Session's layout and closes once the gutter can dock the panel or the body shows another Session, so it never reopens on its own. - Escape is left to an input method composing text, and focus moves to the toggle when the panel hides while it holds focus. - The client inject list names the context menu, Remote, and connection packages the panel reads, the README states Escape priority and the Chat-only gutter, and the Agent Note describes the turn rail as it is.
description, kind
| description | kind |
|---|---|
| The Session panel: a header toggle and a floating panel over the main Conversation body whose sections other plugins register, with the built-in Environment section. | package-reference |
@deepseek-ai/dsh-client-ui-session-panel
English | 中文
Summary
dsh-client-ui-session-panel adds a Session header toggle that shows or hides a floating panel of facts about the current Session. The panel docks in the main Conversation body's end gutter when the gutter can hold it, and otherwise opens over the transcript on request. It draws section titles and leaves section content to the plugins that register sections; it ships the Environment section with the project directory row.
Table of Contents
- Use this package
- Understand the implementation
- Further Exploration
- Model Experience
- Known Limitations and Deferred Work
- Dev Note
Use this package
The @deepseek-ai/dsh-web-app bundle loads this package by default. The toggle is the first Session header utility, before change requests, sharing, and the schedule catalog. It is an icon button with the panel name and its indicators as its accessible name, a tooltip that says whether a press shows or hides the panel, and aria-expanded for whether the panel shows.
Docking and the overlay
The panel docks while the gutter between the transcript column and the body's end edge is at least 344px: 48px clear of the column and its width handle, the panel's 280px minimum width, and a 16px edge margin. Docked, it is 280–340px wide, starts 12px below the header, and scrolls inside itself. Pressing the toggle then flips one docking preference that every Session shares and that persists in localStorage under dsh.sessionPanel.pinned; the panel docks by default.
A narrower gutter hides the docked panel, so it never covers the transcript. This includes a narrow window, an expanded right sidebar, a dragged-wide transcript column, and every View other than Chat, because those Views fill the body. Pressing the toggle then opens the panel over the transcript with the prominent elevation, above the composer stack and not covering it. The overlay closes from the toggle, on Escape, and on a pointer press outside the panel, the toggle, and any open menu, such as a row's context menu; Escape returns focus to the toggle when focus was inside the panel. A modal above the page, an input method composing text, and a handler that already took the key, such as an open menu's, keep Escape; otherwise the overlay takes it first, so with the overlay open the first Escape from the composer closes the overlay and does not count toward stopping a running turn. Closing it does not change the docking preference. At most one Session's overlay is open; it closes once the gutter widens enough to dock and once the main body shows another Session, and switching back does not reopen it. When the panel hides while focus is inside it, focus moves to the toggle.
Contribute a section
A section is one conversation.session.panel.section list registration: id addresses it, order sorts it ascending, and the required label is its title, which the panel draws in the active locale. The section component receives presentation (docked or overlay) and dismissOverlay() as owner props; it renders its body and renders nothing when it has nothing to show, which hides its title too. Register trailing title controls, such as a count or a refresh button, in the keyed conversation.session.panel.section.actions slot under the section's id. A section without a label is reported to the console and not shown.
Plugins share a title by registering rows in a section owner's row slot. The built-in Environment section (id: 'environment', order: 0) declares conversation.session.panel.environment.row; its project row (order: 0) shows the directory of the Workspace that lists the Session, or the directory the Session was created in, with the Host home abbreviated to ~. Right-clicking the row or pressing its More button opens the shared directory context menu. A plugin that owns a shared section declares its own row slot the same way.
Marks that must stay visible while the panel is hidden, such as an attention dot, go in the conversation.session.panel.indicator list. Each occupant includes text that names it, which becomes part of the toggle's accessible name.
Summary rows from every package use the PanelRow primitive, so icon, text, and trailing areas line up across sections; put a row's More button in its menu so every row highlights as a whole and reveals its actions the same way.
Understand the implementation
Implementation internals — click to expand
The toggle and the panel are separate Slot entries that share one plugin-owned visibility source: the persisted docking preference and the Session whose overlay is open. Both read the Session's main body geometry from ctx.uiConversation.layouts, which the Conversation width controls write from their existing measurement, and decide the presentation with the same pure function, so the toggle's state never disagrees with the panel. The panel renders inside the main Conversation body, which owns its positioning context, the transcript axis, and the composer stack height.
The panel projects the section list's live registrations (entriesOfSlot, so a higher-priority registration with the same id replaces a shipped section) into { id, label } rows, recomputed only when the ledger version or the locale revision changes. It renders each section through renderSlot(..., { only: id }) inside its own title and body; a CSS :has() rule hides a section whose body outlet stayed empty, including a shared section whose row outlet stayed empty.
| File | Role |
|---|---|
src/client/index.ts |
Dictionaries, the toggle, the panel, the Environment section, and the project row |
src/client/slots.ts |
Slot declarations and component props |
src/client/visibility.ts |
Docking threshold, presentation, and the shared visibility state |
src/client/sections.ts |
Section roster projection |
src/client/SessionPanel.tsx |
The panel, its section titles, and Escape handling |
src/client/SessionPanelToggle.tsx |
The header toggle and its indicators |
src/client/ProjectRow.tsx |
The project directory row |
Further Exploration
- Web Client Slots — list, keyed, and owner-prop semantics the sections rely on.
dsh-client-ui-conversation— the Session header utilities, the panel seat, and the main body geometry.dsh-client-ui-primitives—PanelRowandPathLabel.
Model Experience
None, as this package renders facts the Client already holds for a human and touches no prompt, message, schema, stream, or tool result.
KV Cache effect
None; the package never assembles or sends provider requests.
Known Limitations and Deferred Work
These limits define current package constraints, not a task backlog.
- Laptop widths overlay rather than dock — with the default transcript width the body must be at least about 1608px wide to dock; narrower bodies use the overlay. Docking by moving the transcript column aside is a separate layout decision.
- No execution environment row — the Client has no per-Session fact for the local machine, an SSH host, or the sandbox mode, so the Environment section names only the project directory.
- No section customization — every live section shows; hiding or reordering sections from the panel is not offered.
Dev Note
Working context for maintainers — click to expand
None.