Skip to content

Commit cb969ee

Browse files
committed
Fix Tool Display Mode image and navigation layout - PR_26156_122-tool-display-mode-layout-fix
1 parent fe34a77 commit cb969ee

6 files changed

Lines changed: 150 additions & 26 deletions

File tree

assets/theme-v2/css/panels.css

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@
282282
}
283283

284284
.tool-display-mode__badge {
285-
width: var(--tool-display-media-size);
286-
height: var(--tool-display-media-size);
285+
width: 64px;
286+
height: 64px;
287287
object-fit: cover;
288288
object-position: center;
289289
border: var(--border-standard);
@@ -292,17 +292,34 @@
292292
}
293293

294294
.tool-display-mode__body {
295-
display: flex;
295+
display: grid;
296+
grid-template-columns: auto minmax(var(--space-0), 1fr);
297+
grid-template-rows: auto auto;
296298
align-items: center;
297-
gap: var(--space-0);
299+
column-gap: var(--space-15);
300+
row-gap: var(--space-8);
298301
min-width: var(--space-0);
299302
padding: var(--space-10) var(--space-14) var(--space-10) var(--space-0)
300303
}
301304

305+
.tool-display-mode__identity-row {
306+
display: contents
307+
}
308+
309+
.tool-display-mode__navigation-row {
310+
grid-column: 2;
311+
grid-row: 2;
312+
display: flex;
313+
align-items: center;
314+
gap: var(--space-14);
315+
flex-wrap: wrap
316+
}
317+
302318
.tool-display-mode__character {
303-
width: 150px;
304-
height: 150px;
305-
margin-right: var(--space-15);
319+
grid-column: 1;
320+
grid-row: 1 / span 2;
321+
width: 225px;
322+
height: 127px;
306323
object-fit: contain;
307324
display: block;
308325
flex: 0 0 auto
@@ -314,6 +331,8 @@
314331
}
315332

