Skip to content

Cardplay: slow restart — BEN opening-lead recompute / caching (solo) #257

Description

@Rick-Wilson

Deferred backlog item from an in-app beetle report (commit 81aaebd, /bidding-practice). Reporter: "File this as something to be investigated after we have the GUI refactoring worked out."

Two parts:

1. Cardplay needs an Undo button

Solo cardplay has no per-card undo. Add one (step back a card / a trick). Should compose with the shared table shell.

2. Restart-cardplay is slow (BEN recompute)

After playing several tricks, "Restart this deal" waits several seconds while BEN recomputes the opening lead. Reporter's notes:

  • The table service caches BEN calls, so a restart there is effectively instant.
  • The solo path has no local cache.
  • If the BEN service keeps its own cache, it doesn't appear to be hitting on identical restart calls.

To investigate:

  • Add a local opening-lead / BEN-call cache in the solo path, keyed by (deal, seat-to-play, played-card history) so a restart replays instantly.
  • And/or verify the BEN service cache actually hits on identical restart calls (it may be keying on something that changes per call).

Spans the frontend (benClient.js / useCardPlay / LocalEngine) and possibly the BEN service. Revisit after the table-view unification (Slice 3 area).

Filed from the dev-sink beetle bundle dev-reports/2026/07/cardplay-needs-undo-button-....

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions