@vibecodeqa/cli 0.35.7 → 0.35.8

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.
Files changed (2) hide show
  1. package/dist/monitor.js +38 -8
  2. package/package.json +1 -1
package/dist/monitor.js CHANGED
@@ -268,15 +268,45 @@ function loadCachedScan(cwd) {
268
268
  }
269
269
  // ── Check Detail View ──
270
270
  function CheckDetail({ check, height, cursor, copied }) {
271
- const visibleIssues = Math.max(1, height - 6);
272
- // Scroll window: keep cursor visible
273
- const scrollStart = Math.max(0, Math.min(cursor - Math.floor(visibleIssues / 2), check.issues.length - visibleIssues));
274
- const visibleSlice = check.issues.slice(scrollStart, scrollStart + visibleIssues);
275
- return (_jsxs(Box, { flexDirection: "column", height: height, paddingX: 1, children: [_jsxs(Text, { bold: true, color: "magenta", children: [" \u25C8 ", check.name] }), _jsxs(Text, { children: [_jsxs(Text, { color: gc(check.grade), bold: true, children: [" ", check.grade, " ", check.score, "/100"] }), _jsxs(Text, { dimColor: true, children: [" \u00B7 ", check.issues.length, " issues \u00B7 ", check.duration, "ms"] }), copied && _jsx(Text, { color: "green", bold: true, children: " \u2713 Copied!" })] }), _jsx(Text, { children: " " }), check.issues.length === 0 ? (_jsx(Text, { color: "green", children: " No issues found." })) : (_jsxs(_Fragment, { children: [visibleSlice.map((iss, i) => {
276
- const idx = scrollStart + i;
271
+ const bodyHeight = height - 5; // header + score + blank + footer margin
272
+ // Each issue takes 2-3 lines: header line + message (wraps if long)
273
+ // Estimate lines per issue for scroll calculation
274
+ const issueHeights = check.issues.map((iss) => {
275
+ const msgLen = iss.message.length;
276
+ return msgLen > 80 ? 3 : 2; // 2 lines base, 3 if message wraps
277
+ });
278
+ // Find scroll window that keeps cursor visible
279
+ let scrollStart = 0;
280
+ let linesUsed = 0;
281
+ // First, find how many items fit
282
+ const fits = [];
283
+ for (let i = 0; i < check.issues.length; i++) {
284
+ if (linesUsed + issueHeights[i] > bodyHeight)
285
+ break;
286
+ fits.push(i);
287
+ linesUsed += issueHeights[i];
288
+ }
289
+ const maxVisible = fits.length || 1;
290
+ // Adjust scroll so cursor is visible
291
+ if (cursor >= scrollStart + maxVisible)
292
+ scrollStart = cursor - maxVisible + 1;
293
+ if (cursor < scrollStart)
294
+ scrollStart = cursor;
295
+ scrollStart = Math.max(0, Math.min(scrollStart, check.issues.length - maxVisible));
296
+ // Collect visible items within height budget
297
+ const visible = [];
298
+ let usedLines = 0;
299
+ for (let i = scrollStart; i < check.issues.length; i++) {
300
+ if (usedLines + issueHeights[i] > bodyHeight)
301
+ break;
302
+ visible.push({ issue: check.issues[i], idx: i });
303
+ usedLines += issueHeights[i];
304
+ }
305
+ const remaining = check.issues.length - (scrollStart + visible.length);
306
+ return (_jsxs(Box, { flexDirection: "column", height: height, paddingX: 1, overflowY: "hidden", children: [_jsxs(Text, { bold: true, color: "magenta", children: [" \u25C8 ", check.name] }), _jsxs(Text, { children: [_jsxs(Text, { color: gc(check.grade), bold: true, children: [" ", check.grade, " ", check.score, "/100"] }), _jsxs(Text, { dimColor: true, children: [" \u00B7 ", check.issues.length, " issues \u00B7 ", check.duration, "ms"] }), copied && _jsx(Text, { color: "green", bold: true, children: " \u2713 Copied!" })] }), _jsx(Text, { children: " " }), check.issues.length === 0 ? (_jsx(Text, { color: "green", children: " No issues found." })) : (_jsxs(_Fragment, { children: [visible.map(({ issue: iss, idx }) => {
277
307
  const sel = idx === cursor;
278
- return (_jsxs(Text, { wrap: "truncate", children: [_jsx(Text, { color: sel ? "white" : "gray", children: sel ? "▸" : " " }), _jsxs(Text, { color: sc(iss.severity), bold: true, children: [iss.severity[0].toUpperCase(), " "] }), iss.file && _jsxs(Text, { color: "cyan", children: [String(iss.file).slice(0, 28).padEnd(28), " "] }), iss.line && _jsx(Text, { dimColor: true, children: String(iss.line).padEnd(5) }), _jsx(Text, { children: iss.message.slice(0, 55) }), iss.rule && _jsxs(Text, { dimColor: true, children: [" (", iss.rule, ")"] })] }, idx));
279
- }), check.issues.length > scrollStart + visibleIssues && _jsxs(Text, { dimColor: true, children: [" +", check.issues.length - scrollStart - visibleIssues, " more"] })] }))] }));
308
+ return (_jsxs(Box, { flexDirection: "column", marginBottom: 0, children: [_jsxs(Text, { children: [_jsx(Text, { color: sel ? "white" : "gray", children: sel ? "▸" : " " }), _jsxs(Text, { color: sc(iss.severity), bold: true, children: [iss.severity[0].toUpperCase(), " "] }), iss.file && _jsxs(Text, { color: "cyan", children: [String(iss.file), iss.line ? `:${iss.line}` : "", " "] }), iss.rule && _jsxs(Text, { dimColor: true, children: ["(", iss.rule, ")"] })] }), _jsxs(Text, { wrap: "wrap", children: [_jsx(Text, { color: sel ? "white" : "gray", children: " " }), _jsx(Text, { color: sel ? "white" : undefined, children: iss.message })] })] }, idx));
309
+ }), remaining > 0 && _jsxs(Text, { dimColor: true, children: [" +", remaining, " more (\u2193 to scroll)"] })] }))] }));
280
310
  }
281
311
  function MonitorApp({ cwd }) {
282
312
  const { exit } = useApp();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecodeqa/cli",
3
- "version": "0.35.7",
3
+ "version": "0.35.8",
4
4
  "description": "Code health scanner for the AI coding era. 25 checks, zero config, full report.",
5
5
  "type": "module",
6
6
  "bin": {