316333
.tool-display-mode__description {
334+
grid-column: 2;
335+
grid-row: 1;
317336
color: var(--gold);
318337
font-weight: var(--font-weight-heavy);
319338
overflow: hidden;

docs_build/dev/codex_commands.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,3 +699,31 @@ Required reports:
699699
- `docs_build/dev/reports/testing_lane_execution_report.md`
700700
- `docs_build/dev/reports/codex_changed_files.txt`
701701
- `docs_build/dev/reports/codex_review.diff`
702+
703+
704+
## PR_26156_122
705+
706+
Changes:
707+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
708+
- Updated shared Tool Display Mode Theme V2 styling in `assets/theme-v2/css/panels.css`.
709+
- Set `.tool-display-mode__badge` to `64px` by `64px`.
710+
- Set `.tool-display-mode__character` to `225px` by `127px`.
711+
- Moved Tool Display Mode body layout to a two-column grid so description sits to the right of the character and navigation sits below the description area.
712+
- Preserved existing Tool Display Mode JavaScript, generated markup, and registry previous/next link behavior.
713+
- Added targeted Tool Display Mode Playwright/MSJ coverage for badge size, character size, description placement, and navigation placement.
714+
- Did not add inline styles, style blocks, script blocks, inline event handlers, page-local CSS, or tool-local CSS.
715+
- Did not modify unrelated tool content.
716+
- Did not modify `start_of_day`.
717+
718+
Validation:
719+
- `node --check tests/playwright/tools/ToolDisplayModeNavigation.spec.mjs`
720+
- `npm run test:lane:tool-display-mode`
721+
- Scoped `git diff --check` for changed implementation/test/report files.
722+
- Targeted changed-file scan confirmed no inline styles, style blocks, inline scripts, inline event handlers, or `start_of_day` file changes were introduced.
723+
- Full samples smoke: skipped by request.
724+
725+
Required reports:
726+
- `docs_build/dev/reports/tool-display-mode-layout-fix-report.md`
727+
- `docs_build/dev/reports/testing_lane_execution_report.md`
728+
- `docs_build/dev/reports/codex_changed_files.txt`
729+
- `docs_build/dev/reports/codex_review.diff`

docs_build/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add reusable Theme V2 tool form table layout - PR_26156_121-tool-form-table-layout-standard
1+
Fix Tool Display Mode media and navigation layout - PR_26156_122-tool-display-mode-layout-fix

docs_build/dev/reports/testing_lane_execution_report.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Testing Lane Execution Report
22

3-
Generated: 2026-06-05T13:05:49.934Z
3+
Generated: 2026-06-05T13:20:23.710Z
44
Dry run: No
55

66
## Summary
@@ -9,7 +9,7 @@ PASS: 1
99
WARN: 0
1010
FAIL: 0
1111
SKIP: 13
12-
Total lane elapsed time: 16.48s
12+
Total lane elapsed time: 18.48s
1313
Actual browser launches: 1
1414

1515
## Full Samples Smoke
@@ -21,7 +21,7 @@ Reason: Skipped because changed files do not modify sample JSON or shared sample
2121

2222
Status: PASS
2323
Reason: Runner preflight and Playwright structure audit passed before expensive lane execution.
24-
Command: C:\nvm4w\nodejs\node.exe scripts/audit-playwright-test-locations.mjs --discovery-report docs_build/dev/reports/playwright_discovery_ownership_report.md --scope-report docs_build/dev/reports/playwright_discovery_scope_report.md --scan-report docs_build/dev/reports/filesystem_scan_reduction_report.md --lanes game-design --targets tests/playwright/tools/GameDesignMockRepository.spec.mjs --helpers tests/helpers/playwrightRepoServer.mjs,tests/helpers/playwrightStorageIsolation.mjs,tests/helpers/playwrightV8CoverageReporter.mjs,tests/helpers/workspaceV2CoverageReporter.mjs
24+
Command: C:\nvm4w\nodejs\node.exe scripts/audit-playwright-test-locations.mjs --discovery-report docs_build/dev/reports/playwright_discovery_ownership_report.md --scope-report docs_build/dev/reports/playwright_discovery_scope_report.md --scan-report docs_build/dev/reports/filesystem_scan_reduction_report.md --lanes tool-display-mode --targets tests/playwright/tools/ToolDisplayModeNavigation.spec.mjs --helpers tests/helpers/playwrightRepoServer.mjs,tests/helpers/playwrightStorageIsolation.mjs,tests/helpers/playwrightV8CoverageReporter.mjs,tests/helpers/workspaceV2CoverageReporter.mjs
2525
Details: none
2626

2727
## Dependency Gate
@@ -32,7 +32,7 @@ Reason: No deterministic dependency failures before runtime.
3232
## Runtime Scheduling
3333

3434
Status: PASS
35-
Scheduled lane order: game-design
35+
Scheduled lane order: tool-display-mode
3636
Reused runtime sessions: 0
3737
Reused lane snapshots: 0
3838
Reused warm-start lanes: 0
@@ -61,7 +61,7 @@ Prevented broad lane escalation: 0
6161
## Discovery Scope
6262

6363
Status: PASS
64-
Target files: tests/playwright/tools/GameDesignMockRepository.spec.mjs
64+
Target files: tests/playwright/tools/ToolDisplayModeNavigation.spec.mjs
6565
Required shared helpers: tests/helpers/playwrightRepoServer.mjs, tests/helpers/playwrightStorageIsolation.mjs, tests/helpers/playwrightV8CoverageReporter.mjs, tests/helpers/workspaceV2CoverageReporter.mjs
6666
Required fixtures: none
6767
Targeted file/helper reads: 5
@@ -71,24 +71,24 @@ Prevented fallback expansion: Yes; no ownership or scope blocker widened into br
7171
## Targeted File Manifests
7272

7373
Status: PASS
74-
Generated manifests: game-design:PASS
74+
Generated manifests: tool-display-mode:PASS
7575
Prevented discovery expansion: Yes
7676
Prevented redundant scans: 4
77-
Persistent manifest events: game-design:INVALIDATED
77+
Persistent manifest events: tool-display-mode:INVALIDATED
7878

7979
## Warm-Start Reuse
8080

8181
Status: PASS
82-
Warm-start events: game-design:INVALIDATED
83-
Dependency hydration events: game-design:INVALIDATED
82+
Warm-start events: tool-display-mode:INVALIDATED
83+
Dependency hydration events: tool-display-mode:INVALIDATED
8484
Prevented redundant initialization: 0
8585
Prevented helper resolution passes: 0
8686
Prevented fixture ownership traversal: 0
8787

8888
## Lane Snapshots
8989

9090
Status: PASS
91-
Snapshot events: game-design:INVALIDATED
91+
Snapshot events: tool-display-mode:INVALIDATED
9292
Reused snapshots: 0
9393
Invalidated snapshots: 1
9494
Prevented graph rebuilds: 0
@@ -107,12 +107,12 @@ Prevented Workspace lane reruns: 0
107107
| --- | --- | --- | --- | --- | --- | --- |
108108
| workspace-contract | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Root tools future-state navigation and Tool Template V2 contract | repo-served root tools page; Tool Template V2 future-state page; Theme V2 shared partials and assets |
109109
| project-workspace | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Project Workspace mock repository, Project Workspace UI, and Toolbox Progress/Build Path project-state bridge | repo-served Project Workspace page; repo-served Toolbox page with role simulation; in-memory SQL-shaped mock project repository |
110-
| game-design | PASS | 16.48s | 1 | Game Design rebuild slice validates the active project context, design save/update, actionable validation, capability demo authoring, and Toolbox progress handoff without exercising unrelated toolbox routes. | Game Design mock repository, project purpose flow, validation overlay, capability demo authoring, and Toolbox progress handoff | repo-served Game Design page; repo-served Toolbox Progress and Build Path views; in-memory SQL-shaped Game Design mock repository; Project Workspace mock project context |
110+
| game-design | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Game Design mock repository, project purpose flow, validation overlay, capability demo authoring, and Toolbox progress handoff | repo-served Game Design page; repo-served Toolbox Progress and Build Path views; in-memory SQL-shaped Game Design mock repository; Project Workspace mock project context |
111111
| game-configuration | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Game Configuration mock repository, Game Design handoff, configuration validation, user-facing output, and Toolbox progress handoff | repo-served Game Configuration page; repo-served Game Design page for handoff checks; repo-served Toolbox Progress and Build Path views; in-memory SQL-shaped Game Configuration mock repository; Game Design mock repository handoff |
112112
| build-path | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Toolbox Build Path simplification, workflow status table, and Admin Tools Progress navigation | repo-served Toolbox page; repo-served Admin Tools Progress page; Project Workspace mock project context; Toolbox role simulation |
113113
| tools-progress | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Admin Tools Progress hydration, Toolbox Group view color model, and Project Build Path separation | repo-served Admin Tools Progress page; repo-served Toolbox Group view; Toolbox registry build sequence; Project Build Path workflow table |
114114
| tool-navigation | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Admin Tools Progress tool route links, Tool Display Mode build-order previous/next controls, and Toolbox group fallback routing | repo-served Admin Tools Progress page; repo-served Project Workspace, Game Design, and Game Configuration tool pages; repo-served Toolbox Group view with URL-selected accordion; Toolbox registry build sequence and route metadata |
115-
| tool-display-mode | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Tool Display Mode identity row, registry-owned previous/next links, disabled text fallback, and multi-path group routing | repo-served Project Workspace, Game Design, Game Configuration, and AI Assistant tool pages; repo-served Toolbox Group view with URL-selected accordion; Toolbox registry build sequence and route metadata; shared Theme V2 Tool Display Mode script |
115+
| tool-display-mode | PASS | 18.48s | 1 | Tool Display Mode validates the two-row identity/navigation layout, anchors for previous/next targets, disabled text for missing targets, registry build-order labels, role preservation, and multi-path fallback without exercising unrelated toolbox routes. | Tool Display Mode identity row, registry-owned previous/next links, disabled text fallback, and multi-path group routing | repo-served Project Workspace, Game Design, Game Configuration, and AI Assistant tool pages; repo-served Toolbox Group view with URL-selected accordion; Toolbox registry build sequence and route metadata; shared Theme V2 Tool Display Mode script |
116116
| tool-images | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Toolbox registry image contract, Toolbox card image rendering, and Tool Display Mode image fallback | Toolbox registry badge/tool image contract; repo-served Toolbox page; repo-served representative Toolbox tool pages; shared registry image fallback |
117117
| tool-runtime | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Active public toolbox and Tool Template V2 contract | repo-served root toolbox page; Tool Template V2 public page; Theme V2 shared partials and assets |
118118
| game-runtime | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Deprecated archive/v1-v2/games reference coverage | |
@@ -124,10 +124,11 @@ Prevented Workspace lane reruns: 0
124124

125125
| Lane | Duration | Test |
126126
| --- | --- | --- |
127-
| game-design | 3.70s | tests\playwright\tools\GameDesignMockRepository.spec.mjs:218:1 > Toolbox Build Path view shows the Game Design handoff |
128-
| game-design | 2.10s | tests\playwright\tools\GameDesignMockRepository.spec.mjs:80:1 > Game Design saves and updates design fields against the active project |
129-
| game-design | 1.80s | tests\playwright\tools\GameDesignMockRepository.spec.mjs:55:1 > Game Design shows an actionable overlay when project context is missing |
130-
| game-design | 1.50s | tests\playwright\tools\GameDesignMockRepository.spec.mjs:192:1 > Game Design authors capability demos as Project Workspace projects |
127+
| tool-display-mode | 4.30s | tests\playwright\tools\ToolDisplayModeNavigation.spec.mjs:211:1 > multi-path fallback opens Toolbox Group view with only the target group expanded |
128+
| tool-display-mode | 2.30s | tests\playwright\tools\ToolDisplayModeNavigation.spec.mjs:143:1 > Project Workspace and Game Configuration use registry order without page hardcoding |
129+
| tool-display-mode | 1.60s | tests\playwright\tools\ToolDisplayModeNavigation.spec.mjs:116:1 > Game Design renders identity and navigation rows with registry anchor links |
130+
| tool-display-mode | 1.30s | tests\playwright\tools\ToolDisplayModeNavigation.spec.mjs:168:1 > missing previous target renders disabled text instead of a broken link |
131+
| tool-display-mode | 1.30s | tests\playwright\tools\ToolDisplayModeNavigation.spec.mjs:186:1 > Build Game renders plain previous and next links in the second row |
131132

132133
## Commands
133134

@@ -138,7 +139,7 @@ Prevented Workspace lane reruns: 0
138139
- SKIP
139140

140141
### game-design
141-
- PASS 16.48s C:\nvm4w\nodejs\node.exe C:\Users\davidq\Documents\GitHub\HTML-JavaScript-Gaming\node_modules\@playwright\test\cli.js test tests/playwright/tools/GameDesignMockRepository.spec.mjs --project=playwright --workers=1 --reporter=list
142+
- SKIP
142143

143144
### game-configuration
144145
- SKIP
@@ -153,7 +154,7 @@ Prevented Workspace lane reruns: 0
153154
- SKIP
154155

155156
### tool-display-mode
156-
- SKIP
157+
- PASS 18.48s C:\nvm4w\nodejs\node.exe C:\Users\davidq\Documents\GitHub\HTML-JavaScript-Gaming\node_modules\@playwright\test\cli.js test tests/playwright/tools/ToolDisplayModeNavigation.spec.mjs --project=playwright --workers=1 --reporter=list
157158

158159
### tool-images
159160
- SKIP
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# PR_26156_122 Tool Display Mode Layout Fix Report
2+
3+
## Scope
4+
5+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first.
6+
- Updated shared Tool Display Mode styling under `assets/theme-v2/css/panels.css`.
7+
- Updated targeted Tool Display Mode Playwright/MSJ coverage.
8+
- Did not modify individual tool content.
9+
- Did not modify Tool Display Mode JavaScript.
10+
- Did not modify `start_of_day`.
11+
12+
## Layout Changes
13+
14+
- Set `.tool-display-mode__badge` to render at `64px` by `64px`.
15+
- Set `.tool-display-mode__character` to render at `225px` by `127px`.
16+
- Changed `.tool-display-mode__body` to a reusable Theme V2 grid layout.
17+
- Kept the character image in the left column.
18+
- Placed `.tool-display-mode__description` to the right of the character image.
19+
- Placed `.tool-display-mode__navigation-row` below the description area in the right column.
20+
- Preserved the existing generated DOM and previous/next link behavior.
21+
22+
## Validation Notes
23+
24+
- Impacted lane: `tool-display-mode`.
25+
- Skipped lanes: all other lanes, because this PR only changes shared Tool Display Mode CSS and targeted Tool Display Mode layout assertions.
26+
- Ran `node --check tests/playwright/tools/ToolDisplayModeNavigation.spec.mjs`.
27+
- Ran `npm run test:lane:tool-display-mode`.
28+
- Ran scoped `git diff --check` for changed implementation/test/report files.
29+
- Ran changed-file static validation confirming no inline styles, style blocks, inline scripts, inline event handlers, or `start_of_day` file changes were introduced.
30+
- Full samples smoke: skipped by request.
31+
32+
## Manual Test Notes
33+
34+
- Verified by targeted Playwright that badge display size is `64x64`.
35+
- Verified by targeted Playwright that character display size is `225x127`.
36+
- Verified description renders to the right of the character image.
37+
- Verified Previous/Next navigation renders below the description area, aligned with the description column.
38+
- Verified previous/next controls remain anchors, not buttons.
39+
- Verified no console errors or failed page requests in the targeted lane.

tests/playwright/tools/ToolDisplayModeNavigation.spec.mjs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,41 @@ async function toolDisplayRows(page) {
7878
));
7979
}
8080

