[object Object]

← back to Ventura Corridor

feat(coverage): ideas_accepted count in homepage build-status strip

c9a00d62cb03144fa86ab1ae72e18bb08f3df8dd · 2026-05-07 22:44:57 -0700 · SteveStudio2

Adds the idea-loop accepted-count next to the news counts on the always-
visible / strip. Click "Ideas accepted" opens the standalone idea-loop
viewer at :9920 (new tab).

API change:
  /api/build-status   +ideas_accepted (line count of ideas.jsonl in the
                      idea-loop skill data dir)

UI change:
  public/index.html   one new b-strip cell next to news counts.

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

Files touched

Diff

commit c9a00d62cb03144fa86ab1ae72e18bb08f3df8dd
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Thu May 7 22:44:57 2026 -0700

    feat(coverage): ideas_accepted count in homepage build-status strip
    
    Adds the idea-loop accepted-count next to the news counts on the always-
    visible / strip. Click "Ideas accepted" opens the standalone idea-loop
    viewer at :9920 (new tab).
    
    API change:
      /api/build-status   +ideas_accepted (line count of ideas.jsonl in the
                          idea-loop skill data dir)
    
    UI change:
      public/index.html   one new b-strip cell next to news counts.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---
 public/index.html   |  2 ++
 src/server/index.ts | 11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git a/public/index.html b/public/index.html
index a2479d1..2f4b9d6 100644
--- a/public/index.html
+++ b/public/index.html
@@ -121,6 +121,7 @@
     <span><a href="/news.html" style="color:inherit;text-decoration:none;border-bottom:1px dotted var(--metal)">News articles</a></span><b id="b-news"><a href="/news.html" style="color:var(--metal-glow);text-decoration:none">—</a></b>
     <span>News biz</span><b id="b-news-biz">—</b>
     <span>Fresh ‹7d</span><b id="b-news-7d">—</b>
+    <span><a href="http://127.0.0.1:9920/" target="_blank" rel="noopener" style="color:inherit;text-decoration:none;border-bottom:1px dotted var(--metal)">Ideas accepted</a></span><b id="b-ideas">—</b>
   </div>
   <div class="b-divider"></div>
   <div class="b-tier">
@@ -426,6 +427,7 @@ async function loadBuildStatus() {
     setNews('b-news', c.news_total);
     setNews('b-news-biz', c.news_biz);
     setNews('b-news-7d', c.news_fresh_7d);
+    setNews('b-ideas', c.ideas_accepted);
     set('b-A', c.tier_a);
     set('b-B', c.tier_b);
     set('b-C', c.tier_c);
diff --git a/src/server/index.ts b/src/server/index.ts
index d2a66d3..9ff6830 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -268,8 +268,19 @@ app.get('/api/build-status', async (_req, res) => {
       UNION ALL SELECT 'news_biz', COUNT(DISTINCT business_id)::text FROM news_items
       UNION ALL SELECT 'news_fresh_7d', COUNT(*)::text FROM news_items WHERE fetched_at > now() - interval '7 days'
     `);
+    // Idea-loop accepted count — read from JSONL on disk (cheap; <100kb)
+    let ideaCount = 0;
+    try {
+      const fs2 = await import('node:fs/promises');
+      const path2 = await import('node:path');
+      const home = process.env.HOME || '/Users/stevestudio2';
+      const p = path2.join(home, '.claude', 'skills', 'idea-loop', 'data', 'ideas.jsonl');
+      const txt = await fs2.readFile(p, 'utf8');
+      ideaCount = txt.split(/\r?\n/).filter(Boolean).length;
+    } catch {}
     const out: Record<string, number> = {};
     for (const row of r.rows) out[row.key] = parseInt(row.value, 10);
+    out.ideas_accepted = ideaCount;
     // Last 5 ingest_runs for the activity tail
     const runs = await query(`
       SELECT id, source, started_at, finished_at, rows_in, rows_new, error_message, notes

← 8172d93 feat(news): vertical filter dropdown on /news.html  ·  back to Ventura Corridor  ·  feat(coverage): /api/ideas/stats + accept-rate line on /cove faa570d →