dankgrinder 7.64.0 → 7.66.0

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/lib/dashboard.js CHANGED
@@ -59,7 +59,7 @@ function fmtUptime(startTime) {
59
59
  // ── Render ──────────────────────────────────────────────────────
60
60
 
61
61
  function renderDashboard(ctx) {
62
- if (!ctx.dashboardStarted || ctx.workers.length === 0 || ctx.dashboardRendering) return;
62
+ if (!ctx.dashboardStarted || ctx.workers.length === 0 || ctx.dashboardRendering || ctx.shutdownCalled) return;
63
63
 
64
64
  initColors(ctx);
65
65
 
@@ -141,7 +141,7 @@ function renderDashboard(ctx) {
141
141
  const statsRow = [
142
142
  `${G}${fmtCoins(aggCoins)}${_} ${D}coins${_}`,
143
143
  `${G}${successRate}%${_} ${D}success${_}`,
144
- `${W}${fmtCoins(sessionPeakCoins)}${_} ${D}peak${_}`,
144
+ `${W}${fmtCoins(ctx.sessionPeakCoins)}${_} ${D}peak${_}`,
145
145
  ctx.isNewHigh ? `${Au}★ NEW HIGH${_}` : '',
146
146
  ].filter(Boolean).join(` ${D}│${_} `);
147
147
 
@@ -269,10 +269,13 @@ function renderDashboard(ctx) {
269
269
  rows.push(`${A}${BOX.dbl}${BOX.dh.repeat(tw - 2)}${BOX.dbr}${_}`);
270
270
 
271
271
  // ── Flush ────────────────────────────────────────────────────
272
- process.stdout.write('\x1b[H');
272
+ // Clear entire screen buffer first so old startup logs don't bleed through
273
+ process.stdout.write('\x1b[2J\x1b[H');
274
+ process.stdout.write(_c.hide);
273
275
  for (const row of rows) {
274
276
  process.stdout.write(`${_c.clearLine}\r${row}\n`);
275
277
  }
278
+ process.stdout.write(_c.show);
276
279
  const leftover = ctx.dashboardLines - rows.length;
277
280
  if (leftover > 0) {
278
281
  process.stdout.write(`\x1b[${leftover}B\x1b[2K`);
package/lib/grinder.js CHANGED
@@ -409,7 +409,7 @@ function renderDashboard() {
409
409
  rgb, c, BOX,
410
410
  });
411
411
 
412
- if (newLines != null) dashboardLines = newLines;
412
+ if (newLines != null) dashboardLines = Math.max(dashboardLines, newLines);
413
413
  dashboardRendering = false;
414
414
  }
415
415
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dankgrinder",
3
- "version": "7.64.0",
3
+ "version": "7.66.0",
4
4
  "description": "Dank Memer automation engine — grind coins while you sleep",
5
5
  "bin": {
6
6
  "dankgrinder": "bin/dankgrinder.js"