feat: productivity suite — task loop, workflow, theming, docs & more #197

Merged
naomi merged 16 commits from feat/productivity into main 2026-03-07 03:08:33 -08:00
Showing only changes of commit e9a9ffc9ab - Show all commits
+14 -7
View File
@@ -59,20 +59,27 @@
currentConversationId = newId;
// Peek at the saved position to set windowStart before the first tick,
// preventing a stale windowStart from a previous conversation leaving
// visibleLines empty (windowStart >= lines.length).
const savedPosition = claudeStore.getScrollPosition(newId);
if (savedPosition === -1) {
// Will auto-scroll: pin the window to the tail of the new conversation
shouldAutoScroll = true;
windowStart = Math.max(0, lines.length - WINDOW_SIZE);
} else {
// Will restore a specific position: always start from the top of history
shouldAutoScroll = false;
windowStart = 0;
}
// Restore scroll position for the new conversation after DOM updates
await tick();
if (terminalElement) {
const savedPosition = claudeStore.getScrollPosition(newId);
isRestoringScroll = true;
if (savedPosition === -1) {
// Auto-scroll to bottom — window reactive statement will advance windowStart
shouldAutoScroll = true;
terminalElement.scrollTop = terminalElement.scrollHeight;
} else {
// Restore to saved position — show from the beginning of history
windowStart = 0;
shouldAutoScroll = false;
await tick();
terminalElement.scrollTop = savedPosition;
}
// Small delay to prevent the scroll handler from overriding our restore