Skip to content

[flow] T-066 重设计 BiliNote Web 与浏览器扩展工作台 UI,移除 Tauri - #65

Merged
El1mir merged 18 commits into
masterfrom
flow/T-066
Nov 11, 2026
Merged

El1mir merged 18 commits into
masterfrom
flow/T-066

Conversation

@El1mir

@El1mir El1mir commented Nov 11, 2026

Copy link
Copy Markdown
Owner

flow task: T-066
重设计 BiliNote Web 与浏览器扩展工作台 UI,移除 Tauri

验收摘要:

  • 主 Web 工作台、Reader、Settings、Onboarding 和扩展 Popup、Options、Sidepanel 均按本规格重设计;完整保留现有用户功能,功能回归检查通过。
  • 所有页面使用统一 semantic tokens;浅色为默认主题,深色主题覆盖全部页面、表单、弹层、状态和阅读内容,无旧 Ember terracotta/warm-neutral 视觉残留。
  • 在 375、768、1024、1440 CSS px 验证 Web 响应式布局;扩展在实际 Popup/Options/Sidepanel 尺寸验证,无溢出、遮挡或不可达功能。
  • 核心文字对比度达到 WCAG AA(普通文字≥4.5:1),非文本 UI 对比度≥3:1;状态同时有文字/图标,不只靠颜色表达。键盘可完成主要流程,Dialog/Drawer 焦点约束和恢复正确,触控目标≥44px,支持 prefers-reduced-motion。
  • 页面状态覆盖加载、空、成功、失败、禁用、保存中/完成和后端不可用;Cookie/设置读取失败不能将空值写回覆盖原值,危险恢复/删除有确认。
  • 动效使用集中 token,动作明确、可中断,普通交互 120–300ms;不使用持续装饰动画或 transform:scale(0),减少动态模式下关闭非必要动画。
  • 彻底移除 Tauri 路由检测、配置、入口、脚本和仅供 Tauri 使用的依赖/文档;Web 统一走 BrowserRouter,更新相关文档或 changelog;无 Tauri 构建入口/运行时引用残留。
  • cd BillNote_frontend && pnpm exec vitest run && pnpm exec tsc -b && pnpm lint && pnpm build 全部通过;cd BillNote_extension && pnpm typecheck && pnpm test && pnpm test:e2e && pnpm build 全部通过。提交截图/对比度结果作为验收证据。

卡链接:flow://task/T-066

Drop the desktop shell so the product is Web + browser extension only: BrowserRouter is the sole router, sidecar event channels and their boot UI are gone, and the Rust tree, its build scripts, release workflow, deps and CORS origins are deleted. Vite now reads its version from package.json and pins base to '/'.
Replace the Ember warm palette with semantic canvas/surface/ink/line/primary tokens mapped through @theme inline, so every existing utility follows the :root and .dark value sets without per-component changes. Add a persisted theme switch painted before React mounts, move white/primary text onto on-primary tokens for dark-mode contrast, raise control borders to line-strong (3:1), and rebuild the type and motion ladders (Inter / Source Serif 4 / IBM Plex Mono; press 120ms to page 300ms).

Evidence: docs/ui-audit/w1-design-system.md, w1-contrast-ratios.txt, w1-light.png, w1-dark.png, w1-responsive-light.png.
Add a desktop top bar (breadcrumb, backend liveness, theme and language) so the shell answers where you are and whether the server is alive without leaving the page, and give the note reader its serif reading copy at 16/28 over the existing 68ch measure. Touch pointers get 44px targets through a coarse-pointer media query, leaving desktop density untouched.

Evidence: docs/ui-audit/w2-shell-and-reader.md and w2-*.png at 375/768/1024/1440 plus light/dark desktop.
…erifiable tokens

Rename the canonical tokens to accent/ink-muted (primary/ink-mute stay as aliases for the page packages that still spell them), self-host Inter, Source Serif 4 and IBM Plex Mono through @fontsource so first paint makes no third-party request, and make the theme preference three-state (light/dark/system) resolved against the OS and painted before React mounts. Add the tokens/theme regression tests and the contrast audit that reads tokens.css directly, so a palette edit cannot silently drop below AA.

Evidence: docs/ui-audit/021/ (contrast.txt, w0-theme-*.png, w0-width-*.png), specs/021-workbench-redesign/DESIGN.md. Gates: vitest 26 files/158 tests, tsc -b, lint, build all exit 0.
Popup / Options / Sidepanel 统一走冷白+青绿 token(浅色默认、深色跟随
prefers-color-scheme),旧 terracotta 已清除;新增 useBackendHealth 提供
加载/后端不可用两态,任务状态改由 task-status-label 统一出文字+图标,
Popup 提交改真表单以便 Enter 触发,触控目标统一 ≥44px。
…ken invariants

Popup repeated the failed-task message that TaskProgress already renders; the options nav emoji carried no information the labels lacked and clashed with the graphite/teal palette. summary now gets the 44px coarse-pointer target, and src/__tests__/tokens.test.ts pins the shared palette/motion names plus the no-hex-outside-tokens rule. Evidence README records the measured sizes, tab order, touch targets and four states.
- 四态截图索引改为实际文件名(empty/ready/loading/failed/backend-down/submitted/coarse),旧一批保留不删并标注;

- 门禁记录更新为 typecheck exit 0 / vitest 4 files 10 tests / build exit 0,并说明 tokens.test.ts 守住的不变量;

- e2e 从「没有 e2e 目录」改为事实:e2e/basic.spec.ts 三条用例真实执行、仅因 Playwright 1.46.1 要 chromium-1129 而 BLOCKED,附原样报错与补跑命令。
- MarkdownNote: 图片改为 button.ember-zoom-trigger + Dialog 灯箱,Escape/遮罩关闭
  与焦点回归复用 useOverlayFocus;代码块配色由 prismStyleFor(resolved) 选择
  oneLight/oneDark,深色画布不再近黑不可读;补 padding 与 aria-label i18n。
- 新增 reader/codeTheme.ts、reader/transcriptSearch.ts(可单测的纯逻辑)。
- TranscriptView: 非空查询显示「匹配 N / M 条转写」(aria-live=polite)。
- i18n: note.viewImage / note.lightboxAlt / transcript.matchCount(zh+en)。
- tests/021-workbench-redesign/reader.test.tsx: 10 例静态与纯函数回归。
- docs: DESIGN.md 阅读区章节 + spec.md 实现清单与证据;docs/ui-audit/evidence/t070。
- 新增 settings/sections.ts 与 saveFeedback.ts:分区清单唯一来源、保存四态
- SettingsPage 窄屏改原生 Select、宽屏竖排导航,两套共用同一路由与草稿角标
- SaveStatus 内联取代保存 toast;OCR/转写读失败渲染 SettingsLoadError 并禁用保存
- Download Cookie / Media 保留天数改走 useSectionDraft,跨分区不丢
- 粗指针下设置页输入框补 min-h-11(tokens coarse 规则只兜 button/select)
- 新增 settings.test.tsx(13 用例)与 docs/ui-audit/t071-settings-evidence.md + 15 张截图
- 四个面的旧色名统一到 021 规范 token(accent/on-accent/accent-soft/success/ink-muted),视觉不变、别名层不再扩散;

- 404 的返回工作区链接补 focus-visible 焦点环,键盘第 6 下可达、回车回 /;

- 新增 tests/021-workbench-redesign/onboarding.test.tsx(6 例)盯住启动屏两态、404 链接、引导首屏不放行、旧色名不得回流;

- docs/ui-audit/t072-onboarding-startup-evidence.md + 19 张运行态截图(四档、深色、启动失败四档、错误边界两档)。
- README: 「桌面版下载」替换为「部署形态」(Web + 浏览器扩展,桌面版已移除),
  指向 CHANGELOG 历史说明。
- onboarding.step1.description(zh+en):不再声称桌面端会自动拉起后端。
- 清掉 HashRouter/桌面端措辞注释(taskUrl、anchors、MarkdownNote、StartupScreen),
  vite.config 的 base 注释同步去 Tauri 字样,src 内 tauri grep 归零。
- docs: docs/ui-audit/t074-tauri-removal-evidence.md 记录 grep/依赖/门禁证据。

复核:src/package.json/vite.config.ts tauri 命中 0;src-tauri 不存在;
BrowserRouter 唯一;tsc/lint/build/vitest 全绿。
- .github/workflows/release-web.yml:v* tag / workflow_dispatch 构建前端 dist,
  打 bilinote-web-X.Y.Z.tar.gz,upload-artifact 并在 tag 时挂 Release;
  VITE_APP_VERSION 由 tag 推导。后端镜像与插件沿用既有两条流水线。
- README「部署形态」补「发布产物」表与手动部署步骤;RELEASING.md 第 4 节列三条流水线。
- CHANGELOG:Removed 记删除 react-medium-image-zoom@5.4.1(灯箱已改 Dialog),
  Internal 记 Web 发布流水线。
- pnpm remove react-medium-image-zoom:package.json -1、pnpm-lock.yaml -14,源码仅剩注释。
- docs/ui-audit/t074-tauri-removal-evidence.md 追加第二轮残留清点与门禁证据。
- 8 acceptance points: docs/ui-audit/021/w7-acceptance.md
- gate commands + exit codes: docs/ui-audit/021/gates.md (extension test:e2e red: stale vitesse template assertions)
- fix extension typecheck: tsconfig types += webextension-polyfill (TS7006 in cookies.ts)
- screenshots: 4 widths x light/dark, reader, settings, onboarding, extension three surfaces
- Tauri residue judged: docs/ui-audit/021/tauri-residue.txt; spec 021 -> implemented
- gates.md: 补 i18n-contract 行、HEAD f657ab2 上的复跑 exit code 表、contrast-audit.mjs 原文输出(13 对 x 2 主题全 PASS);

- w7-acceptance.md: 门禁表补 i18n 行并标明收口轮复跑时延,指向 gates.md 的原文出处。
- frontend vitest 30/197, tsc, lint, i18n 572 keys, build exit 0
- extension typecheck, vitest 4/10, build exit 0
- test:e2e not re-run (same browser blocker), red/BLOCKED unchanged
@El1mir

El1mir commented Nov 11, 2026

Copy link
Copy Markdown
Owner Author

已开 PR pr_032(head 72227b4,远程 #65)

@El1mir
El1mir merged commit 9ab77d9 into master Nov 11, 2026
0 of 2 checks passed
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.

1 participant