fix(web): pinned chip 显示文件名 + 左键跳转预览#113
Open
SymbolStar wants to merge 1 commit into
Open
Conversation
bug: 1) Pinned 区域的 chip 只显示 ref_id (例如 'ref_88c117'), _findRefLabelFromThread 是早期 stub,从未真正去 ref index 里查 label。 2) Pinned chip 渲染成 <div>(非 <a>),通用 file-chip 点击拦截器只匹配 .file-chip-ref / .file-chip-missing / .file-chip,所以左键完全没反应。 fix: - _findRefLabelFromThread 改为查 window._forgeRefs.byId(loadRefIndex 已 缓存),拿真实 label;renderPinnedArea 渲染前 await loadRefIndex() 兜底。 - 全局 click 拦截器里加 .pinned-chip 分支:忽略 × 关闭按钮,其余左键 -> 跳 #/files/refs/<rid>,复用既有 routeFromHash 路径。 - chip title hover 也用 label 而非 ref_id。 backend tests (test_server_thread_pin / test_thread_pin) 绿。
🤖 bot-review (comment-only · phase 1)Diff: Red-line checks:
Phase 2: auto-approve + auto-merge fire only when red-lines are clean, author is internal, and no needs-human path is touched. Block with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bug:
_findRefLabelFromThread 是早期 stub,从未真正去 ref index 里查 label。
.file-chip-ref / .file-chip-missing / .file-chip,所以左键完全没反应。
fix:
缓存),拿真实 label;renderPinnedArea 渲染前 await loadRefIndex() 兜底。
-> 跳 #/files/refs/,复用既有 routeFromHash 路径。
backend tests (test_server_thread_pin / test_thread_pin) 绿。