hololake-platform/research/progress/HLP-DEV-0005-NOTION-READING-AND-PAGE-LINK-RESTORATION.md
Guanghu Domestic Migration dd131ff814
Some checks are pending
Build Windows Internal Installer / Build Windows x64 internal installer (push) Waiting to run
chore: import sanitized domestic snapshot for REPO-008
Source snapshot: 789bd691f530f915fc870bf72ecb7c96c5d5101c
2026-07-17 16:01:12 +08:00

54 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# HLP-DEV-0005 · Notion 阅读层与页面关系恢复
> 日期2026-07-17
>
> 关联模块:`HLP-MOD-0002`
>
> 状态0.1.4 Review 已完成原生验收
## 问题
Tolaria 软件壳本身正常,但知识页出现两项回退:
1. 标题、提示、正文、代码和表格挤在一起,普通引用只剩一根细线;
2. Notion 导出的 `[页面](相对路径.md)` 没有接到 Tolaria 内部导航,普通单击没有反应。
原生 `[[wikilink]]` 实现并未消失。真正缺失的是普通 Markdown 页面链接到
Tolaria 页面路由的兼容层;当前页面还把部分参考路径放在代码块里,代码文本本来也不可点击。
## 恢复内容
- 相对 `.md` / `.markdown` 链接普通单击后直接打开目标笔记;
- 解码 Notion 导出文件名里的 URL 编码,并去除查询串、锚点和扩展名后交给现有页面解析器;
- 不改变外部网址与附件的安全交互;
- 普通引用升级为蓝色提示面板,增加背景、边框、圆角和内边距;
- 增大正文行距、段落间距和阅读列宽;
- 代码块、表格、callout 与行内代码恢复独立视觉层次;
- `NEXT-TODO-20260717` 的参考路径已改为真实 Markdown 页面链接。
## 补丁与构建
- `apps/tolaria/patches/0008-fix-restore-internal-note-links-and-reading-rhythm.patch`
- `apps/tolaria/patches/0009-test-lock-in-readable-editor-theme-defaults.patch`
- `apps/tolaria/patches/0010-fix-resolve-relative-page-links-from-source-notes.patch`
- `apps/tolaria/patches/0011-fix-resolve-links-inside-mounted-workspaces.patch`
- 桌面验收包:`HoloLake Era 0.1.4 Review`
- Bundle ID`com.guanghu.desktop.review.20260717.page`
- DMG SHA-256`ee5e4db8…35ee988`(完整值见验收包同目录 `.sha256` 文件)
## 验证
- 回归测试先失败后修复:相对 Markdown 页面链接普通单击跳转;
- 原生点击发现重复 `README.md` 会误跳后,再补回归测试:路径按来源页面目录归一化并跳到唯一正确页面;
- 挂载多工作区复测后,补齐来源页面所属工作区路径,避免拿当前主仓目录解析挂载页面链接;
- 链接与编辑器定向 Vitest51 项通过;
- ESLint、TypeScript 与 Vite production build 通过;
- Tauri Apple Silicon App 与 DMG 构建通过;
- 原生视觉验收:元信息提示面板、段落节奏、代码块层次可见;
- 原生导航验收:从 `NEXT-TODO-20260717` 普通单击,准确进入挂载平台仓的 `HLP-MOD-0002 · 视觉与知识渲染`
- CodeScene / Codacy本机仍无 MCP、CLI 或 API 环境,未伪造结果。
全量 Vitest 运行了 4822 项,其中 4809 项通过、13 项失败2 项是主题快照预期,
已随补丁更新并通过。其余失败来自 5 个既有测试文件和本次链接、CSS 改动无直接路径,
后续应在正式依赖安装环境中单独复跑,不把它们误记为本次功能通过。