fix(voyage): remove dead console.log else-branches + announce drag-drop fallback (809a225e)

This commit is contained in:
Kjell Tore Guttormsen 2026-05-10 21:26:24 +02:00
commit 8ae51cda30

View file

@ -1443,10 +1443,10 @@ playground first-run shows a complete round-trip-able artifact.
var basePath = first.split('/')[0] || '';
if (typeof loadProjectDirectory === 'function') {
loadProjectDirectory(files, basePath);
} else {
// Step 13 not yet wired — log-only fallback for incremental delivery.
try { console.log('[voyage] project-loader: ' + files.length + ' files in ' + basePath); } catch (_) {}
}
// v4.3 Step 12 (finding 809a225e): dead else-branch removed —
// loadProjectDirectory is defined unconditionally further down
// this file, so the fallback was unreachable noise.
});
}
@ -1587,27 +1587,12 @@ playground first-run shows a complete round-trip-able artifact.
announce(filteredCount + ' fil(er) filtrert (dotfiles / node_modules / path-traversal).');
}
// Phase 5 — render dashboard if available, else log.
// Phase 5 — render dashboard.
// v4.3 Step 12 (finding 809a225e): dead else-branch removed —
// renderDashboard is defined unconditionally in this file, so
// the log-only fallback was unreachable.
if (typeof renderDashboard === 'function') {
renderDashboard(artifacts);
} else {
try {
console.log('[voyage] projectArtifacts loaded', {
basePath: artifacts.basePath,
brief: !!artifacts.brief,
plan: !!artifacts.plan,
review: !!artifacts.review,
research: artifacts.research.length,
architecture: {
overview: !!artifacts.architecture.overview,
gaps: !!artifacts.architecture.gaps,
loose: artifacts.architecture.looseFiles.length
},
progress: !!artifacts.progress,
loose: artifacts.looseFiles.length,
storageKey: artifacts.storageKey
});
} catch (_) {}
}
return artifacts;
}
@ -1693,7 +1678,11 @@ playground first-run shows a complete round-trip-able artifact.
if (typeof loadProjectDirectory === 'function') {
loadProjectDirectory(collected, basePath);
} else {
try { console.log('[voyage] drag-drop: ' + collected.length + ' files in ' + basePath); } catch (_) {}
// v4.3 Step 12 (finding 809a225e + opportunistic
// 3744d351): drag-drop is the only branch with a real
// race-condition reachability — announce via aria-live
// so AT users hear when the project couldn't be loaded.
announce('Drag-drop: kunne ikke lese prosjektmappe (' + collected.length + ' filer i ' + basePath + ').');
}
}
}