Skip to content

fix(client): raise mobile touch targets on coarse pointers - #520

Merged
Grivn merged 1 commit into
omdsh-dev:mainfrom
LUgABeEEE:fix/mobile-touch-targets
Nov 1, 2026
Merged

Grivn merged 1 commit into
omdsh-dev:mainfrom
LUgABeEEE:fix/mobile-touch-targets

Conversation

@LUgABeEEE

@LUgABeEEE LUgABeEEE commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

摘要 / Summary

粗指针(手机)下,页面导航标签、头部控件与表单字段只有 28–37px 高。本 PR 在 src/client/MnemonView.module.css 增加一段 @media (pointer: coarse):把 masthead 控件、导航标签、分区操作、共享按钮变体和单行输入/下拉/文本域提高到 44px 触控基线,并给 canvas 加 overscroll-behavior: contain 以保住面板自己的滚动。细指针完全不受影响:所有规则都在媒体查询内,无标记与 API 变更。

On a coarse pointer the navigation tabs, header controls and form fields are 28–37px tall. This adds one @media (pointer: coarse) block: 44px hit areas for the masthead controls, nav tabs, section actions, shared button variants and single-line fields, plus scroll containment on the canvas. Fine pointers are untouched; no markup or API change.

关联 Issue 或背景 / Related Issue or Context

N/A — CSS-only touch usability fix for existing surfaces; no new capability, Provider or persistence format.

涉及区域 / Affected Areas

  • Web UI 或对话交互 / Web UI or conversation interaction

PR 类型 / PR Type

  • 增强或优化 / Enhancement or optimization

最新代码确认 / Latest Codebase Confirmation

  • 我已基于最新 main 分支开发,或在提交前已 rebase 或合并最新 main。 / I developed from the latest main, or rebased or merged the latest main before submitting.

同步命令 / Sync command:

git fetch origin && git rebase origin/main

AI 编码披露 / AI Coding Disclosure

  • 完全 AI 编码:全部编程改动由 AI 产出,并由贡献者接受和审查。 / Fully AI-coded: AI produced all programming changes, which the contributor accepted and reviewed.

使用的 AI 模型 / AI model used: deepseek-v4.1-flash

使用的编码 Agent 工具 / Coding Agent tool used: DeepSeek Harness (dsh) coding agent

仓库规范检查 / Repository Rules

  • 未修改 DSH 官方源码,未让 tsconfig 指向 DSH 源码 checkout,仅使用正式的 @deepseek-ai/* NPM 契约。
  • Client 与 Host 边界仍以浏览器安全的 src/host/protocol.ts 为准,没有在两侧重复定义 wire DTO。
  • 持久化格式、RPC 权限、路径或凭据处理无变更。
  • 没有提交 token、密钥、私有记忆、未脱敏日志或生成的 lib/ 文件。
  • 用户可见文案未变化,中英文长期文档无需同步。
  • 已添加 changeset(.changeset/mobile-touch-targets.md,dsh-mnemon: patch)。
  • 新增和修改的代码、注释、文档、提交信息不含 emoji。

兼容性与数据安全 / Compatibility and Data Safety

N/A — CSS only. 不影响 DSH/Mnemon 版本兼容、Provider、配置、存储格式、升级或回滚,也不影响现有数据。

本地验证 / Local Validation

执行的命令 / Commands run:

pnpm install --frozen-lockfile
pnpm run build
pnpm run typecheck
pnpm run test:root
pnpm run verify:docs

结果摘要 / Result summary:

  • install、build、typecheck、verify:docs 通过。
  • test:root:158 个文件通过、2 个跳过;2257 个用例通过、7 个跳过。构建期需要各 workspace 插件的 lib/,因此先逐个构建了 plugins/*(与 verify 的顺序一致)。
  • tests/fixtures/presentation-baseline.json 已更新:该指纹会统计规则条数,本次新增 10 条(1059 → 1069);class map 未变(289 个类,哈希不变)。
  • 未在本地执行完整 pnpm run verify(Headless Profile 激活与 package lint 两个阶段);剩余风险限于这两项,由 CI 覆盖。

用户可见变更证据 / Local Feature Evidence

证据 / Evidence:

用构建产物 lib/client.js 的样式表在 390×844、粗指针下渲染:

控件 修改前 修改后
导航标签 37px 44px
头部操作 28px 44px
文本输入 32px 44px
下拉 33px 44px

before

after

夹具使用构建后的类名拼出的最小 DOM,不含凭据、私有记忆或敏感路径;这是样式表尺寸测量,不是真机验收。

@LUgABeEEE

Copy link
Copy Markdown
Contributor Author

Follow-up for the chrome side (collapsible header, collapsed notice summary) opened as #521 so this PR stays a touch-only fix.

@Grivn
Grivn merged commit 40acb28 into omdsh-dev:main Nov 1, 2026
9 of 10 checks passed
@Grivn Grivn mentioned this pull request Nov 1, 2026
12 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants