Repository navigation
fix(ci): sync hardened reusable screenshots workflow; fix dashboard waitFor - #21
Conversation
…ashboard render - reusable-screenshots.yml: sync hardened copy from repo-template — force-push bot branch (regenerated wholesale), PR-existence check guarded to OPEN state, concurrent PR-create races result in success instead of failure - screenshots.mjs: dashboard waitFor targets the rendered #page-title (visible) instead of the permanently hidden #app-ready marker; per-page state support - verified locally: app serves on 127.0.0.1:5000, script captures dashboard and public screenshots with scrub checks passing
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bee5ca4ef
ℹ️ 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".
| git push --force-with-lease origin "$BRANCH" | ||
| if gh pr view "$BRANCH" >/dev/null 2>&1; then | ||
| git push --force origin "$BRANCH" # bot branch is regenerated wholesale each run | ||
| if gh pr view "$BRANCH" --state OPEN >/dev/null 2>&1; then |
There was a problem hiding this comment.
Use a command that supports state filtering
In the screenshot workflow, gh pr view --help only lists --comments, --jq, --json, --template, and --web; passing --state OPEN exits with unknown flag: --state. Consequently this condition always takes the creation path, and the catch-all || echo on gh pr create also turns real authentication, permission, API, or invalid-base failures into a successful workflow with no PR. Use an open-PR query that supports --state (such as gh pr list) and suppress only a confirmed duplicate-PR race.
AGENTS.md reference: AGENTS.md:L30-L30
Useful? React with 👍 / 👎.
What
reusable-screenshots.ymlwith the hardened version from repo-template: force-push the bot branch (regenerated wholesale each run), guard the PR-existence check to--state OPEN, and treat a concurrent PR-create race as a success outcome.screenshots.mjs: dashboardwaitFornow targets the rendered#page-title(visible state) instead of the permanently hidden#app-readymarker span; per-pagestatesupport added. Default port unchanged (app and compose both use 5000).Why
The CI and CodeQL runs failed on the
bot/screenshotsPR (branch deleted at merge; logs unrecoverable), while identical content on main was green. This makes the screenshots pipeline race-proof and its render wait reliable for future bot PRs.Testing
PORT=5000) and ran the updated script with Playwright/Chromium:dashboard.pngandpublic.pngcaptured, scrub checks passed.