Skip to main content

dsh-web-mobile

38Stars9Forks0Issues0Watchers

Convert DSH Web to an app-like experience on mobile browsers: sidebar to drawer navigation, file preview to bottom sheet, settings popup to near full-width, while remaining imperceptible on desktop.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
MIT
Branch
main
deepseek-harnessdshdsh-pluginmobilemobile-uipluginresponsiveweb-ui

Install

cmdweb profile
$ dsh plugin --profile web add dsh-web-mobile

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin mexiaosqwq/dsh-web-mobile for me: review the repository at https://github.com/mexiaosqwq/dsh-web-mobile first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Positioning

Rearrange DSH Web on viewports ≤1023px to approximate a native app experience: sidebar becomes a slide-out drawer, file tree and preview become bottom sheets, settings popup becomes near-full-width with toolbar merged into category bar; completely no-op at ≥1024px.

Core Capabilities

  • Sidebar to Drawer: New "Open Directory" icon button in conversation header, tap to slide out/in drawer; in stages without conversation header like home/blank page, top-left floating button takes over the toggle
  • One-Tap File Browser: New "File Browser" icon button in conversation header, directly expands dsh-web-ui's aionui file explorer into a bottom sheet, no need to open drawer first
  • Double Capsule at Drawer Bottom: When drawer opens, two capsule buttons "File Browser" and "Export Conversation Log" appear at bottom; conversation log button auto-disables when there's no current conversation
  • Status Bar & Safe Area Adaptation: Write viewport-fit=cover + theme-color, push all visible surfaces below the notch per env(safe-area-inset-top); Android system status bar color switches with light/dark theme
  • Preview Overlay Fullscreen: New fullscreen toggle button on the right side of preview overlay title bar in dsh-web-ui; when pressed, overlay fills viewport (including safe area), press again to restore
  • Full Close Interaction Set: Click mask to close when drawer is open, close by pressing Esc (yield when popup opens), click conversation row/task board/search result in drawer to collapse drawer; three-dot menu button on conversation row is explicitly excluded, menu opened by clicking it won't collapse
  • Media Query Width Limit: Between 768–1023px (foldable, tablet portrait), popups and overlays become centered with width limited to min(100vw-32px, 720px), avoiding content cramped in screen corner
  • Diagnostic Floating Bar: After adding ?mobile-nav-debug=1 to URL, floating panel appears at top-right showing real-time viewport, breakpoint match, frame markers, overlay visibility, last 5 JS errors

Technical Implementation

  • Language: TypeScript (React 18 + DSH client SDK); client compiled to CommonJS and inlined as lib/client.js by custom bundler in scripts/build-client.mjs
  • Key Dependencies: @deepseek-ai/cordis (host container), @deepseek-ai/dsh-client-runtime (cordis fiber + ClientContext), @deepseek-ai/dsh-client-ui-slots (slot registration), react ^18.2.0 (React components for header / drawer bottom)
  • Architecture Pattern: Dual-sided plugin. Host side src/index.ts:7 exposes an empty apply(), only used to register dsh-mobile-nav line in host Loader; real work all on Browser side src/client/index.tsx:27-97: injects a mobile <style data-plugin>, registers three slots (conversation.session.header.actions, sidebar.footer.action, and settings.general.item mentioned in README & AGENTS.md, but src/client/index.tsx:66-97 only registers first two), mounts a group of lifecycle-managed DOM effects
  • Entry File: Client's apply(ctx) at src/client/index.tsx:27; cordis patch writes one line insert: { id: dsh-mobile-nav, name: '@dsh-external/dsh-mobile-nav' } in cordis.patch.yml:4-5
  • Core Mechanism: src/client/effects/reconciler-core.ts maintains a zero-import dirty-key registry, merges MutationObserver bursts per animation frame, src/client/effects/phone-chrome.ts:124-165 connects this DOM-free engine to a single whole-tree observer; tasks declare their dirty keys (like data-aionui-preview-open) so only truly changed attributes wake up related tasks

Use Cases

Users who use DSH Web on mobile browsers (including Android Chrome / iOS Safari) and find the default three-column layout cramped on narrow screens; or developers who need it to remain usable when temporarily narrowing desktop windows without losing desktop experience. One installation improves five scenarios simultaneously: home page, ongoing conversation, settings, file tree, and preview.

Prerequisites & Compatibility

DependencyMin VersionDescription
DSH Client SDK@deepseek-ai/dsh-client-runtime ^0.1.0-rc.6 and series (same version number)package.json:48-57 declares peerDependencies, covering locale / runtime / ui-primitives / ui-slots / ui-conversation / ui-layout / ui-settings / ui-sidebar / session-log-export
Cordis@deepseek-ai/cordis ^4.0.1package.json:47 declares, provided by host
React^18.2.0package.json:52 declares, peer only
Node.jsNot declaredpackage.json doesn't set engines; minimum Node for running pnpm verify and pnpm build indirectly determined by @types/react and TS 6.x
PlatformBrowserpackage.json:39-44 declares dsh.client.platform: "web", no host-side code, no native module dependencies
Host Injectionsslots / layout / locale / sessionLogDownloadinject = [...] list at src/client/index.tsx:19, missing any one cordis fiber will refuse to load
Third-party Compatible Pluginsdsh-web-ui-all 0.1.14、dshmarket 1.2.2、dsh-usage-stats 0.1.2、dsh-genui 0.8.3Explicitly listed in README.md:50-55; UI compatibility patches written in src/client/styles/compat.css.ts

Installation

dsh plugin --profile web add github:mexiaosqwq/dsh-web-mobile

Configuration

ConfigTypeDescriptionDefault
?mobile-nav-debug=1URL query parameterShow diagnostic floating bar at top-right (viewport, breakpoint, frame markers, preview/file explorer column visibility, preview/file explorer open state, current phase, last 5 JS errors). For mobile debugging only, doesn't affect functionalityNot passed = not shown

This plugin has no Schema / config file / environment variable形式的 configuration items (src/ doesn't read process.env, Schema fields, or localStorage keys; only debug panel reads URL query parameters).

FAQ

Q: Do I need to restart DSH after installation?

A: Yes. README.md:63 explicitly states "restart dsh web after installation". Plugin injects dsh-mobile-nav line via cordis.patch.yml at host startup; running dsh web process won't dynamically load it.

Q: Will this plugin affect desktop?

A: No. Source code src/client/styles/misc.css.ts:140-150 sets all [data-mobile-nav=...] controls to display:none !important inside (min-width: 1024px) media query; meanwhile src/client/effects/phone-chrome.ts:23-42's installMobileEffect only installs side effects when matchMedia('(max-width: 1023px)') matches. At >=1024px, no MutationObserver is created, no DOM written, no events registered.

Q: Where is the preview overlay fullscreen button? How to use it?

A: Only appears on title bar right side (approx right: 36px; top: 8px) when dsh-web-ui's preview overlay is open. Tap once, preview fills entire viewport (including status bar safe area); tap again to restore to bottom sheet size. aria-label switches between "Fullscreen Preview" / "Exit Fullscreen".

Q: What to do if clicking "File Browser" button does nothing?

A: Usually not a broken button, but that preview overlay is already open (compat.css.ts:104-115 lets preview cover file explorer). First click collapse button (chevron) on preview overlay title bar, then click "File Browser". AGENTS.md:117 explicitly lists this in "Pitfalls".

Q: What if interface reverts to desktop layout after upgrade?

A: Widen window or use desktop browser (≥1024px) to return to desktop layout; if still desktop layout under mobile viewport, first confirm dsh web process actually restarted, then add ?mobile-nav-debug=1 to check top W viewport width and whether mq≤1023 is true.

Q: How to uninstall?

A: dsh plugin --profile web remove dsh-web-mobile, then restart dsh web. This plugin has no host-side process, no persisted files, no external network requests; uninstallation is complete cleanup.

Getting Started Difficulty

Beginner — no code changes needed, install and restart to take effect; the only switch is the ?mobile-nav-debug=1 URL parameter for debugging, which regular users can completely ignore.

Known Issues & Limitations

  • CSS depends on :has() selector, requires Chromium 105+; :has() rules on legacy WebViews are silently dropped, may cause drawer/overlay anomalies. Source code heavily uses :has() in src/client/styles/layout.css.ts:1-3 and compat.css.ts
  • When user system settings enable "Reduce Motion", @media (prefers-reduced-motion: reduce) will turn off slide-in animations and transform transitions for overlays (compat.css.ts:210-216)
  • Preview overlay and file explorer have mutual exclusivity: only one can be open at a time; clicking "File Browser" when preview is open seeming to not work is expected behavior. AGENTS.md:117 lists this as priority check for "button seems not to work"
  • Drawer close-on-click logic uses capture phase events and explicitly excludes conversation row's three-dot menu button (phone-chrome.ts:415); if third-party plugin's conversation row button selector changes in the future, need to sync update here or drawer will mistakenly collapse
  • Full-tree reconciler tasks use module-level installed flag at src/client/effects/phone-chrome.ts:48-88 to prevent duplicate mounting; hot-reloading plugin in same host environment unloads then rebuilds, causing very brief flicker during the transition

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/mexiaosqwq/dsh-web-mobile)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory