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
|
|
@ -229,9 +229,10 @@
|
|||
toggle for existing schedules. Schedules list driven by
|
||||
GET /api/schedules; POST /api/schedules to create, PATCH
|
||||
/api/schedules/{id} to edit, POST /api/schedules/{id}/cancel
|
||||
for per-target / whole-row cancel. No SchedulesChanged SSE
|
||||
event yet, so the list re-fetches on tab activation + after
|
||||
each submit / cancel. See docs/web-ui.md::SCH3DUL3S tab. -->
|
||||
for per-target / whole-row cancel. Live updates via
|
||||
`schedules_changed` SSE; tab activation re-fetches as a
|
||||
safety net for disconnect windows.
|
||||
See docs/web-ui.md::SCH3DUL3S tab. -->
|
||||
<section class="tab-pane" id="tab-pane-schedules"
|
||||
role="tabpanel" aria-labelledby="tab-schedules">
|
||||
<h2>◆ SCH3DUL3S ◆</h2>
|
||||
|
|
@ -245,8 +246,9 @@
|
|||
on this tab so the operator has one place for everything
|
||||
that fires at a future time — operator-set schedules
|
||||
above, agent-self reminders here. Backed by GET
|
||||
/api/reminders; refresh handled by refreshReminders()
|
||||
(called from refreshState). -->
|
||||
/api/reminders; live updates via `reminders_changed` SSE;
|
||||
refreshReminders() called from refreshState + tab
|
||||
activation as safety net for disconnect windows. -->
|
||||
<h2>◆ QU3U3D R3M1ND3RS ◆</h2>
|
||||
<div class="divider">══════════════════════════════════════════════════════════════</div>
|
||||
<p class="meta">reminders agents have queued for themselves but not yet delivered. cancel to drop a stuck or unwanted entry.</p>
|
||||
|
|
|
|||
|
|
@ -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