← back to Cronjobs Viewer
viewer: de-slugged label fallback so every card has a purpose (was 49/281)
3ac193b2abb76cd1e9f86231c25eb30f78f0baa4 · 2026-08-25 10:33:03 -0700 · Steve
Files touched
Diff
commit 3ac193b2abb76cd1e9f86231c25eb30f78f0baa4
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Aug 25 10:33:03 2026 -0700
viewer: de-slugged label fallback so every card has a purpose (was 49/281)
---
server.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/server.js b/server.js
index 83afe0e..928203d 100644
--- a/server.js
+++ b/server.js
@@ -137,9 +137,15 @@ async function collectCrons() {
const lastExit = l ? l.exit : null;
const meta = readCronPlistMeta(path.join(laDir, f));
const state = pid ? 'running' : (lastExit && lastExit !== '0' && lastExit !== '-') ? 'error' : 'idle';
+ // Purpose: prefer the plist's own comment; else de-slug the label into a
+ // readable phrase (com.steve.dw-shopify-storage-canary -> "dw shopify
+ // storage canary") so EVERY card answers "what does it do", not just the
+ // ~17% whose author left a comment.
+ const purpose = meta.purpose
+ || label.replace(/^com\.steve\./, '').replace(/[-_.]/g, ' ').trim();
return {
label, loaded: !!l, pid, lastExit, state,
- schedule: meta.schedule, program: meta.program, purpose: meta.purpose,
+ schedule: meta.schedule, program: meta.program, purpose,
created: meta.created, modified: meta.modified,
lastRun: meta.lastRun, nextRun: meta.nextRun, model: meta.model,
};
← c30c2a5 fix: creds-in-URL fetch guard (CRCP-class bug); pin port 977
·
back to Cronjobs Viewer
·
creds-safe fetch guard: resolve relative fetch vs credential aa15665 →