Skip to content

fix(web): pinned chip 显示文件名 + 左键跳转预览#113

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/pinned-chip-label-click
Jul 6, 2026
Merged

fix(web): pinned chip 显示文件名 + 左键跳转预览#113
github-actions[bot] merged 1 commit into
mainfrom
fix/pinned-chip-label-click

Conversation

@SymbolStar

Copy link
Copy Markdown
Owner

bug:

  1. Pinned 区域的 chip 只显示 ref_id (例如 'ref_88c117'),
    _findRefLabelFromThread 是早期 stub,从未真正去 ref index 里查 label。
  2. Pinned chip 渲染成
    (非 ),通用 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/,复用既有 routeFromHash 路径。
  • chip title hover 也用 label 而非 ref_id。

backend tests (test_server_thread_pin / test_thread_pin) 绿。

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

🤖 bot-review (comment-only · phase 1)

Diff: 1 file changed, 29 insertions(+), 12 deletions(-) @ f0b1701

Red-line checks:

  • ✅ A-7.5: no new 'forbidden' code in xiaof

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 no-auto-merge label or [no-auto-merge] in title.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved by bot-review: red-line checks clean, internal author, no needs-human paths.

@github-actions
github-actions Bot enabled auto-merge (squash) June 29, 2026 08:30

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved by bot-review: red-line checks clean, internal author, no needs-human paths.

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) 绿。
@SymbolStar
SymbolStar force-pushed the fix/pinned-chip-label-click branch from 6868c67 to f0b1701 Compare July 6, 2026 11:38

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved by bot-review: red-line checks clean, internal author, no needs-human paths.

@github-actions
github-actions Bot merged commit 5eadfb2 into main Jul 6, 2026
7 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