Skip to content

feat: multi-battle for stations#1205

Merged
Mygod merged 56 commits into
WatWowMap:mainfrom
Mygod:multibattle
Jun 5, 2026
Merged

feat: multi-battle for stations#1205
Mygod merged 56 commits into
WatWowMap:mainfrom
Mygod:multibattle

Conversation

@Mygod

@Mygod Mygod commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

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

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

Copy link
Copy Markdown

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".

Comment thread server/src/models/Station.js Outdated
Comment thread src/features/station/StationPopup.jsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown

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.

Comment thread src/features/search/renderOption.jsx Outdated
Comment thread src/features/station/StationPopup.jsx
Comment thread src/features/station/StationPopup.jsx
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.

Copilot AI left a comment

Copy link
Copy Markdown

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.

Comment thread src/features/station/battleState.js
@Mygod Mygod changed the base branch from develop to main April 19, 2026 03:12
@Mygod Mygod merged commit e9920fc into WatWowMap:main Jun 5, 2026
2 checks passed
@Mygod Mygod deleted the multibattle branch June 5, 2026 13:35
github-actions Bot pushed a commit that referenced this pull request Jun 5, 2026
# [1.44.0](v1.43.2...v1.44.0) (2026-06-05)

### Features

* multi-battle for stations ([#1205](#1205)) ([e9920fc](e9920fc))
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.44.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants