fix(flags): align board flag rendering#1142
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughExports a CommentFlagDirectory type and hasCommentFlagsForDirectory; post-desktop and post-mobile now use that helper. Adds POLITICAL_FLAG_COORDINATES and an optional coordinates override to buildFlagDefinitions with updated tests. CI workflow splits the React Doctor step for PR vs non-PR runs. ChangesComment Flag Detection and Political Flag Coordinates
CI Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Addressed the CI blocker by keeping full React Doctor on push builds and running React Doctor in diff mode for pull requests that touch React UI files. The flag change itself did not introduce React Doctor errors; the full-scan failure reproduces on current master after react-doctor 0.2.6, while the PR diff scan passes with warnings only. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 95-97: The workflow step "Run React Doctor on changed React files"
runs `yarn doctor --pr-comment` but the workflow only grants `permissions:
contents: read`, so the doctor can't write PR comments; update the workflow
permissions to include write access for PR comments (e.g., add `permissions:
pull-requests: write` at the job or workflow level) so the `--pr-comment` flag
can create/update pull request comments, leaving the rest of the job and the
`yarn doctor --diff ... --annotations --pr-comment` invocation unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
1f0c30c to
f8b5baf
Compare
|
Addressed the CodeRabbit workflow comment by removing the unnecessary React Doctor |
Summary
Verification
Note
Low Risk
UI and flag-metadata alignment with expanded tests; no auth or data-path changes. CI behavior for React Doctor on PRs is narrower in scope.
Overview
Board flags now use a shared
hasCommentFlagsForDirectorycheck so post rendering and flag publish/selector logic agree on when flags apply. Desktop and mobile posts use that helper for author flag display instead of duplicatingfeatures.hasFlags./pol/ political flags match 4chan selector order and sprite positions via explicit coordinates (not index-based grid math), with tests covering key codes and
/pol/option ordering.CI runs full
yarn doctoronly on non-PR builds; on PRs with React UI changes it runsyarn doctor --diffwith annotations on the changed files.Reviewed by Cursor Bugbot for commit f8b5baf. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features / Improvements
Tests