fix: apply review fixes, update version to v0.20, add Sprint 18 changelog
- Fix stale tree cache: clear _dirCache and _expandedDirs on root nav - Fix clearPreview: prompt before discarding unsaved preview edits - Update UI version label from v0.17.1 to v0.20 - Add Sprint 18 entry to CHANGELOG.md - Update SPRINTS.md current state to v0.20 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
37
CHANGELOG.md
37
CHANGELOG.md
@@ -5,6 +5,41 @@
|
||||
|
||||
---
|
||||
|
||||
## [v0.20] Sprint 18 -- File Preview Auto-Close + Thinking Display + Workspace Tree
|
||||
*April 3, 2026 | 318 tests*
|
||||
|
||||
### Features
|
||||
- **File preview auto-close on directory navigation.** When viewing a file in
|
||||
the right panel and navigating directories (breadcrumbs, up button, folder
|
||||
clicks), the preview now automatically closes instead of showing stale
|
||||
content. `clearPreview()` extracted as named function and called from
|
||||
`loadDir()`. Unsaved preview edits prompt for confirmation before discarding.
|
||||
- **Thinking/reasoning display.** Assistant messages with structured content
|
||||
arrays containing `type:'thinking'` or `type:'reasoning'` blocks (Claude
|
||||
extended thinking, o3 reasoning) now render as collapsible gold-themed cards
|
||||
above the response text. Collapsed by default. Click the header to expand and
|
||||
see the model's reasoning process. Uses `esc()` on all content for XSS safety.
|
||||
- **Workspace tree view (Issue #22).** Directories expand/collapse in-place
|
||||
with toggle arrows. Single-click toggles a directory open/closed. Double-click
|
||||
navigates into it (breadcrumb view). Subdirectory contents fetched lazily from
|
||||
the API and cached in `S._dirCache`. Nesting depth shown via indentation.
|
||||
Empty directories show "(empty)" placeholder. Breadcrumb navigation still
|
||||
works alongside the tree view.
|
||||
|
||||
### Bug Fixes
|
||||
- **Stale tree cache on session switch.** `S._dirCache` and `S._expandedDirs`
|
||||
are now cleared when navigating to the root directory, preventing session B
|
||||
from showing session A's cached file listings.
|
||||
- **clearPreview() discards unsaved edits.** Navigation now checks
|
||||
`_previewDirty` and prompts before discarding unsaved preview changes.
|
||||
|
||||
### Architecture
|
||||
- `clearPreview()` extracted from inline handler to named function in `boot.js`.
|
||||
- Thinking card styles added to `style.css` (gold-themed, collapsible).
|
||||
- Tree toggle and empty-directory styles added to `style.css`.
|
||||
|
||||
---
|
||||
|
||||
## [v0.19] Sprint 17 -- Workspace Polish + Slash Commands + Settings
|
||||
*April 3, 2026 | 318 tests*
|
||||
|
||||
@@ -614,4 +649,4 @@ Three-panel layout: sessions sidebar, chat area, workspace panel.
|
||||
|
||||
---
|
||||
|
||||
*Last updated: v0.18.1, April 2, 2026 | Tests: 289*
|
||||
*Last updated: v0.20, April 3, 2026 | Tests: 318*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Hermes Web UI -- Forward Sprint Plan
|
||||
|
||||
> Current state: v0.19 | 318 tests | Daily driver ready
|
||||
> Current state: v0.20 | 318 tests | Daily driver ready
|
||||
> This document plans the path from here to two targets:
|
||||
>
|
||||
> Target A: 1:1 feature parity with the Hermes CLI (everything you can do from the
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<body>
|
||||
<div class="layout">
|
||||
<aside class="sidebar">
|
||||
<div class="sidebar-header"><div class="logo">H</div><div><h1 style="margin:0;font-size:15px;font-weight:700;letter-spacing:-.01em">Hermes</h1><div style="font-size:10px;color:var(--muted);opacity:.8;margin-top:1px">v0.17.1</div></div></div>
|
||||
<div class="sidebar-header"><div class="logo">H</div><div><h1 style="margin:0;font-size:15px;font-weight:700;letter-spacing:-.01em">Hermes</h1><div style="font-size:10px;color:var(--muted);opacity:.8;margin-top:1px">v0.20</div></div></div>
|
||||
<div class="sidebar-nav">
|
||||
<button class="nav-tab active" data-panel="chat" data-label="Chat" onclick="switchPanel('chat')" title="Chat">💬</button>
|
||||
<button class="nav-tab" data-panel="tasks" data-label="Tasks" onclick="switchPanel('tasks')" title="Tasks">📅</button>
|
||||
|
||||
@@ -9,10 +9,17 @@ async function api(path,opts={}){
|
||||
async function loadDir(path){
|
||||
if(!S.session)return;
|
||||
try{
|
||||
if(!path||path==='.'){ S._dirCache={}; if(S._expandedDirs)S._expandedDirs=new Set(); }
|
||||
S.currentDir=path||'.';
|
||||
const data=await api(`/api/list?session_id=${encodeURIComponent(S.session.session_id)}&path=${encodeURIComponent(path)}`);
|
||||
S.entries=data.entries||[];renderBreadcrumb();renderFileTree();
|
||||
if(typeof clearPreview==='function')clearPreview();
|
||||
if(typeof clearPreview==='function'){
|
||||
if(typeof _previewDirty!=='undefined'&&_previewDirty){
|
||||
if(confirm('You have unsaved changes in the preview. Discard and navigate?'))clearPreview();
|
||||
}else{
|
||||
clearPreview();
|
||||
}
|
||||
}
|
||||
}catch(e){console.warn('loadDir',e);}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user