feat: show air raid in a collapsible panel - #134
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the battle overview UI so that when a land-base air raid occurs, the air-raid details are shown in a collapsible “Air Defense” panel while keeping the sortie fleet view visible below, instead of replacing it entirely.
Changes:
- Refactors battle-area rendering into a shared
renderArea(baseDefense)helper to render either the air-raid or sortie layout consistently. - Adds a collapsible “Air Defense” panel (keyboard-operable with ARIA attributes) shown during base defense, with the sortie fleet view rendered underneath.
- Adds the
Air Defensei18n key toen-USandko-KR.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/views/battle-view-area.tsx | Adds collapsible air-raid panel + shared renderer so raid and sortie areas can be shown together. |
| assets/i18n/ko-KR.json | Adds Korean translation for Air Defense. |
| assets/i18n/en-US.json | Adds English translation for Air Defense. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+226
to
+227
| const [airRaidOpen, setAirRaidOpen] = useState(true) | ||
| const toggleAirRaid = () => setAirRaidOpen((open) => !open) |
Comment on lines
+421
to
+423
| <Collapse isOpen={airRaidOpen} keepChildrenMounted> | ||
| <div id="air-raid-body">{renderArea(true)}</div> | ||
| </Collapse> |
Air raid info used to replace the sortie fleet display entirely, hiding the fleet for the duration of the raid. Extract the battle area render into renderArea(baseDefense) so the land base defense can be drawn in a collapsible panel (open by default) above the regular fleet view, which now stays visible throughout. The raid's air force counts and BattleInfo stay scoped to the panel; the sortie area keeps showing NextSpotInfo as it does on any other node. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
KochiyaOcean
force-pushed
the
feat/air-raid-collapse
branch
from
August 9, 2026 08:00
f2de85c to
4545c3f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When an air raid (land base defense) happens, Prophet replaced the whole fleet display with the air raid view — the sortie fleet was hidden until the next node.
Change
The battle area render is extracted into a local
renderArea(baseDefense)helper, so the same layout code draws either battle. When a raid is in progress the component now renders:Collapse, open by default — containing the land base squads vs. the raid enemies, the raid's air force counts, and its rank/formation/air-control line;NextSpotInfo(including the "Heavy Bomber Defense" note).Details:
NextSpotInfois no longer duplicated — the panel shows only the raid'sBattleInfo.id="overview-area"stays on the single outer div so it isn't emitted twice.aria-expanded/aria-controls; a single rotated caret keeps the label from shifting on toggle.Air Defensei18n key to en-US and ko-KR — ja-JP, zh-CN and zh-TW already had it.The non-air-raid path is behavior-preserving: every parameterized expression reduces to its previous form when
baseDefense === Boolean(isBaseDefense).Testing
tsc --noEmitandeslintpass. Not yet exercised against a live raid in poi.🤖 Generated with Claude Code