---
title: Add commissioner rollback for completed player auctions
type: task
status: draft
description: >-
  Allow a commissioner to roll back the result of a specific completed player auction within an
  ongoing draft (release player, restore team cap, log reversal transaction, broadcast). Replaces
  the existing handleRewind stub.
base_uri: user:task/league/add-auction-rollback-completed-player-auction.md
created_at: '2026-04-29T04:34:27.281Z'
entity_id: 559b2e9d-cc67-4ee1-9db1-b793d5ba7192
owner_identity_uri: █████████████████████████
priority: Low
public_read: true
tags:
  - user:tag/league-xo-football.md
updated_at: '2026-04-29T04:34:27.281Z'
visibility_analyzed_at: '2026-11-05T23:48:07.780Z'
---

A commissioner currently has no way to reverse the result of a completed player auction within an ongoing draft. A `handleRewind` stub exists at `app/views/components/auction-commissioner-controls/auction-commissioner-controls.js:37` (empty body) with a commented-out "Rewind" SpeedDialAction at lines 92-97, signalling the prior intent to add this feature. No API route or socket message type currently supports the operation; the `sold()` method at `api/sockets/auction.mjs:150-209` writes to `rosters_players`, `teams.cap`, and `transactions` with no inverse implemented.

## Implementation sketch

- New socket message type (e.g. `AUCTION_ROLLBACK`) handled in `api/sockets/auction.mjs` `_setup_message_handlers` (around lines 972-1012).
- Rollback writes the inverse of `sold()`: delete the matching `rosters_players` row, restore `teams.cap` by the auction value, insert a reversal `transactions` row (new transaction type or signed-amount convention).
- Restore the auction state to allow re-nomination of the player; broadcast updated state to all connected clients.
- Commissioner-only authorization gate.
- Wire up `handleRewind` in `auction-commissioner-controls.js` and uncomment the SpeedDialAction.

## Open questions

- Should rollback restore other teams' bids that were beaten by the winning bid (so they can re-bid), or simply nullify the auction and let the player be re-nominated cleanly? The latter is simpler.
- Audit trail: keep both the original `AUCTION_PROCESSED` transaction and the reversal, or delete the original? Keeping both preserves history.

## Source

Captured in Apple Notes "Auction View" (mod 2020-09-03); migrated during Apple Notes triage on 2026-04-29.
