Skip to content

Web - #248

Merged
tameware merged 25 commits into
dds-bridge:developfrom
tameware:web
Jul 22, 2026
Merged

Web#248
tameware merged 25 commits into
dds-bridge:developfrom
tameware:web

Conversation

@tameware

@tameware tameware commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Multiple UI improvements.

Deployed to https://tameware.com/adam/bridge/dds/dds_mvp.html

cursoragent and others added 15 commits July 19, 2026 08:07
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>
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>
Remove the Fill fourth hand button and fill it automatically once three hands each hold 13 cards, leaving Enter for double-dummy on a full deal.

Co-authored-by: Cursor <cursoragent@cursor.com>
Limit the Enter shortcut to hand inputs, show the default outline only when Enter applies, and focus Double-dummy after loading a test deal.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reject incomplete deals before invoking DDS so direct calls receive a clear validation message instead of an engine error.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use one bare symbol map and apply red styling contextually so suit symbols retain their color independently of deck card pips.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restrict red styling to heart and diamond suit symbols so card ranks use black until entered, when they become gray.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use the existing direction names throughout internal hand maps, eliminating duplicate letter mappings and conversion helpers while preserving external PBN encoding.

Co-authored-by: Cursor <cursoragent@cursor.com>
Centralize the S-H-D-C sequence so PBN formatting, deck rendering, and suit holding logic cannot drift apart.

Co-authored-by: Cursor <cursoragent@cursor.com>
Represent suits by descriptive names throughout UI logic and convert to letter codes only at card and PBN boundaries.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep named suits and pips together internally, converting to compact card keys only at DOM, map, and PBN boundaries.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove redundant per-card guards while preserving duplicate and invalid-input behavior through the aggregate checks.

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 delivers multiple UI/UX improvements to the DDS web MVP page, including richer deal-entry feedback and stronger automated coverage (E2E + unit + CSS contract tests) to keep the UI behavior stable.

Changes:

  • Add live UI affordances while entering hands: deck-status visualization (with entered cards grayed) and per-hand card-count notes when exceeding 13 cards.
  • Improve “default action”/keyboard flow by disabling/enabling and focusing the “Double-dummy it!” button appropriately (including Enter-to-run behavior).
  • Expand test coverage: new CSS contract tests, expanded Node unit tests, and additional Playwright E2E scenarios; wire new test into Bazel web_tests.

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/dds_mvp.js Adds card modeling and new UI-update logic (deck status, card counts, default action, auto-fill fourth hand, Enter handling).
web/dds_mvp.html Adds deck-status container, per-hand card-count elements, and IDs/attributes needed for JS + accessibility and tests.
web/dds_mvp.css Styles for deck-status, entered-card graying, card-count notes, and default-action outline/disabled state.
web/tests/dds_mvp_test.mjs Expands Node unit tests and DOM mocking to cover new behaviors and rendering.
web/tests/test_mvp_e2e.py Adds Playwright E2E coverage for deck-status, card counts, focus behavior, Enter-to-run, disabled states, and 4th-hand autofill.
web/tests/test_dds_mvp_css.py Adds CSS “contract tests” to assert critical selector rules remain present and consistent.
web/BUILD.bazel Adds the new CSS py_test and includes it in the web_tests suite.

Comment thread web/dds_mvp.js
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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 marked this pull request as ready for review July 19, 2026 13:40
Lock in that auto-fill eligibility rejects non-bridge pips and null card entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tameware
tameware requested a review from tzimnoch July 22, 2026 02:43
Comment thread web/tests/dds_mvp_test.mjs Outdated
Comment thread web/tests/dds_mvp_test.mjs
Comment thread web/tests/dds_mvp_test.mjs
Comment thread web/tests/dds_mvp_test.mjs
tameware and others added 2 commits July 22, 2026 08:23
Draw glyphs via CSS :before on spade/heart/diamond/club-suit so red coloring stays on the symbol and out of the markup.

Co-authored-by: Cursor <cursoragent@cursor.com>
The fixture uses east_hearts "k" to exercise case normalization; make that intent visible in the test description.

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

Copy link
Copy Markdown
Collaborator Author

Thanks, @tzimnoch, for another thorough review!

Comment thread web/tests/test_dds_mvp_css.py Outdated
Comment thread web/tests/test_mvp_e2e.py Outdated
Comment thread web/dds_mvp.css
tameware and others added 5 commits July 22, 2026 19:23
Replace regex CSS unit tests with Playwright computed-style checks, and keep disabled or entered text fully opaque so a non-white background does not show through.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid a duplicate spade Ace so the card-count note tests exercise length, not invalid-card handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
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 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread web/dds_mvp.css Outdated
CSS: before content is unreliable for screen readers and copy/paste; keep pip coloring via explicit .deck-card rules instead.
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 5 out of 5 changed files in this pull request and generated no new comments.

@tameware
tameware merged commit d5b6dde into dds-bridge:develop Jul 22, 2026
7 checks passed
@tameware
tameware deleted the web branch July 22, 2026 19:26
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.

4 participants