Skip to content

PR_26171_ALPHA_046 game hub table standard rebuild#26

Closed
ToolboxAid wants to merge 2 commits into
mainfrom
pr/26171-ALPHA-046-game-hub-table-standard-rebuild
Closed

PR_26171_ALPHA_046 game hub table standard rebuild#26
ToolboxAid wants to merge 2 commits into
mainfrom
pr/26171-ALPHA-046-game-hub-table-standard-rebuild

Conversation

@ToolboxAid

@ToolboxAid ToolboxAid commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rebuilds Game Hub around a table-first Projects parent table with direct child accordion rows.
  • Moves Source Idea and Game Journey Items into the expanded owning project row.
  • Adds reusable Theme V2 table parent/child classes while preserving existing Idea Board aliases.
  • Updates targeted Game Hub Playwright coverage and Codex reports.

Validation

  • PASS: node --check toolbox/game-workspace/game-workspace.js
  • PASS: node --check tests/playwright/tools/GameWorkspaceMockRepository.spec.mjs
  • PASS: git diff --check
  • PASS: npx playwright test tests/playwright/tools/GameWorkspaceMockRepository.spec.mjs --project=playwright --workers=1 --reporter=line (12 passed before latest-main merge; 12 passed after conflict resolution)
  • PASS: npm run test:workspace-v2 (workspace-contract lane, 5 passed before latest-main merge; 5 passed after conflict resolution)

Merge Gate

Do not merge without explicit Team Alpha owner approval.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f7acdbb0d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

setStatusLog("Game Hub project details are temporarily unavailable. Refresh the page or try again shortly.");
const activeGame = normalizeGame(repository.getActiveGame(), "Active project");
const userKey = currentSessionUserKey();
const listResult = repository.listGames(userKey ? { userKey } : {});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include opened projects when filtering the table

When an authenticated user whose key is not the repository default owner creates a project, createGame stores it under the default owner unless an ownerKey is passed. This new table filter then calls listGames({ userKey: currentSessionUserKey() }), so the just-created/opened active project is omitted from the table, state.expandedGameId is cleared, and the UI can say it was created/opened while rendering no row for it. This also breaks explicit Idea Board handoffs for non-default signed-in users; either create with the session owner or include the active/opened project when filtering.

Useful? React with 👍 / 👎.

if (updated) {
return updated;
}
return new Date().toISOString().slice(0, 10);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop defaulting missing updates to today

For any project that lacks updated, updatedAt, or lastUpdated (including the existing seeded records and any persisted records created before this field exists), this fallback shows the page-load date in the Updated column. That value changes every day even when the project was not modified, so the table reports false freshness; render an empty/unknown value or persist a real updated timestamp instead.

Useful? React with 👍 / 👎.

Comment on lines +436 to +440
if (!games.length) {
const row = document.createElement("tr");
const tableCell = document.createElement("td");
const countCell = document.createElement("td");
const cell = document.createElement("td");
cell.colSpan = 6;
cell.textContent = "No projects yet. Create a project to get started.";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Distinguish load failures from empty projects

When repository.listGames returns an error, normalizeGameList converts it to [], so this branch renders the same empty-state row used for a real empty list (and the later status still says projects loaded). During a temporary API or persistence failure, creators will see “No projects yet” and may think their projects are gone; preserve an error state and render an unavailable message instead of the create-empty prompt.

Useful? React with 👍 / 👎.

button.type = "button";
button.dataset.gameDelete = game.id;
button.textContent = "Delete";
button.disabled = !projectRecordsSaveAllowed();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid per-row session requests while rendering

projectRecordsSaveAllowed() calls getSessionCurrent(), which goes through the synchronous server API client, and this button is created once for every project row. Rendering a large Projects table therefore issues one blocking session request per row in addition to the other session checks, stalling the page as the list grows; compute the save permission once per render and pass it into row/button creation.

Useful? React with 👍 / 👎.

…me-hub-table-standard-rebuild

# Conflicts:
#	docs_build/dev/reports/codex_changed_files.txt
#	docs_build/dev/reports/codex_review.diff

Copy link
Copy Markdown
Owner Author

OWNER-approved cleanup: closing as superseded by current Game Hub path and merged Game Hub consolidation; old game-workspace path is no longer target direction. Branch retained; no branch deletion performed.

@ToolboxAid ToolboxAid closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants