← back to Gated Morning Review
fix: morning digest email via shared george-send helper (Tailscale-HTTPS+Basic auth) — was 401ing on raw http://127.0.0.1:9850
c46c5fb87f26c392cf6644ccaaa2623b30836475 · 2026-08-20 03:41:01 -0700 · steve
Files touched
Diff
commit c46c5fb87f26c392cf6644ccaaa2623b30836475
Author: steve <steve@designerwallcoverings.com>
Date: Thu Aug 20 03:41:01 2026 -0700
fix: morning digest email via shared george-send helper (Tailscale-HTTPS+Basic auth) — was 401ing on raw http://127.0.0.1:9850
---
sweep.mjs | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/sweep.mjs b/sweep.mjs
index 3ab84fa..60adf28 100644
--- a/sweep.mjs
+++ b/sweep.mjs
@@ -43,14 +43,16 @@ fs.writeFileSync(path.join(DATA, 'latest.json'), JSON.stringify({
console.log(`[gated-morning-sweep] ${ts}: auto-closed ${closed} stale, ${decide.length} await decision (${digest.aging_count} aging >${AGING_DAYS}d, oldest ${digest.oldest_days}d).`);
-// Optional: email Steve the morning link via George (best-effort; skips silently if unreachable).
+// Email Steve the morning link via the shared George helper — the SINGLE correct path
+// (George is behind Tailscale-HTTPS + Basic auth; a raw http://127.0.0.1:9850 POST 401s).
try {
+ const { execFileSync } = await import('child_process');
+ const subject = `☀️ ${decide.length} approvals waiting (${digest.aging_count} aging)`;
const body = `Good morning Steve — your gated-approval queue for ${ts.slice(0,10)}:\n\n` +
`• ${decide.length} waiting for your OK (${digest.aging_count} getting old, oldest ${digest.oldest_days} days)\n` +
`• ${closed} stale ones auto-closed overnight\n\n` +
`Approve them in big buttons here when you reach your desk:\n${VIEWER}\n\n(admin / DW2024!)`;
- await fetch('http://127.0.0.1:9850/api/send', {
- method: 'POST', headers: { 'content-type': 'application/json' },
- body: JSON.stringify({ to: 'steve@designerwallcoverings.com', subject: `☀️ ${decide.length} approvals waiting (${digest.aging_count} aging)`, text: body }),
- }).then(r => console.log('[email]', r.status)).catch(() => {});
-} catch {}
+ const script = '. "$HOME/.claude/skills/_shared/george-send.sh"; george_send steve-office "steve@designerwallcoverings.com" "$1" "$2"';
+ const out = execFileSync('bash', ['-c', script, 'bash', subject, body], { encoding: 'utf8', timeout: 30000 });
+ console.log('[email]', out.includes('"success":true') ? 'sent ✓' : out.slice(0,140));
+} catch (e) { console.log('[email] failed:', String(e.message).slice(0,140)); }
← 48aa2ae pin viewer to verified-bindable port 9440
·
back to Gated Morning Review
·
viewer v2: Approvals+Tasks tabs, plain-English WHY column, k 71f9300 →