fix(interactive): footer names the serving account when the pin is blocked (#5983)

Merged
SU
13d ago
+258-13

Summary

Fixes #5983: the footer kept naming the pinned account after a usage-limit refusal moved every later turn to a sibling, and it ignored the settings and CLI pins.

  • accountFooterSuffix now resolves the effective pin as CLI > settings > stored, and picks block-aware: a blocked pin (a blockedUntil in the future on the stored slot) is skipped for the first usable slot in the same ranking, and the suffix marks the blocked pin, e.g. @work (default blocked until 14:00). When every slot is blocked it names the top-ranked slot with a blocked marker instead of silently naming a slot that cannot serve. An expired block is treated as usable; no pin still falls back to the session's HRW winner, skipping blocked winners.
  • FooterComponent takes an optional resolveAccountPin resolver; interactive mode wires it to resolveClaudeAccountPin(getSessionClaudeAccountPin(sessionId), <settings pinnedAccount>, undefined), so the stored pin stays the fallback inside the footer function. The Grok chrome footer has no account display, so there is nothing to wire there.

Tests

  • New regression packages/coding-agent/test/suite/regressions/issue-5983-footer-serving-account.test.ts (6 tests): blocked pin names the serving sibling with the marker; settings pin overrides the stored pin (including when the settings pin itself is blocked); a blocked HRW winner is skipped; all-blocked names the pin with a marker; an expired block is usable.
  • RED before the fix: 5 failed / 1 passed on the pre-fix footer.ts (the expired-block case passes trivially on old code, as it ignores blocks). GREEN after: 6 passed.
  • Neighbouring footer suites pass: footer-account-display, footer-account-label-coloring, footer-fast-mode-icon — 18 passed in total.
  • bun run check exits 0 (lint, fmt, ratchet, pinned-deps, ts-imports, conflict markers, entry graphs, locks, tsc, browser smoke).

Residuals

  • Real-CLI QA through senpi-qa was not run in this round (time-boxed wave); the change is footer rendering only, covered by the regression tests above.
  • Per-model blocks (modelBlocks) are not considered: the footer does not know the active model at the suffix boundary, so only account-level blockedUntil gates the pick.
  • The new CLA for code-yeongyu repos is pending the user's signature (known item, not this PR's scope).

Summary by cubic

Fixes the interactive footer so it names the account that will actually serve: a pinned account blocked by a usage limit is skipped for the serving sibling, and CLI/settings pins now outrank the stored pin.

  • A blocked pin falls back to the next usable slot and is marked (@work (default blocked until 14:00)); when every slot is blocked the top-ranked one is named with a blocked marker, and expired blocks count as usable.
  • FooterComponent takes an optional account-pin resolver that interactive mode wires to CLI > settings > stored pin resolution.
  • The Anthropic CLI/settings pin is applied only when the current model uses the anthropic-subscription provider; other pooled providers keep their own stored pin even when a slot shares the pin's name.
  • Adds a regression suite and changelog entry covering blocked-pin, settings-pin, all-blocked, expired-block, and provider-gating scenarios.