@vibedrift/cli 0.4.2 → 0.4.3

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.
package/dist/index.js CHANGED
@@ -6802,7 +6802,7 @@ function buildAiSummaryWidget(result) {
6802
6802
  return `<section class="section" style="margin-bottom:32px">
6803
6803
  <div style="background:rgba(255,208,0,0.03);border:1px solid var(--border);border-radius:0;padding:24px 28px;position:relative;overflow:hidden">
6804
6804
  <div style="position:absolute;top:0;left:0;width:3px;height:100%;background:var(--border)"></div>
6805
- <div style="display:flex;align-items:flex-start;gap:20px;flex-wrap:wrap">
6805
+ <div class="score-layout" style="display:flex;align-items:flex-start;gap:20px;flex-wrap:wrap">
6806
6806
  <div style="flex:1;min-width:280px">
6807
6807
  <div style="display:flex;align-items:center;gap:8px;margin-bottom:10px">
6808
6808
  <span style="font-size:16px">&#129302;</span>
@@ -6844,7 +6844,7 @@ function buildScoreSection(result) {
6844
6844
  }).join("");
6845
6845
  return `<section class="section">
6846
6846
  <div class="label">SCORE OVERVIEW</div>
6847
- <div style="display:flex;gap:40px;align-items:flex-start;flex-wrap:wrap">
6847
+ <div class="score-layout" style="display:flex;gap:40px;align-items:flex-start;flex-wrap:wrap">
6848
6848
  <div style="text-align:center;min-width:120px">
6849
6849
  <div class="mono" style="font-size:72px;font-weight:800;color:${color};line-height:1">${compositeScore}</div>
6850
6850
  <div class="mono" style="font-size:16px;color:var(--text-tertiary)">/ ${maxCompositeScore}</div>
@@ -6858,7 +6858,7 @@ function buildRadarSection(result) {
6858
6858
  const cats = getDriftCats(result);
6859
6859
  const n = cats.length;
6860
6860
  if (n === 0) return "";
6861
- const cx = 180, cy = 180, r = 140, step = 2 * Math.PI / n;
6861
+ const cx = 260, cy = 200, r = 130, step = 2 * Math.PI / n;
6862
6862
  let grid = "", dots = "", labels = "";
6863
6863
  const pts = [];
6864
6864
  for (const ring of [0.25, 0.5, 0.75, 1]) {
@@ -6875,14 +6875,14 @@ function buildRadarSection(result) {
6875
6875
  const px = cx + r * ratio * Math.cos(a), py = cy + r * ratio * Math.sin(a);
6876
6876
  pts.push(`${px},${py}`);
6877
6877
  dots += `<circle cx="${px}" cy="${py}" r="5" fill="var(--text-secondary)" stroke="var(--bg-page)" stroke-width="2"/>`;
6878
- const labelDist = r + 30;
6878
+ const labelDist = r + 35;
6879
6879
  const lx = cx + labelDist * Math.cos(a), ly = cy + labelDist * Math.sin(a);
6880
6880
  const anchor = Math.abs(Math.cos(a)) < 0.3 ? "middle" : Math.cos(a) > 0 ? "start" : "end";
6881
6881
  const { color: catColor } = gradeFor(cats[i].score, cats[i].max);
6882
6882
  labels += `<text x="${lx}" y="${ly - 7}" fill="${catColor}" font-size="12" font-weight="600" font-family="-apple-system,sans-serif" text-anchor="${anchor}" dominant-baseline="middle">${esc(cats[i].shortName)}</text>`;
6883
6883
  labels += `<text x="${lx}" y="${ly + 8}" fill="#5A6A7E" font-size="11" font-weight="500" font-family="'SF Mono',Consolas,monospace" text-anchor="${anchor}" dominant-baseline="middle">${cats[i].score}/${cats[i].max} ${cats[i].findings > 0 ? "(" + cats[i].findings + " issues)" : ""}</text>`;
6884
6884
  }
6885
- const radar = `<svg viewBox="0 0 360 360" style="width:100%;max-width:420px;height:auto;margin:0 auto;display:block">${grid}<polygon points="${pts.join(" ")}" fill="rgba(255,208,0,0.04)" stroke="rgba(255,208,0,0.3)" stroke-width="1.5"/>${dots}${labels}</svg>`;
6885
+ const radar = `<svg viewBox="0 0 520 440" style="width:100%;max-width:560px;height:auto;margin:0 auto;display:block">${grid}<polygon points="${pts.join(" ")}" fill="rgba(255,208,0,0.04)" stroke="rgba(255,208,0,0.3)" stroke-width="1.5"/>${dots}${labels}</svg>`;
6886
6886
  const weakest = [...cats].sort((a, b) => {
6887
6887
  const pctA = a.max > 0 ? a.score / a.max : 1;
6888
6888
  const pctB = b.max > 0 ? b.score / b.max : 1;
@@ -7475,9 +7475,73 @@ th[data-sort]:hover { color: var(--text-primary); }
7475
7475
  ::-webkit-scrollbar-thumb { background: #3A3A3D; }
7476
7476
  ::-webkit-scrollbar-thumb:hover { background: #555; }
7477
7477
  @media (max-width: 768px) {
7478
- .page { padding: 20px 14px; }
7479
- .score-layout { flex-direction: column !important; }
7478
+ .page { padding: 16px 10px; }
7479
+ .section { margin-bottom: 28px; }
7480
+ .label { font-size: 10px; letter-spacing: 1.5px; margin-bottom: 10px; }
7481
+
7482
+ /* Score hero: stack vertically */
7483
+ .score-layout { flex-direction: column !important; gap: 16px !important; }
7484
+ .score-layout > div { min-width: 0 !important; width: 100% !important; }
7485
+
7486
+ /* Category bars: stack, remove min-widths */
7487
+ .score-layout [style*="min-width:300px"],
7488
+ .score-layout [style*="min-width:280px"],
7489
+ .score-layout [style*="min-width:200px"],
7490
+ .score-layout [style*="min-width:120px"] {
7491
+ min-width: 0 !important; width: 100% !important;
7492
+ }
7493
+
7494
+ /* Radar chart: constrain to viewport */
7495
+ svg[viewBox] { max-width: 100% !important; }
7496
+
7497
+ /* Strongest/Weakest cards: 2-col, tighter */
7498
+ .section > div[style*="display:flex"][style*="gap:12px"] {
7499
+ gap: 8px !important;
7500
+ }
7501
+ .section > div[style*="display:flex"] > div[style*="min-width:160px"] {
7502
+ min-width: 0 !important; flex: 1 !important;
7503
+ }
7504
+
7505
+ /* Findings list: tighter padding */
7506
+ details > div { padding: 8px 10px !important; }
7507
+ details summary { padding: 10px 12px !important; font-size: 13px !important; }
7508
+
7509
+ /* File ranking table: horizontal scroll */
7510
+ table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
7511
+ table th, table td { padding: 5px 8px !important; font-size: 11px !important; }
7512
+
7513
+ /* Code snippets: wrap text */
7514
+ pre, code { white-space: pre-wrap !important; word-break: break-word !important; font-size: 12px !important; }
7515
+
7516
+ /* Drift coherence bars: full width */
7517
+ .section div[style*="display:flex"][style*="gap:40px"] {
7518
+ flex-direction: column !important; gap: 16px !important;
7519
+ }
7520
+
7521
+ /* Summary + AI section: stack */
7522
+ .section div[style*="display:flex"][style*="gap:20px"] {
7523
+ flex-direction: column !important; gap: 12px !important;
7524
+ }
7525
+
7526
+ /* Sticky header: tighter padding */
7527
+ .sticky-header { padding: 0 12px; font-size: 12px; }
7480
7528
  .sticky-project { display: none !important; }
7529
+
7530
+ /* Export buttons: smaller */
7531
+ .export-btn { padding: 5px 10px; font-size: 11px; }
7532
+
7533
+ /* Code DNA / ML sections: reduce gap */
7534
+ .section div[style*="gap:10px"] { gap: 6px !important; }
7535
+
7536
+ /* Hide long file paths, truncate */
7537
+ td[data-scroll-to] { max-width: 140px !important; }
7538
+ }
7539
+ @media (max-width: 480px) {
7540
+ .page { padding: 12px 8px; }
7541
+ body { font-size: 13px; }
7542
+ .label { font-size: 9px; }
7543
+ .sticky-header { height: 38px; }
7544
+ table th, table td { padding: 4px 6px !important; font-size: 10px !important; }
7481
7545
  }
7482
7546
  @media print {
7483
7547
  body { background: #fff; color: #111; font-size: 11px; line-height: 1.4; }