Skip to content

fix(mac,web): other machines' rows in the popup show and spend their banked resets - #1569

Merged
deathemperor merged 2 commits into
mainfrom
fix/peer-banked-resets
Sep 24, 2026
Merged

deathemperor merged 2 commits into
mainfrom
fix/peer-banked-resets

Conversation

@deathemperor

@deathemperor deathemperor commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

The popup's other-machine rows (#1545) never showed a banked Claude reset and could not spend one: the Mac's PeerFleets.AccountDoc dropped resets on decode, its capability table did not map reset, PeerEngine had no reset, the desktop's forwardable list refused the verb, and its fingerprint would not have pushed on a spend.

All five now carry it. A peer row's ticket mark and menu item stage the reset like a local one, the one popup alert commits it, PeerEngine queues reset <that machine's fleet key> <n>, the desktop forwards it and the other machine's own reset verb re-checks the bank and its hold in its own words.

Tests: PeerFleetsTests (resets decode, .reset capability, the queued verb) and peerFleets.logic.test.ts (forwardable, fingerprint changes on a spend).

Before / after (dev instance on the demo swapd, peer rows from a hand-built peer-sync body; no real claim sent)

Before, the HyperNovae rows carry no ticket mark:

before

After, nova-a's mark is spendable and nova-b's is gray for its notAtLimit hold:

after

Pressing nova-a's mark opens the confirm:

confirm

Use reset queued {"command":"reset","args":["swapd/claude","1"],"machine":"env-hypernovae"} (read back with infinitusctl peer-sync); the next push answered it ok and carried the spent row, which the popup redrew:

after spend

Not captured: the desktop-side forward to a second machine (one machine here); the desktop's forwarding loop is unchanged apart from the allowlist and is covered by the logic test. The alert still reads "account 1's" for a peer row, the same wording a local row gets (#1561); naming the machine there is a follow-up.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Banked Claude resets from other machines are now shown in their popup rows and can be used there.
    • Reset availability and hold information now updates when remote account details change.

…banked resets

The peer-sync path (#1545) carried every row field the popup draws except
the bank #1554 added: the Mac's AccountDoc dropped `resets`, its capability
table had no `reset`, PeerEngine had no `reset`, the desktop's forwardable
list refused the verb and its fingerprint never pushed on a spend. So a
peer row showed no ticket mark, and a spend could not have run anyway.

Each of the five now carries it; the other machine's own `reset` verb still
re-checks the bank and its hold.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@deathemperor
deathemperor enabled auto-merge (squash) September 24, 2026 04:56
@github-actions github-actions Bot added size:M 30-99 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Sep 24, 2026
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: deathemperor/infinitus/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5624e32c-5041-4989-9dca-5ab0f96d7365

📥 Commits

Reviewing files that changed from the base of the PR and between 1019b25 and 0a94591.

📒 Files selected for processing (1)
  • apps/web/src/hooks/peerFleets.logic.test.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: deathemperor/infinitus/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 18e69ee2-b2b1-47c4-84b7-cfb1471d96fc

📥 Commits

Reviewing files that changed from the base of the PR and between edcc965 and 1019b25.

📒 Files selected for processing (6)
  • apps/mac/Sources/InfinitusCore/Engines/PeerEngine.swift
  • apps/mac/Sources/InfinitusCore/PeerFleets.swift
  • apps/mac/Tests/InfinitusCoreTests/PeerFleetsTests.swift
  • apps/mac/changelog.d/peer-banked-resets.md
  • apps/web/src/hooks/peerFleets.logic.test.ts
  • apps/web/src/hooks/peerFleets.logic.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Peer fleet account data now includes optional reset details, and reset is recognized as a peer capability and a forwardable command. The fleet fingerprint includes reset values so changes to those values change the fingerprint.

Changes

Peer banked resets

Layer / File(s) Summary
Decode peer reset data
apps/mac/Sources/InfinitusCore/PeerFleets.swift, apps/mac/Tests/InfinitusCoreTests/PeerFleetsTests.swift, apps/mac/changelog.d/peer-banked-resets.md
AccountDoc carries optional reset data into Account, and fleet capability parsing recognizes reset. Tests cover decoding and capability mapping. The changelog describes reset counts and spending on other machines' popup rows.
Forward peer reset commands
apps/mac/Sources/InfinitusCore/Engines/PeerEngine.swift, apps/mac/Tests/InfinitusCoreTests/PeerFleetsTests.swift, apps/web/src/hooks/peerFleets.logic.ts, apps/web/src/hooks/peerFleets.logic.test.ts
PeerEngine queues a reset command for the specified fleet and account. The web command allowlist accepts reset. Tests cover the queued command and command allowlist.
Detect reset snapshot changes
apps/web/src/hooks/peerFleets.logic.ts, apps/web/src/hooks/peerFleets.logic.test.ts
The fleet fingerprint includes reset availability, total, and hold reason. Tests cover changes to reset counts and availability.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 1019b

The peer-reset changes appear mergeable after normal checks; no actionable merge-blocking issue is established.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 5 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Mac and web changes that let other-machine popup rows display and spend banked resets.
Description check ✅ Passed The description explains the problem, implementation, tests, UI behavior, and before/after results. It does not use the template headings or checklist, but it provides the required information and inc…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 5 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@deathemperor
deathemperor merged commit 0ff109d into main Sep 24, 2026
21 checks passed
@deathemperor
deathemperor deleted the fix/peer-banked-resets branch September 24, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant