[object Object]

← back to Ventura Corridor

fix(coverage): wire JS for rejects drawer (was empty since tick 73)

be002e1603f2f3c49e8ebe4eb5f3c53792042d65 · 2026-05-08 00:49:10 -0700 · SteveStudio2

Tick 73 added the <details> container for rejected ideas but the JS
that populates #idea-rejects didnt get inserted because the Edit
string match failed. Now properly fetches /api/ideas/rejects and
renders the same 3-column grid (score / type / title+body) but with
a red score color to visually distinguish from accepted.

Currently 91 rejects across types: 31 connection, 24 product, 19
automation, 16 rename, 1 kill. Top reject scores show how close they
came to acceptance (most are <26 of the 28 threshold).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit be002e1603f2f3c49e8ebe4eb5f3c53792042d65
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Fri May 8 00:49:10 2026 -0700

    fix(coverage): wire JS for rejects drawer (was empty since tick 73)
    
    Tick 73 added the <details> container for rejected ideas but the JS
    that populates #idea-rejects didnt get inserted because the Edit
    string match failed. Now properly fetches /api/ideas/rejects and
    renders the same 3-column grid (score / type / title+body) but with
    a red score color to visually distinguish from accepted.
    
    Currently 91 rejects across types: 31 connection, 24 product, 19
    automation, 16 rename, 1 kill. Top reject scores show how close they
    came to acceptance (most are <26 of the 28 threshold).
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---
 public/coverage.html | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/public/coverage.html b/public/coverage.html
index 0cfdaf8..d58b097 100644
--- a/public/coverage.html
+++ b/public/coverage.html
@@ -215,6 +215,29 @@ async function load() {
     document.getElementById('idea-feed').innerHTML = '<p style="color:#c47b7b">idea-loop bridge unavailable</p>';
   }
 
+  // Rejects drawer (collapsed by default) — populates only when <details> opened
+  try {
+    const rj = await fetch('/api/ideas/rejects').then(r => r.json());
+    const el = document.getElementById('idea-rejects');
+    const rows = rj.rows || [];
+    if (!rows.length) {
+      el.innerHTML = '<p style="color:var(--ink-mute);font-style:italic;font-family:Cormorant Garamond,serif">No rejects yet.</p>';
+    } else {
+      el.innerHTML = rows.map(r => {
+        const score = r.score_total || 0;
+        const type = (r.type || 'idea').toUpperCase();
+        return `<div style="padding:6px 0;border-bottom:1px dotted var(--rule);display:grid;grid-template-columns:46px 80px 1fr;gap:14px;align-items:start;font-size:11px;color:var(--ink-mute)">
+          <span style="font-family:var(--mono);color:#c47b7b">${score}</span>
+          <span style="font-family:var(--mono);font-size:9px;letter-spacing:.2em;text-transform:uppercase">${escHtml(type)}</span>
+          <div>
+            <div style="font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink)">${escHtml(r.title || '(untitled)')}</div>
+            ${r.body ? `<div style="font-size:10px;color:var(--ink-mute);margin-top:2px">${escHtml(String(r.body).slice(0,180))}${String(r.body).length>180?'…':''}</div>` : ''}
+          </div>
+        </div>`;
+      }).join('');
+    }
+  } catch (e) { /* skip */ }
+
   // News scrape calendar — 90-day heatmap above the heatmap section
   try {
     const cal = await fetch('/api/news/by-day').then(r => r.json());

← 3853840 fix: portable home dir in /api/ideas/{recent,rejects} (caugh  ·  back to Ventura Corridor  ·  feat(coverage): "tonight on the corridor" glance footer e4ee322 →