Introduction

DeepSeek Harness (DSH) follows an “everything is a plugin” architecture. In real-world development, developers often need to debug on mobile devices or collaborate via remote access. The default desktop layout is usually difficult to use on phone screens; the sidebar, settings panel, and file selector all lack proper adaptation.

dsh-mobile-adaptive is an adaptation plugin attached to the dsh client. It injects pure CSS/JS to rebuild the mobile UI without modifying dsh business logic. The desktop target (width >= 1024px) remains unchanged; only responsive adjustments are applied to mobile devices.

Installation and Attachment

The plugin is provided as a bundle package (dsh.bundle) and a client plugin (dsh.client). After installation, the browser side and host side are activated automatically.

Installation command:

dsh plugin --profile web add dsh-mobile-adaptive

Local development debugging (hot reload):
If you need to modify the source code and see changes immediately, it is recommended to use a local link:

dsh plugin --profile web add link:<本机仓库绝对路径>

After installation, be sure to stop the running dsh web process first, then restart it so the new plugin takes effect.

Features

The plugin mainly solves layout adaptation, directory browsing, and file upload.

1. Layout Adaptation

For screens narrower than 1024px, the plugin adjusts the UI structure:

  • Sidebar collapse: The sidebar is hidden as an overlay drawer and can be closed via the hamburger button, the overlay, or the Escape key.
  • Single-column settings: The settings panel becomes fullscreen and uses a two-level navigation model (section list → specific setting item). Controls expand to full width, and touch targets are >=44px.
  • Top toolbar: On <=1023px, the permission selector and model selector are moved from the input bar to the conversation header. The original header items are collapsed into the “+” popup panel.

2. Mobile Directory Browsing

The plugin only adapts the built-in browse (in-app directory tree) dialog in dsh.

  • Fixed to browse mode: The plugin forces browse instead of the native OS selector. This addresses a loopback network misdetection issue when dsh is managed by launchd — in remote access scenarios, directory-picker-auto may incorrectly attach to the native Finder, leaving no UI on mobile devices. You need to disable directory-picker and statically configure directory-picker-browse in ~/.dsh/profiles/web/cordis.patch.yml.
  • Style adjustments: On narrow screens, the browse dialog is fullscreen, the Miller two-column layout collapses into a single column, and row height is >=44px.

3. Local Upload

The upload feature is moved from the input bar to the top toolbar and supports batch operations.

  • Transfer mechanism: The client slices files into 1 MiB chunks, converts them to base64, and transmits them through the generic RPC channel /dsh-mobile-adaptive. The host writes only to the <cwd>/upload/ directory in the workspace.
  • File handling: Filenames are normalized to a single path segment, duplicate names are renamed automatically (for example, filename(1).txt), empty files are rejected, and the maximum file size is 2 GiB.
  • State management: Failed uploads can be retried, .part temporary files are used, and they are automatically cleaned up after 1 hour.

Technical Details and Limitations

  • Compatibility: 100dvh requires iOS 15.4 or later; older systems automatically fall back to 100vh.
  • Desktop: When width >= 1024px, there are no other regression changes except a minor position adjustment to the attachment button.
  • Permissions: The plugin runs with the permissions of the current dsh process. Ensure that the source code and license are trustworthy.