fix(#602): game mobile pass + #apexyard share + loop-engineering level#603
Conversation
…eering level - New capstone level "Engineer the loop" (levelLoop): toggle the guardrails that make a loop safe to run unattended (verify w/ tests+review, halt at human gate, budget+iteration ceiling, stop-on-no-progress, call named skills) and avoid the traps (self-approve merges, build-only verify, run unbounded). Reuses the cost-* toggle/meter UI; pass = all guardrails on, no trap enabled. 11 levels now. - Universal share message: "via @me2resh" -> "via #apexyard" across X / WhatsApp / Copy (dropped the X-only via= param; hashtag works as a brand tag everywhere). Card meta (twitter:site/creator) left as-is. - Mobile responsiveness: extended the @media(<=640px) block with the widget-level fixes the game lacked (RAG paper sheet, prompt-builder slots stack, knowledge- cutoff cards full-width, hallucination/injection docs, cost+loop toggles) plus a global overflow-x guard and a tighter <=380px pass. Touch was already handled (pointer events). Every round now fits a ~360-390px phone. - Bumped OG/Twitter "10 rounds" -> "11 rounds". Closes #602 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
atlas-apex
left a comment
There was a problem hiding this comment.
Code Review: PR #603
Commit: 2e105f92c45bf1205c652096ea2f1acb75765b36
Summary
Three changes to the self-contained site/game.html ("You vs. the LLM" game): (1) a new 11th level levelLoop ("Engineer the loop") cloned from the levelCost toggle-puzzle mechanic, (2) a universal share-message change from via @me2resh to via #apexyard, and (3) a mobile-CSS pass extending the @media (max-width:640px) block plus a new @media (max-width:380px) block. No build/test suite exists for site/; verified statically against the PR HEAD.
Checklist Results
- Architecture & Design: Pass — self-contained static file, no layering concerns; level cloned from an existing pattern.
- Code Quality: Pass —
node --checkclean; LEVELS=11; no global leakage (all locals insidelevelLoop). - Testing: N/A — static HTML/CSS/JS game, no coverage requirement (per PR + framework rules).
- Security: Pass — no secrets, no injection vectors; share URLs use
encodeURIComponent+noopener,noreferrer. - Performance: Pass.
- PR Description & Glossary: Pass — Summary + Testing + Glossary present; Closes #602 (OPEN).
- Summary Bullet Narrative: Pass — bullets are narrative (what + why).
- Technical Decisions (AgDR):N/A — clones an existing level pattern; no architectural decision.
- Adopter Handbooks: N/A — only
.htmltouched (no language handbook fires); architecture/general handbooks not relevant to a static game file; private custom-handbooks dir empty.
Issues Found
None.
Verification performed against HEAD 2e105f9:
1. New level levelLoop — wired correctly:
- Registered as the 11th
LEVELSentry (render:levelLoop) with matchingslide+foot. - Reuses the same helpers as sibling levels:
el,levelHeader,clear,addScore,showResult,hintBtn,footnote,stage,state.levelScores— all defined and in scope. - Reuses every
cost-*CSS class it references (cost-meter,cost-bill,cost-perk,cost-bar,cost-bar-fill,cost-target,cost-quality,cost-opts,cost-opt,cost-toggle,cost-knob,cost-opt-label,cost-opt-desc,cost-opt-tag) — all defined. - Same
locked/recalc/ submit /pointerEvents/temp-verdictshape aslevelCost— faithful clone, level is completable. - Scoring is sane:
SAFE_TOTAL=5; all 5 safe on + 0 risky →safe→ 100; any risky on → 25; partial →max(30, round((safeOn/5)*80)). Matches the PR's stated rubric. node --checkon the inline script passes — no syntax error, no global leakage.
2. Share message — consistent:
- X intent drops
&via=me2reshand embedsvia #apexyardin the encodedtext(%23apexyardround-trips to#apexyard);url=still present and encoded. fullLine(WhatsApp + Copy) appendsvia #apexyardand encodes cleanly. X and WhatsApp are mutually consistent. OG/Twitter copy bumped10 rounds→11 rounds.
3. Mobile CSS — no desktop regression:
- All new rules sit inside media queries (
:640pxextended, new:380pxblock). Both blocks are brace-balanced;:380pxopens after:640pxcloses. - Every targeted class is real (
rag-paper,pb-slot,pb-slot-label,pb-snippet,cut-q,inj-doc,cost-meter,cost-bill,cost-opt,lvl-title,emb-plane,tok-char,rag-tile). overflow-x:hiddencorrectly scoped tobody.
Suggestions
None blocking. Ship and verify live as planned.
Verdict
APPROVED (posted as a comment — GitHub blocks self-approval on own PR)
🤖 Reviewed by Rex (Code Reviewer Agent)
📌 Reviewed commit: 2e105f92c45bf1205c652096ea2f1acb75765b36
Summary
cost-*toggle/meter UI, so it inherits the mobile pass and adds zero new CSS. Ties the game to ApexYard's governed-looping thesis.via @me2resh→via #apexyardacross X, WhatsApp, and Copy. Dropped the X-onlyvia=me2reshintent param and embedded the credit in the message text, so the attribution travels as a brand hashtag on every channel instead of a mention that only resolves on X.twitter:site/creatorcard meta left as-is.@media (max-width:640px)block with the widget-level fixes it lacked (RAG paper sheet padding, prompt-builder slots stack vertically, knowledge-cutoff cards full-width, hallucination/injection docs, cost + loop toggles) plus a globaloverflow-xguard and a tighter@media (max-width:380px)pass. Touch interaction was already fine (drag uses pointer events). Every round now fits a ~360–390px phone with no horizontal scroll.10 rounds→11 roundscopy.Testing
node --checkon the inline script) — clean;LEVELSnow has 11 entries;levelLoopdefined + registered.… via #apexyardon X / WhatsApp / Copy.Closes #602
Glossary
pointerdown/move/upinput model handling mouse + touch with one code path — already used by the game's drag, which is why touch needed no changes.@media (max-width: …)rule that adapts layout below a screen width.