Introduction

Once a DSH session becomes lengthy, finding a historical message requires repetitive scrolling. Common navigation approaches involve opening a panel or relying on the browser’s native title attribute for a preview. The former can easily misalign and overlap with sidebars or bottom bars, while the latter has limited information density. @max-null/dsh-chat-rail takes a different approach: a vertical navigation bar placed on the right side of the session panel. Each user message has an indicator dot; when hovered, it unfolds into a full list like opening a scroll painting, and clicking jumps to the message. Below is an introduction to the plugin’s functionality, installation, and usage.

What is it

@max-null/dsh-chat-rail is a DSH plugin maintained by Max-Null, positioned as a “Scrolling Painting Message Navigation Bar”: a vertical bar on the right that unfolds like a scroll painting on hover, with a scroll-spy highlighting the reading position, and message items including numbering, relative time, and full previews. The current package.json version is 0.6.1, licensed under MIT.

It belongs to the @max-null/* plugin series, which together constitute the SSID (DeepSeek · Seek Soul in Darkness) desktop experience. Regarding compatibility, it requires DSH ≥ 0.1.0-rc.6 and is fully adapted for DSH 0.1.2-alpha.4.

Core Features

Scrolling Painting Expansion and Scroll-spy

  • When collapsed, it is a clean vertical bar that smoothly unfolds from right to left on hover. It uses a single container, ensuring naturally consistent heights for each message item.
  • The scroll-spy follows the reading position: regardless of where the session scrolls, the indicator dot for the current message always stays in the center of the visible navigation bar area, with automatic scroll compensation.
  • When switching sessions, it automatically locates to the current reading position of the new session rather than returning to the top.

Synchronized positioning with better-sidebar

  • When dsh-better-sidebar is installed, the right edge and vertical position of the navigation bar follow the CSS variables --dsh-sidebar-width / --dsh-sidebar-height, sharing the same transition animation with the panel. They move synchronously when the side or bottom bar expands or collapses, avoiding overlap.
  • In the absence of better-sidebar, it uses a CSS fallback (right edge 12px + vertical centering), working out of the box in a pure DSH environment.
  • DSH 0.1.2-alpha.1+ comes with a built-in TurnNavigator vertical rail for round navigation. After installing this plugin, the official vertical rail is automatically hidden (located via aria-label anchors, without relying on build hashes), and this plugin assumes session navigation duties. Uninstalling the plugin restores the official navigation display.

Deep History Jump

History for long sessions is loaded in pages. Jumping to an unloaded message requires preloading first. The plugin’s handling:

  1. DSH 0.1.2-alpha.3+ kernel: uses the official loadThrough(seq) precise jump loader, handling 200 items per page in one go.
  2. Older kernels: automatically falls back to a page-by-page loadOlder loop, 50 items per page.

When jumping to a distant message, a spinner and “Loading” feedback are displayed. In the collapsed state of the navigation bar, only the icon is retained.

Tip Preview Panel

When hovering a message item, a tip panel pops up on the left: displaying the full content and precisely positioning itself after the expand animation ends to avoid position jumping. Inside the panel, the numbering, relative time, and text are aligned in three columns; the numbering has a fixed width, the time is right-aligned, and the text area is maximized.

Messages containing images display a soft image badge in the expanded state (not displayed in the collapsed state to keep the vertical bar clean), while the tip panel displays image thumbnails above the text.

Favorites and Quick Fill

  • To the left of the copy button for each user message are two action buttons: Star ★ Favorite/Unfavorite (turns into a yellow solid star); Plus + One-click refill the message’s full text and attachments into the input box, with historical images refilled via the official attachment channel.
  • Favorite states are persisted in localStorage by session and are retained after refresh or restart.
  • Navigation bar linkage: the indicator bar for favorited messages shows yellow, and in the expanded state, a small star is displayed before the title.
  • At the top of the navigation bar is a star-shaped filter switch; when enabled, it only shows favorited messages; clicking it again restores the full list.

Theme Adaptation

It uses all DSH theme variables (--dsw-alias-*) and automatically adapts to light and dark modes.

Architecture Overview

The plugin is divided into two parts:

  • Host half (lib/index.mjs): registers the chatRail session projection, folding user message anchors from the session log { seq, time, text, id }, excluding context lines injected by plugins and tools.
  • Client half (lib/client.js): injected into the conversation.input.dock slot and rendered to body via a portal.

Data source priority order: chatRail projection → loaded chat nodes → background loadOlder loop.

Installation and Enablement

Use the official installation command:

dsh plugin --profile <name> add @max-null/dsh-chat-rail

Or manually edit the profile’s package.json, adding the package name in dependencies and registering it in dsh.profile.bundles:

- id: chat-rail
  name: '@max-null/dsh-chat-rail'

After installation and restart, no configuration is needed. The navigation vertical bar will appear on the right side of the session panel, and the official DSH TurnNavigator vertical rail will be automatically hidden.

If you wish to participate in development, the repository provides the following scripts:

pnpm install
pnpm typecheck   # tsc strict type checking
pnpm build       # generates lib/

Typical Usage

Daily usage revolves around a few actions:

  1. Hover nav bar: The scroll unfolds, allowing you to browse the numbering, relative time, and preview of messages.
  2. Hover message item: A tip panel pops up on the left to view the full content; for messages with images, you will see the thumbnail first.
  3. Click message item: Jumps to the corresponding message; unloaded history is automatically preloaded.
  4. Scroll session: Highlights follow the reading position and stay centered.
  5. Star important messages: Later use the star-shaped switch at the top to filter only favorites, or use the Plus button to refill a specific message’s full text and attachments into the input box to continue questioning.

Applicable Scenarios and Notes

Suitable for: people who frequently run long sessions in DSH and need to review and organize historical messages; users employing the better-sidebar dual-panel layout who wish navigation wouldn’t misalign with the side or bottom bars; users wanting to use the favorites feature to consolidate important messages.

Notes before use:

  • The plugin runs with the permissions of the current DSH process, and favorite states will be written to localStorage. It is recommended to check the source code and license before installing; this plugin is MIT-licensed.
  • Requires DSH ≥ 0.1.0-rc.6; deep history precise jump depends on the 0.1.2-alpha.3+ kernel, older kernels will automatically fall back to page-by-page loading.
  • After installation, the official TurnNavigator will be hidden, and this plugin assumes navigation duties; if you do not want this behavior, uninstall the plugin and the official navigation will be restored.

Conclusion

@max-null/dsh-chat-rail transforms “finding messages in long sessions” into a positioning operation on a vertical bar: collapsed, it takes no space; hovered, it expands to show the full view; during scrolling, highlights follow the reading position; jumping to distant history also provides loading feedback. Combined with favorites and quick fill, it handles both review and organization needs.