maxpool 1.24.1 → 1.24.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tui.js +25 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.24.1",
3
+ "version": "1.24.3",
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
@@ -2150,7 +2150,31 @@ export class TUI {
2150
2150
  const rg = a.resetGrants;
2151
2151
  if (rg?.eligible) n += (rg.grants || []).filter(g => g.usableNow && !g.expired).length;
2152
2152
  }
2153
- resetsCell = rpad(n > 0 ? green(String(n)) : gray('0'), RESETS_W);
2153
+ // Expiry rides with the count when it's tight: "1~2d" = 1 reset, expires in ~2 days.
2154
+ // Claude grants end mid-Oct (weeks out) — a day-count would be noise; only the
2155
+ // SOONEST-expiring card under 7 days gets a suffix, so the column stays narrow
2156
+ // and the number it carries still answers "use it or lose it?".
2157
+ let suffix = '';
2158
+ if (n > 0) {
2159
+ let soonest = Infinity;
2160
+ const rc = a.resetCards;
2161
+ if (rc) for (const c of [...(rc.fiveHour || []), ...(rc.weekly || [])]) {
2162
+ if (!c.expired && c.expiresAt != null && c.expiresAt < soonest) soonest = c.expiresAt;
2163
+ }
2164
+ const rg = a.resetGrants;
2165
+ if (rg?.eligible) for (const g of (rg.grants || [])) {
2166
+ if (g.usableNow && !g.expired && g.endsAt != null && g.endsAt < soonest) soonest = g.endsAt;
2167
+ }
2168
+ // Expiry is ALWAYS shown when a reset exists (owner 2026-10-01: "what is the
2169
+ // proper way to communicate if we have a reset, and when does it expire" —
2170
+ // both facts, always). Hours under 24h, days at or above.
2171
+ const days = soonest === Infinity ? null : (soonest - Date.now()) / 86400_000;
2172
+ if (days != null) {
2173
+ suffix = days < 1 ? '~' + Math.max(1, Math.round(days * 24)) + 'h'
2174
+ : '~' + Math.max(1, Math.round(days)) + 'd';
2175
+ }
2176
+ }
2177
+ resetsCell = rpad(n > 0 ? green(String(n) + suffix) : gray('0'), RESETS_W + (suffix ? 2 : 0));
2154
2178
  }
2155
2179
 
2156
2180
  if (a.type === 'provider') {