Skip to content

PR_26171_044 Idea Board Game Hub project flow#22

Merged
ToolboxAid merged 2 commits into
mainfrom
codex/pr-26171-044-idea-board-game-hub-project-flow
Jun 20, 2026
Merged

PR_26171_044 Idea Board Game Hub project flow#22
ToolboxAid merged 2 commits into
mainfrom
codex/pr-26171-044-idea-board-game-hub-project-flow

Conversation

@ToolboxAid

Copy link
Copy Markdown
Owner

Summary

  • Wire Idea Board Create Project through the existing Game Hub repository contract.
  • Lock Project and Archived ideas/notes as read-only and expose Open in Game Hub plus archive/restore behavior.
  • Replace internal Game Hub project-record copy with creator-facing Project Information and read-only Source Idea display.

Validation

  • node --check toolbox/idea-board/index.js
  • node --check toolbox/game-workspace/game-workspace.js
  • node --check toolbox/game-workspace/game-workspace-api-client.js
  • node --check src/dev-runtime/persistence/tool-repositories/game-workspace-mock-repository.js
  • node --check tests/playwright/tools/IdeaBoardTableNotes.spec.mjs
  • node --check tests/playwright/tools/ToolboxRoutePages.spec.mjs
  • node --check tests/playwright/tools/GameWorkspaceMockRepository.spec.mjs
  • npx playwright test tests/playwright/tools/IdeaBoardTableNotes.spec.mjs --project=playwright --workers=1 --reporter=line
  • npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs --project=playwright --workers=1 --reporter=line --grep "Idea Board launches"
  • npx playwright test tests/playwright/tools/GameWorkspaceMockRepository.spec.mjs --project=playwright --workers=1 --reporter=line --grep "Game Hub"
  • npm run test:workspace-v2
  • git diff --check

…ea-board-game-hub-project-flow

# Conflicts:
#	docs_build/dev/reports/codex_changed_files.txt
#	docs_build/dev/reports/codex_review.diff
@ToolboxAid ToolboxAid merged commit decd371 into main Jun 20, 2026
1 check passed

@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: 2a38796f81

ℹ️ 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".

return;
}
const repository = gameHubProjectRepository();
const project = repository.createGame({

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 Gate Create Project on an authenticated session

In a fresh Idea Board session with no selected session user, Ready ideas still show Create Project, but this new call goes through the Game Hub createGame save method. The Local API rejects Game Hub save methods when sessionUserKey is empty, so the primary handoff fails for unauthenticated users with a generic retry message instead of prompting sign-in or disabling the action like Game Hub does.

Useful? React with 👍 / 👎.

" ",
actionButton("Delete", "delete", "ideaBoardIdeaAction"),
);
} else if (isProject(record)) {

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 Prevent manual Project statuses without project ids

When a user uses the existing status dropdown to save a new or edited idea as Project instead of pressing Create Project, the record has no projectId. This branch now hides Edit/Delete and shows only Open in Game Hub/Archive; Open immediately refuses because openProject requires projectId, leaving the idea stranded as a read-only project with no linked Game Hub record.

Useful? React with 👍 / 👎.

populateSelect(elements.currentUserRoleInput, GAME_WORKSPACE_MEMBER_ROLES);
const requestedGameId = new URL(window.location.href).searchParams.get("game");
if (requestedGameId) {
const openedGame = repository.openGame(requestedGameId);

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 Validate deep-linked games against membership

When ?game= is present, this opens the supplied id directly instead of resolving it through the same membership-scoped listGames({ userKey }) path used to build the Open Games buttons. Because game ids are predictable slugs/counters, a guest or unrelated signed-in user can load another Game Hub project by URL and view its Project Information and Source Idea, bypassing the visible game-list scope.

Useful? React with 👍 / 👎.

Comment on lines +575 to +579
const project = repository.createGame({
name: record.idea,
purpose: "Game",
sourceIdea: projectSourceIdea(record),
status: "Planning",

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 Create projects under the signed-in user

For authenticated users other than the default seed creator, this handoff omits an owner/member key, so createGame falls back to GAME_WORKSPACE_DEFAULT_OWNER_USER_KEY and adds only that user as a member. The project created from Idea Board is then attributed to User 1 in Game Hub instead of the creator who clicked Create Project, and the actual creator is not added as a member.

Useful? React with 👍 / 👎.

Comment on lines +542 to +543
} else {
setStatusLog("That Game Hub project could not be found.");

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 Do not fall back to the previous game for stale links

If the ?game= id no longer exists, for example after the linked Game Hub project was deleted while the Idea Board row or bookmarked URL remains, openGame returns null but leaves the repository's existing active game untouched. The message says the project could not be found, then renderWorkspace() displays whatever game was already active (usually Demo Game), so stale Open in Game Hub links can show the wrong project as if it were the target.

Useful? React with 👍 / 👎.

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