maxpool 1.24.44 → 1.24.46

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/package.json +1 -1
  2. package/src/tui.js +17 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.24.44",
3
+ "version": "1.24.46",
4
4
  "description": "Multi-account Claude Code proxy with adaptive, rate-aware load balancing across Claude accounts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/tui.js CHANGED
@@ -76,6 +76,12 @@ function acctHeader(W) {
76
76
  + quota;
77
77
  }
78
78
 
79
+ /** padStart by VISIBLE width (ANSI color codes take no columns). */
80
+ function lpadVis(s, w) {
81
+ const gap = w - vw(s);
82
+ return gap > 0 ? ' '.repeat(gap) + s : s;
83
+ }
84
+
79
85
  function rpad(s, w) {
80
86
  const gap = w - vw(s);
81
87
  return gap > 0 ? s + ' '.repeat(gap) : s;
@@ -1338,7 +1344,11 @@ export class TUI {
1338
1344
  familyFirstSeen.get(fam).push(idx);
1339
1345
  }
1340
1346
  const provGrouped = [...familyFirstSeen.values()].flat();
1341
- return [...nonProv, ...provGrouped];
1347
+ // Owner 2026-10-29: Where is the PRIMARY grouping — local rows first, cloud rows
1348
+ // after — and the existing ordering (providers grouped by family, OAuth as-added)
1349
+ // stays intact WITHIN each group.
1350
+ const all = [...nonProv, ...provGrouped];
1351
+ return [...all.filter(i => !this.am.accounts[i].remote), ...all.filter(i => this.am.accounts[i].remote)];
1342
1352
  }
1343
1353
 
1344
1354
  _selectableIndexes(action) {
@@ -2030,6 +2040,10 @@ export class TUI {
2030
2040
  let hidden = 0;
2031
2041
  for (const i of this._displayOrder()) {
2032
2042
  if (this.hideDisabled && this.am.accounts[i]?.enabled === false) { hidden++; continue; }
2043
+ // Same key also hides local copies guarded by the duplicate guard — they are
2044
+ // effectively off (owner 2026-10-29: "should it hide the local ones that are
2045
+ // in the cloud... they're effectively disabled as well"). No separate key.
2046
+ if (this.hideDisabled && this.am.accounts[i]?.poolBenchedBy) { hidden++; continue; }
2033
2047
  // The legacy single team-pool row is superseded by per-account cloud rows.
2034
2048
  if (this.am.accounts[i]?.type === 'pool') continue;
2035
2049
  lines.push(this._renderAcct(i, bw, showBoth));
@@ -2569,11 +2583,11 @@ export class TUI {
2569
2583
  for (const k of Object.keys(tot)) tot[k] += w[k];
2570
2584
  out.push(' ' + name.slice(0, 10).padEnd(10)
2571
2585
  + [fmt(w.h24), delta(w.h24, w.h24p), fmt(w.d7), delta(w.d7, w.d7p), fmt(w.d30), delta(w.d30, w.d30p), fmt(w.total), fmtTok(w.tok7)]
2572
- .map(c => String(c).padStart(CW)).join(''));
2586
+ .map(c => lpadVis(String(c), CW)).join(''));
2573
2587
  }
2574
2588
  out.push(dim(' ' + 'total'.padEnd(10)
2575
2589
  + [fmt(tot.h24), delta(tot.h24, tot.h24p), fmt(tot.d7), delta(tot.d7, tot.d7p), fmt(tot.d30), delta(tot.d30, tot.d30p), fmt(tot.total), fmtTok(tot.tok7)]
2576
- .map(c => String(c).padStart(CW)).join('')));
2590
+ .map(c => lpadVis(String(c), CW)).join('')));
2577
2591
 
2578
2592
  const link = (this.am.poolLinks || []).find(l => l.lastOkAt);
2579
2593
  out.push(dim(` data since boot${link ? ` · team pool synced ${new Date(link.lastOkAt).toLocaleTimeString()}` : ''}`));