Skip to content

Added a button to fill the fourth hand when three hands have 13 cards each#235

Open
tameware wants to merge 5 commits into
dds-bridge:developfrom
tameware:fill-fourth-hand
Open

Added a button to fill the fourth hand when three hands have 13 cards each#235
tameware wants to merge 5 commits into
dds-bridge:developfrom
tameware:fill-fourth-hand

Conversation

@tameware

@tameware tameware commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

cursoragent and others added 2 commits July 14, 2026 22:55
When three hands each hold 13 distinct cards and the fourth hand is empty,
enable a Fill fourth hand button and automatically complete the deal with
the remaining 13 cards. Includes JS unit tests for the new logic.

Co-authored-by: Adam Wildavsky <adam@tameware.com>
Use Enter for filling an eligible fourth hand or running double-dummy on a complete deal, while styling unavailable actions clearly.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the DDS MVP web UI so that when three hands are complete (39 cards total), users can automatically fill the missing fourth hand, and it refines “Enter” key behavior to trigger the appropriate default action (fill vs. double-dummy).

Changes:

  • Added a “Fill fourth hand” button and supporting logic to compute and populate the missing hand from the remaining 13 cards.
  • Updated action availability/keyboard handling so Enter triggers fill when eligible, otherwise runs double-dummy only when all hands are complete.
  • Expanded coverage with new/updated E2E, JS unit, and CSS contract tests, and added CSS styling for enabled/disabled action buttons.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
web/tests/test_mvp_e2e.py Adds E2E coverage for Enter key behavior and the new Fill fourth hand flow; adjusts incomplete-deal validation test expectations.
web/tests/test_dds_mvp_css.py New CSS contract tests asserting enabled/disabled styling for the primary action buttons.
web/tests/dds_mvp_test.mjs Extends unit tests and mocks to cover fourth-hand fill state, action-button enablement, and Enter key routing.
web/dds_mvp.js Implements fourth-hand fill computation, action-button state updates, and global keydown handling.
web/dds_mvp.html Adds the Fill fourth hand button and IDs; makes buttons type="button"; defaults action buttons to disabled.
web/dds_mvp.css Styles enabled/disabled states for the primary action buttons.
web/BUILD.bazel Registers the new CSS py_test and includes it in the web test suite.

Comment thread web/dds_mvp.js
tameware and others added 3 commits July 15, 2026 08:44
The double-dummy action is disabled until all hands are complete, so its incomplete-hand error path and tests cannot execute through the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
Show all 52 cards by suit and gray cards as they are entered so users can see which cards remain available.

Co-authored-by: Cursor <cursoragent@cursor.com>
Display a live card count only when a hand exceeds 13 cards so overfilled hands are immediately identifiable.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@tameware tameware requested a review from zzcgumn July 15, 2026 14:29
@tameware tameware marked this pull request as ready for review July 15, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants