4.4 KiB
id, title, status, type, team, supporting_teams, roadmap_item, priority
| id | title | status | type | team | supporting_teams | roadmap_item | priority | |
|---|---|---|---|---|---|---|---|---|
| TASK-152 | Current match live kill feed | pending | backend | Backend Senior |
|
rcon-full-data | high |
TASK-152 - Current match live kill feed
Goal
Expose recent current-match kill events and render them as a live visual feed
on partida-actual.html.
Background
The current-match page will exist at
partida-actual.html?server=<server_slug>. The backend already stores/parses
RCON AdminLog data and materializes kill/player stats for historical matches.
Existing materialization logic uses AdminLog kill payload fields such as:
killer_idkiller_namekiller_teamvictim_idvictim_namevictim_teamweapon
We now want a live/current-match kill feed similar to a FPS kill feed: killer, weapon, victim, teamkill distinction, timestamp.
Constraints / DO NOT BREAK
- Do not query RCON directly from the frontend.
- Do not expose raw AdminLog lines.
- Do not expose admin-only/sensitive fields.
- Do not break existing historical materialization.
- Do not break existing match detail player stats.
- Do not depend on server #03.
- Do not fabricate kill events.
- Do not duplicate kill rows on repeated polling.
- Keep polling safe.
Allowed Changes
- backend endpoint for current match kill feed
- backend read-model/helper for current/open match event window
- frontend current-match JS/CSS
- tests for event normalization/filtering where practical
Implementation Requirements
- Add a backend endpoint for recent current-match kill events by server.
- Supported servers:
comunidad-hispana-01comunidad-hispana-02
- Unknown server values must return a safe 400/404 style response and must not query arbitrary targets.
- The endpoint should return normalized event rows:
event_idevent_timestamporserver_timekiller_namekiller_teamvictim_namevictim_teamweaponis_teamkill- confidence/source if needed
- The endpoint should only return events belonging to the current/open match if that can be determined.
- If the current/open match window cannot be determined reliably, return a
safe recent window and include a clear confidence marker, for example:
- scope:
"recent-admin-log-window" - confidence:
"partial"
- scope:
- Do not return raw AdminLog text.
- Add frontend rendering for a kill feed:
- newest events visible at top or bottom consistently
- killer name
- weapon label/icon placeholder
- victim name
- timestamp
- teamkill visual distinction
- Prevent duplicate rendering:
- track
event_idvalues already rendered - update existing rows only if needed
- track
- Poll every 15-30 seconds.
- Add an empty state:
- "Todavía no se han detectado bajas en esta partida."
- Add an error/stale state:
- "No se pudo actualizar el feed de combate."
- Do not show fake/sample kill events in production UI.
Files to Read First
AGENTS.mdai/architecture-index.mdai/repo-context.mdai/orchestrator/backend-senior.md- current-match page files created by TASK-151
- AdminLog materialization/read-model files that already normalize kill data
Expected Files to Modify
- backend current-match kill feed endpoint/read-model files
- current-match frontend JS/CSS files
- focused tests for event normalization/filtering where practical
Validation
python -m compileall backend/app- Run backend tests related to AdminLog/materialization/current-match feed.
- Run
node --checkon current-match frontend JS. - Review
git diff --name-onlyand confirm the changed files match this task.
Manual Verification
- Open
partida-actual.html?server=comunidad-hispana-01. - Open
partida-actual.html?server=comunidad-hispana-02. - Verify kill feed renders only normalized events.
- Verify repeated polling does not duplicate rows.
- Verify teamkills are visually distinguishable.
- Verify raw AdminLog lines are never displayed.
Commit Message
feat: add current match live kill feed
Expected Outcome
The current-match page can show a safe, normalized, non-duplicated live kill feed based on RCON/AdminLog data.
Outcome
Document the feed scope and confidence behavior, event normalization choices, polling validation, and any follow-up task instead of expanding scope.
Change Budget
- Prefer fewer than 5 modified files.
- Prefer changes under 200 lines when feasible.
- Split the work into follow-up tasks if the scope grows.