Skip to content

Conversation

Copy link

Copilot AI commented Jan 17, 2026

The login screen had critical UX issues: typing 'r' or 'p' in credentials triggered unwanted actions, error messages exposed technical details, form text wasn't centered, and no username persistence existed.

Changes

Input conflict resolution

  • Removed bare key handlers that intercepted form input
  • Replaced with mouse-driven button UI for mode switching and password visibility

Error message sanitization

  • Map connection failures → "Couldn't connect to server"
  • Map 401/404 → "That user wasn't found or password is incorrect"
  • Map timeouts → "Server is taking too long to respond"

Form field rendering

  • Center text vertically/horizontally using get_rect(center=...)
  • Normalize font to freesansbold.ttf across all fields

Username persistence

  • Add "Remember username" checkbox (Shift+S toggle)
  • Save to .saved_username, auto-load on init
  • Optimize: clear file only on state transition, not every frame

UI controls added

  • Show/Hide button adjacent to password field
  • Submit button (contextual "Login"/"Register" label)
  • Mode toggle button ("Switch to Login"/"Switch to Register")
# Button click detection in event loop
if event.type == pygame.MOUSEBUTTONDOWN:
    if self.toggle_password_button_rect.collidepoint(mouse_pos):
        self.show_password = not self.show_password

All keyboard shortcuts (Tab/Enter/ESC) preserved.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 17, 2026 06:39
Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
…mize I/O

Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Copilot AI changed the title [WIP] Add client-server architecture with Docker support Fix login screen UX: eliminate input conflicts, add clickable UI, improve error handling Jan 17, 2026
@dmccoystephenson dmccoystephenson marked this pull request as ready for review January 17, 2026 06:46
@dmccoystephenson dmccoystephenson merged commit 14f3278 into feat/server-client Jan 17, 2026
2 checks passed
@dmccoystephenson dmccoystephenson deleted the copilot/sub-pr-266-again branch January 17, 2026 06:47
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