Files
mnote/design/05-editor-mainline/process/5-35-navigation-breadcrumb-fetch-guard-followup-v1.md
T
lix-2026 1882db7681 收口 MNote P0 P1 P2 审查尾项
- 归档 OnlyOffice live bridge、Page AI、mindmap、design governance 与相关 bug 条目
- 补齐 MinerU OCR 后端 runtime 合同与 smoke/test 基线
- 收口 ChatOnly/Doubao、ObjectIdentity、Page Aggregate compat 与 runtime owner 文档口径

验证:
- cargo test --manifest-path rust/Cargo.toml -p mnote-web local_ocr -- --test-threads=1
- cargo test --manifest-path rust/Cargo.toml -p mnote-web onlyoffice_bridge -- --test-threads=1
- git diff --check
- git diff --cached --check
- codegraph index . --force && codegraph status .
- codegraph sync . && codegraph status .
2026-06-01 09:29:12 +08:00

47 lines
2.3 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.
# 5-35 导航页 breadcrumb 与 fetch guard follow-up v1
> 状态:process
>
> Owner05-editor-mainline / 03-rust-web
>
> 创建时间:2026-06-01
>
> 来源:`design/05-editor-mainline/done/5-33-navigation-page-route-guard-checklist-v1.md` 归档后拆出的增强尾项。
## 背景
`5-33` 已完成导航页主路径:`/` 与 local-folder / folder scope 无明确页面时显示导航页,不再自动打开默认 Markdownrecent folders/pages、删除页 fallback、未登录 route guard、导航页首屏不注入 editor / aggregate 均已有测试和 browser smoke。
剩余问题不应继续阻塞主清单,但仍属于工作区体验尾项:
- 文档页 breadcrumb 的文件夹段应逐级回到对应 folder navigation page。
- 浏览器交互 fetch 返回 `401/404/410` 时,当前页面应有统一恢复策略,而不是只依赖服务端 HTML route guard。
## 目标
- 点击文档页 breadcrumb 文件夹段时,进入对应 `fileTreeScope` 的导航页,并保持 Sidebar Explorer scope 一致。
- 当前页面相关 fetch 返回 `404/410` 时,回到当前资源所在父 folder navigation page,并显示轻量提示。
- 当前交互 fetch 返回 `401` 时,跳转 `/auth?next=<current-url>`
- 保留普通业务错误 toast,不把所有 API 错误都吞成导航跳转。
## 非目标
- 不重新打开 `5-33` 的导航页主清单。
- 不新增第二套 route truthcanonical route guard 仍在 Rust HTML shell。
- 不改变 FileTree 普通文件夹点击只展开的行为。
- 不为所有后台 API 加全局 silent redirect。
## 验收
- [ ] breadcrumb 文件夹段点击后 URL 包含对应 `fileTreeScope`,主区域是 folder navigation page。
- [ ] Sidebar Explorer 与主区域 scope 一致。
- [ ] 当前文档相关 fetch 返回 `404/410` 时回到父 folder navigation page。
- [ ] 当前交互 fetch 返回 `401` 时跳转 auth 并携带 `next`
- [ ] `task500-navigation-page-route-guard-smoke.js` 继续通过,或新增 `task5xx-navigation-breadcrumb-fetch-guard-smoke.js` 覆盖本文尾项。
## 建议验证
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web root_entry -- --test-threads=1`
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web local_folder -- --test-threads=1`
- `node scripts/task500-navigation-page-route-guard-smoke.js`