Skip to content

feat: multi-battle for stations#1205

Open
Mygod wants to merge 49 commits intoWatWowMap:developfrom
Mygod:multibattle
Open

feat: multi-battle for stations#1205
Mygod wants to merge 49 commits intoWatWowMap:developfrom
Mygod:multibattle

Conversation

@Mygod
Copy link
Copy Markdown
Collaborator

@Mygod Mygod commented Apr 6, 2026

Mygod added 30 commits April 4, 2026 20:11
@Mygod Mygod added the Enhancement New feature or request label Apr 6, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dbe7b45c02

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds multi-battle support for Stations end-to-end (DB context detection → API/model aggregation → GraphQL schema/queries → UI rendering), with an additional client filter to optionally include upcoming battles.

Changes:

  • Extend the Station GraphQL/API shape to include a battles array (StationBattle) and plumb it through client queries/types.
  • Update Station map marker, tile memoization, and popup UI to handle multiple battles and a “Include Upcoming” filter.
  • Update station search results timing to account for battle_start (pre-start vs active).

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/services/queries/station.js Fetches battles { ... } for station details.
src/services/queries/search.js Adds battle_start to search results query.
src/features/station/useStationMarker.js Marker icon logic updated to accept a selected battle.
src/features/station/StationTile.jsx Computes battle-derived timers/state and memoizes based on battles.
src/features/station/StationPopup.jsx Renders multiple battles in the popup; integrates filtering/visibility.
src/features/station/battleState.js New shared client helper for selecting/ordering battles + refresh timestamps.
src/features/search/renderOption.jsx Search option timer updated to consider battle_start.
src/features/search/OptionImage.jsx Simplifies memoization for option images.
src/features/drawer/Stations.jsx Adds “Include Upcoming” toggle to station filters UI.
server/src/services/DbManager.js Detects station_battle table support via schema check (hasMultiBattles).
server/src/models/Station.js Implements multi-battle joins/aggregation, filtering, and search support.
server/src/graphql/typeDefs/scanner.graphql Adds battles: [StationBattle] and defines StationBattle.
server/src/graphql/typeDefs/map.graphql Adds battle_start to Search type.
server/src/filters/builder/base.js Adds default filter field includeUpcoming when permitted.
packages/types/lib/server.d.ts Adds hasMultiBattles to DB context type.
packages/types/lib/scanner.d.ts Adds StationBattle + Station.battles typings.
packages/locales/lib/human/en.json Adds include_upcoming label.
config/default.json Adds default stations.includeUpcoming: true.
config/custom-environment-variables.json Adds env override mapping for default includeUpcoming.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Mygod added 3 commits April 8, 2026 11:55
Keep future battle starts in the shared refresh schedule.
This rerenders markers when hidden upcoming battles become active.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 19 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants