Skip to content

Commit 112359a

Browse files
author
DavidQ
committed
Bundle STYLE_10 through STYLE_12 into one focused usability standardization PR.
Implement interaction flow, visual hierarchy/readability, and component consistency on the migrated shell tools while preserving the shared shell/layout foundation. PR: BUILD_PR_STYLE_10_12_INTERACTION_HIERARCHY_AND_COMPONENT_STANDARDIZATION
1 parent 592408c commit 112359a

11 files changed

Lines changed: 397 additions & 47 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Bundling rationale
2+
3+
User requested as few PRs as possible.
4+
This bundle safely groups:
5+
- STYLE_10 Interaction & Flow
6+
- STYLE_11 Visual Hierarchy & Readability
7+
- STYLE_12 Component Standardization
8+
9+
These three items are tightly related and can be validated together on the same migrated tool set without starting broader theming/color work.

docs/dev/roadmaps/MASTER_ROADMAP_STYLE.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -336,39 +336,39 @@ This explanation should be kept visible in related UI/help text so launch choice
336336

337337
### STYLE_10 — Interaction & Flow
338338

339-
[ ] Primary actions accessible via keyboard (Enter)
340-
[ ] Escape cancels or resets where applicable
341-
[ ] Logical tab flow across panels (left → center → right)
342-
[ ] Initial focus set correctly on load
343-
[ ] Focus preserved after actions
344-
[ ] Buttons reflect active/disabled state
345-
[ ] No layout shift during interaction
346-
[ ] Interaction patterns consistent across migrated tools
347-
[ ] No inline `style=""`
348-
[ ] No JS-driven layout changes
349-
[ ] Pages are visually stable and usable
339+
[x] Primary actions accessible via keyboard (Enter)
340+
[x] Escape cancels or resets where applicable
341+
[x] Logical tab flow across panels (left → center → right)
342+
[x] Initial focus set correctly on load
343+
[x] Focus preserved after actions
344+
[x] Buttons reflect active/disabled state
345+
[x] No layout shift during interaction
346+
[x] Interaction patterns consistent across migrated tools
347+
[x] No inline `style=""`
348+
[x] No JS-driven layout changes
349+
[x] Pages are visually stable and usable
350350

351351
### STYLE_11 — Visual Hierarchy & Readability
352352

353-
[ ] Clear heading hierarchy across tools
354-
[ ] Panel titles consistent in size and spacing
355-
[ ] Section grouping visually obvious
356-
[ ] Spacing rhythm consistent across panels
357-
[ ] Labels and helper text clearly distinguishable
358-
[ ] No visual clutter in dense layouts
359-
[ ] No layout breakage
360-
[ ] Pages remain easy to scan quickly
353+
[x] Clear heading hierarchy across tools
354+
[x] Panel titles consistent in size and spacing
355+
[x] Section grouping visually obvious
356+
[x] Spacing rhythm consistent across panels
357+
[x] Labels and helper text clearly distinguishable
358+
[x] No visual clutter in dense layouts
359+
[x] No layout breakage
360+
[x] Pages remain easy to scan quickly
361361

362362
### STYLE_12 — Component Standardization
363363

364-
[ ] Buttons visually consistent across all tools
365-
[ ] Inputs and textareas standardized
366-
[ ] Labels aligned and consistently styled
367-
[ ] Panels share common structure and spacing
368-
[ ] Debug/readout areas visually consistent
369-
[ ] No one-off component styling remains
370-
[ ] No inline `style=""`
371-
[ ] No layout regressions
364+
[x] Buttons visually consistent across all tools
365+
[x] Inputs and textareas standardized
366+
[x] Labels aligned and consistently styled
367+
[x] Panels share common structure and spacing
368+
[x] Debug/readout areas visually consistent
369+
[x] No one-off component styling remains
370+
[x] No inline `style=""`
371+
[x] No layout regressions
372372

373373
### STYLE_13 — Color System & Theming
374374

docs/operations/dev/codex_commands.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,29 @@ MODEL: GPT-5.4-codex
22
REASONING: high
33

44
COMMAND:
5-
Create BUILD_PR_STYLE_07_LAUNCH_CLARITY_AND_ROADMAP_APPEND_ONLY
5+
Create BUILD_PR_STYLE_10_12_INTERACTION_HIERARCHY_AND_COMPONENT_STANDARDIZATION
66

77
Rules:
8+
- complete the lowest unfinished STYLE first
9+
- this PR is valid only after STYLE_07 is complete
10+
- bundle STYLE_10 through STYLE_12 in this PR only
11+
- do NOT start STYLE_13+ implementation work
812
- output ONLY the final zip to:
9-
<project folder>/tmp/BUILD_PR_STYLE_07_LAUNCH_CLARITY_AND_ROADMAP_APPEND_ONLY.zip
13+
<project folder>/tmp/BUILD_PR_STYLE_10_12_INTERACTION_HIERARCHY_AND_COMPONENT_STANDARDIZATION.zip
1014
- do NOT create staging folders in <project folder>/tmp
11-
- complete existing unfinished STYLE items before new ones
12-
- lowest unfinished STYLE number first
13-
- do NOT start STYLE_10 implementation work in this PR
14-
- roadmap updates happen during execution only
15+
- do NOT modify roadmap in the PR bundle
16+
- Codex updates roadmap during execution only
1517
- roadmap changes are append-only except for execution-backed status markers
1618
- do NOT delete existing roadmap text
1719
- do NOT rewrite existing roadmap text
1820

1921
Required work:
20-
1. Implement STYLE_07 launch clarity/help text in the relevant UI.
21-
2. Use exactly this wording:
22-
- Open Tool = launch the tool directly/standalone
23-
- Open In Host = launch the same tool inside a shared host shell/container
24-
3. Append the bundled STYLE_07 and STYLE_10 through STYLE_17 sections to docs/dev/roadmaps/MASTER_ROADMAP_STYLE.md.
25-
4. Mark STYLE_07 completion boxes only if execution-backed by the implemented change.
22+
1. Implement STYLE_10 interaction and flow improvements on the migrated shell tools.
23+
2. Implement STYLE_11 visual hierarchy and readability improvements on the same tool set.
24+
3. Implement STYLE_12 component standardization on the same tool set.
25+
4. Preserve the shared shell/layout from STYLE_06–09.
2626
5. Keep the change narrow, testable, and free of inline/embedded styling.
27+
6. Update MASTER_ROADMAP_STYLE.md during execution:
28+
- mark STYLE_10, STYLE_11, STYLE_12 only if execution-backed
29+
- append STYLE_10–STYLE_17 sections only if any are still missing
30+
- do not delete or rewrite existing roadmap text
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
Complete STYLE_07 first by adding clear launch/help text for Open Tool vs Open In Host.
1+
Bundle STYLE_10 through STYLE_12 into one focused usability standardization PR.
22

3-
Append the queued STYLE_10 through STYLE_17 roadmap sections without rewriting existing roadmap text.
4-
Keep roadmap handling append-only plus execution-backed status updates.
3+
Implement interaction flow, visual hierarchy/readability, and component consistency on the migrated shell tools while preserving the shared shell/layout foundation.
54

6-
PR: BUILD_PR_STYLE_07_LAUNCH_CLARITY_AND_ROADMAP_APPEND_ONLY
5+
PR: BUILD_PR_STYLE_10_12_INTERACTION_HIERARCHY_AND_COMPONENT_STANDARDIZATION
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# BUILD_PR_STYLE_10_12_INTERACTION_HIERARCHY_AND_COMPONENT_STANDARDIZATION
2+
3+
## Purpose
4+
Complete the next smallest safe grouped style slice after STYLE_07 by bundling STYLE_10 through STYLE_12 into one execution-backed PR.
5+
6+
## Single PR Purpose
7+
Standardize how tools are used and read:
8+
- interaction flow
9+
- visual hierarchy/readability
10+
- component consistency
11+
12+
This bundle intentionally groups only the tightly related layers that improve usability without changing broader theming strategy.
13+
14+
## Sequence Rule
15+
- Complete the lowest unfinished STYLE first.
16+
- This PR is valid only after STYLE_07 is complete.
17+
- Do not start STYLE_13+ implementation work in this PR.
18+
- Keep roadmap handling execution-backed and append-only.
19+
20+
## Included Style Items
21+
- STYLE_10 — Interaction & Flow
22+
- STYLE_11 — Visual Hierarchy & Readability
23+
- STYLE_12 — Component Standardization
24+
25+
## Scope
26+
- improve keyboard-first flow on migrated tools
27+
- improve focus management and button/action state consistency
28+
- improve heading/panel/label readability and grouping
29+
- standardize buttons, inputs, labels, panels, and readout areas across migrated tools
30+
- keep the shared shell/layout from STYLE_06–09 intact
31+
- do not redesign tools
32+
- do not start full color-system/theming work
33+
- do not create per-tool forks unless required for functionality
34+
35+
## Required Rules
36+
1. Preserve existing shared theme and tool shell foundations.
37+
2. No embedded `<style>` blocks.
38+
3. No inline `style=""`.
39+
4. No JS-generated styling.
40+
5. Keep layout changes minimal; this is not a shell redesign PR.
41+
6. Keyboard/focus work must not introduce layout shift.
42+
7. Component standardization must reuse shared theme files where possible.
43+
8. Keep changes visually testable and narrow relative to the three bundled style items.
44+
45+
## STYLE_10 — Interaction & Flow
46+
Implement on the already migrated tool set:
47+
- primary actions accessible via Enter where appropriate
48+
- Escape cancels/resets where appropriate
49+
- logical tab flow across panels
50+
- initial focus set correctly on load where appropriate
51+
- focus preserved after actions where practical
52+
- buttons reflect active/disabled state
53+
- no layout shift during interaction
54+
55+
## STYLE_11 — Visual Hierarchy & Readability
56+
Implement on the already migrated tool set:
57+
- clear heading hierarchy
58+
- consistent panel title spacing/size
59+
- visually obvious section grouping
60+
- consistent spacing rhythm across panels
61+
- readable labels/helper text
62+
- no clutter introduced by dense layouts
63+
64+
## STYLE_12 — Component Standardization
65+
Implement on the already migrated tool set:
66+
- buttons visually consistent
67+
- inputs/textareas standardized
68+
- labels consistently styled/aligned
69+
- panels use common structure/spacing
70+
- debug/readout areas visually consistent
71+
- remove one-off component styling where safe
72+
73+
## Validation Targets
74+
Use the existing migrated shell tools as the validation set:
75+
- tools/State Inspector/index.html
76+
- tools/Performance Profiler/index.html
77+
- tools/Replay Visualizer/index.html
78+
- tools/Physics Sandbox/index.html
79+
80+
## Acceptance
81+
- STYLE_10 interaction behavior is execution-backed on migrated tools
82+
- STYLE_11 readability improvements are visible and consistent
83+
- STYLE_12 component consistency is visible across migrated tools
84+
- no layout shell regression
85+
- no inline/embedded styling added
86+
- change remains visually testable

tools/Performance Profiler/main.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
import { readToolHostSharedContextFromLocation } from "../shared/toolHostSharedContext.js";
77
import { registerToolBootContract } from "../shared/toolBootContract.js";
88
import { isFiniteNumber } from "../../src/shared/number/index.js";
9+
import { setupDebugToolInteractionFlow } from "../shared/debugToolInteractionFlow.js";
910

1011
const refs = {
1112
runWorkloadButton: document.getElementById("runWorkloadButton"),
@@ -23,6 +24,8 @@ const state = {
2324
frameSampling: false
2425
};
2526

27+
let disposeInteractionFlow = null;
28+
2629
function setStatus(message) {
2730
if (refs.statusText instanceof HTMLElement) {
2831
refs.statusText.textContent = message;
@@ -75,6 +78,20 @@ function stopFrameSampling() {
7578
state.frameHandle = 0;
7679
}
7780
state.frameSampling = false;
81+
updateControlState();
82+
}
83+
84+
function updateControlState() {
85+
const running = state.frameSampling;
86+
if (refs.runWorkloadButton instanceof HTMLButtonElement) {
87+
refs.runWorkloadButton.disabled = running;
88+
}
89+
if (refs.runFrameSampleButton instanceof HTMLButtonElement) {
90+
refs.runFrameSampleButton.disabled = running;
91+
}
92+
if (refs.stopButton instanceof HTMLButtonElement) {
93+
refs.stopButton.disabled = !running;
94+
}
7895
}
7996

8097
function runFrameSample() {
@@ -84,6 +101,7 @@ function runFrameSample() {
84101
let lastTimestamp = 0;
85102
let sampleCount = 0;
86103
state.frameSampling = true;
104+
updateControlState();
87105

88106
function tick(timestamp) {
89107
if (!state.frameSampling) {
@@ -159,6 +177,15 @@ const performanceProfilerApi = {
159177
function bootPerformanceProfiler() {
160178
if (!initialized) {
161179
bindEvents();
180+
disposeInteractionFlow = setupDebugToolInteractionFlow({
181+
primaryButton: refs.runWorkloadButton,
182+
escapeAction: () => {
183+
stopFrameSampling();
184+
setStatus("Profiler reset to idle.");
185+
},
186+
statusElement: refs.statusText
187+
});
188+
updateControlState();
162189
const hostContext = readToolHostSharedContextFromLocation(window.location);
163190
if (hostContext?.state && typeof hostContext.state === "object") {
164191
performanceProfilerApi.applyProjectState(hostContext.state);
@@ -174,6 +201,10 @@ registerToolBootContract("performance-profiler", {
174201
init: bootPerformanceProfiler,
175202
destroy() {
176203
stopFrameSampling();
204+
if (typeof disposeInteractionFlow === "function") {
205+
disposeInteractionFlow();
206+
disposeInteractionFlow = null;
207+
}
177208
return true;
178209
},
179210
getApi() {

tools/Physics Sandbox/main.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { integrateVelocity2D, stepArcadeBody } from "../../src/engine/physics/index.js";
22
import { safeParseJson, toPrettyJson } from "../shared/debugInspectorData.js";
33
import { registerToolBootContract } from "../shared/toolBootContract.js";
4+
import { setupDebugToolInteractionFlow } from "../shared/debugToolInteractionFlow.js";
45

56
const refs = {
67
runButton: document.getElementById("runPhysicsStepButton"),
@@ -9,6 +10,9 @@ const refs = {
910
output: document.getElementById("physicsSandboxOutput")
1011
};
1112

13+
let disposeInteractionFlow = null;
14+
let initialized = false;
15+
1216
function setStatus(message) {
1317
if (refs.statusText instanceof HTMLElement) {
1418
refs.statusText.textContent = message;
@@ -46,9 +50,24 @@ function runStep() {
4650
}
4751

4852
function bootPhysicsSandbox() {
53+
if (initialized) {
54+
return {
55+
runStep
56+
};
57+
}
4958
if (refs.runButton instanceof HTMLButtonElement) {
5059
refs.runButton.addEventListener("click", runStep);
5160
}
61+
disposeInteractionFlow = setupDebugToolInteractionFlow({
62+
primaryButton: refs.runButton,
63+
escapeAction: () => {
64+
if (refs.output instanceof HTMLElement) {
65+
refs.output.textContent = "Run a step to inspect updated body state.";
66+
}
67+
setStatus("Sandbox reset to ready state.");
68+
},
69+
statusElement: refs.statusText
70+
});
5271
if (refs.input instanceof HTMLTextAreaElement && !refs.input.value.trim()) {
5372
refs.input.value = toPrettyJson({
5473
x: 0,
@@ -63,6 +82,7 @@ function bootPhysicsSandbox() {
6382
maxSpeedY: 140
6483
});
6584
}
85+
initialized = true;
6686
return {
6787
runStep
6888
};
@@ -71,6 +91,10 @@ function bootPhysicsSandbox() {
7191
registerToolBootContract("physics-sandbox", {
7292
init: bootPhysicsSandbox,
7393
destroy() {
94+
if (typeof disposeInteractionFlow === "function") {
95+
disposeInteractionFlow();
96+
disposeInteractionFlow = null;
97+
}
7498
return true;
7599
},
76100
getApi() {

0 commit comments

Comments
 (0)