dsh-mobile-shell
DeepSeek App-style mobile shell for the DSH Web UI.
为 DSH Web 界面提供接近官方 DeepSeek App 的竖屏手机壳层:抽屉导航、官方风格的顶栏 / 输入卡 / 设置页,以及一条可预测的 Android 返回栈。

What it does / 功能
- Mobile shell / 移动壳层:窄屏(≤1023px)隐藏常驻左侧图标栏,把宿主左栏变成 88vw 左侧抽屉;顶栏提供 ☰、右侧详情、+新建三个入口。
- Right details drawer / 右侧详情抽屉:宿主右侧栏(工作区文件、终端、Agent 浏览器)改为从右侧拉出的抽屉,保留约 12% 左侧页面可见。
- App-style composer / 官方风格输入卡:28px 圆角、轻阴影、圆形发送/停止按钮、胶囊式权限/模型控件;输入区字号 16px,避免移动端自动放大。
- App-style settings / 官方风格设置页:全屏设置面板、返回箭头、横向分类胶囊、白色分组卡片。
- Edge gestures / 边缘手势:左边缘右滑开左抽屉,右边缘左滑开右抽屉;轴锁避免与纵向滚动冲突。
- Back stack / 返回栈:Android 返回键依次关闭 设置 → 右抽屉 → 左抽屉,再交给宿主默认行为。
- Desktop no-op / 桌面端零影响:≥1024px 时所有按钮、遮罩、手势均不生效。
Install / 安装
要求:DSH Web 0.2.x,目标浏览器为手机 WebView 或移动视口。
dsh plugin --profile <profile> add link:/path/to/dsh-mobile-shell
dsh --profile <profile> web
也可以把仓库发布到 Git 仓库后用 dsh plugin --profile <profile> add <git-url> 安装。
如果运行环境没有 pnpm(dsh plugin add 依赖它),可改为手工安装:把本仓库目录复制到
<DSH_HOME>/profiles/<profile>/node_modules/dsh-mobile-shell,保持 package.json 与 lib/ 原样,
再按上面的 patch row 注册并重启一次即可。
Build / 构建
npm run build
lib/client.js 是提交进仓库的构建产物(DSH 客户端只拉取一个 client 文件,样式以内嵌 JSON 字符串注入)。修改源码后必须重新构建。
Docs / 文档
Compatibility & limits / 兼容与限制
- 面向 DSH Web 0.2.x;宿主 DOM 通过稳定类名后缀与
data-* 属性匹配,不硬编码 CSS-module 哈希。
- 本阶段只做壳层、输入卡、设置页与返回栈;消息气泡、附件浮层、语音输入不在本阶段范围内。
- 与其它移动端补丁叠加时,以本插件运行时注入的样式为准。
- 深色模式继承宿主主题;桌面端完全 no-op。
License
MIT — see LICENSE.
English
dsh-mobile-shell is a client-only DSH Web UI plugin that makes the phone layout feel like the official DeepSeek app.
- Hides the permanent left rail and turns the host sidebar into an 88vw drawer with a dimmed scrim.
- Turns the host right-hand details panel into a right drawer that keeps ~12% of the page visible.
- Adds app-style top bar actions (☰, details, new session), a 28px composer card, and a full-screen settings sheet with grouped cards.
- Adds edge-swipe gestures (left edge → left drawer, right edge → right drawer) with an axis lock so vertical scrolling is unaffected.
- Routes the Android hardware back key through a single back stack: settings → right drawer → left drawer → host default.
- Desktop (≥1024px) is a complete no-op.
Install
dsh plugin --profile <profile> add link:/path/to/dsh-mobile-shell
dsh --profile <profile> web
Build
npm run build
The browser bundle is committed at lib/client.js; rebuild after editing src/.
If the runtime has no pnpm (the dsh plugin add path depends on it), copy this directory into
<DSH_HOME>/profiles/<profile>/node_modules/dsh-mobile-shell instead, add the patch row shown above, and restart once.
Docs
Compatibility
Built for DSH Web 0.2.x. Selectors use stable class-name suffixes and data-* markers rather than CSS-module hashes. This phase covers the shell, composer, settings and back stack only; message bubbles, attachment sheets and voice input are out of scope. Desktop is a no-op.