From c3c2efa60972cc7d214e0bdbd72e220b6eef339d Mon Sep 17 00:00:00 2001 From: Codex Date: Tue, 23 Jun 2026 18:32:04 -0400 Subject: [PATCH] PR_26175_OWNER_043: align active team registry with Delta and Gamma --- .../PROJECT_INSTRUCTIONS.md | 20 + .../TEAM_START_COMMANDS.md | 22 + .../addendums/multi_team.md | 20 + .../addendums/pr_workflow.md | 2 + .../addendums/team_release_readiness.md | 6 + .../addendums/team_start_and_release.md | 19 + .../backlog/BACKLOG_MASTER.md | 6 + .../team_assignments/ACTIVE_TEAM_REGISTRY.md | 15 + .../team_assignments/TEAM_ASSIGNMENTS.md | 24 + .../team_assignments/team_ownership.md | 21 + ...043-team-registry-gamma-delta-alignment.md | 71 ++ .../dev/reports/codex_changed_files.txt | 18 +- docs_build/dev/reports/codex_review.diff | 910 +++++++----------- 13 files changed, 594 insertions(+), 560 deletions(-) create mode 100644 docs_build/dev/reports/PR_26175_OWNER_043-team-registry-gamma-delta-alignment.md diff --git a/docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md b/docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md index 3314b3dea..124e8d641 100644 --- a/docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md +++ b/docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md @@ -57,3 +57,23 @@ Rules: - Teams pull backlog items only from their ownership area unless OWNER explicitly reassigns or splits the work. - Cross-team work requires OWNER approval and must identify the owning team for each PR. - Team start commands must remain aligned with this ownership model. + +## Current Active-Capable Team Map + +OWNER override approved: align active team governance with Delta and Gamma. + +The current active-capable team map includes: + +- Team Alfa +- Team Bravo +- Team Charlie +- Team Delta +- Team Gamma +- Team OWNER + +Clarification: +- The four-team ownership model remains the current backlog ownership model for Alfa, Bravo, Charlie, and Delta. +- Team Gamma is valid and active-capable for now because another PC may be working on it. +- Do not retire Team Gamma unless OWNER explicitly approves that retirement. +- Gamma work requires OWNER assignment, an active branch, an active draft/open PR, or an OWNER cleanup/release responsibility before it is treated as active. +- Historical four-team wording remains preserved for traceability, but it must not be read as excluding Team Gamma from active-capable governance. diff --git a/docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md b/docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md index 12f74cb1f..59b736216 100644 --- a/docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md +++ b/docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md @@ -90,6 +90,28 @@ Create one Team Delta branch for the selected assignment. Work only that assignment. ``` +## Start Team Gamma + +Ready-to-copy command: + +```text +OWNER override approved: Start Team Gamma from the ProjectInstructions release gate. + +Read docs_build/dev/ProjectInstructions/README.txt first. +Read docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md. +Read docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md. +Read docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md. + +Stop if Team Gamma already has an active branch. +Stop if Team Gamma already has an active assignment. +Stop if OWNER has not explicitly assigned Team Gamma work. +Stop if the selected work conflicts with current Alfa, Bravo, Charlie, or Delta ownership. + +Record the selected assignment under Team Gamma in TEAM_ASSIGNMENTS.md. +Create or use one Team Gamma branch for the selected assignment. +Work only that assignment. +``` + ## Day Work / EOD Merge Reminder Ready-to-copy reminder: diff --git a/docs_build/dev/ProjectInstructions/addendums/multi_team.md b/docs_build/dev/ProjectInstructions/addendums/multi_team.md index 3d603aff9..063f67988 100644 --- a/docs_build/dev/ProjectInstructions/addendums/multi_team.md +++ b/docs_build/dev/ProjectInstructions/addendums/multi_team.md @@ -13,6 +13,26 @@ Rules: - Cross-team work requires OWNER approval and must identify the correct owning team for each PR. - Team start commands must use the current ownership model before pulling a backlog item. +## Current Active-Capable Team Map + +OWNER override approved: align active team governance with Delta and Gamma. + +The active-capable team map currently includes: + +- Team Alfa +- Team Bravo +- Team Charlie +- Team Delta +- Team Gamma +- Team OWNER + +Rules: +- Historical four-team ownership wording remains preserved for backlog ownership traceability. +- Team Gamma remains valid and active-capable for now because another PC may be working on it. +- Do not retire Team Gamma unless OWNER explicitly approves retirement. +- Team Gamma may be active when it has OWNER-assigned work, an active branch, an active draft/open PR, or active release/cleanup responsibility. +- If Team Gamma work touches an Alfa, Bravo, Charlie, or Delta ownership area, the PR must document the OWNER assignment or cross-team decision. + ## All-Team Preferred Codex Execution Method Preferred execution model: diff --git a/docs_build/dev/ProjectInstructions/addendums/pr_workflow.md b/docs_build/dev/ProjectInstructions/addendums/pr_workflow.md index cadfee261..c925ad3d1 100644 --- a/docs_build/dev/ProjectInstructions/addendums/pr_workflow.md +++ b/docs_build/dev/ProjectInstructions/addendums/pr_workflow.md @@ -54,6 +54,8 @@ Applies to: - Team Alfa - Team Bravo - Team Charlie +- Team Delta +- Team Gamma - Any future NATO-named team Behavior: diff --git a/docs_build/dev/ProjectInstructions/addendums/team_release_readiness.md b/docs_build/dev/ProjectInstructions/addendums/team_release_readiness.md index d73cfcb9f..fd5049cfd 100644 --- a/docs_build/dev/ProjectInstructions/addendums/team_release_readiness.md +++ b/docs_build/dev/ProjectInstructions/addendums/team_release_readiness.md @@ -4,6 +4,12 @@ This gate prevents Team Alfa, Team Bravo, Team Charlie, or Team OWNER from starting regular assigned work before the ProjectInstructions operating system is ready. +Current OWNER clarification: +- The current release-readiness gate also applies to Team Delta and Team Gamma. +- Team Gamma is valid and active-capable for now because another PC may be working on it. +- Do not retire Team Gamma unless OWNER explicitly approves retirement. +- Historical wording that listed fewer teams remains traceable, but it must not exclude Delta or Gamma from current active-capable governance. + ## Release Rule Teams may start only when all of the following are true: diff --git a/docs_build/dev/ProjectInstructions/addendums/team_start_and_release.md b/docs_build/dev/ProjectInstructions/addendums/team_start_and_release.md index e1018c155..7caa3a506 100644 --- a/docs_build/dev/ProjectInstructions/addendums/team_start_and_release.md +++ b/docs_build/dev/ProjectInstructions/addendums/team_start_and_release.md @@ -31,6 +31,25 @@ The current active delivery teams for backlog start commands are: Each team start must confirm the selected backlog item is inside that team's ownership area. +## Current Active-Capable Start Map + +OWNER override approved: align active team governance with Delta and Gamma. + +The current active-capable start map includes: + +- Team Alfa +- Team Bravo +- Team Charlie +- Team Delta +- Team Gamma +- Team OWNER + +Clarification: +- The four-team start set remains the backlog ownership start set for Alfa, Bravo, Charlie, and Delta. +- Team Gamma is valid and active-capable for OWNER-assigned, branch-backed, PR-backed, release, or cleanup work. +- Do not retire Team Gamma unless OWNER explicitly approves retirement. +- Gamma work must not silently take ownership from Alfa, Bravo, Charlie, or Delta; cross-team work requires OWNER approval. + ## Assignment Flow For backlog-driven work: diff --git a/docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md b/docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md index 0b8942261..18b14edd6 100644 --- a/docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md +++ b/docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md @@ -162,6 +162,12 @@ ## Four-Team Backlog Alignment +Current OWNER clarification: +- The backlog alignment below preserves the current Alfa, Bravo, Charlie, and Delta ownership model. +- Team Gamma is valid and active-capable for now because another PC may be working on it, but no standing Gamma backlog ownership area is assigned here. +- Do not retire Team Gamma unless OWNER explicitly approves retirement. +- Gamma work must be OWNER-assigned, branch-backed, PR-backed, release, or cleanup work and must not silently replace Alfa, Bravo, Charlie, or Delta ownership. + ### Team Alfa - [ ] Alfa - Game Hub polish diff --git a/docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md b/docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md index 5ca625819..84531a667 100644 --- a/docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md +++ b/docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md @@ -28,8 +28,23 @@ If a team has no assignment, no active branch, and no active PR, it is inactive | Team | Active Assignment | Branch | PR | Status | OWNER Decision | |------|-------------------|--------|----|--------|----------------| +| Team Alfa | none | none | none | Available | Active-capable under current OWNER map | +| Team Bravo | none | none | none | Available | Active-capable under current OWNER map | +| Team Charlie | none | none | none | Available | Active-capable under current OWNER map | +| Team Delta | none | none | none | Available | Active-capable under current OWNER map | +| Team Gamma | none | unknown external PC possible | unknown external PR possible | Active-capable | Do not retire Gamma without explicit OWNER approval | | Team OWNER | none | none | none | Available | Governance Phase 1 complete | +## Current Active-Capable Team Map + +OWNER override approved: align active team governance with Delta and Gamma. + +The current active-capable team map includes Team Alfa, Team Bravo, Team Charlie, Team Delta, Team Gamma, and Team OWNER. + +Team Gamma remains valid and active-capable for now because another PC may be working on it. Do not retire Gamma unless OWNER explicitly approves retirement. + +Historical four-team wording remains preserved for backlog ownership traceability, but it must not be read as excluding Team Gamma from active-capable governance. + ## Update Rules Update the registry when: diff --git a/docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md b/docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md index acefbba8e..88d515447 100644 --- a/docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md +++ b/docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md @@ -4,6 +4,12 @@ | Team | Assignment | Branch | PR | Status | |------|------------|--------|----|--------| +| Team Alfa | none | none | none | Available | +| Team Bravo | none | none | none | Available | +| Team Charlie | none | none | none | Available | +| Team Delta | none | none | none | Available | +| Team Gamma | none | unknown external PC possible | unknown external PR possible | Active-capable | +| Team OWNER | none | none | none | Available | Rules: - Registry is the authoritative active-work view. @@ -27,6 +33,12 @@ Result: If a team is missing from Active Team Registry: it is currently inactive. +Current OWNER clarification: +- The active-capable team map includes Team Alfa, Team Bravo, Team Charlie, Team Delta, Team Gamma, and Team OWNER. +- Team Gamma remains valid and active-capable for now because another PC may be working on it. +- Do not retire Team Gamma unless OWNER explicitly approves retirement. +- Historical four-team wording remains preserved for backlog ownership traceability, but it must not exclude Gamma from active-capable governance. + ## Assignment Status Legend - Available: team may pull one `[ ]` backlog item when explicitly instructed. @@ -65,6 +77,18 @@ Active assignment: none. Active branch: none. +## Team Gamma + +Status: Active-capable + +Active assignment: none recorded locally. + +Active branch: unknown external PC possible. + +Active PR: unknown external PR possible. + +OWNER decision: Do not retire Gamma without explicit OWNER approval. + ## Team OWNER Status: Available diff --git a/docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md b/docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md index 865cca551..45eeecb00 100644 --- a/docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md +++ b/docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md @@ -52,6 +52,27 @@ Alfa, Bravo, Charlie, and Delta are the four active delivery teams for backlog o Each team may pull only from its ownership area unless OWNER explicitly reassigns, splits, or approves cross-team work. +## Current Active-Capable Team Map + +OWNER override approved: align active team governance with Delta and Gamma. + +The current active-capable team map includes: + +- Team Alfa +- Team Bravo +- Team Charlie +- Team Delta +- Team Gamma +- Team OWNER + +Clarification: +- The four-team rule remains the current backlog ownership model for Alfa, Bravo, Charlie, and Delta. +- Team Gamma is valid and active-capable for now because another PC may be working on it. +- Team Gamma does not receive a standing backlog ownership area in this file. +- Do not retire Team Gamma unless OWNER explicitly approves retirement. +- Gamma work requires OWNER assignment, an active branch, an active draft/open PR, or active release/cleanup responsibility. +- Gamma work that touches Alfa, Bravo, Charlie, or Delta areas must document the OWNER cross-team decision. + ## Rule Ownership may only be reassigned by OWNER governance. diff --git a/docs_build/dev/reports/PR_26175_OWNER_043-team-registry-gamma-delta-alignment.md b/docs_build/dev/reports/PR_26175_OWNER_043-team-registry-gamma-delta-alignment.md new file mode 100644 index 000000000..fde668180 --- /dev/null +++ b/docs_build/dev/reports/PR_26175_OWNER_043-team-registry-gamma-delta-alignment.md @@ -0,0 +1,71 @@ +# PR_26175_OWNER_043-team-registry-gamma-delta-alignment + +OWNER override approved: align active team governance with Delta and Gamma. + +## Summary + +Updated Project Instructions governance only. This PR adds current OWNER-approved active-capable team map clarification so Delta and Gamma are both recognized, while preserving historical four-team wording for backlog ownership traceability. Gamma remains valid and active-capable because another PC may be working on it. + +No runtime code, PR history, archive history, branch deletion, PR closure, or merge action was changed. + +## Branch Validation + +| Check | Result | Evidence | +|---|---|---| +| Started from main | PASS | Setup returned to main, ran `git pull --ff-only`, and main was already up to date. | +| Current branch | PASS | `PR_26175_OWNER_043-team-registry-gamma-delta-alignment` | +| Expected branch | PASS | `PR_26175_OWNER_043-team-registry-gamma-delta-alignment` | +| Base sync | PASS | HEAD/base `6d94477bb0ae9f63dd1466dbb89e4a437b8749b0`; main `6d94477bb0ae9f63dd1466dbb89e4a437b8749b0`; origin/main `6d94477bb0ae9f63dd1466dbb89e4a437b8749b0` | +| Worktree before edits | PASS | Clean before branch creation and governance edits. | + +## Requirement Checklist + +| Requirement | Result | Notes | +|---|---|---| +| Governance instructions only | PASS | Changed files are under `docs_build/dev/ProjectInstructions/` plus required reports. | +| Active team map includes Team Alfa | PASS | Added to active-capable map and registry/assignment tables. | +| Active team map includes Team Bravo | PASS | Added to active-capable map and registry/assignment tables. | +| Active team map includes Team Charlie | PASS | Added to active-capable map and registry/assignment tables. | +| Active team map includes Team Delta | PASS | Kept and clarified in active-capable map, PR shortcut, and readiness/start governance. | +| Active team map includes Team Gamma | PASS | Added as valid active-capable team with explicit do-not-retire guidance. | +| Active team map includes Team OWNER | PASS | Preserved and included in active-capable map. | +| Keep Gamma valid/active-capable | PASS | Added explicit Gamma active-capable clarification across governance files. | +| Do not retire Gamma | PASS | Added explicit do-not-retire-without-OWNER-approval guidance. | +| Do not rewrite existing PR history | PASS | No archive/history files or PR history were changed. | +| Align references excluding Delta/Gamma | PASS | Updated current governance references that omitted Delta/Gamma or could exclude Gamma. | +| Preserve historical wording where appropriate | PASS | Historical four-team text remains; new clarification blocks explain current OWNER decision. | +| No runtime code changes | PASS | No runtime paths changed. | +| Required reports | PASS | `codex_review.diff`, `codex_changed_files.txt`, and this report generated. | +| Repo-structured ZIP under tmp/ | PASS | `tmp/PR_26175_OWNER_043-team-registry-gamma-delta-alignment_delta.zip` generated and contents verified. | + +## Validation Lane Report + +| Lane | Result | Evidence | +|---|---|---| +| ProjectInstructions read gate | PASS | Read 46 files under `docs_build/dev/ProjectInstructions/`. | +| Scope lane | PASS | Changed governance instruction files and reports only. | +| Release gate lane | PASS | Source-of-truth files remain present; no protected instruction guidance was deleted. | +| Gamma/Delta alignment lane | PASS | Active-capable team map now includes Alfa, Bravo, Charlie, Delta, Gamma, and OWNER. | +| Whitespace lane | PASS | `git diff --check` completed successfully. | +| ZIP lane | PASS | ZIP created at `tmp/PR_26175_OWNER_043-team-registry-gamma-delta-alignment_delta.zip` with repo-structured entries. | + +## Changed Governance Files + +- `docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md` +- `docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md` +- `docs_build/dev/ProjectInstructions/addendums/multi_team.md` +- `docs_build/dev/ProjectInstructions/addendums/pr_workflow.md` +- `docs_build/dev/ProjectInstructions/addendums/team_release_readiness.md` +- `docs_build/dev/ProjectInstructions/addendums/team_start_and_release.md` +- `docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md` +- `docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md` +- `docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md` +- `docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md` + +## Manual Validation Notes + +- Confirmed the work started from clean, synced `main` before creating the OWNER_043 branch. +- Confirmed ProjectInstructions archive/history snapshots were read and left untouched. +- Confirmed the active-capable map includes Team Alfa, Team Bravo, Team Charlie, Team Delta, Team Gamma, and Team OWNER. +- Confirmed Gamma is not retired and is marked valid/active-capable only under OWNER assignment, active branch, active PR, release, or cleanup responsibility. +- Confirmed no runtime code was modified. diff --git a/docs_build/dev/reports/codex_changed_files.txt b/docs_build/dev/reports/codex_changed_files.txt index fb32c88ea..a52c4ee24 100644 --- a/docs_build/dev/reports/codex_changed_files.txt +++ b/docs_build/dev/reports/codex_changed_files.txt @@ -1,9 +1,13 @@ -assets/theme-v2/css/status.css -assets/theme-v2/js/toolbox-status-bar.js -docs_build/dev/BUILD_PR.md -docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_report.md -docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_validation-lane.md -docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_requirements-checklist.md +docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md +docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md +docs_build/dev/ProjectInstructions/addendums/multi_team.md +docs_build/dev/ProjectInstructions/addendums/pr_workflow.md +docs_build/dev/ProjectInstructions/addendums/team_release_readiness.md +docs_build/dev/ProjectInstructions/addendums/team_start_and_release.md +docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md +docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md +docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md +docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md +docs_build/dev/reports/PR_26175_OWNER_043-team-registry-gamma-delta-alignment.md docs_build/dev/reports/codex_changed_files.txt docs_build/dev/reports/codex_review.diff -tests/playwright/tools/ToolboxSelectedGameStatusBar.spec.mjs diff --git a/docs_build/dev/reports/codex_review.diff b/docs_build/dev/reports/codex_review.diff index 10a76dad1..07c19c4a7 100644 --- a/docs_build/dev/reports/codex_review.diff +++ b/docs_build/dev/reports/codex_review.diff @@ -1,576 +1,380 @@ -diff --git a/assets/theme-v2/css/status.css b/assets/theme-v2/css/status.css -index 5ea748263..88e0d5e64 100644 ---- a/assets/theme-v2/css/status.css -+++ b/assets/theme-v2/css/status.css -@@ -54,11 +54,19 @@ - - .toolbox-status-bar__game { - min-width: var(--space-0); -- display: grid; -- gap: var(--space-3); -+ display: flex; -+ align-items: center; -+ flex-wrap: wrap; -+ gap: var(--space-14); - text-align: left - } - -+.toolbox-status-bar__field { -+ min-width: var(--space-0); -+ display: grid; -+ gap: var(--space-3) -+} -+ - .toolbox-status-bar__label { - color: var(--muted); - font-size: var(--font-size-xs); -@@ -73,7 +81,7 @@ - overflow-wrap: anywhere - } - --.toolbox-status-bar__meta { -+.toolbox-status-bar__purpose { - color: var(--muted); - font-size: var(--font-size-sm); - overflow-wrap: anywhere -@@ -89,6 +97,10 @@ - text-align: center - } - -+.toolbox-status-bar__context-type { -+ flex: 0 0 auto -+} -+ - .toolbox-status-bar__message { - margin: var(--space-0); - max-width: var(--measure-lg); -@@ -104,13 +116,27 @@ - } - - .toolbox-status-bar[data-selected-game-state="missing"] { -- border-color: var(--gold-border-muted); -- background: var(--gold-soft) -+ border-color: var(--gold-border-muted) - } - - .toolbox-status-bar[data-selected-game-state="error"] { -- border-color: color-mix(in srgb, var(--red) 52%, var(--line)); -- background: color-mix(in srgb, var(--red) 14%, var(--panel)) -+ border-color: color-mix(in srgb, var(--red) 52%, var(--line)) -+} -+ -+.toolbox-status-bar[data-toolbox-status-context-kind="error"] .toolbox-status-bar__context-type { -+ border-color: color-mix(in srgb, var(--red) 62%, var(--line)); -+ color: var(--red) -+} -+ -+.toolbox-status-bar[data-toolbox-status-context-kind="warning"] .toolbox-status-bar__context-type, -+.toolbox-status-bar[data-toolbox-status-context-kind="validation"] .toolbox-status-bar__context-type { -+ border-color: var(--gold-border-muted); -+ color: var(--gold) -+} -+ -+.toolbox-status-bar[data-toolbox-status-context-kind="save"] .toolbox-status-bar__context-type { -+ border-color: color-mix(in srgb, var(--green) 62%, var(--line)); -+ color: var(--green) - } - - body.tool-focus-mode .toolbox-status-bar { -@@ -240,6 +266,7 @@ body.tool-focus-mode .toolbox-status-bar { - } - - .toolbox-status-bar__game { -+ justify-content: center; - text-align: center - } - } -diff --git a/assets/theme-v2/js/toolbox-status-bar.js b/assets/theme-v2/js/toolbox-status-bar.js -index 5a611d33d..fdb367328 100644 ---- a/assets/theme-v2/js/toolbox-status-bar.js -+++ b/assets/theme-v2/js/toolbox-status-bar.js -@@ -7,6 +7,7 @@ let repository = null; - let messageObserver = null; - let listenersInstalled = false; - let latestToolMessage = ""; -+let pendingToolMessageRefresh = 0; - let mountOptions = { - gameHubHref: "toolbox/game-hub/index.html", - pagePath: "", -@@ -89,16 +90,29 @@ function createStatusBar() { - game.className = "toolbox-status-bar__game"; - game.dataset.toolboxSelectedGame = ""; - -- const label = createText("span", "toolbox-status-bar__label", "toolboxSelectedGameLabel"); -- label.textContent = "Selected Game"; -+ const nameField = document.createElement("div"); -+ nameField.className = "toolbox-status-bar__field"; -+ nameField.dataset.toolboxSelectedGameNameField = ""; -+ const nameLabel = createText("span", "toolbox-status-bar__label", "toolboxSelectedGameNameLabel"); -+ nameLabel.textContent = "Selected Game Name"; - const name = createText("strong", "toolbox-status-bar__game-name", "toolboxSelectedGameName"); -- const meta = createText("span", "toolbox-status-bar__meta", "toolboxSelectedGameMeta"); -- game.append(label, name, meta); -+ nameField.append(nameLabel, name); -+ -+ const purposeField = document.createElement("div"); -+ purposeField.className = "toolbox-status-bar__field"; -+ purposeField.dataset.toolboxSelectedGamePurposeField = ""; -+ const purposeLabel = createText("span", "toolbox-status-bar__label", "toolboxSelectedGamePurposeLabel"); -+ purposeLabel.textContent = "Selected Game Purpose"; -+ const purpose = createText("span", "toolbox-status-bar__purpose", "toolboxSelectedGamePurpose"); -+ purpose.dataset.toolboxSelectedGameMeta = ""; -+ purposeField.append(purposeLabel, purpose); -+ game.append(nameField, purposeField); - - const center = document.createElement("div"); - center.className = "toolbox-status-bar__center"; - center.dataset.toolboxStatusCenter = ""; - -+ const contextType = createText("span", "pill toolbox-status-bar__context-type", "toolboxStatusContextType"); - const message = createText("p", "toolbox-status-bar__message status", "toolboxStatusMessage"); - message.setAttribute("role", "status"); - const action = document.createElement("a"); -@@ -106,7 +120,7 @@ function createStatusBar() { - action.dataset.toolboxStatusAction = ""; - action.href = mountOptions.gameHubHref; - action.textContent = "Open Game Hub"; -- center.append(message, action); -+ center.append(contextType, message, action); - - inner.append(game, center); - bar.append(inner); -@@ -172,6 +186,12 @@ function updateLatestToolMessage() { - } - } - -+function scheduleToolMessageRefresh() { -+ window.clearTimeout(pendingToolMessageRefresh); -+ pendingToolMessageRefresh = window.setTimeout(updateLatestToolMessage, 0); -+ window.setTimeout(updateLatestToolMessage, 120); -+} -+ - function observeToolMessages() { - messageObserver?.disconnect(); - const main = document.querySelector("main"); -@@ -211,51 +231,76 @@ function publishSelectedGameContext(selectedGame, state) { - })); - } - --function selectedGameMeta(selectedGame) { -- return [selectedGame.purpose, selectedGame.status] -- .map((value) => String(value || "").trim()) -- .filter(Boolean) -- .join(" - "); -+function classifyToolContext(messageText, state, required) { -+ const text = String(messageText || "").trim(); -+ if (state === "error") { -+ return { kind: "error", label: "Error" }; -+ } -+ if (required && state === "missing") { -+ return { kind: "action", label: "Tool Action" }; -+ } -+ if (/\b(error|failed|malformed|unavailable|could not)\b/i.test(text)) { -+ return { kind: "error", label: "Error" }; -+ } -+ if (/\b(sign in|refresh|try again|temporarily|blocked)\b/i.test(text)) { -+ return { kind: "warning", label: "Warning" }; -+ } -+ if (/\b(validation|requirement|requirements|missing|required|open or seed)\b/i.test(text)) { -+ return { kind: "validation", label: "Validation" }; -+ } -+ if (/\b(saved|created|deleted|updated|loaded|save changes)\b/i.test(text)) { -+ return { kind: "save", label: "Save State" }; -+ } -+ return { kind: "action", label: "Tool Action" }; - } - - function renderSelectedGame(bar, selectedGame, state, messageText) { - const required = pageRequiresSelectedGame(); - const name = bar.querySelector("[data-toolbox-selected-game-name]"); -- const meta = bar.querySelector("[data-toolbox-selected-game-meta]"); -+ const purpose = bar.querySelector("[data-toolbox-selected-game-purpose]"); -+ const contextType = bar.querySelector("[data-toolbox-status-context-type]"); - const message = bar.querySelector("[data-toolbox-status-message]"); - const action = bar.querySelector("[data-toolbox-status-action]"); -+ const nextMessage = messageText || latestToolMessage || (selectedGame -+ ? `Tool context is filtered to ${selectedGame.name}.` -+ : required -+ ? "Select or create a game in Game Hub before using this toolbox page." -+ : "Idea Board can capture ideas before a Game Hub game exists."); -+ const context = classifyToolContext(nextMessage, state, required); - - bar.dataset.selectedGameState = state; - bar.dataset.selectedGameRequired = String(required); -+ bar.dataset.toolboxStatusContextKind = context.kind; -+ contextType.textContent = context.label; - action.hidden = false; - action.href = mountOptions.gameHubHref; - - if (selectedGame) { - name.textContent = selectedGame.name; -- meta.textContent = selectedGameMeta(selectedGame) || "Game Hub selected game"; -- message.textContent = messageText || latestToolMessage || `Data filtered to ${selectedGame.name}.`; -+ purpose.textContent = selectedGame.purpose || "Game"; -+ message.textContent = nextMessage; - action.textContent = "Open Game Hub"; - return; - } - - if (!required) { -- name.textContent = "Optional"; -- meta.textContent = "Idea Board can start before Game Hub creation"; -- message.textContent = latestToolMessage || "Idea Board can capture ideas before a Game Hub game exists."; -+ name.textContent = "No game selected"; -+ purpose.textContent = "Idea Board optional"; -+ message.textContent = nextMessage; - action.textContent = "Open Game Hub"; - return; - } +diff --git a/docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md b/docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md +index 3314b3dea..124e8d641 100644 +--- a/docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md ++++ b/docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md +@@ -57,3 +57,23 @@ Rules: + - Teams pull backlog items only from their ownership area unless OWNER explicitly reassigns or splits the work. + - Cross-team work requires OWNER approval and must identify the owning team for each PR. + - Team start commands must remain aligned with this ownership model. ++ ++## Current Active-Capable Team Map ++ ++OWNER override approved: align active team governance with Delta and Gamma. ++ ++The current active-capable team map includes: ++ ++- Team Alfa ++- Team Bravo ++- Team Charlie ++- Team Delta ++- Team Gamma ++- Team OWNER ++ ++Clarification: ++- The four-team ownership model remains the current backlog ownership model for Alfa, Bravo, Charlie, and Delta. ++- Team Gamma is valid and active-capable for now because another PC may be working on it. ++- Do not retire Team Gamma unless OWNER explicitly approves that retirement. ++- Gamma work requires OWNER assignment, an active branch, an active draft/open PR, or an OWNER cleanup/release responsibility before it is treated as active. ++- Historical four-team wording remains preserved for traceability, but it must not be read as excluding Team Gamma from active-capable governance. +diff --git a/docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md b/docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md +index 12f74cb1f..59b736216 100644 +--- a/docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md ++++ b/docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md +@@ -90,6 +90,28 @@ Create one Team Delta branch for the selected assignment. + Work only that assignment. + ``` - if (state === "error") { - name.textContent = "Unavailable"; -- meta.textContent = "Game Hub selected game could not be read"; -- message.textContent = messageText || "Game Hub selected game is unavailable. Refresh or restore the Local API."; -+ purpose.textContent = "Game Hub selected game could not be read"; -+ message.textContent = nextMessage; - action.textContent = "Open Game Hub"; - return; - } ++## Start Team Gamma ++ ++Ready-to-copy command: ++ ++```text ++OWNER override approved: Start Team Gamma from the ProjectInstructions release gate. ++ ++Read docs_build/dev/ProjectInstructions/README.txt first. ++Read docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md. ++Read docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md. ++Read docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md. ++ ++Stop if Team Gamma already has an active branch. ++Stop if Team Gamma already has an active assignment. ++Stop if OWNER has not explicitly assigned Team Gamma work. ++Stop if the selected work conflicts with current Alfa, Bravo, Charlie, or Delta ownership. ++ ++Record the selected assignment under Team Gamma in TEAM_ASSIGNMENTS.md. ++Create or use one Team Gamma branch for the selected assignment. ++Work only that assignment. ++``` ++ + ## Day Work / EOD Merge Reminder + + Ready-to-copy reminder: +diff --git a/docs_build/dev/ProjectInstructions/addendums/multi_team.md b/docs_build/dev/ProjectInstructions/addendums/multi_team.md +index 3d603aff9..063f67988 100644 +--- a/docs_build/dev/ProjectInstructions/addendums/multi_team.md ++++ b/docs_build/dev/ProjectInstructions/addendums/multi_team.md +@@ -13,6 +13,26 @@ Rules: + - Cross-team work requires OWNER approval and must identify the correct owning team for each PR. + - Team start commands must use the current ownership model before pulling a backlog item. + ++## Current Active-Capable Team Map ++ ++OWNER override approved: align active team governance with Delta and Gamma. ++ ++The active-capable team map currently includes: ++ ++- Team Alfa ++- Team Bravo ++- Team Charlie ++- Team Delta ++- Team Gamma ++- Team OWNER ++ ++Rules: ++- Historical four-team ownership wording remains preserved for backlog ownership traceability. ++- Team Gamma remains valid and active-capable for now because another PC may be working on it. ++- Do not retire Team Gamma unless OWNER explicitly approves retirement. ++- Team Gamma may be active when it has OWNER-assigned work, an active branch, an active draft/open PR, or active release/cleanup responsibility. ++- If Team Gamma work touches an Alfa, Bravo, Charlie, or Delta ownership area, the PR must document the OWNER assignment or cross-team decision. ++ + ## All-Team Preferred Codex Execution Method + + Preferred execution model: +diff --git a/docs_build/dev/ProjectInstructions/addendums/pr_workflow.md b/docs_build/dev/ProjectInstructions/addendums/pr_workflow.md +index cadfee261..c925ad3d1 100644 +--- a/docs_build/dev/ProjectInstructions/addendums/pr_workflow.md ++++ b/docs_build/dev/ProjectInstructions/addendums/pr_workflow.md +@@ -54,6 +54,8 @@ Applies to: + - Team Alfa + - Team Bravo + - Team Charlie ++- Team Delta ++- Team Gamma + - Any future NATO-named team + + Behavior: +diff --git a/docs_build/dev/ProjectInstructions/addendums/team_release_readiness.md b/docs_build/dev/ProjectInstructions/addendums/team_release_readiness.md +index d73cfcb9f..fd5049cfd 100644 +--- a/docs_build/dev/ProjectInstructions/addendums/team_release_readiness.md ++++ b/docs_build/dev/ProjectInstructions/addendums/team_release_readiness.md +@@ -4,6 +4,12 @@ + + This gate prevents Team Alfa, Team Bravo, Team Charlie, or Team OWNER from starting regular assigned work before the ProjectInstructions operating system is ready. + ++Current OWNER clarification: ++- The current release-readiness gate also applies to Team Delta and Team Gamma. ++- Team Gamma is valid and active-capable for now because another PC may be working on it. ++- Do not retire Team Gamma unless OWNER explicitly approves retirement. ++- Historical wording that listed fewer teams remains traceable, but it must not exclude Delta or Gamma from current active-capable governance. ++ + ## Release Rule - name.textContent = "No game selected"; -- meta.textContent = "Game Hub owns game selection"; -+ purpose.textContent = "Game Hub owns game selection"; - message.textContent = "Select or create a game in Game Hub before using this toolbox page."; - action.textContent = "Select or Create in Game Hub"; - } -@@ -284,6 +329,9 @@ function installEventListeners() { - return; - } - listenersInstalled = true; -+ document.addEventListener("click", scheduleToolMessageRefresh, true); -+ document.addEventListener("submit", scheduleToolMessageRefresh, true); -+ document.addEventListener("change", scheduleToolMessageRefresh, true); - window.addEventListener("gamefoundry:toolbox-selected-game-changed", refreshToolboxStatusBar); - window.addEventListener("gamefoundry:data-changed", refreshToolboxStatusBar); - } -diff --git a/docs_build/dev/BUILD_PR.md b/docs_build/dev/BUILD_PR.md -index 51d6abdeb..65c4d9709 100644 ---- a/docs_build/dev/BUILD_PR.md -+++ b/docs_build/dev/BUILD_PR.md -@@ -1,41 +1,42 @@ --# PR_26175_ALFA_001-toolbox-selected-game-status-bar -+# PR_26175_ALFA_002-toolbox-status-bar-context-polish + Teams may start only when all of the following are true: +diff --git a/docs_build/dev/ProjectInstructions/addendums/team_start_and_release.md b/docs_build/dev/ProjectInstructions/addendums/team_start_and_release.md +index e1018c155..7caa3a506 100644 +--- a/docs_build/dev/ProjectInstructions/addendums/team_start_and_release.md ++++ b/docs_build/dev/ProjectInstructions/addendums/team_start_and_release.md +@@ -31,6 +31,25 @@ The current active delivery teams for backlog start commands are: - ## Purpose --Add one shared Theme V2 toolbox status bar that surfaces the Game Hub selected game and current tool messages across toolbox pages. -+Polish the shared toolbox status bar context display so it shows only selected-game name/purpose on the left and categorized tool context in the center. + Each team start must confirm the selected backlog item is inside that team's ownership area. - ## Source Of Truth --This `BUILD_PR.md` is the source of truth for `PR_26175_ALFA_001-toolbox-selected-game-status-bar`. -+This `BUILD_PR.md` is the source of truth for `PR_26175_ALFA_002-toolbox-status-bar-context-polish`. ++## Current Active-Capable Start Map ++ ++OWNER override approved: align active team governance with Delta and Gamma. ++ ++The current active-capable start map includes: ++ ++- Team Alfa ++- Team Bravo ++- Team Charlie ++- Team Delta ++- Team Gamma ++- Team OWNER ++ ++Clarification: ++- The four-team start set remains the backlog ownership start set for Alfa, Bravo, Charlie, and Delta. ++- Team Gamma is valid and active-capable for OWNER-assigned, branch-backed, PR-backed, release, or cleanup work. ++- Do not retire Team Gamma unless OWNER explicitly approves retirement. ++- Gamma work must not silently take ownership from Alfa, Bravo, Charlie, or Delta; cross-team work requires OWNER approval. ++ + ## Assignment Flow + + For backlog-driven work: +diff --git a/docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md b/docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md +index 0b8942261..18b14edd6 100644 +--- a/docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md ++++ b/docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md +@@ -162,6 +162,12 @@ + + ## Four-Team Backlog Alignment + ++Current OWNER clarification: ++- The backlog alignment below preserves the current Alfa, Bravo, Charlie, and Delta ownership model. ++- Team Gamma is valid and active-capable for now because another PC may be working on it, but no standing Gamma backlog ownership area is assigned here. ++- Do not retire Team Gamma unless OWNER explicitly approves retirement. ++- Gamma work must be OWNER-assigned, branch-backed, PR-backed, release, or cleanup work and must not silently replace Alfa, Bravo, Charlie, or Delta ownership. ++ + ### Team Alfa + + - [ ] Alfa - Game Hub polish +diff --git a/docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md b/docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md +index 5ca625819..84531a667 100644 +--- a/docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md ++++ b/docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md +@@ -28,8 +28,23 @@ If a team has no assignment, no active branch, and no active PR, it is inactive + + | Team | Active Assignment | Branch | PR | Status | OWNER Decision | + |------|-------------------|--------|----|--------|----------------| ++| Team Alfa | none | none | none | Available | Active-capable under current OWNER map | ++| Team Bravo | none | none | none | Available | Active-capable under current OWNER map | ++| Team Charlie | none | none | none | Available | Active-capable under current OWNER map | ++| Team Delta | none | none | none | Available | Active-capable under current OWNER map | ++| Team Gamma | none | unknown external PC possible | unknown external PR possible | Active-capable | Do not retire Gamma without explicit OWNER approval | + | Team OWNER | none | none | none | Available | Governance Phase 1 complete | + ++## Current Active-Capable Team Map ++ ++OWNER override approved: align active team governance with Delta and Gamma. ++ ++The current active-capable team map includes Team Alfa, Team Bravo, Team Charlie, Team Delta, Team Gamma, and Team OWNER. ++ ++Team Gamma remains valid and active-capable for now because another PC may be working on it. Do not retire Gamma unless OWNER explicitly approves retirement. ++ ++Historical four-team wording remains preserved for backlog ownership traceability, but it must not be read as excluding Team Gamma from active-capable governance. ++ + ## Update Rules + + Update the registry when: +diff --git a/docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md b/docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md +index acefbba8e..88d515447 100644 +--- a/docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md ++++ b/docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md +@@ -4,6 +4,12 @@ + + | Team | Assignment | Branch | PR | Status | + |------|------------|--------|----|--------| ++| Team Alfa | none | none | none | Available | ++| Team Bravo | none | none | none | Available | ++| Team Charlie | none | none | none | Available | ++| Team Delta | none | none | none | Available | ++| Team Gamma | none | unknown external PC possible | unknown external PR possible | Active-capable | ++| Team OWNER | none | none | none | Available | + + Rules: + - Registry is the authoritative active-work view. +@@ -27,6 +33,12 @@ Result: + If a team is missing from Active Team Registry: + it is currently inactive. + ++Current OWNER clarification: ++- The active-capable team map includes Team Alfa, Team Bravo, Team Charlie, Team Delta, Team Gamma, and Team OWNER. ++- Team Gamma remains valid and active-capable for now because another PC may be working on it. ++- Do not retire Team Gamma unless OWNER explicitly approves retirement. ++- Historical four-team wording remains preserved for backlog ownership traceability, but it must not exclude Gamma from active-capable governance. ++ + ## Assignment Status Legend - ## Exact Scope --- Add a shared toolbox status bar renderer loaded through Theme V2 shared partial bootstrapping. --- Render the status bar above the footer in normal page mode. --- Anchor the status bar to the viewport bottom while `body.tool-focus-mode` is active. --- Read the selected game only from the Game Hub repository through the existing Local API/service contract. --- Display the selected Game Hub game on the left side of the status bar. --- Display tool actions, warnings, errors, save state, validation messages, or the missing-game prompt in the center of the status bar. --- Expose the selected Game Hub game as derived page context for toolbox pages without persisting browser-owned product data. --- Require selected-game context on toolbox pages except Idea Board, which remains excluded because ideas can exist before game creation. --- Show a creator-safe prompt to select or create a game in Game Hub when no selected game exists. --- Notify the shared status bar when Game Hub changes the selected game. --- Add targeted Playwright coverage for placement, fullscreen anchoring, selected-game display/update, missing-game prompt, and Idea Board exclusion. -+- Do not include environment text in the status bar because environment already appears in the platform banner. -+- On the left side, display the selected Game Hub game name and selected Game Hub game purpose. -+- On the center side, display tool context messages for tool actions, save state, validation messages, warnings, or errors. -+- Preserve normal placement above the footer. -+- Preserve fullscreen/tool display mode bottom anchoring. -+- Preserve Idea Board selected-game filtering exclusion. -+- Preserve Game Hub as selected-game owner through the existing repository contract. -+- Keep the shared Theme V2 toolbox component model. -+- Update targeted Playwright coverage for the polished left and center context. + - Available: team may pull one `[ ]` backlog item when explicitly instructed. +@@ -65,6 +77,18 @@ Active assignment: none. - ## Exact Targets --- `assets/theme-v2/js/gamefoundry-partials.js` -+- `docs_build/dev/BUILD_PR.md` - - `assets/theme-v2/js/toolbox-status-bar.js` - - `assets/theme-v2/css/status.css` --- `toolbox/game-hub/game-hub.js` - - `tests/playwright/tools/ToolboxSelectedGameStatusBar.spec.mjs` --- `docs_build/dev/reports/PR_26175_ALFA_001-toolbox-selected-game-status-bar_report.md` --- `docs_build/dev/reports/PR_26175_ALFA_001-toolbox-selected-game-status-bar_validation-lane.md` --- `docs_build/dev/reports/PR_26175_ALFA_001-toolbox-selected-game-status-bar_requirements-checklist.md` -+- `docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_report.md` -+- `docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_validation-lane.md` -+- `docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_requirements-checklist.md` -+- `docs_build/dev/reports/codex_review.diff` -+- `docs_build/dev/reports/codex_changed_files.txt` + Active branch: none. - ## Out Of Scope -+- No environment status in the toolbox status bar. -+- No row highlights. -+- No large banners. -+- No modal-style status messages. -+- No inline styles, style blocks, or page-local CSS. -+- No API/service contract changes. - - No engine core changes. - - No `start_of_day` folder changes. --- No API/service contract changes. --- No page-local CSS, inline styles, or style blocks. --- No browser storage or browser-owned product data as selected-game source of truth. --- No Idea Board selected-game filtering. ++## Team Gamma ++ ++Status: Active-capable ++ ++Active assignment: none recorded locally. ++ ++Active branch: unknown external PC possible. ++ ++Active PR: unknown external PR possible. ++ ++OWNER decision: Do not retire Gamma without explicit OWNER approval. ++ + ## Team OWNER - ## Validation - Run: -@@ -47,12 +48,12 @@ npx playwright test tests/playwright/tools/ToolboxSelectedGameStatusBar.spec.mjs - Also verify the changed source does not introduce inline styles or style blocks: + Status: Available +diff --git a/docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md b/docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md +index 865cca551..45eeecb00 100644 +--- a/docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md ++++ b/docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md +@@ -52,6 +52,27 @@ Alfa, Bravo, Charlie, and Delta are the four active delivery teams for backlog o - ```powershell --rg -n " { -+ await route.fulfill({ -+ contentType: "application/json", -+ body: JSON.stringify({ -+ data: { -+ authenticated: true, -+ displayName: options.session.displayName || "User 1", -+ roleSlugs: options.session.roleSlugs || ["creator"], -+ userKey, -+ }, -+ ok: true, -+ }), -+ }); -+ }); -+ await page.request.post(`${server.baseUrl}/api/session/user`, { -+ data: { userKey }, -+ }); -+ } - - await workspaceV2CoverageReporter.start(page); - await page.goto(`${server.baseUrl}${pathName}`, { waitUntil: "networkidle" }); -@@ -84,6 +105,14 @@ function expectNoPageFailures(failures) { - expect(failures.consoleErrors).toEqual([]); - } - -+function creatorSession() { -+ return { -+ displayName: "User 1", -+ roleSlugs: ["creator"], -+ userKey: MOCK_DB_KEYS.users.user1, -+ }; -+} -+ - async function statusBarSnapshot(page) { - return page.locator("[data-toolbox-status-bar]").evaluate((bar) => { - const footer = document.querySelector("footer.footer"); -@@ -111,8 +140,13 @@ test("shared toolbox status bar shows selected Game Hub game above the footer", - const statusBar = page.locator("[data-toolbox-status-bar]"); - await expect(statusBar).toBeVisible(); - await expect(page.locator("style, [style], script:not([src])")).toHaveCount(0); -+ await expect(statusBar).not.toContainText("Environment"); -+ await expect(statusBar.locator("[data-toolbox-selected-game-name-label]")).toHaveText("Selected Game Name"); - await expect(statusBar.locator("[data-toolbox-selected-game-name]")).toHaveText("Demo Game"); -- await expect(statusBar.locator("[data-toolbox-selected-game-meta]")).toHaveText("Game - Under Construction"); -+ await expect(statusBar.locator("[data-toolbox-selected-game-purpose-label]")).toHaveText("Selected Game Purpose"); -+ await expect(statusBar.locator("[data-toolbox-selected-game-purpose]")).toHaveText("Game"); -+ await expect(statusBar.locator("[data-toolbox-selected-game]")).not.toContainText("Under Construction"); -+ await expect(statusBar.locator("[data-toolbox-status-context-type]")).toHaveText("Tool Action"); - await expect(statusBar.locator("[data-toolbox-status-message]")).toContainText("Game Design mock repository ready."); - await expect(page.locator("body")).toHaveAttribute("data-toolbox-selected-game-id", "demo-game"); - await expect(page.locator("body")).toHaveAttribute("data-toolbox-selected-game-filter", "active"); -@@ -130,6 +164,29 @@ test("shared toolbox status bar shows selected Game Hub game above the footer", - } - }); - -+test("shared toolbox status bar center reports save state after Game Hub saves", async ({ page }) => { -+ const failures = await openRepoPage(page, "/toolbox/game-hub/index.html", { session: creatorSession() }); -+ -+ try { -+ await page.getByRole("button", { name: "Add Game" }).click(); -+ const addGameRow = page.locator("[data-game-add-row='input']"); -+ await addGameRow.getByLabel("Game").fill("Status Bar Save"); -+ await addGameRow.getByLabel("Purpose").selectOption("Learning Game"); -+ await addGameRow.getByLabel("Status").selectOption("Ready for Testing"); -+ await addGameRow.getByRole("button", { name: "Save" }).click(); -+ -+ await expect(page.locator("[data-toolbox-status-context-type]")).toHaveText("Save State"); -+ await expect(page.locator("[data-toolbox-status-message]")).toHaveText("Created and opened Status Bar Save."); -+ await expect(page.locator("[data-toolbox-selected-game-name]")).toHaveText("Status Bar Save"); -+ await expect(page.locator("[data-toolbox-selected-game-purpose]")).toHaveText("Learning Game"); -+ await expect(page.locator("[data-toolbox-status-bar]")).not.toContainText("Environment"); -+ -+ expectNoPageFailures(failures); -+ } finally { -+ await failures.server.close(); -+ } -+}); -+ - test("shared toolbox status bar anchors to the bottom in tool display mode", async ({ page }) => { - const failures = await openRepoPage(page, "/toolbox/game-design/index.html"); - -@@ -156,9 +213,11 @@ test("Game Hub owner selection updates the global toolbox status bar", async ({ - await expect(page.locator("[data-toolbox-selected-game-name]")).toHaveText("Demo Game"); - await page.locator("[data-game-toggle='gravity-demo']").click(); - await expect(page.locator("[data-toolbox-selected-game-name]")).toHaveText("Gravity Demo"); -- await expect(page.locator("[data-toolbox-selected-game-meta]")).toHaveText("Capability Demo - Wireframe"); -+ await expect(page.locator("[data-toolbox-selected-game-purpose]")).toHaveText("Capability Demo"); -+ await expect(page.locator("[data-toolbox-selected-game]")).not.toContainText("Wireframe"); - await expect(page.locator("body")).toHaveAttribute("data-toolbox-selected-game-id", "gravity-demo"); - await expect(page.locator("body")).toHaveAttribute("data-toolbox-selected-game-filter", "active"); -+ await expect(page.locator("[data-toolbox-status-context-type]")).toHaveText("Warning"); - await expect(page.locator("[data-toolbox-status-message]")).toContainText("Sign in to create or update Game Hub projects."); - - expectNoPageFailures(failures); -@@ -173,6 +232,8 @@ test("non-Idea Board toolbox pages show a creator-safe prompt when no Game Hub g - try { - const statusBar = page.locator("[data-toolbox-status-bar]"); - await expect(statusBar.locator("[data-toolbox-selected-game-name]")).toHaveText("No game selected"); -+ await expect(statusBar.locator("[data-toolbox-selected-game-purpose]")).toHaveText("Game Hub owns game selection"); -+ await expect(statusBar.locator("[data-toolbox-status-context-type]")).toHaveText("Tool Action"); - await expect(statusBar.locator("[data-toolbox-status-message]")).toHaveText("Select or create a game in Game Hub before using this toolbox page."); - await expect(statusBar.locator("[data-toolbox-status-action]")).toHaveText("Select or Create in Game Hub"); - await expect(statusBar.locator("[data-toolbox-status-action]")).toHaveAttribute("href", /toolbox\/game-hub\/index\.html$/); -@@ -195,8 +256,9 @@ test("Idea Board is excluded from selected-game filtering and does not show the - try { - const statusBar = page.locator("[data-toolbox-status-bar]"); - await expect(statusBar).toBeVisible(); -- await expect(statusBar.locator("[data-toolbox-selected-game-name]")).toHaveText("Optional"); -- await expect(statusBar.locator("[data-toolbox-selected-game-meta]")).toHaveText("Idea Board can start before Game Hub creation"); -+ await expect(statusBar.locator("[data-toolbox-selected-game-name]")).toHaveText("No game selected"); -+ await expect(statusBar.locator("[data-toolbox-selected-game-purpose]")).toHaveText("Idea Board optional"); -+ await expect(statusBar.locator("[data-toolbox-status-context-type]")).toHaveText("Tool Action"); - await expect(statusBar.locator("[data-toolbox-status-message]")).toContainText("Ready to shape ideas and notes."); - await expect(statusBar.locator("[data-toolbox-status-message]")).not.toContainText("Select or create a game"); - await expect(page.locator("body")).toHaveAttribute("data-toolbox-selected-game-filter", "optional"); + docs_build/dev/reports/codex_review.diff +-tests/playwright/tools/ToolboxSelectedGameStatusBar.spec.mjs