Skip to content

feat: move chess pieces by typing SQL queries + UI polish#2

Merged
Devn913 merged 2 commits intomainfrom
copilot/improve-ui-ux
Apr 21, 2026
Merged

feat: move chess pieces by typing SQL queries + UI polish#2
Devn913 merged 2 commits intomainfrom
copilot/improve-ui-ux

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

The app showed SQL for every move but never let players drive moves via SQL. This adds a full SQL input workflow and several UX improvements.

SQL Move Input

  • New "Execute SQL Move" panel at the bottom of the SQL column
  • Accepts the same UPDATE chess_piece SET position = '...' WHERE position = '...' format the app already generates, plus shorthand (e2 e4, e2-e4, e2 to e4, e2e4)
  • Ctrl+Enter executes; parse/legality errors shown inline in red
  • Promotions triggered via SQL fall through to the existing promotion dialog
-- Full form (matches generated schema)
UPDATE chess_piece
SET    position = 'e4'
WHERE  position = 'e2'
  AND  color    = 'white';

-- Shorthand
e2 e4

Auto-fill on piece click

Clicking a board piece pre-populates the textarea with a move template and positions the cursor on ??? (the destination placeholder), so typing the target square is the only remaining step.

UPDATE chess_piece
SET    position = '???'    -- cursor lands here
WHERE  position = 'e2'
  AND  color    = 'white';

Other UX changes

  • Per-block ⎘ Copy button on every SQL log entry
  • Active-turn glow — current player's bar gets a green border highlight
  • Template textarea auto-clears after a successful board-click move or new game
  • state.sqlInputHasTemplate flag tracks template state (avoids magic-string detection)

Copilot AI and others added 2 commits April 21, 2026 06:49
…r-bar active-turn highlight

Agent-Logs-Url: https://github.com/Devn913/SQL_Chess/sessions/32b36d0d-69c4-4ded-994a-17eb4abc62fa

Co-authored-by: Devn913 <56478595+Devn913@users.noreply.github.com>
…able, regex verified

Agent-Logs-Url: https://github.com/Devn913/SQL_Chess/sessions/32b36d0d-69c4-4ded-994a-17eb4abc62fa

Co-authored-by: Devn913 <56478595+Devn913@users.noreply.github.com>
@Devn913 Devn913 marked this pull request as ready for review April 21, 2026 06:59
@Devn913 Devn913 merged commit 5683590 into main Apr 21, 2026
3 checks passed
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.

2 participants