Skip to content

Host follows the account being played; public page names Fabled companions (1.1.0, relay 0.3.1) - #10

Merged
facusantillo merged 2 commits into
mainfrom
fix/follow-active-account
Oct 20, 2026
Merged

facusantillo merged 2 commits into
mainfrom
fix/follow-active-account

Conversation

@facusantillo

Copy link
Copy Markdown
Owner

Qué pasaba

VERIFICACION K8 (2026-10-20): después del cambio de región (que es otra cuenta), HDT exportaba el mazo nuevo a la carpeta de la cuenta nueva, pero el host había elegido su cuenta una sola vez al arrancar (el collection.json más reciente) y no volvía a mirar. Resultado: overlay, !deck y la página pública seguían con el mazo de la región vieja ("Updated 1 h ago") mientras HDT mostraba otro.

Además, la página pública mostraba Card #120064 / Card #120068 en un mazo con una carta Fabled: sus dos compañeras no son coleccionables y cards.collectible.json no las trae (el mismo F11 que tuvo el panel el 15/10).

Qué cambia

  • OverlayStateService reevalúa la cuenta en cada poll: gana la que tenga el archivo del exporter (collection, decks, rank, active-deck) o la partida terminada más reciente; --account sigue fijando una. Al cambiar, olvida polvo, rango, mazo y sync de la anterior y relee la carpeta nueva en el mismo poll (service.log: Now following account …). Power.log se lee antes de elegir la cuenta, así una partida terminada de otra cuenta es en sí la evidencia.
  • GameRepository.Latest() siembra la evidencia desde la base al arrancar.
  • KickStreamService cierra la sesión que esté abierta aunque el overlay ya siga otra cuenta (LatestOpen(null)), y toma el rango final de la cuenta de la sesión.
  • Página pública: pide el cards.json completo solo cuando algo queda sin resolver (tres veces el tamaño; de ahí el fallback). Bundle regenerado; RELAY_VERSION 0.3.1 → hace falta el tag worker-v0.3.1.
  • Tests: The_overlay_follows_the_account_whose_exports_are_newer (ida y vuelta entre dos cuentas), LatestOpen(null). 211 .NET + 67 vitest en verde.
  • Docs: VERIFICACION K8.6/K8.7, PROGRESO, overlay.md.

Para probar (después de mergear)

  1. Tag worker-v0.3.1 (deploy del relay) y zip nuevo desde main.
  2. Con HDT abierto, cambiar de región o de cuenta y elegir un mazo: en pocos segundos el panel, !deck y /d/tsukuru-tv muestran el mazo de esa cuenta.
  3. Abrir /d/tsukuru-tv con un mazo Fabled: las compañeras salen con nombre.

Generated by Claude Code

claude and others added 2 commits October 20, 2026 20:54
…nions (relay 0.3.1)

VERIFICACION K8, 2026-10-20: after a change of region (a new account) HDT exported the new deck into the new account's inbox folder, but the host had chosen its account once at start-up (newest collection.json) and never looked again, so the overlay, !deck and the public page stayed on the old region's deck ("Updated 1 h ago").

- OverlayStateService re-evaluates the account on every poll: the one with the newest exporter file (collection, decks, rank, active-deck) or finished game wins; --account still pins. On a switch it drops dust, rank, deck and sync of the previous account and re-reads the new folder in the same poll (log: "Now following account …"). Power.log is polled before the account is chosen, so a finished game of another account is itself the evidence; completed games are counted after the choice.
- GameRepository.Latest() seeds the evidence from the database at start-up.
- KickStreamService closes the session that is open even when the overlay follows another account by then (StreamSessionRepository.LatestOpen(null)); rank_end is taken from the session's account.
- Public deck page: cards.collectible.json has no tokens, so the two companions of a Fabled card showed as "Card #id" (same as the panel's F11 on 2026-10-15). The browser script now fetches the full cards.json only when something stays unresolved. Bundle rebuilt; RELAY_VERSION 0.3.1.
- Tests: The_overlay_follows_the_account_whose_exports_are_newer (host, both directions), LatestOpen(null). 211 .NET + 67 vitest.
- Docs: VERIFICACION K8.6/K8.7, PROGRESO, overlay.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RaFitGHCUzwkHrFTjz8qJb
@facusantillo
facusantillo merged commit 14741c0 into main Oct 20, 2026
3 checks passed
@facusantillo
facusantillo deleted the fix/follow-active-account branch October 20, 2026 22:06
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.

2 participants