Search bottle names and shelf words, register hashchange after boot, decommented worker checks, colour rule on app.js markup - #118
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Search (#102)
matches()readshayOf(d): the drink name plus each build ingredient'sname,shortandshelfword, folded once and kept on the drink asd._hay. The code match is unchanged and case-sensitive.check_search_casealso readshayOf()and catchesfold(d.code). CLAUDE.md describes what search reads.Counts under All bottles, each equal to the drinks holding that bottle:
vermouth78 (was 4),bitters70 (was 0),syrup48 (was 0),liqueur60 (was 0),cremeandcrème6 (was 0),lemons38 (was 0),benedictine18.2,1,1,clstill finds 2.Single-letter searches also match letters in the longer names:
Qgoes from 97 to 113 drinks andqfrom 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
hashchangelistener is added after boot'sroute(), beside thestoragelistener. A tab tapped while the data is loading no longer throws; boot's ownroute()reads the arrival hash.Gate (#107)
jslex.decomment()blanks comments and keeps string and regex literals, on the same offsets.check_workeris split intocheck_app_worker,check_sw_shell,evictsandkeep_gated, and reads decommented source. The eviction must be in the liveelseof the https guard, and every.put(inkeep()must sit inside theres.status === 200block.check_style.check_js_coloursflags a literal colour in astyle,fill,stroke,stop-colororcolorattribute in the markupapp.jswrites. The glass SVG files are out of scope, noted in the docstring.test_checks.pyadds 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
make verifypasses.renderNext) each fail with a message naming the file and rule.#barset during Pouring gave no error and Bar rendered when the data landed. After boot#menu,#info,#barand#drink/martiniroute correctly;/#baron arrival opens Bar; no console errors.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.