@beastmode-develeap/beastmode 0.1.274 → 0.1.276

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@
15
15
  }
16
16
  </script>
17
17
  <!--BOARD_DATA-->
18
- <script>window.__BUILD_STAMP__ = "20260516-122824-bc1b033";</script>
18
+ <script>window.__BUILD_STAMP__ = "20260516-135653-88d25be";</script>
19
19
  <link rel="preconnect" href="https://fonts.googleapis.com">
20
20
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
21
21
  <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
@@ -8568,7 +8568,21 @@ function ProjectsPage({ selectedProject, onProjectChange }) {
8568
8568
  setGuideErrors(prev => ({ ...prev, [name]: null }));
8569
8569
  return resp;
8570
8570
  } catch (e) {
8571
- setGuideErrors(prev => ({ ...prev, [name]: e.message }));
8571
+ // 404 means no guide exists yet — treat as empty sentinel so the
8572
+ // render shows the status-based fallback instead of a raw error.
8573
+ const noGuide = e.message && (
8574
+ e.message.includes('No codebase guide') ||
8575
+ e.message.includes('Guide file not found') ||
8576
+ e.message === 'HTTP 404'
8577
+ );
8578
+ if (noGuide) {
8579
+ setGuideContent(prev => ({
8580
+ ...prev,
8581
+ [name]: { ...(prev[name] || {}), [level]: '' },
8582
+ }));
8583
+ } else {
8584
+ setGuideErrors(prev => ({ ...prev, [name]: e.message }));
8585
+ }
8572
8586
  return null;
8573
8587
  }
8574
8588
  }, []);
@@ -8579,12 +8593,14 @@ function ProjectsPage({ selectedProject, onProjectChange }) {
8579
8593
  return;
8580
8594
  }
8581
8595
  setExpandedProject(name);
8582
- // Fetch L1 content lazily on first expand if analysis is complete.
8583
- const st = analysisStatuses[name];
8584
- if (st && st.status === 'complete' && !(guideContent[name] && guideContent[name].l1)) {
8596
+ // Optimistically fetch L1 guide on expand regardless of analysis status.
8597
+ // Guide files exist even when a re-analysis is in progress (previous run's
8598
+ // output persists). fetchGuide silently treats 404 as empty so this is
8599
+ // safe to call unconditionally — it never shows a raw HTTP error.
8600
+ if (!(guideContent[name] && guideContent[name].l1)) {
8585
8601
  await fetchGuide(name, 'l1');
8586
8602
  }
8587
- }, [expandedProject, analysisStatuses, guideContent, fetchGuide]);
8603
+ }, [expandedProject, guideContent, fetchGuide]);
8588
8604
 
