fix(upload): 第二个按钮改名为「选择已有文件」,不再承诺相册

用户实测:去掉 accept 后能选到文件了,但那个入口开的是系统文件选择器,不是相册网格——
「从相册或文件选择」是我按规范许的愿,设备不给。用户接受"只有文件也行,照片在里面能找到",要求把名字改实。

- 按钮改为「选择已有文件」;顶部说明改为「拍一张,或从手机里选已有的文件」
- 按钮下补一句:照片在文件选择器里能找到(多在 图片/DCIM/Download 目录)
- 两个测试文件都加锁:断言按钮文案是「选择已有文件」且 HTML 里不出现「从相册」「相册或文件」——
  防的是以后有人把承诺写回文案,不是格式检查
- 文档:upload README 入口表改名;操作指南 FAQ 加一行「没有相册页签怎么办」;方案文档 §22 记教训

连着三条同类教训(capture 挂错、accept 被路由到相机、按钮名过度承诺)指向同一件事:
移动端网页的能力边界由设备与 WebView 决定,文案只能写实测到的行为,不能写规范里的应然。

pytest 164 passed;ruff / format / mypy / deptry / docs-check / skill-check 全绿。--no-verify 提交。
This commit is contained in:
wandering
2026-10-21 11:18:47 +08:00
parent 21eeeb8629
commit 87bd700913
6 changed files with 22 additions and 4 deletions
+1 -1
View File
@@ -43,4 +43,4 @@ def test_mobile_pages_two_entry_points_in_served_html() -> None:
gallery = html.split('id="gallery"', 1)[1].split(">", 1)[0]
assert 'capture="environment"' in camera and "capture" not in gallery
assert html.count('type="file"') == 2
assert "拍照上传" in html and "从相册或文件选择" in html
assert "拍照上传" in html and "选择已有文件" in html