Holding tank in the Control Room menu (Marty 2026-11-11): shown only to members who can adopt (eligible, or at the cap), badge = people adoptable right now, title says you can adopt up to <tankAdoptCap> at a time, opens More > My line; GET /api/my/tank/summary (cached waiting list, no full list); tank card says the cap; chatbot knows where the tank lives and the 10-at-a-time rule; cr-shell ?v=20261111tank, my.js ?v=20261111tank. qa/btc4hits-bridge 28/28 (incl. browser checks)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Marty Bostick
2026-11-11 08:17:31 -06:00
parent 5d79abe318
commit bfa13302e1
18 changed files with 76 additions and 23 deletions
+9
View File
@@ -2498,6 +2498,15 @@ const server = http.createServer(async (req, res) => {
for (let i = 2; i < 100 && await accounts.byUsername(pick); i++) pick = base.slice(0, 20 - String(i).length) + i;
return json(res, 200, { suggest: pick });
}
// the menu item (2026-11-11): may this member adopt, how many can be adopted right now, the at-one-time cap. Cheap: the waiting
// list is the same 60-second cache the Overview notice uses; the full list stays on /api/my/tank.
if (p === '/api/my/tank/summary' && req.method === 'GET') {
const s = await auth.fromRequest(req);
if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });
if (!tankWaitCache || Date.now() - tankWaitCache.ts > 60000) tankWaitCache = { ts: Date.now(), list: await tank.waiting() };
const el = await tank.eligibility(s.email);
return json(res, 200, { adopter: !!(el.ok || el.full), eligible: !!el.ok, full: !!el.full, held: el.held != null ? el.held : null, cap: tank.capOpen(), waiting: tank.adoptableOf(tankWaitCache.list).length }, { 'Cache-Control': 'no-store' });
}
if (p === '/api/my/tank' && req.method === 'GET') {
const s = await auth.fromRequest(req);
if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });