dsh-msg-resize: Turn the DSH dialog area into a draggable, resizable free-floating window.

Preface

By default, DSH places the chat area in a centered, fixed-width message column with the input box below. Changing width requires editing styles, and there are no handles available to move it slightly; large amounts of space are wasted on the sides of wide screens. The plugin introduced below, dsh-msg-resize (maintainer buddha68), handles this: it packages the message area and input box into a floating window that can be dragged and resized, with position and size remembered.

The plugin ID is fixed to msg-resize, package name dsh-msg-resize, current version 2.6.0, license MIT. Source code is at https://github.com/buddha68/dsh-msg-resize , directory page at https://www.skillhub.cn/plugins/buddha68/dsh-msg-resize . It belongs to the client-side UI category and only acts on the profile you specify.

What is it

One-sentence positioning: Changes DSH’s chat area (message area + input box) from a fixed centered column to a freely positionable and freely resizable floating window.

It solves the problem of the default layout being unfriendly to wide screens and the lack of low-cost means to adjust the chat area’s size and position. Compared to modifying host styles or writing custom CSS, this plugin encapsulates changes within the plugin, relies on handles for interaction, saves position and size locally, and does not require readjustment every time it is reopened.

Core Features

Two handles, one for moving position, one for resizing:

  1. Bottom-right corner ⤡: Drag to change width and height, minimum 460×320.
  2. Top-right corner ⠿: Drag to move the entire chat block to any position.
  3. Double-click the corresponding handle: Reset to default individually.
  4. Keyboard fine-tuning: Click handle to focus, ←→ to change width, ↑↓ to change height; holding Shift increases step size by 4x.
  5. Position and size are written to browser localStorage, persisting across refreshes and reopenings; upon uninstallation, only one key dshMsgResize.v2 is left.
  6. The active area is limited within the chat content pane (inset 8px): it won’t cover the left sidebar, nor run off-screen; it can continue to stick to the left after collapsing the sidebar.
  7. The input box width follows the panel width, height remains unchanged, and it always sticks to the bottom of the panel.
  8. Automatically removed on narrow screens (< 720px), leaving the mobile layout untouched.

Installation and Enablement

Install only for the profile you intend to use. The web version is usually web, the desktop version is desktop, and they do not affect each other.

Method A: One-line command (requires git locally)

dsh plugin --profile web add github:buddha68/dsh-msg-resize

After installation, restart DSH once, or wait for the host to recombine. The package includes dsh.bundle manifest and cordis.patch.yml. After installation, it automatically attaches the “top-right move” and “bottom-right resize” handles.

Method B: Release ZIP (no git)

Use this path if you don’t have a git environment, following these four steps:

  1. Go to https://github.com/buddha68/dsh-msg-resize/releases, download dsh-msg-resize-2.6.0.zip or the source archive, and extract it to any directory, for example D:\plugins\dsh-msg-resize.
  2. Link the directory to the profile’s node_modules: use junction on Windows, symlink on macOS / Linux.
mklink /J "%DSH_HOME%\profiles\web\node_modules\dsh-msg-resize" "D:\plugins\dsh-msg-resize"
ln -s /path/to/dsh-msg-resize "$DSH_HOME/profiles/web/node_modules/dsh-msg-resize"
  1. Append the following content to the end of the profile’s cordis.patch.yml (consistent with the cordis.patch.yml in the repository root):
- insert:
    - id: msg-resize
      name: 'dsh-msg-resize'
  1. Wait for the host to recombine (about 7–10 seconds), or restart DSH once. Open any session, and a floating window and two handles should appear.

DSH_HOME defaults to the DSH data directory, commonly F:\dsh-home or %USERPROFILE%\.dsh on Windows. Only modifying the cordis.patch.yml for the web profile is sufficient.

Typical Usage

No extra configuration is needed after installation; operate directly on the session page.

Action Operation
Resize Drag the bottom-right handle ⤡, horizontally to change width, vertically to change height
Move Drag the top-right handle ⠿, moving the entire chat block
Reset Double-click the corresponding handle
Precise fine-tuning Click the handle to focus, then press ←→↑↓; hold Shift to increase step size

Handles automatically disappear on narrow screens, which is expected behavior and does not require manual closing.

Applicable Scenarios and Notes

Who is it for. Developers running DSH on a wide screen who want the chat area to occupy their preferred position and size, especially those who have the left sidebar, right info pane, or multiple editor windows open simultaneously. Both desktop and web versions work; simply decide whether to install per profile.

Prerequisites and Permissions. This plugin runs with the permissions of the current dsh process. You should check the source code and license (MIT) before installing. The manual installation method involves the node_modules and cordis.patch.yml in the profile directory; back up these configurations before making changes.

Verification Environment. The environment declared in the README is DSH web 0.2.x (Chromium / Electron), plugin v2.6.0.

Known Limitations.

  1. All targets use CSS Modules class name suffix matching (e.g., [class$="_scrollBody"], [class$="_column"], [class$="_centerCol"]), which is stable across builds. If the host makes major changes to the chat area structure, the plugin will automatically fail without error (fail-inert), and you will need to modify these selectors.
  2. The panel uses position: fixed, so the host’s ancestor nodes must not have transform or filter. The current version does not; if added in the future, fixed positioning will be hijacked and needs to be changed to a portal.
  3. If dsh-chat-drag is installed simultaneously, that plugin is responsible for moving the message area horizontally, and handle positions will conflict. This plugin takes over the move action on the chat page (zeroing out the other’s displacement and hiding the handle), and new chat pages are unaffected. If dsh-chat-drag is not installed, this logic is a no-op.
  4. After collapsing the left sidebar or switching the “Note / Chat” panel, the active area is automatically recalculated; dragging near boundaries does not cause jitter.

Uninstallation.

dsh plugin --profile web remove dsh-msg-resize

For manual installations, remove the - insert: … msg-resize section from cordis.patch.yml, delete the node_modules\dsh-msg-resize link, and refresh the page; dshMsgResize.v2 in localStorage can be cleared as well.

Conclusion

The value of this plugin lies not in new capabilities, but in changing the DSH chat area layout from “default centered fixed width” to “you are in control, and it remembers.” It is cleaner than modifying global styles when fine-grained control is needed, and changes are limited to the chat pane. Directory page: https://www.skillhub.cn/plugins/buddha68/dsh-msg-resize ; Source code: https://github.com/buddha68/dsh-msg-resize .

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye