Skip to content

fix(#602): game mobile pass + #apexyard share + loop-engineering level#603

Merged
atlas-apex merged 1 commit into
devfrom
fix/GH-602-game-mobile-and-share
Jun 9, 2026
Merged

fix(#602): game mobile pass + #apexyard share + loop-engineering level#603
atlas-apex merged 1 commit into
devfrom
fix/GH-602-game-mobile-and-share

Conversation

@atlas-apex

Copy link
Copy Markdown
Collaborator

Summary

  • New capstone level — "Engineer the loop" 🔁 (level 11, after "Optimize the bill"). A toggle puzzle: make the loop safe to run unattended. Enable the five guardrails (verify with build+tests+review, halt at the human merge gate, budget+iteration ceiling, stop-on-no-progress, call named skills) and avoid the three traps (self-approve merges, build-only verify, run unbounded). Any trap → "runs off a cliff." Reuses the existing cost-* toggle/meter UI, so it inherits the mobile pass and adds zero new CSS. Ties the game to ApexYard's governed-looping thesis.
  • Universal share messagevia @me2reshvia #apexyard across X, WhatsApp, and Copy. Dropped the X-only via=me2resh intent 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/creator card meta left as-is.
  • Mobile responsiveness — the game already stacked the embedding/agent grids and header; this extends the @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 global overflow-x guard 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.
  • Bumped the OG/Twitter 10 rounds11 rounds copy.

Testing

  1. JS syntax verified (node --check on the inline script) — clean; LEVELS now has 11 entries; levelLoop defined + registered.
  2. Open the Netlify deploy preview on a phone (or desktop devtools at 360–390px) and play through every round — confirm no horizontal scroll, no clipped controls, and the new "Engineer the loop" level scores correctly (all 5 guardrails on + no trap = 100; any trap = "runs off a cliff").
  3. Confirm the share buttons produce … via #apexyard on X / WhatsApp / Copy.

Closes #602


Glossary

Term Definition
Loop engineering Designing the bounded loop that prompts an agent (discover→plan→execute→verify→repeat) instead of prompting each step yourself — the concept the new level teaches.
Pointer events A unified pointerdown/move/up input model handling mouse + touch with one code path — already used by the game's drag, which is why touch needed no changes.
Responsive breakpoint A @media (max-width: …) rule that adapts layout below a screen width.

…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 atlas-apex left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --check clean; LEVELS=11; no global leakage (all locals inside levelLoop).
  • 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 .html touched (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 LEVELS entry (render:levelLoop) with matching slide + 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-verdict shape as levelCost — faithful clone, level is completable.
  • Scoring is sane: SAFE_TOTAL=5; all 5 safe on + 0 risky → safe100; any risky on → 25; partial → max(30, round((safeOn/5)*80)). Matches the PR's stated rubric.
  • node --check on the inline script passes — no syntax error, no global leakage.

2. Share message — consistent:

  • X intent drops &via=me2resh and embeds via #apexyard in the encoded text (%23apexyard round-trips to #apexyard); url= still present and encoded.
  • fullLine (WhatsApp + Copy) appends via #apexyard and encodes cleanly. X and WhatsApp are mutually consistent. OG/Twitter copy bumped 10 rounds11 rounds.

3. Mobile CSS — no desktop regression:

  • All new rules sit inside media queries (:640px extended, new :380px block). Both blocks are brace-balanced; :380px opens after :640px closes.
  • 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:hidden correctly scoped to body.

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

@atlas-apex atlas-apex merged commit b3e9f4a into dev Jun 9, 2026
7 checks passed
@atlas-apex atlas-apex deleted the fix/GH-602-game-mobile-and-share branch June 9, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants