diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index d1a3bde61..6a81a6f22 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -28,18 +28,17 @@ - Custom provider support via `pi.registerProvider()` with `streamSimple` for custom API implementations - Added `custom-provider.ts` example extension demonstrating custom Anthropic provider with OAuth -### Fixed - -- Extension `setWorkingMessage()` calls in `agent_start` handlers now work correctly; previously the message was silently ignored because the loading animation didn't exist yet ([#935](https://github.com/badlogic/pi-mono/issues/935)) -- Off-by-one error in bash output "earlier lines" count caused by counting spacing newline as hidden content ([#921](https://github.com/badlogic/pi-mono/issues/921)) - ### Changed +- HTML export: clicking a sidebar message now navigates to its newest leaf and scrolls to it, instead of truncating the branch ([#853](https://github.com/badlogic/pi-mono/pull/853) by [@mitsuhiko](https://github.com/mitsuhiko)) +- HTML export: active path is now visually highlighted with dimmed off-path nodes ([#929](https://github.com/badlogic/pi-mono/pull/929) by [@hewliyang](https://github.com/hewliyang)) - `/reload` now re-renders the entire scrollback so updated extension components are visible immediately - Skill, prompt template, and theme discovery now use settings and CLI path arrays instead of legacy filters ([#645](https://github.com/badlogic/pi-mono/issues/645)) ### Fixed +- Extension `setWorkingMessage()` calls in `agent_start` handlers now work correctly; previously the message was silently ignored because the loading animation didn't exist yet ([#935](https://github.com/badlogic/pi-mono/issues/935)) +- Off-by-one error in bash output "earlier lines" count caused by counting spacing newline as hidden content ([#921](https://github.com/badlogic/pi-mono/issues/921)) - User package filters now layer on top of manifest filters instead of replacing them ([#645](https://github.com/badlogic/pi-mono/issues/645)) - Auto-retry now handles "terminated" errors from Codex API mid-stream failures - Follow-up queue (Alt+Enter) now sends full paste content instead of `[paste #N ...]` markers ([#912](https://github.com/badlogic/pi-mono/issues/912)) diff --git a/packages/coding-agent/src/core/export-html/template.css b/packages/coding-agent/src/core/export-html/template.css index c29fa2036..d64cc0686 100644 --- a/packages/coding-agent/src/core/export-html/template.css +++ b/packages/coding-agent/src/core/export-html/template.css @@ -144,6 +144,15 @@ } .tree-node.in-path { + background: color-mix(in srgb, var(--accent) 10%, transparent); + } + + .tree-node:not(.in-path) { + opacity: 0.5; + } + + .tree-node:not(.in-path):hover { + opacity: 1; } .tree-prefix { diff --git a/packages/coding-agent/src/core/export-html/template.js b/packages/coding-agent/src/core/export-html/template.js index 25de67158..7d5edae05 100644 --- a/packages/coding-agent/src/core/export-html/template.js +++ b/packages/coding-agent/src/core/export-html/template.js @@ -665,6 +665,7 @@ // ============================================================ let currentLeafId = leafId; + let currentTargetId = urlTargetId || leafId; let treeRendered = false; function renderTree() { @@ -681,12 +682,12 @@ for (const flatNode of filtered) { const entry = flatNode.node.entry; const isOnPath = activePathIds.has(entry.id); - const isLeaf = entry.id === currentLeafId; + const isTarget = entry.id === currentTargetId; const div = document.createElement('div'); div.className = 'tree-node'; if (isOnPath) div.classList.add('in-path'); - if (isLeaf) div.classList.add('active'); + if (isTarget) div.classList.add('active'); div.dataset.id = entry.id; const prefix = buildTreePrefix(flatNode); @@ -721,10 +722,10 @@ for (const node of nodes) { const id = node.dataset.id; const isOnPath = activePathIds.has(id); - const isLeaf = id === currentLeafId; + const isTarget = id === currentTargetId; node.classList.toggle('in-path', isOnPath); - node.classList.toggle('active', isLeaf); + node.classList.toggle('active', isTarget); const marker = node.querySelector('.tree-marker'); if (marker) { @@ -1351,6 +1352,7 @@ function navigateTo(targetId, scrollMode = 'target', scrollToEntryId = null) { currentLeafId = targetId; + currentTargetId = scrollToEntryId || targetId; const path = getPath(targetId); renderTree();