Skip to content

fix(web): correct two-prompt anchor selection - #204

Merged
elkaix merged 1 commit into
mainfrom
fix/prompt-anchor-selection
Aug 26, 2026
Merged

fix(web): correct two-prompt anchor selection#204
elkaix merged 1 commit into
mainfrom
fix/prompt-anchor-selection

Conversation

@elkaix

@elkaix elkaix commented Aug 26, 2026

Copy link
Copy Markdown
Member

Related Issue

Direct user report; no GitHub issue.

Problem

With exactly two prompts, bottom-follow state kept the second prompt active while the user hovered, focused, or selected the first prompt. The anchor could therefore show both prompts as selected or return to the second prompt during smooth scrolling.

What changed

  • Separate the visually highlighted row from the viewport-active row.
  • Keep an explicitly selected prompt active while smooth scrolling starts.
  • Add the exact two-prompt hover, focus, and click regression coverage.
  • Rebuild the committed web bundle and add a patch changeset.

Verification

  • Web tests: 997 passed.
  • Web and root type checks passed.
  • Root lint passed with no errors.
  • Web build and committed-asset freshness check passed.
  • Light and dark visual checks passed.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (direct user report; no issue exists).
  • I have added tests that prove the fix works.
  • Ran gen-changesets skill.
  • This PR needs no documentation update.

Summary by CodeRabbit

  • Bug Fixes

    • Improved conversation navigation when multiple prompts are present.
    • Selecting a prompt in the table of contents now remains consistent during scrolling.
    • Updated row highlighting to correctly prioritize hover, focus, and selected states.
  • Web Experience

    • Refreshed bundled web assets and diagram support for a more reliable application build.

Keep hover, focus, and explicit click selection independent from viewport follow state. This prevents the second prompt from remaining highlighted in two-prompt conversations.
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2b4c5762-0ec4-49ad-92f4-87549de4f843

📥 Commits

Reviewing files that changed from the base of the PR and between 9f5f5bf and 35e4436.

📒 Files selected for processing (98)
  • .changeset/fix-prompt-anchor-selection.md
  • apps/pythinker-code/dist-web/.web-bundle-manifest.json
  • apps/pythinker-code/dist-web/assets/CodeBlockNode-DAbIT1YQ.js
  • apps/pythinker-code/dist-web/assets/DesignSystemView-CNvCSVFt.js
  • apps/pythinker-code/dist-web/assets/Tooltip-ZudMQ-r0.js
  • apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-Bll7_2rX.js
  • apps/pythinker-code/dist-web/assets/arc-i3Cwndrc.js
  • apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-Db1hZGe5.js
  • apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-cr4vjQ1P.js
  • apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-B3GT8xij.js
  • apps/pythinker-code/dist-web/assets/channel-CRmZXxAS.js
  • apps/pythinker-code/dist-web/assets/channel-Ciw2qhjx.js
  • apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-DcbCvFbW.js
  • apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-baBluNR7.js
  • apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-B_4WdsPc.js
  • apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CmxioZig.js
  • apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-DsFB3Fti.js
  • apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-C-wDwoC0.js
  • apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-Tp7S0w--.js
  • apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-D_60I4PC.js
  • apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-BOyQwG-7.js
  • apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-9LZ2e6T0.js
  • apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-D0aRBW2X.js
  • apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-9LZ2e6T0.js
  • apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-D0aRBW2X.js
  • apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-DvKBGuII.js
  • apps/pythinker-code/dist-web/assets/cssMode-gWA3VTCg.js
  • apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-Byg0NdnJ.js
  • apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-ByoPUflO.js
  • apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-u-A10G9p.js
  • apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-a3q2B2N3.js
  • apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-B3tc4iew.js
  • apps/pythinker-code/dist-web/assets/diagram-VSXAHHWV-wfPgWSzf.js
  • apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-ano3VTet.js
  • apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DwH3hi_j.js
  • apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-fqbVOO6I.js
  • apps/pythinker-code/dist-web/assets/editor.main-CUgPnB4r.js
  • apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-DBkUSbm0.js
  • apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-B55b-50s.js
  • apps/pythinker-code/dist-web/assets/freemarker2-BLqTDIvk.js
  • apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DkUtPT3S.js
  • apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-BwFh1DGV.js
  • apps/pythinker-code/dist-web/assets/handlebars-Dt6_fHq4.js
  • apps/pythinker-code/dist-web/assets/html-DNZRtspS.js
  • apps/pythinker-code/dist-web/assets/htmlMode-CNwKQEFk.js
  • apps/pythinker-code/dist-web/assets/index-CKVuDqnW.js
  • apps/pythinker-code/dist-web/assets/index-CZhX7oJU.css
  • apps/pythinker-code/dist-web/assets/index-D9Nz1t7z.js
  • apps/pythinker-code/dist-web/assets/index-at2nKQ9b.js
  • apps/pythinker-code/dist-web/assets/index-tKxZRbcu.js
  • apps/pythinker-code/dist-web/assets/index10-D9W-n1aP.js
  • apps/pythinker-code/dist-web/assets/index11-D2xpmxp_.js
  • apps/pythinker-code/dist-web/assets/index5-DA0ZmzsV.js
  • apps/pythinker-code/dist-web/assets/index6-D50HseCy.js
  • apps/pythinker-code/dist-web/assets/index7-DPemc_3e.js
  • apps/pythinker-code/dist-web/assets/index8-DbXzFaJO.js
  • apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-BRTvYe1X.js
  • apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-BVwPbQXn.js
  • apps/pythinker-code/dist-web/assets/javascript-BsIpPAMU.js
  • apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-BojULxF8.js
  • apps/pythinker-code/dist-web/assets/jsonMode-DBSMQpjf.js
  • apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-CJ6Ryr5x.js
  • apps/pythinker-code/dist-web/assets/layout-BZTUGqmN.js
  • apps/pythinker-code/dist-web/assets/linear-DnyH2I-x.js
  • apps/pythinker-code/dist-web/assets/liquid-PbV9SRs8.js
  • apps/pythinker-code/dist-web/assets/lspLanguageFeatures-BxKarwGx.js
  • apps/pythinker-code/dist-web/assets/mdx-6vkE1AZK.js
  • apps/pythinker-code/dist-web/assets/mermaid.core-D6Xg32pF.js
  • apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-7ciIqqxG.js
  • apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-wfnagsjR.js
  • apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-DhlCgfPE.js
  • apps/pythinker-code/dist-web/assets/python-OQiB2MoN.js
  • apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-CM5bQoYO.js
  • apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-BwlyJaCi.js
  • apps/pythinker-code/dist-web/assets/razor-C5WSpCq4.js
  • apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CfJXScDi.js
  • apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-CBJH_lza.js
  • apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-Ps_-YPM0.js
  • apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-CWV7CJ5p.js
  • apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-CTXuOFHJ.js
  • apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-CibQ_uPc.js
  • apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-DHo0DYww.js
  • apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-Cpu1Tv6J.js
  • apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-CWZwvd-3.js
  • apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-pddQXmuq.js
  • apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-zg0jYTbx.js
  • apps/pythinker-code/dist-web/assets/tsMode-DVpap0Ub.js
  • apps/pythinker-code/dist-web/assets/typescript-Cev6QPda.js
  • apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-COP9XdTb.js
  • apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-BBYPRgFY.js
  • apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-DzNaKtLK.js
  • apps/pythinker-code/dist-web/assets/xml-CSRj6A38.js
  • apps/pythinker-code/dist-web/assets/xychartDiagram-S5SC5T6Z-DbC2NYN9.js
  • apps/pythinker-code/dist-web/assets/yaml-dB1gSO3c.js
  • apps/pythinker-code/dist-web/index.html
  • apps/pythinker-web/src/components/chat/ConversationPane.vue
  • apps/pythinker-web/src/components/chat/ConversationToc.vue
  • apps/pythinker-web/test/conversation-toc.test.ts

📝 Walkthrough

Walkthrough

The change fixes prompt selection in conversations with two prompts. It separates TOC highlighting from viewport activity, adds related tests, and refreshes generated web assets with new Mermaid, editor, runtime, and diagram bundles.

Changes

Prompt anchor selection and web bundle

Layer / File(s) Summary
Conversation TOC selection behavior
apps/pythinker-web/src/components/chat/ConversationPane.vue, apps/pythinker-web/src/components/chat/ConversationToc.vue, apps/pythinker-web/test/conversation-toc.test.ts, .changeset/fix-prompt-anchor-selection.md
The TOC now prioritizes hover and focus highlighting, preserves explicitly selected prompts during scrolling, and limits bottom activation to auto-follow mode. Tests cover two-prompt navigation and highlighting.
Generated Mermaid diagram modules
apps/pythinker-code/dist-web/assets/*Diagram*.js, apps/pythinker-code/dist-web/assets/*diagram*.js, apps/pythinker-code/dist-web/assets/sizeCapture-*.js
Generated Sankey, state, timeline, Venn, Wardley, XY chart, class, and swimlanes modules are included with parsers, databases, renderers, styles, and related utilities.
Generated editor and runtime modules
apps/pythinker-code/dist-web/assets/tsMode-*.js, apps/pythinker-code/dist-web/assets/typescript-*.js, apps/pythinker-code/dist-web/assets/xml-*.js, apps/pythinker-code/dist-web/assets/yaml-*.js, apps/pythinker-code/dist-web/assets/vue.runtime-*.js
Generated TypeScript language services, editor language definitions, XML and YAML support, and the Vue runtime bundle are added.
Generated bundle asset references
apps/pythinker-code/dist-web/.web-bundle-manifest.json, apps/pythinker-code/dist-web/index.html, apps/pythinker-code/dist-web/assets/*
Generated imports, dynamic imports, dependency maps, manifest hashes, and HTML references now point to refreshed hashed JavaScript and CSS assets.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Warning

Some tools did not complete. Review the errors below.

🔧 ast-grep (0.45.2)
apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-Byg0NdnJ.js

ast-grep timed out on this file

apps/pythinker-code/dist-web/.web-bundle-manifest.json

ast-grep did not scan this file: retry isolation stopped after a systemic timeout or after exhausting the retry isolation budget

apps/pythinker-code/dist-web/assets/CodeBlockNode-DAbIT1YQ.js

ast-grep did not scan this file: retry isolation stopped after a systemic timeout or after exhausting the retry isolation budget

  • 20 others

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pymodel/pythinker-code@35e4436
npx https://pkg.pr.new/@pymodel/pythinker-code@35e4436

commit: 35e4436

Comment thread apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CmxioZig.js
Comment thread apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CmxioZig.js
@elkaix
elkaix merged commit 2d76cad into main Aug 26, 2026
26 of 27 checks passed
@elkaix
elkaix deleted the fix/prompt-anchor-selection branch August 26, 2026 10:15
elkaix pushed a commit that referenced this pull request Aug 27, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @pymodel/pythinker-code@1.4.0

### Minor Changes

- [#188](#188)
[`0097afc`](0097afc)
Thanks [@elkaix](https://github.com/elkaix)! - Remove the
`--allow-remote-terminals` flag from `pythinker web`; PTY terminal
routes now stay available on loopback binds only.

- [#188](#188)
[`0097afc`](0097afc)
Thanks [@elkaix](https://github.com/elkaix)! - Add
`PYTHINKER_CODE_INFINITE_RETRY=1` to retry every failed model request
indefinitely with backoff instead of failing the turn, for long
unattended runs.

- [#208](#208)
[`bd0eadd`](bd0eadd)
Thanks [@elkaix](https://github.com/elkaix)! - Add an option to reveal
saved plan files in your file manager. Select Reveal in file manager
from a saved plan.

### Patch Changes

- [#188](#188)
[`0097afc`](0097afc)
Thanks [@elkaix](https://github.com/elkaix)! - Silence the
MaxListenersExceededWarning that could appear during long agent turns
with many parallel tool calls.

- [#188](#188)
[`0097afc`](0097afc)
Thanks [@elkaix](https://github.com/elkaix)! - Fix messages sent from
one web client not appearing on other clients connected to the same
session.

- [#207](#207)
[`3a1d761`](3a1d761)
Thanks [@elkaix](https://github.com/elkaix)! - Fix context usage updates
in interactive clients.

- [#214](#214)
[`48510be`](48510be)
Thanks [@elkaix](https://github.com/elkaix)! - Complete a Codex sign-in
as soon as the browser tab becomes visible again, not only when the
window regains focus.

- [#201](#201)
[`5f087d8`](5f087d8)
Thanks [@elkaix](https://github.com/elkaix)! - Make the chat prompt
anchor a compact line index that opens prompt and response previews.

- [#188](#188)
[`0097afc`](0097afc)
Thanks [@elkaix](https://github.com/elkaix)! - Persist a picked thinking
effort as the default only up to the model's own default effort; a more
expensive pick stays session-only.

- [#204](#204)
[`2d76cad`](2d76cad)
Thanks [@elkaix](https://github.com/elkaix)! - Fix prompt anchor
selection when a conversation has two prompts.

- [#198](#198)
[`6be446e`](6be446e)
Thanks [@elkaix](https://github.com/elkaix)! - Wrap narrow Changes
editor lines while keeping line numbers visible.

- [#207](#207)
[`3a1d761`](3a1d761)
Thanks [@elkaix](https://github.com/elkaix)! - Fix session history after
steering or undoing a turn.

- [#211](#211)
[`7040eed`](7040eed)
Thanks [@elkaix](https://github.com/elkaix)! - Add a setting to pin
every subagent to the selected model, use the dark banner in every
sidebar, and show Pythinker desktop updates as one continuous download.

- [#188](#188)
[`0097afc`](0097afc)
Thanks [@elkaix](https://github.com/elkaix)! - Show the /plugins
marketplace catalog as soon as it loads, with latest-version lookups
running in the background.

- [#192](#192)
[`8b6cc70`](8b6cc70)
Thanks [@elkaix](https://github.com/elkaix)! - Preserve subagent model
aliases when provider models refresh.

- [#215](#215)
[`e4ed37f`](e4ed37f)
Thanks [@elkaix](https://github.com/elkaix)! - Fix a resumed session
showing a stale "manually stopped" or failed state when its last turn
had actually completed.

- [#198](#198)
[`6be446e`](6be446e)
Thanks [@elkaix](https://github.com/elkaix)! - Show available desktop
updates as a sidebar button with release notes and update controls.

- [#192](#192)
[`8b6cc70`](8b6cc70)
Thanks [@elkaix](https://github.com/elkaix)! - Stop goal turns when
automatic context compaction is cancelled or fails.

- [#192](#192)
[`8b6cc70`](8b6cc70)
Thanks [@elkaix](https://github.com/elkaix)! - Let subagents inherit the
calling agent model from the Agent settings tab.

- [#188](#188)
[`0097afc`](0097afc)
Thanks [@elkaix](https://github.com/elkaix)! - Fix foreground subagents
being reported as background tasks on the task list.

- [#201](#201)
[`5f087d8`](5f087d8)
Thanks [@elkaix](https://github.com/elkaix)! - Use theme-matched
Pythinker banners in the sidebar.

- [#207](#207)
[`3a1d761`](3a1d761)
Thanks [@elkaix](https://github.com/elkaix)! - Fix loss of large tool
outputs in long conversations.

- [#213](#213)
[`0753f13`](0753f13)
Thanks [@elkaix](https://github.com/elkaix)! - Fix the "manually
stopped" state lingering after undoing the interrupted turn.

- [#198](#198)
[`6be446e`](6be446e)
Thanks [@elkaix](https://github.com/elkaix)! - Replace the sidebar robot
icon with the Pythinker Code banner.
## pythinker@0.9.6

### Patch Changes

- [#188](#188)
[`0097afc`](0097afc)
Thanks [@elkaix](https://github.com/elkaix)! - Persist a picked thinking
effort as the default only up to the model's own default effort; a more
expensive pick stays session-only.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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