8589
8605
  const stopPolling = useCallback((name) => {
8590
8606
  if (pollTimersRef.current[name]) {
@@ -8831,7 +8847,7 @@ function ProjectsPage({ selectedProject, onProjectChange }) {
8831
8847
  data-testid="codebase-summary-panel">
8832
8848
  <div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;">
8833
8849
  <strong style="font-size:13px;">Codebase summary</strong>
8834
- ${pillState === 'complete' && guide.l1 ? html`
8850
+ ${guide.l1 ? html`
8835
8851
  <button class="btn btn-sm btn-secondary"
8836
8852
  onClick=${() => toggleFullGuide(proj.name)}
8837
8853
  data-testid="project-show-full-guide">
@@ -8840,44 +8856,45 @@ function ProjectsPage({ selectedProject, onProjectChange }) {
8840
8856
  ` : null}
8841
8857
  </div>
8842
8858
  ${guideErr ? html`<div class="error-msg" style="margin-bottom:8px;">${guideErr}</div>` : null}
8843
- ${pillState === 'complete'
8844
- ? (guide.l1 == null
8845
- ? html`<div style="color:var(--text-secondary);font-size:12px;">Loading guide\u2026</div>`
8846
- : html`
8847
- <pre style="white-space:pre-wrap;font-family:inherit;font-size:13px;line-height:1.5;
8848
- background:var(--bg-subtle);padding:10px;border-radius:6px;margin:0;"
8849
- data-testid="codebase-guide-l1">${guide.l1}</pre>
8850
- ${showFullGuide[proj.name]
8851
- ? (guide.l2 == null
8852
- ? html`<div style="margin-top:8px;color:var(--text-secondary);font-size:12px;">Loading full guide\u2026</div>`
8853
- : html`
8854
- <pre style="white-space:pre-wrap;font-family:inherit;font-size:12px;line-height:1.5;
8855
- background:var(--bg-subtle);padding:10px;border-radius:6px;margin-top:8px;"
8856
- data-testid="codebase-guide-l2">${guide.l2}</pre>
8857
- `)
8858
- : null}
8859
- `)
8860
- : pillState === 'running'
8861
- ? html`<div style="display:flex;align-items:center;gap:8px;color:var(--text-secondary);">
8862
- <span class="spinner" style="display:inline-block;width:12px;height:12px;border:2px solid var(--border);
8863
- border-top-color:var(--accent);border-radius:50%;
8864
- animation:spin 0.8s linear infinite;"></span>
8865
- Analyzing codebase\u2026
8866
- </div>`
8867
- : pillState === 'failed'
8868
- ? html`<div>
8869
- <div class="error-msg" style="margin-bottom:8px;">${st.error || 'Analysis failed'}</div>
8870
- <button class="btn btn-sm btn-primary"
8871
- onClick=${() => reanalyze(proj.name)}
8872
- data-testid="project-retry-btn">Retry</button>
8859
+ ${guide.l1 === undefined
8860
+ ? html`<div style="color:var(--text-secondary);font-size:12px;">Loading guide\u2026</div>`
8861
+ : guide.l1
8862
+ ? html`
8863
+ ${isBusy ? html`<div style="font-size:11px;color:var(--text-secondary);margin-bottom:6px;">Re-analysis in progress\u2026</div>` : null}
8864
+ <pre style="white-space:pre-wrap;font-family:inherit;font-size:13px;line-height:1.5;
8865
+ background:var(--bg-subtle);padding:10px;border-radius:6px;margin:0;"
8866
+ data-testid="codebase-guide-l1">${guide.l1}</pre>
8867
+ ${showFullGuide[proj.name]
8868
+ ? (guide.l2 === undefined
8869
+ ? html`<div style="margin-top:8px;color:var(--text-secondary);font-size:12px;">Loading full guide\u2026</div>`
8870
+ : html`
8871
+ <pre style="white-space:pre-wrap;font-family:inherit;font-size:12px;line-height:1.5;
8872
+ background:var(--bg-subtle);padding:10px;border-radius:6px;margin-top:8px;"
8873
+ data-testid="codebase-guide-l2">${guide.l2}</pre>
8874
+ `)
8875
+ : null}
8876
+ `
8877
+ : pillState === 'running'
8878
+ ? html`<div style="display:flex;align-items:center;gap:8px;color:var(--text-secondary);">
8879
+ <span class="spinner" style="display:inline-block;width:12px;height:12px;border:2px solid var(--border);
8880
+ border-top-color:var(--accent);border-radius:50%;
8881
+ animation:spin 0.8s linear infinite;"></span>
8882
+ Analyzing codebase\u2026
8873
8883
  </div>`
8874
- : html`<div style="color:var(--text-secondary);">
8875
- Not analyzed yet \u2014
8876
- <button class="btn btn-sm btn-primary"
8877
- style="margin-left:6px;"
8878
- onClick=${() => reanalyze(proj.name)}
8879
- data-testid="project-run-analysis-btn">Run analysis</button>
8880
- </div>`}
8884
+ : pillState === 'failed'
8885
+ ? html`<div>
8886
+ <div class="error-msg" style="margin-bottom:8px;">${st.error || 'Analysis failed'}</div>
8887
+ <button class="btn btn-sm btn-primary"
8888
+ onClick=${() => reanalyze(proj.name)}
8889
+ data-testid="project-retry-btn">Retry</button>
8890
+ </div>`
8891
+ : html`<div style="color:var(--text-secondary);">
8892
+ Not analyzed yet \u2014
8893
+ <button class="btn btn-sm btn-primary"
8894
+ style="margin-left:6px;"
8895
+ onClick=${() => reanalyze(proj.name)}
8896
+ data-testid="project-run-analysis-btn">Run analysis</button>
8897
+ </div>`}
8881
8898
  </div>
8882
8899
  ` : null}
8883
8900
  <${EnvironmentPanel} projectName=${proj.name} />
@@ -1 +1 @@
1
- bc1b033bf9c904a96fbcc8e23baf42117d9b32d3
1
+ 88d25be900a29498978af616d9a62157536b9fd4
@@ -1 +1 @@
1
- 20260516-122824-bc1b033
1
+ 20260516-135653-88d25be
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beastmode-develeap/beastmode",
3
- "version": "0.1.274",
3
+ "version": "0.1.276",
4
4
  "description": "BeastMode Dark Factory — turn intent into verified software",
5
5
  "type": "module",
6
6
  "bin": {