You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of epic #1047. Design: hub-v2-v3-design-2026-10-26.md §4.
Problem (Drew, 2026-10-25; investigated, not built): the credential projection keeps only the ACTIVE credential per integration, so multiple same-type logins collapse into one quota row. OpenChamber's quota CLI solved the listing side (PR #474 merged: per-credential + provider-instance quota, disabled_providers respected) — the hub feed/render side never got the same treatment.
Work: carry provider instances through the fleet feed (check-usage snapshots distinguish some already); render one row per credential where quotas genuinely differ (OpenAI x2 logins, OpenCode Go x2 workspaces) with the pool total as headline; where credentials share one pool, render one row — never a fake split.
Acceptance: the two-OpenAI-login case renders correctly per its real pool structure; Go Personal vs Lab stay distinct; tests cover both shapes.
Verdict — CONFIRMED at HEAD, and the gap is precisely located: the gather side already works per credential — scripts/gather-quota.ts reads OpenCode's credential store directly and fetches per provider instance, and src/quota-gather-map.ts carries credentialId/credentialLabel per result. The collapse happens in projection/render: src/quota-current.tsoverlayQuotaCurrent groups entries by serviceId and applies only the newest fresh-ok entry (freshOk[0]) to the single pool — the module header says it outright: "Several entries can share a serviceId (one per credential): a fresh ok entry wins… otherwise the newest entry decides." Every other login's windows are dropped, and src/render.ts renders one card per pool, so credentialLabel never becomes a row. The test fixtures in test/quota-current.test.ts (~lines 118–124) already model the real shape: two entries for one service labelled "OpenAI" and "OpenAI 2".
Routing: scoped implementation packet enqueued as queue task 3004 (dedupe repo-health:v1:fix:developing-today/code:issue:1113): carry per-credential rows through the view model, split only where quotas genuinely differ (pool total as headline), one row for shared-pool credentials (never a fake split), render + /api/quota.json, tests for both shapes including Go Personal vs Lab staying distinct.
Activity
developing-today commentedon Oct 27, 2026
CODE-251
dezren39 commentedon Oct 29, 2026
🤖 Agent note · picked up
dezren39 commentedon Oct 29, 2026
🤖 Agent note · done
scripts/gather-quota.tsreads OpenCode's credential store directly and fetches per provider instance, andsrc/quota-gather-map.tscarriescredentialId/credentialLabelper result. The collapse happens in projection/render:src/quota-current.tsoverlayQuotaCurrentgroups entries by serviceId and applies only the newest fresh-ok entry (freshOk[0]) to the single pool — the module header says it outright: "Several entries can share a serviceId (one per credential): a fresh ok entry wins… otherwise the newest entry decides." Every other login's windows are dropped, andsrc/render.tsrenders one card per pool, socredentialLabelnever becomes a row. The test fixtures intest/quota-current.test.ts(~lines 118–124) already model the real shape: two entries for one service labelled "OpenAI" and "OpenAI 2".repo-health:v1:fix:developing-today/code:issue:1113): carry per-credential rows through the view model, split only where quotas genuinely differ (pool total as headline), one row for shared-pool credentials (never a fake split), render +/api/quota.json, tests for both shapes including Go Personal vs Lab staying distinct.queue/queueduntil task 3004 lands.packet-task2392-fix1113.json(goal hidden_files)9 remaining items
dezren39 commentedon Oct 31, 2026
🤖 Agent note · picked up
fix(usage-hub): key credential rows by credentialId, tolerate reset d…
feat(usage-hub): per-credential quota rows in projection + render (#1113
dezren39 commentedon Oct 31, 2026
🤖 Agent note · done