Summary
When a cron job completes, a badge (green dot with count) appears on the Tasks nav tab. But once the user opens the Tasks panel, the badge clears immediately — and there's no per-job indicator showing which job just ran. The user can't tell which cron triggered the notification without manually checking each job's "Last Output" section.
Reported by: @franksxf (Discord)
Steps to reproduce
- Have one or more scheduled cron jobs configured
- Wait for a cron job to complete
- Observe the green dot badge on the Tasks nav tab
- Click the Tasks tab to open it
- The badge clears immediately (
_cronUnreadCount resets to 0 on switchPanel('tasks'))
- The cron job list shows all jobs with name + status only — no indication of which one just ran
- The "Last Output" section shows no visual emphasis even for the job that just executed
Root cause area
panels.js — two separate gaps:
1. Badge clears on panel open, not on job view (panels.js ~line 2968):
// Clear cron badge when Tasks tab is opened
switchPanel = async function(name) {
if (name === 'tasks') { _cronUnreadCount = 0; updateCronBadge(); }
return _origSwitchPanel(name);
};
The count resets the moment the Tasks panel opens — before the user has actually seen which job ran.
2. No per-job "new run" indicator in the list (panels.js ~line 277):
for (const job of _cronList) {
const item = document.createElement('div');
item.className = 'cron-item';
item.innerHTML = `
<div class="cron-header">
<span class="cron-name">${esc(job.name)}</span>
<span class="cron-status ${status.listClass}">${esc(status.label)}</span>
</div>`;
Each row only renders name + status. There's no dot, highlight, or "new" badge on the specific job that completed.
3. "Last Output" section has no emphasis for new runs (panels.js ~line 353):
<div class="detail-card-title">${esc(t('cron_last_output'))}</div>
No visual distinction between a freshly-completed run and stale output from days ago.
Expected behavior
- When a cron job completes, a small dot or "NEW" badge appears on that specific job row in the list — persisting until the user opens that job's detail view
- The badge on the Tasks tab clears only after the user has viewed the specific job that ran (or after viewing all unread jobs)
- The "Last Output" section is visually emphasized (bold title, highlighted border, or similar) when it contains a run the user hasn't seen yet
Proposed approach
- Track which job IDs had new completions:
_cronNewJobIds = new Set() — populated alongside _cronUnreadCount in startCronPolling()
- In
loadCrons(), add a dot indicator to any job whose ID is in _cronNewJobIds
- In
openCronDetail(), remove the job ID from _cronNewJobIds and update the badge count accordingly — clear the dot on that item
- In
_renderCronDetail(), add a has-new-run CSS class to the "Last Output" card when the job is in _cronNewJobIds
Impact
Medium — affects all users with scheduled cron jobs. The notification system signals that something happened but leaves users hunting to find what. Most likely to confuse users who have multiple cron jobs configured.
Summary
When a cron job completes, a badge (green dot with count) appears on the Tasks nav tab. But once the user opens the Tasks panel, the badge clears immediately — and there's no per-job indicator showing which job just ran. The user can't tell which cron triggered the notification without manually checking each job's "Last Output" section.
Reported by: @franksxf (Discord)
Steps to reproduce
_cronUnreadCountresets to 0 onswitchPanel('tasks'))Root cause area
panels.js— two separate gaps:1. Badge clears on panel open, not on job view (
panels.js~line 2968):The count resets the moment the Tasks panel opens — before the user has actually seen which job ran.
2. No per-job "new run" indicator in the list (
panels.js~line 277):Each row only renders name + status. There's no dot, highlight, or "new" badge on the specific job that completed.
3. "Last Output" section has no emphasis for new runs (
panels.js~line 353):No visual distinction between a freshly-completed run and stale output from days ago.
Expected behavior
Proposed approach
_cronNewJobIds = new Set()— populated alongside_cronUnreadCountinstartCronPolling()loadCrons(), add a dot indicator to any job whose ID is in_cronNewJobIdsopenCronDetail(), remove the job ID from_cronNewJobIdsand update the badge count accordingly — clear the dot on that item_renderCronDetail(), add ahas-new-runCSS class to the "Last Output" card when the job is in_cronNewJobIdsImpact
Medium — affects all users with scheduled cron jobs. The notification system signals that something happened but leaves users hunting to find what. Most likely to confuse users who have multiple cron jobs configured.