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:
@@ -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