Introduction

In the DSH Web environment, if functional plugins need to display a sidebar, editor view, status bar, or command entry, they usually require a unified layout and mounting mechanism. dock provides a basic workspace shell: it first presents a VSCode-style activity bar, sidebar, editor area, status bar, and command system, and then allows functional plugins to mount their panels, editor views, activity items, status items, and commands through the ctx.workbench registry. It is maintained by AKS1st and is licensed under MIT. dock itself is only responsible for the workspace shell and does not come with specific capabilities like file browsing or text editing; capabilities such as file browsing, text editing, image viewing, Markdown viewing, and Git management are installed on demand by dock series functional plugins.

What is it

dock is the base plugin for the DSH Web workspace. It provides a VSCode-style layout shell, including an activity bar, sidebar, editor area, and status bar, and exposes a registry service for functional plugins to mount:

  • Panels
  • Editor Views
  • Activity Bar Items
  • Status Bar Items
  • Commands

Functional plugins connect to the workspace shell provided by dock through these registration entry points and do not need to handle the overall layout themselves.

Core Features

Layout Shell

dock provides the following basic layout areas:

  • Activity Bar: The left vertical strip where icon items can be registered. Clicking switches the sidebar panel.
  • Sidebar: Carries panels provided by functional plugins.
  • Editor Area: Multi-tab editor view.
  • Status Bar: Bottom status item registration entry.

Docking and Windows

dock supports docking the entire workspace to the four sides of the screen and supports floating window mode. Independent floating windows can be dragged and resized.

Layout information is saved in localStorage and restored after refresh.

Command System

dock provides command registration and invocation capabilities, using executeCommand for command registration and invocation.

Open Registry

dock provides registration services via ctx.workbench. Functional plugins can use the following methods to mount extensions:

  • registerActivityBarItem
  • registerPanel
  • registerEditorView
  • registerStatusBarItem
  • registerCommand

These registration methods return an unregistration function. When used with ctx.effect, registered content can be automatically cleaned up when the plugin is disabled.

Installation and Enablement

Environment Requirements

dock requires the DSH Web environment, with the client platform being Web. Install using --profile web.

Requirements:

  • Node >=20
  • Peer dependency cordis ^4.0.0-rc.7 (included with DSH)
  • react / react-dom ^18.2.0 as optional peer; if not provided, the workspace UI will not activate

Install dock

Recommended from npm registry:

dsh plugin --profile web add dock-base

Alternative via GitHub:

dsh plugin --profile web add github:AKS1st/dock

Install Functional Plugins on Demand

dock only provides the workspace shell. If specific capabilities are needed, functional plugins can be installed on demand:

dsh plugin --profile web add dock-files
dsh plugin --profile web add dock-editor
dsh plugin --profile web add dock-images
dsh plugin --profile web add dock-markdown
dsh plugin --profile web add dock-git

Alternatively, install separately via GitHub:

dsh plugin --profile web add github:AKS1st/dock-files
dsh plugin --profile web add github:AKS1st/dock-editor
dsh plugin --profile web add github:AKS1st/dock-images
dsh plugin --profile web add github:AKS1st/dock-markdown
dsh plugin --profile web add github:AKS1st/dock-git

Installing just dock itself is also possible; it will exist as a clean workspace shell.

Typical Usage

Combinations

The following combinations are selected as needed; you do not need to install all of them.

  1. Just browsing files:
dsh plugin --profile web add dock-base
dsh plugin --profile web add dock-files
  1. Browse and edit text:
dsh plugin --profile web add dock-base
dsh plugin --profile web add dock-files
dsh plugin --profile web add dock-editor
  1. Full file workspace, adding image and Markdown viewing on top of file browsing and text editing:
dsh plugin --profile web add dock-base
dsh plugin --profile web add dock-files
dsh plugin --profile web add dock-editor
dsh plugin --profile web add dock-images
dsh plugin --profile web add dock-markdown
  1. When Git management is needed, add to any of the above combinations:
dsh plugin --profile web add dock-git

These functional plugins collaborate via the registry provided by ctx.workbench. dock itself does not depend on other dock series plugins; conversely, dock-files, dock-editor, dock-images, dock-markdown, and dock-git depend on the workspace shell provided by dock. The installation order between functional plugins is insensitive.

Development

In the repository, you can use the following commands:

pnpm install
pnpm run build
pnpm run check

src/client/contract.ts is the external contract for the workspace. There is a vendored copy inside the functional plugin; when modifying the contract, these copies need to be synchronized.

Suitable Scenarios and Notes

dock is suitable for the following scenarios:

  • Need to set up a unified workspace shell in the DSH Web environment
  • Need to mount panels, editor views, status items, and commands for multiple functional plugins
  • Need to combine dock series plugins by scenario rather than installing full capabilities at once

You need to pay attention to:

  • The dock base only provides the workspace shell and does not come with specific capabilities like file browsing or editing.
  • Plugins will run with the current dsh process permissions. You should check the source code and license before installing.
  • The license for this project is MIT.
  • react and react-dom are optional peer dependencies; if not provided, the workspace UI will not activate.
  • The external contract for dock is located at src/client/contract.ts, and there is a vendored copy inside the functional plugin; changes need to be synchronized.

Conclusion

The value of dock lies in converging the layout, registry, command mounting, and layout persistence of the DSH Web workspace into a single base plugin. Subsequent functional plugins only need to care about their own capabilities and mount them to a unified shell via ctx.workbench.

GitHub Address:

https://github.com/AKS1st/dock

Directory: No verifiable directory page address was provided in the verified materials.