viberadar 0.3.44 → 0.3.45

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.
@@ -482,56 +482,49 @@
482
482
 
483
483
  /* ── Test-type cards inside feature detail ───────────────────────────────── */
484
484
  .test-type-grid {
485
- display: flex;
486
- gap: 8px;
487
- margin-bottom: 14px;
488
- flex-wrap: wrap;
489
- align-items: center;
485
+ display: grid;
486
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
487
+ gap: 10px;
488
+ margin-bottom: 18px;
490
489
  }
491
490
  .test-type-card {
492
491
  display: flex;
493
- align-items: center;
494
- gap: 8px;
492
+ flex-direction: column;
495
493
  background: var(--bg-card);
496
494
  border: 1px solid var(--border);
497
- border-left: 3px solid transparent;
495
+ border-top: 3px solid transparent;
498
496
  border-radius: 8px;
499
- padding: 7px 12px;
497
+ padding: 12px 14px 10px;
500
498
  cursor: pointer;
501
499
  transition: background 0.15s, border-color 0.15s;
502
- flex-shrink: 0;
500
+ min-width: 0;
503
501
  }
504
502
  .test-type-card:hover { background: var(--bg-hover); }
505
- .test-type-card .tt-accent { display: none; } /* replaced by border-left */
506
- .test-type-card .tt-label {
507
- font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
508
- color: var(--muted); white-space: nowrap;
509
- }
510
- .test-type-card .tt-count {
511
- font-size: 18px; font-weight: 700; line-height: 1;
512
- }
513
- .test-type-card .tt-sub {
514
- font-size: 11px; color: var(--dim); white-space: nowrap;
515
- }
516
- .test-type-card.tt-empty { opacity: 0.65; }
517
- .test-type-card.tt-active { background: var(--bg-hover); }
503
+ .test-type-card.tt-active { background: var(--bg-hover); border-color: var(--border); }
504
+ .test-type-card.tt-empty { opacity: 0.6; }
518
505
  .test-type-card.tt-failed {
519
506
  border-color: var(--red) !important;
520
- background: rgba(248, 81, 73, 0.06);
521
- }
522
- .tt-chip-actions { display: flex; gap: 4px; margin-left: 4px; }
507
+ background: rgba(248, 81, 73, 0.05);
508
+ }
509
+ .tt-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
510
+ .tt-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
511
+ .tt-failed-badge { font-size: 10px; color: var(--red); font-weight: 700; }
512
+ .tt-count { font-size: 28px; font-weight: 700; line-height: 1; margin-bottom: 2px; }
513
+ .tt-sub { font-size: 11px; color: var(--dim); }
514
+ .tt-card-actions { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
523
515
  .tt-run-btn {
524
- display: inline-block; margin: 0;
525
- padding: 3px 9px;
516
+ width: 100%; padding: 5px 10px;
526
517
  background: transparent; border: 1px solid var(--border);
527
- border-radius: 4px; color: var(--muted); font-size: 10px;
528
- cursor: pointer; white-space: nowrap;
518
+ border-radius: 5px; color: var(--muted); font-size: 11px;
519
+ cursor: pointer; text-align: center;
529
520
  transition: background 0.1s, color 0.1s, border-color 0.1s;
530
521
  }
531
522
  .tt-run-btn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--dim); }
532
523
  .tt-run-btn:disabled { opacity: 0.4; cursor: not-allowed; }
533
524
  .tt-fix-btn { border-color: var(--yellow); color: var(--yellow); font-weight: 600; }
534
525
  .tt-fix-btn:hover { background: rgba(255,200,0,0.1); color: var(--yellow); border-color: var(--yellow); }
526
+ .tt-write-btn { border-color: var(--accent); color: var(--accent); }
527
+ .tt-write-btn:hover { background: rgba(88,166,255,0.1); color: var(--accent); border-color: var(--accent); }
535
528
  .file-rows { display: flex; flex-direction: column; gap: 2px; }
