Skip to content

Sprint 3.1: War frontend completion — Intelligence Panel, Alliance Wars section, Scan Enemy#102

Merged
makr-code merged 2 commits into
mainfrom
copilot/sprint-3-1-war-frontend-dialog-ui
Apr 12, 2026
Merged

Sprint 3.1: War frontend completion — Intelligence Panel, Alliance Wars section, Scan Enemy#102
makr-code merged 2 commits into
mainfrom
copilot/sprint-3-1-war-frontend-dialog-ui

Conversation

Copilot AI commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Completes the remaining B-1 gaps in the war frontend: War-Intelligence-Panel, visible Alliance Wars, and War-Goal-Score display. All war mechanics are now fully controllable from the UI.

Backend (api/war.php)

Two new GET endpoints:

  • get_intel&war_id=X — queries enemy fleet count, colony count, alliance affiliation, and resource scan (65% accuracy factor) for any war the player participates in
  • alliance_wars — resolves the player's current alliance from alliance_members and returns all active alliance_relations rows with relation_type='war'

API client (js/network/api.js)

  • warIntel(warId)get_intel (30s TTL cache)
  • warAllianceList()alliance_wars (10s TTL cache)

War UI (RuntimeWarController.js)

  • allianceWarsHtml(myAlliance, allianceWars) — renders an Alliance Wars section in the war overview showing [TAG] Name, target, and declared date; shown in both empty and populated list states
  • intelPanelHtml(intel) — stat cards for enemy fleets, colonies, alliance, and estimated resources
  • 🔍 Scan Enemy button added to active-war detail header; injects intelPanelHtml into a [data-intel-host] placeholder on click
  • WarController.render() now loads war list + alliance wars via Promise.all
// Detail view header (active war only)
<button data-intel-load="${warId}">🔍 Scan Enemy</button>
// → async fetches api.warIntel(warId) → renders fleet/colony/resource stats inline

Tests (tests/js/war-events.test.js)

Expanded from 20 → 31 tests: 7 for Alliance Wars section (loading, rendering, empty/null states, user targets) and 4 for the Scan Enemy button and intel panel rendering.

Docs

GAP_TODO.md B-1 all items marked ✅ complete.

…, Scan Enemy button

Agent-Logs-Url: https://github.com/makr-code/GalaxyQuest/sessions/f13db9f5-4d42-4dd1-b669-edd4f7d1c518

Co-authored-by: makr-code <150588092+makr-code@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement war declaration dialog and UI for alliances and negotiations Sprint 3.1: War frontend completion — Intelligence Panel, Alliance Wars section, Scan Enemy Apr 12, 2026
Copilot AI requested a review from makr-code April 12, 2026 06:48
@makr-code
makr-code marked this pull request as ready for review April 12, 2026 06:50
@makr-code
makr-code merged commit daeedac into main Apr 12, 2026
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.

Sprint 3.1: War-Frontend-Completion & Dialog-UI fertigstellen

2 participants