Skip to content

feat(app): add a conversation outline navigator - #55370

Closed
jianhao wants to merge 1 commit into
anomalyco:devfrom
jianhao:session-outline
Closed

jianhao wants to merge 1 commit into
anomalyco:devfrom
jianhao:session-outline

Conversation

@jianhao

@jianhao jianhao commented Oct 14, 2026

Copy link
Copy Markdown

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

给会话页面加一条「对话导航条」:在对话区靠书写方向末端的一侧固定一列刻度轨道,每一轮用户消息对应一个刻度。

  • 光标扫过轨道时,指针下的刻度会像风铃一样展开(相邻刻度轻微跟随),并弹出该轮提问的卡片;
  • 点击刻度直接跳到那一轮,当前所处的一轮用颜色区分;
  • 轨道本身 pointer-events: none,只有刻度接收事件,不会挡住正文的选中与点击;
  • 会话很长时先压缩刻度间距、再压缩刻度高度,整组始终保持居中、紧凑;
  • 横向只使用逻辑属性(inset-inline-end、padding-inline、flex-end),RTL 会自动镜像;滚动时每帧只有一次 rAF 节流的高度测量(读取 [data-message-id] 的行区间),且仅在桌面宽度、轮数 ≥ 2 时运行。

为什么有用:长会话只能靠滚动找回历史轮次,时间轴又很长;有这条轨道就能一眼看出有多少轮、当前在哪,并一步跳过去。

How did you verify your code works?

  • 新增 Playwright 用例 packages/app/e2e/regression/session-outline.spec.ts(轨道位置、每轮一个刻度、hover 卡片),本地通过;
  • 在 packages/app 跑 bun typecheck 通过;仓库根的 bun run check 需要先在这条分支上 bun install --frozen-lockfile(本机 node_modules 比 dev 旧),所以以 CI 为准。

Screenshots / recordings

(GIF 见下方)

outlineNavigator

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

- A compact rail of ticks pinned inside the conversation's trailing edge, one tick
  per user turn. The cursor swells the tick under it like a wind chime and opens a
  card with that turn's prompt; clicking a tick jumps to the turn.
- The rail is inert apart from the ticks, so it never blocks selecting or clicking
  the transcript underneath, and it keeps long sessions compact by shrinking the
  gap first, then the row height.
- Horizontal layout is logical only (inset-inline-end, padding-inline,
  flex-end), so RTL mirrors the rail without extra rules; the component positions
  the rail and the card vertically.
- e2e: packages/app/e2e/regression/session-outline.spec.ts covers the rail's
  position, one tick per turn and the hover card.
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot closed this Oct 14, 2026
@opencode-agent

Copy link
Copy Markdown
Contributor

Thanks for putting this together, and for the clear description and screenshot!

I think this duplicates #54088, which is still open and adds the same thing to the desktop session view: a rail with one tick per user turn, a preview of the prompt on hover, click to jump, and the current turn highlighted.

If you think #54088 is missing something from your version (the wind-chime hover effect, compressing ticks in very long sessions, RTL mirroring), it would help a lot to review, test or comment there.

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

Labels

needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants