Skip to content

Conversation

@hewliyang
Copy link
Contributor

@hewliyang hewliyang commented Jan 24, 2026

Added highlighting of the active path
&
Active item in the tree can now be the selected message instead of the leaf of the active path

Screen.Recording.2026-01-24.at.16.14.21.mov

@hewliyang hewliyang changed the title fix(coding-agent): improve HTML export tree navigation and add active path highlighting chore(coding-agent): improve HTML export tree navigation and add active path highlighting Jan 24, 2026
@hewliyang hewliyang force-pushed the hly/fix/share-html-tree-nav-scroll branch from d958f9a to 193b29b Compare January 24, 2026 08:26
@hewliyang hewliyang changed the title chore(coding-agent): improve HTML export tree navigation and add active path highlighting chore(coding-agent): add active path highlighting to html exports Jan 25, 2026
@hewliyang hewliyang changed the title chore(coding-agent): add active path highlighting to html exports chore(coding-agent): add active path highlighting in html exports Jan 25, 2026
hewliyang added a commit to hewliyang/pi-mono that referenced this pull request Jan 25, 2026
- Remove unused childrenMap, findBranchLeaf, handleTreeNodeClick, scrollToEntry
- Split changelog entry: navigation (badlogic#853 by @mitsuhiko), highlighting (badlogic#929 by @hewliyang)
@hewliyang hewliyang changed the title chore(coding-agent): add active path highlighting in html exports Add active path highlighting in html exports Jan 25, 2026
…ating branch

Previously, clicking a message in the sidebar tree would set that message
as the new leaf, causing getPath() to only return messages up to that point
and hiding all messages below it.

Now handleTreeNodeClick() checks if the clicked entry is on the current path:
- If yes: just scrolls to it without re-rendering
- If no: finds the actual leaf of that branch and navigates to it, then
  scrolls to the clicked message

Added childrenMap for parent->children lookup and findBranchLeaf() to
traverse down to a branch's leaf.
…ating branch

Previously, clicking a message in the sidebar tree would set that message
as the new leaf, causing getPath() to only return messages up to that point
and hiding all messages below it.

Now handleTreeNodeClick() checks if the clicked entry is on the current path:
- If yes: scrolls to it and updates the active marker
- If no: finds the branch's leaf, navigates to it, then scrolls to clicked message

Adds currentTargetId to track the selected entry separately from currentLeafId
(which branch to display), so the active marker follows user selection.
- Add subtle accent background tint to in-path nodes
- Dim off-path nodes to 50% opacity (restore on hover)
- Makes current branch visually distinct in tree navigation
@hewliyang hewliyang force-pushed the hly/fix/share-html-tree-nav-scroll branch from 799ae00 to 89b249c Compare January 25, 2026 15:43
hewliyang added a commit to hewliyang/pi-mono that referenced this pull request Jan 25, 2026
- Remove unused childrenMap, findBranchLeaf, handleTreeNodeClick, scrollToEntry
- Split changelog entry: navigation (badlogic#853 by @mitsuhiko), highlighting (badlogic#929 by @hewliyang)
- Remove unused childrenMap, findBranchLeaf, handleTreeNodeClick, scrollToEntry
- Split changelog entry: navigation (badlogic#853 by @mitsuhiko), highlighting (badlogic#929 by @hewliyang)
@hewliyang hewliyang force-pushed the hly/fix/share-html-tree-nav-scroll branch from 89b249c to 4fdb168 Compare January 25, 2026 15:47
@hewliyang
Copy link
Contributor Author

hewliyang commented Jan 25, 2026

Woops did not realize @mitsuhiko's #853 which implemented #572 💀

Cleaned up the dead code & removed the duplicate ### Fixes in the changelog.

@badlogic badlogic merged commit 1675824 into badlogic:main Jan 25, 2026
1 check failed
@badlogic
Copy link
Owner

Beautiful, thank you!

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.

2 participants