fix(dashboard): refresh reminders on SCH3DUL3S tab activation + update stale comments
- activateTab('schedules') now calls both refreshSchedules() and
refreshReminders() since both sections live on the same tab.
(The previous SYST3M/system target was wrong.)
- Update index.html comment to reflect schedules_changed SSE coverage
- Update index.html reminders comment to mention reminders_changed SSE
- Update tabs.js reminders section comment to reflect SSE coverage
This commit is contained in:
parent
a1e46e2b3d
commit
d0b038e17d
2 changed files with 15 additions and 12 deletions
|
|
@ -2375,11 +2375,10 @@ window.marked = marked;
|
|||
|
||||
// ─── reminders ──────────────────────────────────────────────────────────
|
||||
// Reminders aren't part of /api/state (separate sqlite table, separate
|
||||
// mutation cadence). Refresh fires alongside refreshState() so a
|
||||
// cancel POST or a cold load both reflect within the same tick. A
|
||||
// periodic poll isn't necessary — new reminders are queued by the
|
||||
// agents themselves and the operator already sees them next time
|
||||
// they interact with the page.
|
||||
// mutation cadence). refreshReminders() is called from refreshState() for
|
||||
// cold-load and reconnect recovery. Live mutations are covered by the
|
||||
// `reminders_changed` SSE event → `applyRemindersChanged` so no periodic
|
||||
// poll is needed.
|
||||
async function refreshReminders() {
|
||||
const liveRoot = $('reminders-section');
|
||||
if (!liveRoot) return;
|
||||
|
|
@ -3664,8 +3663,10 @@ window.marked = marked;
|
|||
updateTabbarOverflow();
|
||||
// Re-fetch schedules on activation as a safety net (SSE covers
|
||||
// live mutations but re-sync ensures consistency after disconnect
|
||||
// windows or approval-path inserts that don't yet emit).
|
||||
if (target === 'schedules') refreshSchedules();
|
||||
// windows or approval-path inserts that don't yet emit). Also
|
||||
// re-fetch reminders on SCH3DUL3S activation since both sections
|
||||
// live on the same tab.
|
||||
if (target === 'schedules') { refreshSchedules(); refreshReminders(); }
|
||||
// Permissions tables (capabilities + tool-groups) have no SSE channel;
|
||||
// fetch both on each activation so the operator sees fresh data.
|
||||
if (target === 'permissions') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue