Repository navigation
feat: Fable weekly bar, separate accounts for two organizations of one login, session bar only when reported - #1
Open
dragosdobro wants to merge 3 commits into
Conversation
dragosdobro
force-pushed
the
feat/fable-bar-and-org-accounts
branch
from
November 5, 2026 11:11
d13bfeb to
284e869
Compare
dragosdobro
force-pushed
the
feat/fable-bar-and-org-accounts
branch
from
November 12, 2026 12:37
9f78a89 to
7a953d9
Compare
2solarmax
added a commit
that referenced
this pull request
Nov 13, 2026
…hold, direct reactive gate, cap-measured room, distinct identities #1 a GENERAL hold counts a peer only if every ACTIVE model bucket it reports also has >=35% room (a Fable-exhausted peer would leave Fable with no route). #2 a hold notes its reason and falls through: the model loop still claims a dying model grant, and a model wall with no room elsewhere. #3 the reactive 429 path evaluates the hold directly (wallClaimHeld: header-fresh refill stamp, grant end, live peer count) instead of matching the sweep's reason string — a stale probe/listing at the wall no longer falls through to a claim. Scoped 429s get the same per-model gate. Comment corrected. #4 peer room is measured to its effective caps on both windows (weekly cap, else 1.0; 5h bench = min(5h cap, 0.90)). #6 peers sharing one capacityIdentity count once. wallClaimHeld is the one hold rule shared by the sweep and the reactive path. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TMppTxPFhguyMkcjkNvdb9
2solarmax
added a commit
that referenced
this pull request
Nov 13, 2026
…-wide budget, #4 identity-less peer); #3 driven in server order At 5865365: 6 of 40 fail (RT2-1 x2, RT2-2 x3, RT2-4). The #3 server-order tests pass at 5865365 by design: they replace a seeded state production never produces with markRateLimited -> tryReactiveClaim, pinning that a Fable 429 never spends on the fast path and that no 429 retry-after stands in for the refill. Pool fixture accounts now carry a resolvable identity. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TMppTxPFhguyMkcjkNvdb9
2solarmax
added a commit
that referenced
this pull request
Nov 13, 2026
…d budget, identity-less peers skipped #1 a wall either path HELD is registered (account._wallHold) and live only while no claim superseded it and the account is still at that wall with the refill ahead (isHoldingWall). Every sweep whose own probe fails (timeout/error/throw) or whose listing is stale re-runs wallClaimHeld through the reactive route (stored listing <=6h, peers' live freshness): capacity unknown -> claim. A listing cooldown still blocks; a never-held wall keeps today's behaviour. #2 a hold needs holdMinPeers x (walls holding in this pool, this one included) roomy peers — 4 walls on 2 peers: one holds, three claim. Same on the 429 path. #3 the fast path's Fable branch is unreachable from a 429 (markRateLimited marks the bucket reactive first, and the pick refuses reactive buckets); it is reached by the rescue of a sweep-held Fable wall, whose bucket is probe- measured — so its refill is a real reset stamp, never a retry-after. Tests now drive server order. #4 a peer whose capacityIdentity is null is not counted; self is excluded by the same identity check. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TMppTxPFhguyMkcjkNvdb9
2solarmax
added a commit
that referenced
this pull request
Nov 13, 2026
Fail at 9a91a2a: - R4-1 (#1 blocker): under the general hold, a Fable WALL grant dying before / within a day after the general refill is still claimed; one outliving it is skipped - R4-2 (#2 major): a Fable claim under the hold, then a dark probe and no peer room -> the general reset is claimed (rescue and weekly 429) - R4-3 (#3): spending a grant that clears the general weekly retires the hold, whatever the 429 kind or claim scope (sweep and fast path) - R4-4 (#4): the hold records the refill it waits for; a later window is a new wall - R3-4 updated (#5): every profile self serves needs its own roomy peers - R4-6 (#6): the hold lets go before the stored listing ages past the 6h claim bound Controls passing at both (by design): R4-2 control (one claim per general wall still holds); R3-2 now runs its "no Fable reading" case through the real countPeersWithRoom instead of a lambda that always answered 2 (#7). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TMppTxPFhguyMkcjkNvdb9
- New Fbl bar shows Fable weekly usage and time to reset; a dash when there is no data - Appears on terminals 112 columns or wider; narrower screens look as before - Bar widths are now computed from the column layout, so rows no longer overflow - Tests cover the new bar and the width rules
…e accounts - Accounts are told apart by user and organization, so a Team org and a personal org on the same email no longer overwrite each other - Logging in to the other organization adds a second account; the same organization still re-authenticates in place - Older accounts look up their organization with their own token; if that fails, the TUI asks whether to re-authenticate or add - The second account's suggested name is `<email> (<plan>)` - Team pool links, remote logins and duplicate detection compare the organization too - Tests cover the matching on every login, save and restore path
…n window - Plans without a 5-hour limit send no session reading; when no account has one, the Ses column is dropped - Fbl and Wk take its room: Wk always shows, and Fbl joins it from 97 columns - As soon as any Claude, API-key or provider account reports a session reading, every row shows Ses again - Tests cover the layout and both cases
dragosdobro
force-pushed
the
feat/fable-bar-and-org-accounts
branch
from
November 14, 2026 09:32
7a953d9 to
d16bb57
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three changes on one branch, one commit each, on top of v1.24.93.
1. Fable weekly bar in the TUI (
feat(tui))Ses | Fbl | Wk: the Fable weekly usage and its time to reset sit between the session and week bars.2. Two organizations of one Claude login as separate accounts (
feat(accounts))One Claude login can belong to several organizations, for example a Team org and a personal Max org under the same email. Today every dedupe site compares
accountUuidonly, so logging in to the second organization re-authenticates the first account instead of adding a new one.fetchProfilereturnsorganization.uuid, stored asorganizationUuid.maxpool login, token persistence, sync from disk, config writer,maxpool accounts, state.json restore) uses one shared predicate insrc/oauth.js; a source guard test keeps rawaccountUuidcomparisons out ofsrc/.Re-authenticate it (r) or add a second account (a)? [r];maxpool loginre-authenticates in place and prints a--namehint.<email> (<plan type>).maxpool accountsno longer renames two accounts to the same email._routeLogin,maxpool login's local-or-cloud choice), the remote login sender (cloud-login.js), thePOST /maxpool/accountsinject and duplicate detection compare the organization too, and/maxpool/statusexportsorganizationUuid.3. Leave out the session bar when no account reports one (
feat(tui))Verified Ultra accounts no longer report a 5-hour window (upstream already treats a missing 5h reading as no limit,
cff65b2). When no account in the pool reports a session reading, theSescolumn is dropped:Wkalways shows andFbljoins it from 97 columns. As soon as any Claude, API-key or provider account reports one, every row showsSesagain.Testing
test/tui-fable-bar.test.js(11),test/account-identity.test.js(11),test/same-email-accounts.test.js(14),test/tui-session-collapse.test.js(4), plus organization cases intest/remote-inject.test.js,test/tui-remote-login.test.jsandtest/pool-link.test.js.npm testwith an isolatedHOMEon Node 18.20.8, 20.20.2, 22.23.3, 24.19.0 and 26.8.2, compared with untouchedmainon each version: no new failures.HOME, every test file excepttest/rc-gate.test.js, which hung on this machine on both trees, all files at once): 2014 tests, 4 failures. Three also fail on untouched v1.24.93 in the same run (the two below andtui-terminal-pty"(c) self-update hand-off"). The fourth,tui-terminal-pty"(e) a crash that does not exit", passes alone 3/3 on both this branch and untouched v1.24.93 (load-sensitive pty timing). Untouched v1.24.93: 1970 tests, 4 failures (one only because that copy had no git metadata).mainon this macOS machine:release-stage-watchdog"a FROZEN stage is killed at its ceiling": needs atimeoutbinary that macOS does not ship (all versions).family-fallback"the default really is 250ms": Node 26 only.maxpool login, a second login to the other organization of the same user through the TUI. Result: two accounts, one user uuid, two organization uuids (claude_max,claude_team).Notes
accountslist,maxpool serverexits with "No accounts configured" and the supervisor restarts it in a loop that ignores Ctrl+C. Not changed here; on a fresh install the first login has to bemaxpool login.