Polish public historical page copy and add safe links for recent matches when source URLs are available.
9.4 KiB
9.4 KiB
id, title, status, type, team, supporting_teams, roadmap_item, priority
| id | title | status | type | team | supporting_teams | roadmap_item | priority | ||
|---|---|---|---|---|---|---|---|---|---|
| TASK-112 | Polish historical copy and add recent match links | pending | frontend | Frontend Senior |
|
historical-ui | high |
TASK-112 - Polish historical copy and add recent match links
Goal
Polish the public historical page copy so implementation words stay hidden from users, and add source links to recent match cards when a safe persisted match URL is available.
Context
HLL Vietnam has hidden the paused MVP/Elo UI from the public historical page. Manual visual review found three remaining issues:
- The ranking note includes this awkward fallback sentence: "Se muestra el ultimo periodo cerrado porque el actual todavia solo suma 0 cierres."
- Public UI copy still exposes the technical word "snapshot".
- Recent match cards show match IDs but do not link to the original match detail page.
Current product decisions remain unchanged:
- Keep historical ingestion active.
- Keep historical policy RCON-first, with public-scoreboard fallback only where RCON fails, lacks coverage or lacks parity for a specific historical operation.
- Keep Elo/MMR and advanced MVP UI paused.
- Hide technical implementation wording from public users.
- Add match links only when a persisted or safely derivable source URL is available.
Use branch:
chore/polish-historical-copy-and-match-links
Steps
- Work on branch
chore/polish-historical-copy-and-match-links. - Inspect the listed files before changing anything.
- Remove the public sentence: "Se muestra el ultimo periodo cerrado porque el actual todavia solo suma 0 cierres." from the ranking note/copy.
- Keep the ranking note useful if needed, but do not expose the awkward fallback explanation.
- Remove the word "snapshot" from public UI copy.
- Keep internal function names unchanged if renaming them would increase risk.
- Use Spanish, product-friendly public alternatives where needed, such as:
- "datos precalculados"
- "datos actualizados"
- "registro"
- "ultima actualizacion"
- "datos disponibles"
- Avoid "snapshot" in visible text, loading states, errors and metadata.
- Add match links for the recent matches section ("Ultimas partidas registradas") when a safe URL exists:
- Backend recent matches payload should expose a safe URL field such as
match_urlorsource_url. - Prefer using the persisted
raw_payload_reffromhistorical_matchesif available. - If
raw_payload_refis unavailable, derive the URL only if the server source/base URL and external match id are available and already trusted by existing historical server configuration. - Do not expose credentials or internal filesystem paths.
- Frontend recent match cards should render a visible link/button such as "Ver partida" when the URL exists.
- The link must open in a new tab with
target="_blank"andrel="noopener noreferrer". - If no URL exists, keep the current card layout without a broken link.
- Backend recent matches payload should expose a safe URL field such as
- Preserve existing normal historical UI:
- summary
- basic historical rankings
- recent matches
- server selector with only Todos, Comunidad Hispana #01, Comunidad Hispana #02
- Keep these paused/hidden:
- MVP mensual V1
- MVP mensual V2
- Comparativa V1 vs V2
- Elo/MMR mensual
- Do not change the historical ingestion policy or reintroduce Comunidad Hispana #03.
- Update
docs/decisions.mdonly if the implementation changes a documented contract or public historical UI assumption. - Validate the result.
- Move this task file to
ai/tasks/done/after validation is complete and the outcome is documented. - Commit and push the completed work to origin. Do not leave completed work only in local.
Files to Read First
frontend/historico.htmlfrontend/assets/js/historico.jsfrontend/assets/css/historico.cssbackend/app/historical_storage.pybackend/app/historical_snapshots.pybackend/app/payloads.pybackend/app/routes.pybackend/tests/if presentdocs/decisions.mdai/repo-context.mdai/architecture-index.md
Rules:
- Read these files before implementation.
- Keep the implementation scoped to public historical page copy, recent match payload shape and recent match card rendering.
- Do not change backend historical ingestion policy.
Expected Files to Modify
frontend/assets/js/historico.js- possibly
frontend/assets/css/historico.css - possibly
backend/app/historical_storage.py - possibly
backend/app/historical_snapshots.py - possibly
backend/app/payloads.py - possibly backend tests if present
- possibly
docs/decisions.md ai/tasks/done/TASK-112-polish-historical-copy-and-match-links.md
Rules:
- Prefer modifying only these files.
- If additional files become necessary, explain why in the task outcome and commit message.
- The task file should be moved from
ai/tasks/pending/toai/tasks/done/only after validation is complete.
Expected Files Not to Modify
frontend/index.html- Docker/Compose configuration
- local
.env - database migrations
- persisted data
- Elo/MMR backend implementation files
- historical ingestion policy/config
- unrelated backend modules
- unrelated frontend pages
Constraints
- Keep the change minimal and verifiable.
- Preserve HLL Vietnam project identity: military, Vietnam, tactical, sober.
- Do not reintroduce paused MVP/Elo UI.
- Do not reintroduce Comunidad Hispana #03.
- Do not change historical ingestion policy.
- Do not delete backend code, migrations, snapshots/data or endpoints.
- Do not add real credentials, secrets, passwords or tokens.
- Do not expose credentials or internal filesystem paths through match URLs.
- Do not introduce unnecessary frameworks or dependencies.
- Keep frontend changes compatible with direct browser opening where applicable.
- Confirm
backend/runtime/is not created or committed.
Validation
Before completing the task:
- Run
git status. - Run
node --check frontend/assets/js/historico.js. - Run
powershell -ExecutionPolicy Bypass -File scripts/run-integration-tests.ps1. - Run
docker compose down. - Run
docker compose up -d --build. - Run
docker compose ps. - Run
Invoke-WebRequest http://localhost:8000/health | Select-Object -ExpandProperty Content. - Run
Invoke-WebRequest http://localhost:8080 | Select-Object -ExpandProperty StatusCode. - Verify served
historico.html/JS output or manual browser:- no visible word "snapshot"
- no visible sentence "Se muestra el ultimo periodo cerrado porque el actual todavia solo suma 0 cierres."
- recent match cards still render
- when a match URL exists, a "Ver partida" link appears
- server #03 is not visible
- paused MVP/Elo blocks remain hidden
- Confirm no database migrations or persisted data changed.
- Confirm
backend/runtime/is not created or committed. - Review
git diff --name-onlyand confirm changed files match the expected scope.
If a configured validation command cannot be run, document the exact reason in the outcome.
Commit And Push Requirements
- Run validation before committing.
- Run
git status. - Stage only intended files.
- Commit with a clear message, for example:
chore: polish historical copy and match links - Push the branch to origin.
- Do not leave completed work only in local.
Outcome
Completed.
- Validation performed:
git status --shortnode --check frontend/assets/js/historico.jspowershell -ExecutionPolicy Bypass -File scripts/run-integration-tests.ps1docker compose downdocker compose up -d --builddocker compose psInvoke-WebRequest http://localhost:8000/health | Select-Object -ExpandProperty ContentInvoke-WebRequest http://localhost:8080 | Select-Object -ExpandProperty StatusCode- served
historico.htmlandhistorico.jscopy checks for removed public fallback/snapshot wording - focused temporary-storage check confirming
match_urlis exposed from a safe persisted match reference
- Public copy changes made:
- Removed the fallback sentence about showing the previous closed period because the current one had 0 closures.
- Replaced visible
snapshotwording in loading states, errors, metadata and empty copy with product-facing Spanish alternatives such asdatos,datos precalculados,registroandresumen. - Corrected the all-servers summary note copy.
- Backend payload field used for match links:
match_url. - URL source: persisted
historical_matches.raw_payload_ref, accepted only when it is an HTTP(S)/games/URL on the configured historical serverscoreboard_base_url. - No credentials or internal filesystem paths are exposed through
match_url; unsafe or off-origin values resolve to no link. - Normal historical UI still renders through the served frontend and backend health checks.
- Comunidad Hispana #03 remains absent from the public selector, and paused MVP/Elo blocks were not reintroduced to
historico.html. - No migrations, persisted data, or
backend/runtime/were changed or committed. - Browser plugin note: the Browser plugin's Node execution tool was not exposed in this session after discovery, so rendered-page acceptance was verified through served frontend/API checks instead.
- Commit hash and push result: pending commit/push step.
Change Budget
- Prefer fewer than 5 modified files.
- Prefer changes under 200 lines when feasible.
- Split the work into a follow-up task if the scope grows beyond public copy, recent match URL payloads and recent match card rendering.