Skip to content

task 12 context

Xopher edited this page Oct 28, 2026 · 1 revision

Task 12 context from the lead (decisions the brief cannot know)

Earlier tasks you consume (on this branch; read with chemx read <file> --outline / --symbol=<name>):

  • T2 src/lib/services/core/packs/projects/movingOut.ts (the Moving Out type: its four phases and the roof's Hand Over the Keys), src/lib/services/core/packs/movingPack.ts (MovingAnswers, the move-* quests, categories cat-move-<phase>, movingBeastId).
  • T4 src/lib/services/projects/projectChores.ts (ProjectChore with custom, WHOLE_HOUSE_ID, rehomeChores).
  • T8/T10 src/lib/services/projects/projectService.ts (startProject, settleReadyFloors, ...).
  • T9 src/lib/services/projects/projectWizard.ts (ProjectDraft, newProjectDraft, projectIdOf) and src/app/SideMenu/XpSettings/components/XpProjectWizardModal.vue.
  • T11 the finish (credits, trophy sheet in Hometown).

Rulings (decided; follow them):

  1. prefillMovingOut(answers, openMoveQuests, heroes) lives in a pure module (e.g. src/lib/services/projects/movingOutPrefill.ts) with tests/unit/movingOutPrefill.spec.ts. An open move-* quest becomes a custom chore on its phase (from its category cat-move-<phase>), keeping its name, size and assignees; camp and unpack quests are left out; a quest whose phase is not a Moving Out phase is left out (say which in the report). The rooms come from the last Moving House answers; with no answers, the default house.
  2. The wizard opens pre-filled: give XpProjectWizardModal an optional initial draft (or type id + prefill) prop, so the Moving House entry opens it on Moving Out with the prefill and the wizard keeps every rule (dates, reward, one active project). Do not duplicate the wizard.
  3. Building the Moving Out project from the prefill retires the Old House: remove the gen-move-house temple record, delete the open move-* quests that were carried into the draft as chores (they live in the tower now; leaving them would put every chore on the board twice), keep every paid quest and its log, and keep the camp / unpack quests on the board. Reset the heroes' saved runs in the Old House (forgetOldHouseWalks, src/lib/services/core/packs/movingTempleReset.ts). Pin each part with a spec case.
  4. The Old House spot in Hometown hides when the active or the last project is Moving Out (any status but abandoned; an abandoned Moving Out run brings the Old House back only if its temple record still exists, otherwise it stays hidden). Keep the existing family data: never wipe a store.
  5. Removal: delete buildMovingTemple, movingTempleBackup, src/lib/services/core/packs/movingTemple.ts, src/lib/services/core/packs/movingTemple/houseRecord.ts, tests/unit/movingTemple.spec.ts and the houseRecord specs only once chemx q -g "buildMovingTemple" and chemx q -g "houseRecord" find no importer outside them. KEEP houseRooms.ts, housePlanner.ts, movingTempleReset.ts (if still used) and tests/unit/movingHouseFixtures.ts (Task 6's matrix imports it; earlier ruling R6). Repoint anything else that imported the deleted modules.
  6. The Cypress spec tests/e2e/specs/moving-temple.spec.js (and moving-pack.spec.js if it walks the Old House build) exercises the removed builder: update it to the new flow (the moving entry opens the wizard on Moving Out) or remove the parts that test the deleted code; say which in the report. CI's E2E smoke on master runs only new-hero, party-style specs listed in .github/workflows/tests.yml; check that none of them reaches the removed code.
  7. The e2e walk (tests/e2e/specs/project-tower.spec.js, 390x844, cy.seedWorld(), cy.tapToWakeAudio()) follows the brief. The credits show the makers' names and roles only (owner ruling 2026-10-27: no ages anywhere); assert "Xopher Pollard aka XP" and never an age. Run it on this worktree's OWN dev server: the shared :8100 serves the main checkout's files, not yours. These two raw commands are allowed for this task only, from the worktree root:
    • start: pnpm vue-cli-service serve --port 8123 in the background (or pnpm exec ionic serve --port 8123 --no-open if the vue-cli one does not serve the app the way ionic does); wait until curl -s localhost:8123 answers;
    • run: pnpm vue-cli-service test:e2e --headless --browser chrome --url http://localhost:8123 --spec tests/e2e/specs/project-tower.spec.js (Cypress 8; screenshots land in tests/e2e/screenshots);
    • ALWAYS stop the server when done, by port: lsof -ti:8123 | xargs -r kill (never pkill -f: it kills the shell). A dev server costs 2-5 GB: start it once, run the spec as often as you need, stop it. If the walk cannot pass for a reason outside this task (a seed fixture gap, an unrelated screen bug), report DONE_WITH_CONCERNS with the failing step and the screenshot path rather than weakening the walk.
  8. Do not commit screenshots or videos (the lead commits by path; list only source files in your report).
  9. From Task 11: XpProjectWizardModal.vue already takes an optional typeId prop (the trophy's "Start again" uses it); extend that same entry for the Moving Out prefill (e.g. an optional initial draft) instead of adding a second way in. The finish lives in src/hooks/useProjectFinish.ts, src/lib/services/projects/projectFinish.ts, CreditsRoll.vue and ProjectTrophySheet.vue; the credits show roles and names from src/lib/services/copy/credits.ts.
  10. Audit ratchet (CI gate): add no new hazards. Keep each file you touch at 500 lines or fewer if it was under (HomeTown.ts, PacksSettings.vue), name every condition before its if but never name a boolean only to return it, no long repetitive switch, function complexity 12 or under. Before you report, run chemx audit at the worktree root and include its gate: line (ignore the modified chemx-ratchet.json: the local chemx rewrote it; the lead never commits it). Deleting files lowers counts; that is fine.

Table of Contents


Home - See Pages

Developer Docs

Start Screen

User Management

My Portal

My Home

The City (Hometown)

The World Map

The Dungeon

Game Master

Settings

Support & Glossary

About XP

Clone this wiki locally