147 lines
5.3 KiB
Markdown
147 lines
5.3 KiB
Markdown
---
|
|
id: TASK-135
|
|
title: Fix RCON match detail faction assets and icon display
|
|
status: pending
|
|
type: frontend
|
|
team: Frontend Senior
|
|
supporting_teams:
|
|
- Experto en interfaz
|
|
roadmap_item: rcon-full-data
|
|
priority: high
|
|
---
|
|
|
|
# TASK-135 - Fix RCON Match Detail Faction Assets And Icon Display
|
|
|
|
## Goal
|
|
|
|
Polish faction presentation in the historical RCON match detail scoreboard so faction icons load reliably, are visibly larger, and no longer show long descriptive faction subtitles.
|
|
|
|
## Context
|
|
|
|
The historical match detail page already renders a RCON/materialized match detail view with a scoreboard-like result block, player table, local faction image paths, and local map/faction assets being added by the user.
|
|
|
|
The current direction is acceptable, especially the central result with score, map, Warfare and winner. Remaining rough details are visual and asset-related:
|
|
|
|
- German/Eje icon is not visible, likely due to wrong asset path or name.
|
|
- Faction icons are too small.
|
|
- Faction subtitles such as `Fuerzas estadounidenses` and `Ejército alemán` should be removed.
|
|
- Event timeline must remain hidden.
|
|
- Confidence/source/base must remain hidden.
|
|
- No `snapshot` wording.
|
|
- No Elo/MVP blocks.
|
|
- No Comunidad Hispana #03.
|
|
|
|
## Files to Read First
|
|
|
|
- `AGENTS.md`
|
|
- `ai/architecture-index.md`
|
|
- `ai/repo-context.md`
|
|
- `ai/orchestrator/frontend-senior.md`
|
|
- `frontend/historico-partida.html`
|
|
- `frontend/assets/js/historico-partida.js`
|
|
- relevant CSS used by `historico-partida.html`
|
|
|
|
## Expected Files to Modify
|
|
|
|
- `frontend/assets/js/historico-partida.js`
|
|
- relevant CSS used by `historico-partida.html`
|
|
- this task file when moving it from `ai/tasks/pending` to `ai/tasks/done`
|
|
|
|
If additional files are necessary, document why in the task outcome.
|
|
|
|
## Implementation Requirements
|
|
|
|
1. Work from a dedicated branch: `codex/task-135-faction-assets`.
|
|
2. Verify faction assets exist in `frontend/assets/img/factions`.
|
|
3. Use `.webp` paths, not `.svg`, for faction icons:
|
|
- `frontend/assets/img/factions/us.webp`
|
|
- `frontend/assets/img/factions/germany.webp`
|
|
- `frontend/assets/img/factions/soviets.webp`
|
|
- `frontend/assets/img/factions/britain.webp`
|
|
4. Fix the German/Eje icon not displaying.
|
|
5. Add graceful fallback if any faction image is missing.
|
|
6. Increase faction icon size in the scoreboard layout.
|
|
7. Remove long faction subtitle text such as:
|
|
- `Fuerzas estadounidenses`
|
|
- `Ejército alemán`
|
|
- `Fuerzas británicas`
|
|
- `Ejército soviético`
|
|
8. Keep only main side/faction labels:
|
|
- `Aliados`
|
|
- `Eje`
|
|
- `Soviéticos`, `Británicos` or `USA` only if needed
|
|
9. Do not show long descriptive subtitles under faction labels.
|
|
10. Keep the winner marker if it remains visually subtle.
|
|
11. Preserve the player table.
|
|
12. Keep the event timeline hidden.
|
|
13. Keep confidence/source/base hidden.
|
|
14. Do not add implementation/debug text to the UI.
|
|
|
|
## Constraints
|
|
|
|
- Keep the change small and focused.
|
|
- Preserve the dark HLL Vietnam visual identity.
|
|
- Do not introduce frameworks or dependencies.
|
|
- Do not modify backend behavior unless a minimal fallback contract issue is discovered and documented.
|
|
- Do not modify unrelated files.
|
|
- Do not reintroduce event timeline, confidence/source/base cards, `snapshot` wording, Elo/MVP blocks or Comunidad Hispana #03.
|
|
|
|
## Validation Commands
|
|
|
|
Run the relevant checks before marking this task done:
|
|
|
|
- `node --check frontend/assets/js/historico-partida.js`
|
|
- `node --check frontend/assets/js/historico.js`
|
|
- `node --check frontend/assets/js/historico-recent-live.js`
|
|
- `python -m compileall backend/app`
|
|
- `powershell -ExecutionPolicy Bypass -File scripts/run-integration-tests.ps1`
|
|
- `powershell -ExecutionPolicy Bypass -File scripts/run-rcon-data-pipeline-tests.ps1`
|
|
- `docker compose up -d --build backend frontend`
|
|
- `Invoke-WebRequest "http://localhost:8000/health" | Select-Object -ExpandProperty Content`
|
|
- `Invoke-WebRequest "http://localhost:8000/api/historical/recent-matches?server=all-servers&limit=10" | Select-Object -ExpandProperty Content`
|
|
|
|
## Manual Verification
|
|
|
|
Open:
|
|
|
|
- `http://localhost:8080/historico.html`
|
|
- `http://localhost:8080/historico-partida.html?server=comunidad-hispana-02&match=comunidad-hispana-02%3A1779178461%3A1779183861%3Acarentanwarfare`
|
|
|
|
Then hard refresh with `Ctrl+F5` and verify:
|
|
|
|
- Score remains `3 : 2`.
|
|
- Winner remains `Aliados`.
|
|
- Map remains `Carentan`.
|
|
- Duration remains `1 h 30 min`.
|
|
- German/Eje icon is visible.
|
|
- Faction icons are larger than before.
|
|
- Long faction descriptions are gone.
|
|
- AntonioPruna still shows 1 kill, 0 deaths, `M1 GARAND`.
|
|
- Victim row still shows `death_by` AntonioPruna.
|
|
- No timeline/events section is visible.
|
|
- No confidence/source/base cards are visible.
|
|
- No `snapshot`, Elo/MVP block or Comunidad Hispana #03 appears.
|
|
|
|
## Git Requirements
|
|
|
|
- Use branch `codex/task-135-faction-assets`.
|
|
- Move only this task from `ai/tasks/pending` to `ai/tasks/done` when complete.
|
|
- Add `Outcome` and `Validation Result` sections before completing the task.
|
|
- Stage only intended files.
|
|
- Commit and push the branch.
|
|
- Final git status must be clean.
|
|
|
|
## Outcome
|
|
|
|
To be completed by AI Platform Run / Codex CLI.
|
|
|
|
## Validation Result
|
|
|
|
To be completed by AI Platform Run / Codex CLI.
|
|
|
|
## Change Budget
|
|
|
|
- Prefer fewer than 5 modified files.
|
|
- Prefer changes under 200 lines when feasible.
|
|
- Split follow-up work into separate tasks if scope grows.
|