Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,11 @@ jobs:
fi
case "$GAMES" in
none)
test "$SMOKE" = "skipped"
echo "skipped: smoke and frame gates ($REASON)"
# A path the map calls no game surface can still trip a smoke job (a script under
# scripts/ is in the heavy set), and a smoke that ran and passed is more evidence
# than a skip, not a contradiction. Only a failure is wrong here.
[ "$SMOKE" = "skipped" ] || [ "$SMOKE" = "success" ]
echo "ran: smoke and frame gates ($REASON)"
;;
surface)
test "$SMOKE" = "success"
Expand Down
7 changes: 7 additions & 0 deletions changes/lane-credits-pane.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Fixed

- `check-game-front-end` counts `CreditsPane` as a game's credits surface. 0.38.4's games pin reported `Games/deepward - no credits` for a game that renders the credits in the `GameMenu` the engine ships (`CreditsPane` in a detail slot), because the pattern only knew `CreditsScreen`, `CreditsPanel` and the generated asset credits. Harbor Heat's baselined `#credits` entry no longer applies at the current pin, so the baseline shrinks from 8 entries to 7; Brightway Park's stays until the games pin that ships its menu.

### Fixed (CI)

- The ci aggregate job accepts a smoke run that actually ran and passed when the path map says no game surface changed. A script under scripts/** is in the heavy set but not in the game map, so GAMES=none with SMOKE=success is a real combination; the job asserted on skipped and failed an otherwise green run, which is what blocked this PR.
1 change: 0 additions & 1 deletion scripts/game-front-end-baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"brightway-park#credits",
"brightway-park#settings",
"ember-command#settings",
"harbor-heat#credits",
"harbor-heat#settings",
"odd-orbit#settings",
"scrap-signal#credits",
Expand Down
9 changes: 9 additions & 0 deletions scripts/gameFrontEnd.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ describe("findFrontEndGaps", () => {
).toEqual(["probe#settings"]);
});

test("a GameMenu credits pane clears it - the menu the engine ships carries credits", () => {
expect(
scan({
"Games/probe/src/ui/menu/ProbeMenu.tsx":
'import { CreditsPane } from "@jgengine/react/gameMenuSaves";\nconst verbs = [{ id: "credits", label: "Credits" }];\n',
}),
).toEqual(["probe#settings"]);
});

test("generated asset credits also clear it", () => {
expect(
scan({ "Games/probe/src/ui.tsx": 'import { creditsForSourceIds } from "@jgengine/assets/credits";\n' }),
Expand Down
6 changes: 4 additions & 2 deletions scripts/gameFrontEnd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ const REQUIREMENTS = [
},
{
id: "credits",
pattern: /CreditsScreen|CreditsPanel|creditsFor(?:Source|Asset)Ids|creditsForSources|<Credits\b/,
fix: "add a credits screen — `creditsForSourceIds(ids)` generates the asset attribution, `CreditsScreen` renders it; see `Games/wreckway`",
// `CreditsPane` is the game menu's own detail pane (#2317). A game that puts credits in the menu
// the engine ships has shipped credits, and 0.38.4's pin saw Deepward reported as having none.
pattern: /CreditsScreen|CreditsPanel|CreditsPane|creditsFor(?:Source|Asset)Ids|creditsForSources|<Credits\b/,
fix: "add a credits screen - `creditsForSourceIds(ids)` generates the asset attribution, `CreditsPane` in a `GameMenu` detail slot or `CreditsScreen` renders it; see `Games/wreckway`",
},
] as const;

Expand Down
Loading