[codex] PR_26175_ALFA_001-002 toolbox status bar#119
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3557b13e88
ℹ️ 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".
| if (pagePath.indexOf("toolbox/") !== 0) { | ||
| return; |
There was a problem hiding this comment.
Mount the bar on the toolbox clean URL
When the toolbox landing is opened as /toolbox/ or /toolbox (the common directory-index URL), currentPagePath() returns toolbox, so this guard returns before loading the shared status bar. That leaves the toolbox index without the new selected-game/context UI even though /toolbox/index.html gets it; normalize the exact toolbox path to the index page or allow it here.
Useful? React with 👍 / 👎.
| const prioritized = messages | ||
| .filter((entry) => entry.priority > 0) | ||
| .pop(); | ||
| return prioritized?.text || messages[messages.length - 1]?.text || ""; |
There was a problem hiding this comment.
Select the status that changed instead of the last one
When a toolbox page has several data-backed status regions, this always picks the last data-status in DOM order rather than the status that actually changed. For example, Game Journey's note/type/editor status nodes appear before data-journey-target-status, so saving or adding a note updates data-journey-note-status but the shared bar keeps showing the recommended-target status instead of the actual tool action/save message.
Useful? React with 👍 / 👎.
Summary
tmp/.Validation
npx playwright test tests/playwright/tools/ToolboxSelectedGameStatusBar.spec.mjs --workers=1- PASS, 6 passedrg -n "<style|style=" assets/theme-v2/js/toolbox-status-bar.js assets/theme-v2/css/status.css tests/playwright/tools/ToolboxSelectedGameStatusBar.spec.mjs- PASS, no matchesgit diff --cached --checkbefore ALFA_002 commit - PASSArtifacts
tmp/PR_26175_ALFA_001-toolbox-selected-game-status-bar_delta.ziptmp/PR_26175_ALFA_002-toolbox-status-bar-context-polish_delta.zipCommits
359d48c503557b13e8