Skip to content

Search bottle names and shelf words, register hashchange after boot, decommented worker checks, colour rule on app.js markup - #118

Merged
cjimti merged 1 commit into
mainfrom
search-names-boot-order-gate-strip
Sep 13, 2026
Merged

cjimti merged 1 commit into
mainfrom
search-names-boot-order-gate-strip

Conversation

@cjimti

@cjimti cjimti commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Search (#102)

matches() reads hayOf(d): the drink name plus each build ingredient's name, short and shelf word, folded once and kept on the drink as d._hay. The code match is unchanged and case-sensitive. check_search_case also reads hayOf() and catches fold(d.code). CLAUDE.md describes what search reads.

Counts under All bottles, each equal to the drinks holding that bottle: vermouth 78 (was 4), bitters 70 (was 0), syrup 48 (was 0), liqueur 60 (was 0), creme and crème 6 (was 0), lemons 38 (was 0), benedictine 18. 2,1,1,cl still finds 2.

Single-letter searches also match letters in the longer names: Q goes from 97 to 113 drinks and q from 64 to 82. Name matches already outnumbered code matches for single letters before this change (H: 19 by code, 121 on main).

Boot (#108)

The hashchange listener is added after boot's route(), beside the storage listener. A tab tapped while the data is loading no longer throws; boot's own route() reads the arrival hash.

Gate (#107)

  • jslex.decomment() blanks comments and keeps string and regex literals, on the same offsets.
  • check_worker is split into check_app_worker, check_sw_shell, evicts and keep_gated, and reads decommented source. The eviction must be in the live else of the https guard, and every .put( in keep() must sit inside the res.status === 200 block.
  • check_style.check_js_colours flags a literal colour in a style, fill, stroke, stop-color or color attribute in the markup app.js writes. The glass SVG files are out of scope, noted in the docstring.
  • test_checks.py adds 13 cases (232 to 245): eviction commented out, status check present but put not gated, seven colour cases plus one on the real icon markup, and two search cases.

Checked

Not checked: 390px, light mode and print (no visual change), DevTools Slow 3G throttling (fetch delay was scripted instead), typing speed on a phone.

Closes #102. Closes #107. Closes #108.

…decommented worker checks, colour rule on app.js markup

Search: matches() reads hayOf(d), the drink name plus each build ingredient's name, short and shelf word, folded once and kept on the drink as d._hay. The code match is unchanged and case-sensitive. check_search_case also reads hayOf() and catches fold(d.code). CLAUDE.md describes what search reads.

Boot: the hashchange listener is added after boot's route(), beside the storage listener, so a tab tapped while the data is loading no longer throws.

Gate: jslex.decomment() blanks comments and keeps literals. check_worker is split into check_app_worker, check_sw_shell, evicts and keep_gated, and reads decommented source: the eviction must be in the live else of the https guard, and every put in keep() must sit inside the status 200 check. check_style.check_js_colours flags a literal colour in a style, fill, stroke, stop-color or color attribute in the markup app.js writes. test_checks.py adds 13 cases (232 to 245).

Closes #102. Closes #107. Closes #108.
@cjimti
cjimti merged commit 365ad6d into main Sep 13, 2026
1 check passed
@cjimti
cjimti deleted the search-names-boot-order-gate-strip branch September 13, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant