Commit Graph
84 Commits
Author SHA1 Message Date
adamandClaude Opus 5.5 698fe9d14a polish the website
- show Wordle's praise (Genius ... Phew) for wins on the board and
  stats pages instead of repeating the score
- history: month-style calendar with dates and results, next to the
  summary numbers, replacing the small heatmap strip
- recent form as two rows of a week each
- fuller identicons at small sizes
- put "The word was" above the answer tiles, wrap the terminal demo
  on phones and hide keyboard hints on touch screens
- say where followed players show up (the home page leaderboard)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:36:27 +00:00
adamandClaude Opus 5.5 710c9c5b79 replace the duplicate header link with a player search
"Home" and "Find a player" both went to the home page. Swap the second
link for a search box in the header so a player can be looked up from
any page ("/" focuses it). Phones get a search button that jumps to the
search on the home page instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:30:02 +00:00
adamandClaude Opus 5.5 f278ab0ac1 stop won boards showing "null" on the website
A won board has no answer row, and passing that null straight to
replaceChildren printed it as the text "null" under the board. Add a
fill() helper that skips null children like h() does and use it on the
board page. Bump the asset version so browsers load the new wordle.js
alongside the new board.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:27:10 +00:00
adamandClaude Opus 5.5 fc3c74822f revamp the website
Rebuild the browser pages around shared wordle.css / wordle.js, still
served by the unchanged nginx config (same URLs and ?user= / ?board=
parameters, data from /wordle/rawstats and /wordle/rawboard):

- home: animated terminal demo, copyable ssh command, countdown to the
  next UTC day, player search with recent searches, and a leaderboard
  of followed players (kept in the browser) with today's results
- stats: stat cards, guess distribution with losses, today's result and
  the last 14 days
- history: calendar heatmap and a card per game, loading more on demand
- board: flip-in tiles, hold (or R) to reveal letters, the answer on a
  loss, copyable spoiler-free emoji result, previous/next game
- dark/light/system themes and a high contrast mode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 18:54:29 +00:00
adamandClaude Opus 5.5 5bafab3e10 don't highlight a stats bar after a loss
Since progress is saved before the final reveal, save_result runs with
ROW still on the last row, so losing on the sixth guess highlighted the
"6" bar as if the game had been won. Only highlight after a win.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 18:52:55 +00:00
adamandClaude Opus 5.5 eccee4d3f1 always remove the SSH key after a deploy
The clean up step was skipped whenever a transfer failed, leaving the
deploy key on the runner. Run it even when an earlier step fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 18:21:50 +00:00
adamandClaude Opus 5.5 45de1fd982 deploy website pages with the game
Copy the pages in www/html/wordle to /var/www/html/wordle on the server,
where nginx serves them from, on every deploy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 18:21:41 +00:00
adamandClaude Opus 5.5 7a95e50fe7 lowercase usernames on the website
The game saves usernames in lowercase, but the search box and the
user/board URL parameters were used as typed, so searching "Adam"
reported that the user had never played. Lowercase them before use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:50:50 +00:00
adamandClaude Opus 5.5 3d78ff7863 show board dates in UTC on the website
Board days are UTC epoch days (midnight UTC), but toLocaleDateString
formatted them in the viewer's timezone, so anyone west of UTC saw
every game dated the day before. Format them in UTC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:50:37 +00:00
adamandClaude Opus 5.5 4c6c53ff13 add website pages
Copies of the pages served from /var/www/html/wordle on the server:
the user search page (index.html), stats.html, games.html and
game.html. Browsers are sent here by nginx while curl gets the raw
board and stats files. These aren't deployed by the workflow yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:50:22 +00:00
adamandClaude Opus 5.5 8e62094a6f treat Ctrl-D at the guess prompt like Enter
Ctrl-D doesn't move the cursor to a new line, but the retry prompts
move up a line assuming Enter was pressed, so each Ctrl-D climbed up
the screen over the keyboard and board. It also quit the game, losing
an offline game to a stray key press.

On a terminal, print the missing newline and carry on as if Enter was
pressed. Only exit when input has really ended (not a terminal), so a
closed pipe still can't spin the retry loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:39:02 +00:00
adamandClaude Opus 5.5 0f8640e9e8 explain hard mode errors in guess prompt
Replace "GREEN Issue", "YELLOW Issue" and "POOL Issue" with messages
that say which letter broke which rule:

  3rd letter must be A
  Must contain R
  1st letter can't be R   (was yellow there before)
  S is not in the word    (strict mode, grey letter reused)

hard_mode_check now records the failing position, and a yellow letter
reused in the same spot gets its own code (6, previously the unused
"NEW Issue"). Drop the unused "Not A Valid Guess" code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:35:38 +00:00
adamandClaude Opus 5.5 6b07093d68 write the same answer line to both board files
On a loss the answer line was written to RESULT_FILE with the border
indent and bold, but CUR_RESULT_FILE only got the letters. Move the
answer line into render_answer and use it for the terminal and both
files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:32:28 +00:00
adamandClaude Opus 5.5 a3f9ae6a17 quit when input ends at the guess prompt
At end of input (Ctrl-D, or stdin closed) read returns straight away
with an empty guess, so the "Must be 5 letters" loop spun forever at
full CPU. If the game's parent process was killed first, the subshell
was left orphaned and spinning.

Exit retrieve_guess when read hits EOF, pass that back through the
retry prompts with a single recursive call, and quit from main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:31:21 +00:00
adamandClaude Opus 5.5 d34d98c15d only update stats for the daily game
update_stats ran for every online game, so practice games played after
the daily counted towards played/wins/losses and a practice loss reset
the streak. Move it inside the DAILY_DONE check with the board files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:27:24 +00:00
adamandClaude Opus 5.5 8dfebaa9f8 zero pad decimal part of average guesses
An average of 3.04 was shown as 3.4 because the hundredths weren't
padded. Pad with parameter expansion to keep the script bash-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:24:24 +00:00
adamandClaude Opus 5.5 f29d81e932 keep hard mode hints when resuming a game
hard_mode_check uses the previous row's greens and yellows, but these
weren't written to the progress file, so after resuming a game the next
guess could drop known green and yellow letters. Save them alongside
the rest of the game state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:19:24 +00:00
adamandClaude Opus 5.5 73f403693a save progress after every guess
Progress was only saved at the start of a game and on Ctrl-C, so a
dropped connection lost every guess made so far. Ctrl-C during the
reveal also saved the scored row without advancing ROW, which gave the
player that guess back on resume.

Save straight after each guess is scored (before the reveal) with the
next row, record the result before the final reveal, and make the
SIGINT trap only tidy up the terminal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:17:20 +00:00
abrown38andClaude Opus 5.5 1f6a5b4a44 validate username in online mode
Usernames are used in file names and URLs, so a '/' could write files
outside the game directory and a space broke the share links. Only
allow a-z, 0-9 and _ (max 32 chars) and re-prompt otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:12:44 +00:00
abrown38 437d46e975 add colour to keyboard 2026-09-29 17:07:46 +00:00
adam 7621938f04 set program name in help message
Deploy game to server / deploy (push) Successful in 8s
2026-02-11 21:43:00 +00:00
adam 1a9a440509 fix duplicate path in URL
Deploy game to server / deploy (push) Successful in 6s
2026-01-21 12:48:48 +00:00
adam d9a7c94125 add link to website
Deploy game to server / deploy (push) Successful in 7s
2025-11-29 03:50:26 +00:00
adam efa709e34e add online mode flag to help message
Deploy game to server / deploy (push) Successful in 8s
2025-11-23 21:22:10 +00:00
adam a7cdb712fd fix typo in function name
Deploy game to server / deploy (push) Successful in 7s
2025-09-27 21:14:39 +00:00
adam 75074d8e84 add stats url to online mode
Deploy game to server / deploy (push) Successful in 7s
2025-08-28 09:59:26 +00:00
adam 3487adf34c exit save_result if not in online mode
Deploy game to server / deploy (push) Successful in 30s
2025-04-23 21:22:03 +00:00
adam 2194d495e6 extra file for current board
Deploy game to server / deploy (push) Successful in 42s
2025-03-03 12:07:43 +00:00
adam 005a129919 change help message format
Deploy game to server / deploy (push) Successful in 6s
2025-02-22 20:00:30 +00:00
adam bdb3d4e4d1 Move signal trap initialization after game mode questions - Prevent progress files after incorrect username 2025-02-22 19:41:46 +00:00
adam 6bbcc5229b save progress at start of a game 2025-02-22 19:38:06 +00:00
adam 4029c00edc remove $ where not needed 2025-02-22 19:22:45 +00:00
adam 8327678209 only show board on daily win
Deploy game to server / deploy (push) Successful in 6s
2025-02-21 13:21:04 +00:00
adam d496319361 Add guess count out of 6 on win
Deploy game to server / deploy (push) Successful in 7s
2025-02-21 13:12:19 +00:00
adam 107fd30b00 print spoiler free board after a game 2025-02-21 13:07:03 +00:00
adam 0a5d0be050 change spacing on math
Deploy game to server / deploy (push) Successful in 7s
2025-02-20 12:50:17 +00:00
adam 357c74cf08 calculate average guesses and fix divide by 0 bug
Deploy game to server / deploy (push) Successful in 8s
2025-02-16 17:05:57 +00:00
adam e138f71a62 start games played at 0
Deploy game to server / deploy (push) Successful in 6s
2025-02-14 16:31:02 +00:00
adam 064b85aac2 add 1 to graph axis to match number of guesses
Deploy game to server / deploy (push) Successful in 7s
2025-02-14 16:27:01 +00:00
adam fba5cc07ae fix pool issue bug
Deploy game to server / deploy (push) Successful in 5s
2025-02-14 16:14:31 +00:00
adam ce2a14fbe6 track stat
Deploy game to server / deploy (push) Successful in 6s
2025-02-14 16:00:39 +00:00
adam 138c254591 initalise stats to 0 and always update
Deploy game to server / deploy (push) Successful in 7s
2025-02-14 14:43:07 +00:00
adam dfe8ea7f13 track user stats 2025-02-14 14:05:45 +00:00
adam 1ee78db9bf only print share URL after daily wordle
Deploy game to server / deploy (push) Successful in 7s
2025-02-13 23:43:14 +00:00
adam da696e5df2 display share URL with online mode
Deploy game to server / deploy (push) Successful in 7s
2025-02-13 23:37:03 +00:00
adam 00490f53c7 Merge branch 'feature/online_mode'
Deploy game to server / deploy (push) Successful in 7s
2025-02-12 19:42:35 +00:00
adam 8d92cfe57d fix strict hard mode pool bug with double letters 2025-02-12 19:21:14 +00:00
adam a7a19d33b6 uncomment epoch thing 2025-02-12 13:50:06 +00:00
adam 2dc552c74e after daily word complete new words can be played 2025-02-12 13:36:01 +00:00
adam 556c1ec598 working, may still be bugs 2025-02-12 11:30:38 +00:00