Skip to content

Companion: final integration and its economy documented (#10) - #30

Merged
cmena92 merged 1 commit into
mainfrom
feat/10-integracion
Oct 29, 2026
Merged

cmena92 merged 1 commit into
mainfrom
feat/10-integracion

Conversation

@cmena92

@cmena92 cmena92 commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Closes #10

The last piece of the companion (#2). No new features: the gate shows that the pieces work together, keep existing data and leave the offline app as it was.

What the new checks prove (all in tools/test-companero.js, in a real browser)

  • Old profile: after opening and caring for the companion, coins, unlocks, palette, character, stats and name are byte for byte the same. A character bought in the core stays the companion's own.
  • New profile: goes through the real welcome, wears a rabbit, «medianoche» and a cap, and feeds a fruit. The balance drops exactly what was spent (400 → 5), with no console error.
  • Broken data: broken JSON, unknown ids, partial data and a future version each open the page with defaults and the balance untouched, with no console error.
  • «Erase everything» in the profile, through the real button and its red confirmation, leaves no chogan.companero.* key.
  • No network, no permissions:
    • no companion file uses fetch, XMLHttpRequest, WebSocket, sendBeacon or a remote URL;
    • each module is in the entry's files, so the service worker keeps it offline;
    • the APK still asks only to vibrate.
  • Languages:
    • every string in the five languages, none missing or extra;
    • Persian right to left; nothing wider than 390 px;
    • every name fits inside its card (also German at 1280 px);
    • every button has a name for a screen reader.

Documentation

COMPANERO.md (Spanish, for the team) documents:

  • the rule: wishes, never needs;
  • where coins come from: only from finishing games, via C.stats.record;
  • where they go;
  • the price of every item, which a test compares against CATALOGO;
  • the total of everything permanent: 2,770 coins;
  • the stored data, and the decisions.

It is a file of our own, not DECISIONS.md, which belongs to upstream.

One visual fix

In German, «Wasserschwein» broke out of its card. It now breaks at a soft hyphen («Wasser-schwein»), and any long name without one wraps inside its card.

Checks run locally

  • node tools/test-companero.js: 197 green (46 new).
  • node tools/test.js: 5,610 green.
  • ./tools/browser-check.sh: 52 of 52.
  • Screenshots at 390 px and 1280 px in the five languages, checked by the owner's agent.
  • Merge test with upstream/main: done in Sincronizar con el original 0.20.0 #28/Sync with upstream 0.20.0 (#28) #29. The fork is now level with upstream 0.20.0, so there is nothing left to conflict.

Outside this PR

  • The WebCom site (wccr_sitio) leaves the companion out of its game count, in its own PR there.
  • The release (v0.20.0-capybara.1) comes after this merges.

No new features. The final gate shows the pieces work together, keep
existing data and leave the offline app as it was:

- An old profile keeps its coins, unlocks, palette, character, stats
  and name after opening and caring for the companion; a character
  bought in the core stays the companion's own.
- A new profile goes through the welcome, wears a rabbit, a design and
  a cap, and feeds a fruit; the balance drops exactly what was spent.
- Broken JSON, unknown ids, partial data and a future version open the
  page with defaults and the balance untouched, with no console error.
- «Erase everything» in the profile removes every chogan.companero.*
  key, through the real button and its red confirmation.
- No companion file asks the network for anything, each module is in
  the entry's files for the service worker, and the APK still asks only
  to vibrate.
- Every string in the five languages, Persian right to left, nothing
  wider than 390 px, and every button named for a screen reader.

COMPANERO.md documents the rule (wishes, never needs), the sources and
sinks of coins, the price of every item (checked against CATALOGO by a
test), the total of 2,770 coins, the data and the decisions.

One visual fix: a long name broke out of its card in German; it now
breaks at its soft hyphen (Wasser-schwein).
@cmena92
cmena92 merged commit 989de78 into main Oct 29, 2026
3 checks passed
@cmena92
cmena92 deleted the feat/10-integracion branch October 29, 2026 08:39
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.

Integrar, migrar y validar la experiencia del compañero

1 participant