Skip to content

feat(catalog): expand to 103 values and preserve existing profiles - #363

Merged
DoctorDerek merged 20 commits into
mainfrom
feat/362-default-values-103
Oct 10, 2026
Merged

DoctorDerek merged 20 commits into
mainfrom
feat/362-default-values-103

Conversation

@DoctorDerek

@DoctorDerek DoctorDerek commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Implements the approved WAYVM v9.1 catalog expansion and v9.2 Craftsmanship authoring example: 103 built-in values, manual custom-value authoring with one informational example, and a durable upgrade for existing profiles and older backups.

  • Keep the original 100 source values, definitions, identities, and animal mappings unchanged, including Sexuality.
  • Add product-owned Ingenuity, Destiny, and Pets with stable identities and zero initial progress.
  • Preserve existing same-name custom values as distinct records, including their definitions and earned XP; unchanged names remain editable.
  • Remove starter-example cards, prefill actions, and add-all controls from web and native. Show only the approved plain-text Craftsmanship example inside Add value; its name and definition have one shared owner also consumed by representative authoring tests.
  • The example never fills a draft, saves data, or becomes a 104th built-in. Existing unmatched-search prefilling, player-authored drafts, explicit Save, and recovery remain intact.
  • Correct current-product counts and source attribution; an older backup preview reports its actual included-value count.

Closes #362

Substantive review map

The PR has 20 small semantic commits and 74 changed files: 29 production/copy owners and 45 regression/fixture files. The v9.2 follow-up touches ten existing files, only three of them production owners. Most original test changes replace default-count assumptions or retired example interactions; historical scheduler fixtures and the schema-one export golden bytes remain intact.

Concern Main owners What to review
Catalog and provenance Value.ts, CanonicalValues.ts, ValueToAnimalMap.ts, ValueRanking.ts Original 100 preserved; additions use wayvm:* IDs, null source ordinals, stable catalog ordinals, and existing animal assets.
Custom identity ActiveDeck.ts, CustomValueValidation.ts Legacy same-name records remain valid; newly authored or renamed collisions are still rejected.
Save and backup compatibility ActiveDeckCodec.ts, BattleProfileCheckpoint.ts, WayvmExport.ts, BattleProfileEvent.ts Read the recorded catalog before replay/upgrade; validate envelope and inner-catalog agreement.
Durable upgrade PlayerCatalogUpgrade.ts, persistence/portability/recovery actors Reuse the existing deck-revision transaction and atomic import owners; gate gameplay on durable acceptance and retain Retry recovery.
Shared transitions BattleProfileJournal.ts, DeckRevision.ts, BattleProfile.ts, RootMachine.ts One shared event/achievement application path; catalog version is explicit during replay and upgrade.
Authoring UI CustomValueInvitationCopy.ts, CustomValueDraftEditor.tsx, NativeCustomValueForm.tsx, CustomValueInvitation.tsx One compact informational example, blank initial fields, explicit saving, no selectable examples or add-all actions.
Product copy Shared introduction/information copy, editorial, import previews Current product says 103; historical source attribution still says 100.

Migration behavior

  • Fresh profiles begin with 103 built-ins. Existing legacy profiles hydrate and replay their old journal first, then commit one catalog upgrade through the existing durable store.
  • Retained XP, lifetime wins/comparisons, custom identities/text, settings, appearance, and unlocked/presented achievements remain intact.
  • Existing deck-revision rules restart current-cycle matching/current-cycle wins and clear Undo/Redo once. This is not a lifetime-progress reset.
  • New built-ins begin at zero; legacy custom Ingenuity/Destiny/Pets is neither merged, renamed, deleted, nor invalidated.
  • Valid older backups are decoded in their original catalog and upgraded within the existing atomic replacement; pre-import backup/recovery behavior is retained.
  • An upgrade write failure stays in the existing recovery presentation and offers Retry rather than exposing an unsaved playable upgrade.

Diagnosed CI failures repaired

  • Native information-panel test: replace the obsolete 100-value heading expectation with 103.
  • Results overlap tests: replace the hardcoded z-index 100 with the actual contract that the strongest row is above every other row. Preserve the real overlapping-pixel visibility checks at both widths.
  • Mouse and bunny battle tests: use locally verified seeds for the 103-value catalog so both cases still exercise their intended animals and windup/contact segments.

No meaningful tests were deleted, skipped, or weakened; no retry, timeout, workflow, or coverage-gate changes.

Local verification

Current v9.2 follow-up

  • Focused web integration: 63 passed across 2 suites.
  • Full native-renderer suite: 170 passed across all 35 suites; existing coverage gates pass.
  • Local production-preview Playwright: 24 passed, 0 failed, 0 retries across Chromium, Firefox, and WebKit. The 18 targeted journeys took 1.1 minutes; six enlarged-text authoring reflow checks took 18.3 seconds.
  • Browser coverage includes 103-default startup; blank authoring fields, informational guidance, explicit save and reload; strongest-row overlapping pixels at 320/1440; intended mouse/bunny battle segments; authoring at 200% text at 390/1440, including unmatched-search prefilling and draft retention.
  • Both web/native TypeScript checks, production web build, mandatory pnpm lint, pnpm format, and git diff --check passed.

Earlier catalog verification

  • Full current-worktree Vitest: 1,470 passed, 0 failed, 1 preexisting Linux-only skip on Windows. This full run predates the v9.2 follow-up; the focused integration run above is the follow-up evidence.
  • Final Splash/catalog-upgrade subset: 9 passed.
  • Earlier local cross-browser catalog/authoring/Undo-Redo/editorial journeys: 12 passed in 28.6 seconds.
  • Original source-record/source-animal-map hashes and schema-one export golden bytes/hash remain unchanged.

No new packages, workflows, build scripts, or test framework. Unrelated ignored worktrees were excluded from local Vitest discovery without modifying test configuration. Temporary QA preview stopped. Unrelated untracked Next-generated AGENTS.md and CLAUDE.md files were preserved.

Manual QA checklist

  1. Open an existing profile: retained XP/custom values remain; Ingenuity, Destiny, and Pets appear as separate built-ins. Current-cycle/Undo-Redo reset is the one-time existing deck-revision consequence.
  2. If an existing custom value shares a new built-in name, confirm its own definition/progress remains and its definition is still editable.
  3. From Home, open Add value with no existing draft: both fields are empty; one plain Craftsmanship example appears; Save is disabled until valid text is authored. Close the editor: no example remains on Home.
  4. Manually enter and save Craftsmanship, reload, and find its saved definition among 104 active values. No value should be added merely by opening or closing the editor.
  5. Confirm ordinary battles, results sorting, and ranking continue to work with the expanded catalog.

Boundaries and next task

The approved GDD publication/version save occurred separately; local mirrors and scratchsheets remain ignored. No controller, splash, localization, EAS/native build, physical-device acceptance, or other-repository changes. This is locally verified code, not a deployment or live-production claim. Hosted checks are not being awaited; merge remains with Mapachito.

Next approved order: Steam Deck-first controller acceptance → first-arrival polish → localization.

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
what-are-your-values-mapache Ready Ready Preview Oct 10, 2026 12:03am UTC

Request Review

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🧹 ESLint

Quality check 1 of 3

✅ Zero warnings.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🧪 Vitest

Quality check 2 of 3

✅ Vitest completed successfully.

 Test Files  199 passed (199)
      Tests  1471 passed (1471)
   Duration  106.21s (transform 4.48s, setup 44.74s, import 19.87s, tests 122.10s, environment 76.84s)

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🎭 Playwright

Quality check 3 of 3

✅ Playwright completed successfully.

Running 273 tests using 1 worker
    Error: expect(locator).toHaveAttribute(expected) failed
  1 flaky
  272 passed (20.8m)

Open preview deployment

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🗺️ XState v5 State Machine Diff Visualization

Architecture visualization

⚠️ Static XState analysis is unavailable.

Analysis exceeds 50 changed TypeScript files.

Inspect workflow run

@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.07843% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.04%. Comparing base (93189ac) to head (b59b78d).

Files with missing lines Patch % Lines
packages/machines/src/BattleProfileCheckpoint.ts 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #363      +/-   ##
==========================================
- Coverage   92.05%   92.04%   -0.01%     
==========================================
  Files         302      302              
  Lines        8781     8778       -3     
  Branches     2401     2407       +6     
==========================================
- Hits         8083     8080       -3     
+ Misses        369      368       -1     
- Partials      329      330       +1     
Flag Coverage Δ
native 93.26% <100.00%> (-0.04%) ⬇️
vitest 91.82% <95.91%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DoctorDerek

Copy link
Copy Markdown
Owner Author

Code reviewed and approved. QA pass. Merging now.

@DoctorDerek
DoctorDerek merged commit e0eebe0 into main Oct 10, 2026
11 checks passed
@DoctorDerek
DoctorDerek deleted the feat/362-default-values-103 branch October 10, 2026 01:20

This branch was successfully deployed

1 active deployment
Preview — b59b78df Deployed Oct 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expand the default catalog to 103 values without losing existing progress

1 participant