Introduction¶
DeepSeek Harness (DSH) Web GUI typically works in a three-column layout on desktop. When taken to a mobile device, several practical issues arise: the three-column shell is squeezed into small screens, native browse dialogs are unsuitable for remote access, rc.6 settings and privileged APIs are restricted to loopback, and accessing via http://tunnel-ip causes the browser to lack crypto.randomUUID.
@az7627/dsh-mobile-remote is a DSH plugin maintained by az7627. It hooks in via a double-bread approach without modifying Harness source code or the npx installation contents. The goal is to collapse the Web GUI into a single column under a ≤760px viewport, make directory selection, file management, terminal, and settings usable on mobile, and provide remote access enhancement via a WireGuard tunnel address.
What is this¶
- npm package:
@az7627/dsh-mobile-remote. The package name includes a scope because an unscopeddsh-mobile-remotehas been taken by someone else. - Maintainer:
az7627. - License: MIT.
- Scope: Implemented according to the DeepSeek Harness
0.1.0-rc.6Web shell DOM contract; core upgrades require re-verification and version tracking.
Core Features¶
Mobile Layout with Zero Desktop Changes¶
Under a ≤760px viewport, the plugin collapses the DSH Web GUI three-column shell into a single column:
- The sidebar becomes a left-swipe drawer with an overlay and a top-left menu button.
- The
detailspanel becomes a full-screen overlay. - Drag handles are hidden.
- iOS safe-area adaptation.
- Input fields use
16pxto avoid mobile focus zooming. - Touch targets are not smaller than
36px.
The desktop layout remains unchanged. All mobile rules are narrowed into a media query; the desktop layout and column widths are unaffected.
Mobile-Optimized Modals and Overlays¶
True modal dialogs (such as primitives Modal and the settings panel) become full-screen on mobile with independently scrolling content areas. Standard overlay panels (such as menus and context panels) retain their own box and background.
Overlays like menus, lists, and panels with background shadows that go off-screen automatically shift to be inside the screen. Trigger positions recalculate on change. Surfaces with built-in transform animations (like drawers and details panels) are not disturbed. Documentation mentions practical testing on 320–430px six-width levels showing the model selection menu is always fully on screen.
Simplified Preset Labels¶
Under narrow screens, Agent preset buttons only show icons plus short labels:
- Chinese:
标准/极简/PTC/创造 - English similarly.
Desktop retains full names.
Rebuilt Directory Selection Page¶
The plugin pins Harness’s directory selection interaction as a Web directory page and replaces the built-in browse dialog with a custom interface; the host browse backend is retained.
Desktop provides:
- Large dialog.
- Left-side shortcut directories.
- Columnar browsing, i.e., Miller columns.
- Four-key toolbar.
- Clickable breadcrumb path bar.
Mobile provides:
- Shortcut directory landing page.
- Single-column list with back button.
- Full-screen presentation.
File Management¶
A new “File Management” entry appears above “Settings” in the sidebar, sharing the same column view as the directory selector.
File management includes these behaviors:
- Opening a directory appends a column.
- When it can’t fit, the bottom horizontal scrollbar automatically positions to the newest column.
- Each column has an independent scrollbar; original column scroll position is preserved when expanding a new column.
- Right-click menu supports: Rename, Copy, Paste, Delete, Download, Open with, Copy file address, Properties, New, Upload, Refresh, Open in terminal.
- Automatically appends
-copy-2suffix on paste to avoid duplicates. - Text can be previewed, edited, and saved.
- Images, videos, audio can be previewed inline.
- PDF opens in a new tab.
- Unknown types can be opened with a custom method.
- Hex editing is divided into windows of
64KB, up to8MB. - Upload limit
8MB. - Double confirmation when deleting non-empty folders.
- Folder properties show recursive statistics of real size.
- Hidden files are displayed with transparency.
- Mobile retains inline touch buttons.
Browser-based PTY Terminal¶
The sidebar terminal button opens a terminal in the browser. It uses the host’s node-pty session (ConPTY on Windows) and the client uses xterm.js for rendering.
Supports:
- Line editing.
- ANSI colors.
- Full-screen TUI applications.
- Terminal follows viewport fit and syncs PTY size.
- Output is a bounded ring buffer of size
256KB. - Polling interval
60ms. - Client stops polling
10minutes later automatically kills the session to avoid PowerShell process leaks.
Right-click “Open in terminal” in file management can start a terminal in any directory. Windows defaults to PowerShell (-NoProfile), others use bash.
Mobile Settings Page Usability¶
For rc.6, the settings scope for non-loopback browsers is pinned to memory persistence, causing settings pages on mobile to easily fail requests or appear blank.
The plugin sets the isLoopback of the connection handle to true in trusted remote sessions and performs a fiber re-application on consumed old value settings consumer entries, allowing them to rebind to host persistent transport. Desktop loopback scenarios are unaffected.
Non-Secure Context Fix¶
When mobile accesses via http://tunnel-ip (a non-secure source), the browser doesn’t provide crypto.randomUUID, which can cause RPC calls for settings, directory lists, models, plugins, presets, etc., to fail.
The plugin installs a UUIDv4 fallback based on crypto.getRandomValues at startup. crypto.getRandomValues is available in any source, so it can recover from RPC calls missing crypto.randomUUID.
Removing Loopback Pinning for Privileged APIs¶
rc.6 pins methods like settings, credentials, Agent presets, model discovery to only local use, potentially resulting in 403 forbidden on mobile.
The plugin forwards same-origin privileged calls to its own trusted-host channel; the host side then hands off to the built-in apiProxy via a loopback request. The trust boundary remains trustedHosts in the profile, i.e., the WireGuard tunnel address.
Remote Enhancements¶
The plugin also provides remote access related enhancements:
- Disconnection reconnect status bar.
- Remote access status line in general settings, including bound address, trusted source, directory selection backend, plugin version, which can be self-checked on mobile.
- PWA enhancements: standalone manifest, PNG icon,
apple-touch-icon.
Installation and Usage¶
Install the plugin first, then restart the Web service.
Install from npm:
dsh plugin --profile web add @az7627/dsh-mobile-remote
Restart:
npx @deepseek-ai/dsh web
To update, simply re-run the add command above; pnpm will install the latest version.
Uninstall:
dsh plugin --profile web remove @az7627/dsh-mobile-remote
Local development can use link installation:
dsh plugin --profile web add C:\path\to\dsh-mobile-remote
After changing source code, execute build and restart Web service, no need to re-add:
pnpm run build
npx @deepseek-ai/dsh web
Development workflow:
pnpm install
pnpm run typecheck
pnpm test
pnpm run build
Typical Usage: WireGuard Mobile Remote Access¶
The rc.6 webserver only accepts 127.0.0.1 / 0.0.0.0 binding, and the CLI intentionally rejects 0.0.0.0, so it is not possible to bind the service directly to 10.66.66.1. Remote access uses local binding plus WireGuard address port forwarding.
First configure the profile. The profile file is:
~/.dsh/profiles/web/cordis.patch.yml
The web-runtime configuration needs to include trustedHosts of the tunnel address, for example:
10.66.66.1
10.66.66.1:3080
After configuration, mobile requests can pass the /api trust fence.
Next, install port forwarding. This step requires administrator privileges:
netsh interface portproxy add v4tov4 listenaddress=10.66.66.1 listenport=3080 connectaddress=127.0.0.1 connectport=3080
Finally, start with local binding and access on mobile:
http://10.66.66.1:3080
Recommended unattended startup method:
pwsh -File scripts\start-dsh-web.ps1 -InstallPortProxy
pwsh -File scripts\start-dsh-web.ps1
pwsh -File scripts\start-dsh-web.ps1 -RegisterStartup
Where:
-InstallPortProxy: Install port forwarding once, requires admin privileges.- No parameters: Start service, and check interface, port occupancy, forwarding status.
-RegisterStartup: Optional, register logon startup task.
Typical Usage: Verification Scripts¶
Before verification, start a one-off test instance. This instance is isolated from the real ~/.dsh:
pwsh -File scripts\start-test-dsh.ps1
Start address:
http://127.0.0.1:3097
Execute verification scripts for the above isolated instance:
node scripts/verify-mobile.mjs
node scripts/verify-file-manager.mjs http://127.0.0.1:3097
node scripts/verify-terminal.mjs http://127.0.0.1:3097
node scripts/verify-settings-loopback.mjs http://127.0.0.1:3097
node scripts/verify-usage-remote.mjs http://127.0.0.1:3097
Clean up isolated test directory:
pwsh -File scripts\start-test-dsh.ps1 -Remove
Through the above steps, plugin behavior can be verified on mobile simulation, file management, terminal, settings loopback, and remote usage trust fence.
Note: Do not run verification scripts using an instance sharing ~/.dsh. The verification browser opening session triggers the loading fix, writing closers to the real session logs, which may conflict with writes from the running instance, causing log sequence gaps.
Applicable Scenarios and Considerations¶
Suitable for these scenarios:
- Want to access local DSH Web GUI on mobile via a WireGuard tunnel.
- Need directory selection, file management, terminal, and settings usable on mobile.
- Hope the desktop layout remains unchanged, only enabling mobile adaptation on small screens.
- Need to call privileged APIs (settings, models, presets, credentials) that were originally restricted to loopback in a trusted remote session.
Pre-use considerations:
- The plugin runs under dsh process permissions. Source code and MIT license should be checked before installation.
- The trust boundary is still
trustedHostsin the profile, i.e., the WireGuard tunnel address. - Port forwarding installation requires administrator privileges.
- File management upload and hex editing both have
8MBlimits. - Terminal output ring buffer is
256KB, polling interval60ms. - The client stops polling
10minutes later; the plugin automatically recycles the terminal session. - Windows defaults to PowerShell (
-NoProfile), other platforms use bash. - NPM package name must have scope:
@az7627/dsh-mobile-remote. - The plugin is implemented according to the Web shell DOM contract of
0.1.0-rc.6; core upgrades require re-verification.
Conclusion¶
@az7627/dsh-mobile-remote puts mobile responsiveness, directory selection, file management, browser-based terminal, settings fixes, and WireGuard remote enhancements into one DSH plugin. After installation, desktop is unaffected; mobile can access DSH Web GUI via the WireGuard tunnel address, and perform directory browsing, file operations, terminal interaction, and settings viewing.
Community directory: az7627/dsh-mobile-remote
GitHub: az7627/dsh-mobile-remote