536
529
  .file-row {
537
530
  display: flex;
@@ -1565,30 +1558,38 @@ function renderFeatureCards(c) {
1565
1558
  }
1566
1559
 
1567
1560
  function testTypeCard(type, label, icon, color, count, active, featureKey, failedCount = 0) {
1568
- const empty = count === 0 && type !== 'source';
1561
+ const empty = count === 0 && type !== 'source';
1569
1562
  const hasFailed = failedCount > 0 && type !== 'source';
1570
- const subLabel = type === 'source' ? 'файлов' : (empty ? 'нет тестов' : pluralFiles(count));
1563
+ const subLabel = type === 'source' ? 'файлов' : (empty ? 'нет тестов' : pluralFiles(count));
1571
1564
  const accentColor = hasFailed ? 'var(--red)' : color;
1572
1565
  const countColor = hasFailed ? 'var(--red)' : (active || !empty ? color : 'var(--dim)');
1573
1566
 
1567
+ const failedBadge = hasFailed
1568
+ ? `<span class="tt-failed-badge">❌ ${failedCount}</span>`
1569
+ : '';
1570
+
1574
1571
  const runBtn = !empty && type !== 'source' && featureKey
1575
- ? `<button class="tt-run-btn" onclick="event.stopPropagation();runTests('${featureKey}','${type}')">▶ запустить</button>`
1572
+ ? `<button class="tt-run-btn" onclick="event.stopPropagation();runTests('${featureKey}','${type}')">▶ запустить тесты</button>`
1576
1573
  : '';
1577
1574
  const fixAllBtn = hasFailed && D.agent && featureKey
1578
- ? `<button class="tt-run-btn tt-fix-btn" onclick="event.stopPropagation();runAgentTask('fix-tests-all','${featureKey}','${type}')">🔧 починить</button>`
1575
+ ? `<button class="tt-run-btn tt-fix-btn" onclick="event.stopPropagation();runAgentTask('fix-tests-all','${featureKey}','${type}')">🔧 починить все</button>`
1579
1576
  : '';
1580
- const failedBadge = hasFailed
1581
- ? `<span style="font-size:10px;color:var(--red);font-weight:700;white-space:nowrap">❌ ${failedCount}</span>`
1577
+ const writeBtn = type !== 'source' && D.agent && featureKey
1578
+ ? `<button class="tt-run-btn tt-write-btn" onclick="event.stopPropagation();runAgentTask('write-tests','${featureKey}')">✍ написать тесты</button>`
1579
+ : '';
1580
+ const actions = (runBtn || fixAllBtn || writeBtn)
1581
+ ? `<div class="tt-card-actions">${runBtn}${fixAllBtn}${writeBtn}</div>`
1582
1582
  : '';
1583
- const actions = (runBtn || fixAllBtn) ? `<div class="tt-chip-actions">${runBtn}${fixAllBtn}</div>` : '';
1584
1583
 
1585
1584
  return `
1586
1585
  <div class="test-type-card${empty ? ' tt-empty' : ''}${active ? ' tt-active' : ''}${hasFailed ? ' tt-failed' : ''}"
1587
- data-testtype="${type}" style="border-left-color:${accentColor}${active ? ';border-color:' + color : ''}">
1588
- <span class="tt-label">${icon} ${label}</span>
1586
+ data-testtype="${type}" style="border-top-color:${accentColor}">
1587
+ <div class="tt-card-header">
1588
+ <span class="tt-label">${icon} ${label}</span>
1589
+ ${failedBadge}
1590
+ </div>
1589
1591
  <span class="tt-count" style="color:${countColor}">${count}</span>
1590
1592
  <span class="tt-sub">${subLabel}</span>
1591
- ${failedBadge}
1592
1593
  ${actions}
1593
1594
  </div>`;
1594
1595
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viberadar",
3
- "version": "0.3.44",
3
+ "version": "0.3.45",
4
4
  "description": "Live module map with test coverage for vibecoding projects",
5
5
  "main": "./dist/cli.js",
6
6
  "bin": {