Skip to content

feat: 新增对话界面锚点,支持点击跳转对应提问 - #875

Open
adrve wants to merge 1 commit into
NanmiCoder:mainfrom
adrve:feat/add-dialog-anchor
Open

feat: 新增对话界面锚点,支持点击跳转对应提问#875
adrve wants to merge 1 commit into
NanmiCoder:mainfrom
adrve:feat/add-dialog-anchor

Conversation

@adrve

@adrve adrve commented Jun 20, 2026

Copy link
Copy Markdown

Summary

新增对话锚点功能,在聊天消息导航组件增加跳转锚点,点击可快速定位对应提问消息,仅改动桌面端聊天 UI 组件,无服务端、底层逻辑变更。

改动文件:
MessageNavigation.tsx(新增)— 右侧书签面板 UI
MessageList.tsx(修改)— 引入组件 + 添加 data-message-id 属性 + 跳转逻辑

如下图,对话界面右侧新增了锚点,点击可以跳转到指定的提问:
ScreenShot_2026-06-20_001518_480

Feature Quality Contract

  • Changed surface:
  • Tests added or updated:
  • Coverage evidence:
  • E2E / live-model evidence:
  • Known risk / rollback:

Verification

  • I ran the relevant local checks, or explained why they do not apply.
  • I added or updated same-area tests for every production behavior change.
  • I ran bun run verify for code changes, including the coverage gate.
  • New or changed executable production lines meet the changed-line coverage threshold, or the blocker/maintainer override is documented.
  • I attached or summarized the quality report path, JUnit/log artifact path, and pass/fail/skip counts.
  • I ran E2E/live smoke for cross-boundary, provider/runtime, desktop chat, agent-loop, native, or release changes, or documented the blocker.

Risk

  • This PR does not touch CLI core paths, or it has maintainer approval for allow-cli-core-change.
  • Production code changes include matching tests, or have maintainer approval for allow-missing-tests.
  • Coverage baseline/threshold changes have maintainer approval for allow-coverage-baseline-change.
  • Quarantined tests still have owners, exit criteria, and unexpired review windows.
  • Provider/runtime changes were covered by mock contract tests, and live smoke was run or explicitly deferred.

@dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jun 20, 2026
@github-actions

Copy link
Copy Markdown

PR quality triage

Changed areas: area:desktop

CLI core policy: No CLI-core policy block detected.

Missing-test policy: Blocked by policy until a maintainer applies allow-missing-tests or matching tests are added.

Coverage baseline policy: No coverage-baseline policy block detected.

CLI core files:

  • none

Coverage policy files:

  • none

Expected checks:

  • change-policy
  • desktop-checks
  • desktop-native-checks
  • coverage-checks

Test coverage signals:

  • BLOCKING unless allow-missing-tests is applied: Desktop product files changed without a desktop test file in the PR.

Risk notes:

  • No special risk notes from changed paths.

Hard merge gates still come from GitHub Actions, not AI review.

Dosu handoff: Dosu can be used as the AI reviewer for risk explanation, missing-test prompts, and maintainer Q&A. If it does not comment automatically from the PR template, ask:

@dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact.

@dosubot

dosubot Bot commented Jun 20, 2026

Copy link
Copy Markdown

Hi @adrve! I'm Dosu and I'm helping the Relakkes's Org team.

Here's my review of this PR across the requested dimensions:

Changed-Area Risk: Low
This is a purely additive UI feature — a new MessageNavigation.tsx panel and minor augmentation of MessageList.tsx with data-message-id attributes and scroll logic. The scroll-to-anchor pattern (scrollIntoView) aligns with existing patterns already used in the codebase's chat containers [1]. No existing behavior is removed or altered, so regression risk is minimal.

Missing Tests: Medium Concern
The PR description leaves the "Tests added or updated" and "Coverage evidence" sections blank. For a new interactive component, I'd expect at least:

  • Unit tests for MessageNavigation.tsx verifying it renders bookmark items from the message list and fires the correct callback on click
  • Tests for the scroll/jump logic in MessageList.tsx confirming data-message-id attributes are applied and that programmatic scroll targets the correct element
  • Edge-case coverage: empty conversation, single message, very long conversations

Given that no dedicated UI test infrastructure exists in the indexed repos yet, this may be an accepted gap — but it should be explicitly documented in the "Known risk / rollback" section.

Docs Impact: None
This is a client-side UX enhancement with no API, config, or behavioral contract changes. No documentation updates are needed.

Desktop Startup Risk: Negligible
The changes are scoped to chat message rendering components. Unless MessageNavigation.tsx introduces a heavy dependency or blocking initialization logic, it should not affect app launch time. Worth confirming the component lazy-loads or renders only after the chat view mounts.

CLI Core Impact: None
This PR is entirely within the desktop chat UI layer — no CLI paths, agent-loop logic, or provider/runtime code are touched.

Summary: The feature is well-scoped and low-risk. The main gap is the absence of test coverage documentation. I'd recommend either adding lightweight component tests or explicitly noting in the PR why they're deferred (e.g., pending test infra setup) so reviewers have the full picture.


Leave Feedback Ask Dosu about cc-haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:desktop enhancement New feature or request needs-maintainer-approval size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants