Review incoming tasks and manage recurring Oliver work across your connected apps.
+
-
Loading routines...
+
+
+
+
+
+
+
+ Active
+
+
+ History
+
+
+
@@ -2390,6 +2444,7 @@
Buy More Hours
lark: 'lark-oauth-btn'
};
const RECOMMENDATION_SECTION_LABELS = {
+ 'section-work': 'Open Work',
'section-channels': 'Open Connected Apps',
'section-memo': 'Open Memory',
'section-routines': 'Open Routines',
@@ -2415,6 +2470,7 @@
Buy More Hours
let cachedIdentifiers = [];
let cachedTasks = [];
let cachedRoutines = { active: [], history: [] };
+ let activeWorkView = 'tasks';
let activeRoutineTab = 'active';
let routineActionBusyIds = new Set();
let routineActionErrors = {};
@@ -2541,6 +2597,74 @@
Buy More Hours
});
}
+ function normalizeWorkView(view) {
+ return view === 'routines' ? 'routines' : 'tasks';
+ }
+
+ // Preserve legacy dashboard anchors by routing old Tasks/Routines hashes into
+ // the unified Work section and selecting the matching top-level tab.
+ function resolveDashboardSectionTarget(sectionId) {
+ const normalizedSectionId = String(sectionId || '').replace(/^#/, '');
+ if (!normalizedSectionId) {
+ return null;
+ }
+ if (normalizedSectionId === 'section-tasks') {
+ return {
+ requestedSectionId: normalizedSectionId,
+ targetSectionId: 'section-work',
+ workView: 'tasks'
+ };
+ }
+ if (normalizedSectionId === 'section-routines') {
+ return {
+ requestedSectionId: normalizedSectionId,
+ targetSectionId: 'section-work',
+ workView: 'routines'
+ };
+ }
+ return {
+ requestedSectionId: normalizedSectionId,
+ targetSectionId: normalizedSectionId,
+ workView: null
+ };
+ }
+
+ function syncWorkViewHash(view) {
+ const nextHash = normalizeWorkView(view) === 'routines' ? '#section-routines' : '#section-tasks';
+ const nextUrl = `${window.location.pathname}${window.location.search}${nextHash}`;
+ window.history.replaceState({}, document.title, nextUrl);
+ }
+
+ function setActiveWorkView(nextView, options = {}) {
+ const { syncHash = false } = options;
+ activeWorkView = normalizeWorkView(nextView);
+
+ const tasksButton = document.getElementById('work-view-tab-tasks');
+ const routinesButton = document.getElementById('work-view-tab-routines');
+ const tasksPanel = document.getElementById('work-view-panel-tasks');
+ const routinesPanel = document.getElementById('work-view-panel-routines');
+ const tasksActive = activeWorkView === 'tasks';
+
+ if (tasksButton) {
+ tasksButton.classList.toggle('is-active', tasksActive);
+ tasksButton.setAttribute('aria-selected', tasksActive ? 'true' : 'false');
+ }
+ if (routinesButton) {
+ routinesButton.classList.toggle('is-active', !tasksActive);
+ routinesButton.setAttribute('aria-selected', tasksActive ? 'false' : 'true');
+ }
+ if (tasksPanel) {
+ tasksPanel.hidden = !tasksActive;
+ }
+ if (routinesPanel) {
+ routinesPanel.hidden = tasksActive;
+ }
+
+ if (syncHash) {
+ syncWorkViewHash(activeWorkView);
+ }
+ }
+
function hideExistingAccountOptions() {
existingAccountContainer?.classList.add('hidden');
}
@@ -3520,17 +3644,25 @@
${memoryTitle}
}
function openDashboardSection(sectionId) {
- const normalizedSectionId = String(sectionId || '').replace(/^#/, '');
- if (!normalizedSectionId) {
+ const resolvedSection = resolveDashboardSectionTarget(sectionId);
+ if (!resolvedSection) {
return false;
}
- const target = document.getElementById(normalizedSectionId);
+ if (resolvedSection.workView) {
+ setActiveWorkView(resolvedSection.workView);
+ }
+
+ const target = document.getElementById(resolvedSection.targetSectionId);
if (!target) {
return false;
}
- window.location.hash = normalizedSectionId;
+ window.history.replaceState(
+ {},
+ document.title,
+ `${window.location.pathname}${window.location.search}#${resolvedSection.requestedSectionId}`
+ );
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
window.setTimeout(updateSidebarNavigation, 150);
return true;
@@ -4549,9 +4681,17 @@
if (!hash || !hash.startsWith('#section-')) {
return;
}
- const target = document.querySelector(hash);
+ const resolvedSection = resolveDashboardSectionTarget(hash);
+ if (!resolvedSection) {
+ return;
+ }
+ if (resolvedSection.workView) {
+ setActiveWorkView(resolvedSection.workView);
+ }
+ const target = document.getElementById(resolvedSection.targetSectionId);
if (target) {
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
+ window.setTimeout(updateSidebarNavigation, 150);
}
}
@@ -4774,6 +4914,7 @@
cachedIdentifiers = [];
cachedTasks = [];
cachedRoutines = { active: [], history: [] };
+ activeWorkView = 'tasks';
activeRoutineTab = 'active';
routineActionBusyIds = new Set();
routineActionErrors = {};
@@ -6532,6 +6673,12 @@
}
});
+ document.querySelectorAll('[data-work-view]').forEach((button) => {
+ button.addEventListener('click', () => {
+ setActiveWorkView(button.dataset.workView, { syncHash: true });
+ });
+ });
+
document.querySelectorAll('[data-routine-tab]').forEach((button) => {
button.addEventListener('click', () => {
switchRoutineTab(button.dataset.routineTab);
@@ -6546,6 +6693,10 @@
}
});
+ window.addEventListener('hashchange', () => {
+ scrollToDashboardHashTarget();
+ });
+
// Handle OAuth callback - manually parse hash and set session
async function handleOAuthCallback() {
const hash = window.location.hash;