81+
async function expectToolDisplayModeVisualLayout(page) {
82+
const layout = await page.locator("#toolDisplayMode").evaluate((displayMode) => {
83+
const badge = displayMode.querySelector(".tool-display-mode__badge");
84+
const character = displayMode.querySelector(".tool-display-mode__character");
85+
const description = displayMode.querySelector(".tool-display-mode__description");
86+
const navigation = displayMode.querySelector(".tool-display-mode__navigation-row");
87+
const badgeBox = badge.getBoundingClientRect();
88+
const characterBox = character.getBoundingClientRect();
89+
const descriptionBox = description.getBoundingClientRect();
90+
const navigationBox = navigation.getBoundingClientRect();
91+
92+
return {
93+
badgeHeight: Math.round(badgeBox.height),
94+
badgeWidth: Math.round(badgeBox.width),
95+
characterHeight: Math.round(characterBox.height),
96+
characterWidth: Math.round(characterBox.width),
97+
descriptionRightOfCharacter: descriptionBox.left >= characterBox.right,
98+
navigationAlignedWithDescription: Math.abs(navigationBox.left - descriptionBox.left) <= 2,
99+
navigationBelowDescription: navigationBox.top >= descriptionBox.bottom,
100+
navigationRightOfCharacter: navigationBox.left >= characterBox.right
101+
};
102+
});
103+
104+
expect(layout).toEqual({
105+
badgeHeight: 64,
106+
badgeWidth: 64,
107+
characterHeight: 127,
108+
characterWidth: 225,
109+
descriptionRightOfCharacter: true,
110+
navigationAlignedWithDescription: true,
111+
navigationBelowDescription: true,
112+
navigationRightOfCharacter: true
113+
});
114+
}
115+
81116
test("Game Design renders identity and navigation rows with registry anchor links", async ({ page }) => {
82117
const failures = await openRepoPage(page, "/toolbox/game-design/index.html?role=user");
83118

@@ -97,6 +132,7 @@ test("Game Design renders identity and navigation rows with registry anchor link
97132
await expect(next).toHaveText("Next: Game Configuration");
98133
await expect(next).toHaveAttribute("href", "toolbox/game-configuration/index.html?role=user");
99134
await expectPlainNavigationLinks(page);
135+
await expectToolDisplayModeVisualLayout(page);
100136
await expectNoPageFailures(failures);
101137
} finally {
102138
await workspaceV2CoverageReporter.stop(page);
@@ -164,6 +200,7 @@ test("Build Game renders plain previous and next links in the second row", async
164200
await expect(next).toHaveText("Next: Game Testing");
165201
await expect(next).toHaveAttribute("href", "toolbox/game-testing/index.html?role=user");
166202
await expectPlainNavigationLinks(page);
203+
await expectToolDisplayModeVisualLayout(page);
167204
await expectNoPageFailures(failures);
168205
} finally {
169206
await workspaceV2CoverageReporter.stop(page);

0 commit comments

Comments
 (0)