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
|
toggle for existing schedules. Schedules list driven by
|
||||||
GET /api/schedules; POST /api/schedules to create, PATCH
|
GET /api/schedules; POST /api/schedules to create, PATCH
|
||||||
/api/schedules/{id} to edit, POST /api/schedules/{id}/cancel
|
/api/schedules/{id} to edit, POST /api/schedules/{id}/cancel
|
||||||
for per-target / whole-row cancel. No SchedulesChanged SSE
|
for per-target / whole-row cancel. Live updates via
|
||||||
event yet, so the list re-fetches on tab activation + after
|
`schedules_changed` SSE; tab activation re-fetches as a
|
||||||
each submit / cancel. See docs/web-ui.md::SCH3DUL3S tab. -->
|
safety net for disconnect windows.
|
||||||
|
See docs/web-ui.md::SCH3DUL3S tab. -->
|
||||||
<section class="tab-pane" id="tab-pane-schedules"
|
<section class="tab-pane" id="tab-pane-schedules"
|
||||||
role="tabpanel" aria-labelledby="tab-schedules">
|
role="tabpanel" aria-labelledby="tab-schedules">
|
||||||
<h2>◆ SCH3DUL3S ◆</h2>
|
<h2>◆ SCH3DUL3S ◆</h2>
|
||||||
|
|
@ -245,8 +246,9 @@
|
||||||
on this tab so the operator has one place for everything
|
on this tab so the operator has one place for everything
|
||||||
that fires at a future time — operator-set schedules
|
that fires at a future time — operator-set schedules
|
||||||
above, agent-self reminders here. Backed by GET
|
above, agent-self reminders here. Backed by GET
|
||||||
/api/reminders; refresh handled by refreshReminders()
|
/api/reminders; live updates via `reminders_changed` SSE;
|
||||||
(called from refreshState). -->
|
refreshReminders() called from refreshState + tab
|
||||||
|
activation as safety net for disconnect windows. -->
|
||||||
<h2>◆ QU3U3D R3M1ND3RS ◆</h2>
|
<h2>◆ QU3U3D R3M1ND3RS ◆</h2>
|
||||||
<div class="divider">══════════════════════════════════════════════════════════════</div>
|
<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>
|
<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 ──────────────────────────────────────────────────────────
|
||||||
// Reminders aren't part of /api/state (separate sqlite table, separate
|
// Reminders aren't part of /api/state (separate sqlite table, separate
|
||||||
// mutation cadence). Refresh fires alongside refreshState() so a
|
// mutation cadence). refreshReminders() is called from refreshState() for
|
||||||
// cancel POST or a cold load both reflect within the same tick. A
|
// cold-load and reconnect recovery. Live mutations are covered by the
|
||||||
// periodic poll isn't necessary — new reminders are queued by the
|
// `reminders_changed` SSE event → `applyRemindersChanged` so no periodic
|
||||||
// agents themselves and the operator already sees them next time
|
// poll is needed.
|
||||||
// they interact with the page.
|
|
||||||
async function refreshReminders() {
|
async function refreshReminders() {
|
||||||
const liveRoot = $('reminders-section');
|
const liveRoot = $('reminders-section');
|
||||||
if (!liveRoot) return;
|
if (!liveRoot) return;
|
||||||
|
|
@ -3664,8 +3663,10 @@ window.marked = marked;
|
||||||
updateTabbarOverflow();
|
updateTabbarOverflow();
|
||||||
// Re-fetch schedules on activation as a safety net (SSE covers
|
// Re-fetch schedules on activation as a safety net (SSE covers
|
||||||
// live mutations but re-sync ensures consistency after disconnect
|
// live mutations but re-sync ensures consistency after disconnect
|
||||||
// windows or approval-path inserts that don't yet emit).
|
// windows or approval-path inserts that don't yet emit). Also
|
||||||
if (target === 'schedules') refreshSchedules();
|
// 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;
|
// Permissions tables (capabilities + tool-groups) have no SSE channel;
|
||||||
// fetch both on each activation so the operator sees fresh data.
|
// fetch both on each activation so the operator sees fresh data.
|
||||||
if (target === 'permissions') {
|
if (target === 'permissions') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue