Skip to content

docs(tooling): add PR review and component pattern learnings to agent guides#387

Closed
Kneesal wants to merge 2 commits intomainfrom
docs/386-agent-guide-learnings
Closed

docs(tooling): add PR review and component pattern learnings to agent guides#387
Kneesal wants to merge 2 commits intomainfrom
docs/386-agent-guide-learnings

Conversation

@Kneesal
Copy link
Member

@Kneesal Kneesal commented Mar 11, 2026

Summary

  • Updates handle-pr-review skill with guidance on checking all GitHub API surfaces for CodeRabbit reviews and verifying bot suggestions against installed packages
  • Adds component pattern learnings to apps/web/AGENTS.md: base-ui Button render prop behavior, shadcn generated code gotchas, string fallback operators
  • Adds seed script idempotency note to apps/cms/AGENTS.md for nested component arrays

Contracts Changed

None

Regeneration Required: no

Validation

  • Documentation only — no code changes

Resolves #386

Made with Cursor

Summary by CodeRabbit

  • Documentation
    • Clarified PR review guidance: how to find review comments across surfaces, how to handle unresolved threads, and guidance for verifying automated suggestions before applying.
    • Added best-practice notes for content seed scripts to handle nested components and avoid skipping content.
    • Documented component-pattern guidance and string-fallback recommendations for frontend components.

- handle-pr-review: add guidance on checking all GitHub API surfaces
  for CodeRabbit reviews and verifying bot suggestions against installed
  packages before applying
- apps/web/AGENTS.md: add component patterns for base-ui Button render
  prop, shadcn generated code gotchas, and string fallback operators
- apps/cms/AGENTS.md: add seed script idempotency note for nested
  components

Made-with: Cursor
@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 089657a5-c18d-40f2-a395-e660776a16b7

📥 Commits

Reviewing files that changed from the base of the PR and between 5b40dc8 and 7ba2b6d.

📒 Files selected for processing (2)
  • .cursor/skills/handle-pr-review/SKILL.md
  • apps/web/AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/web/AGENTS.md
  • .cursor/skills/handle-pr-review/SKILL.md

Walkthrough

Documentation updates: expanded PR review guidance in .cursor/skills/handle-pr-review/SKILL.md, added component-pattern guidance in apps/web/AGENTS.md, and documented seed-script idempotency for nested components in apps/cms/AGENTS.md.

Changes

Cohort / File(s) Summary
PR Review Skill
​.cursor/skills/handle-pr-review/SKILL.md
Expanded Step 1 to include checking all GitHub review surfaces (PR reviews, inline comments, issue comments) and querying GraphQL reviewThreads for unresolved threads; added "Finding review comments" and "Verifying bot suggestions" sections (pre-apply checks: grep for prop/API, TypeScript type checks, reject missing refs); reorganized thread-resolution and PR-number inference notes; minor wording/reorg.
Web Agent Patterns
apps/web/AGENTS.md
Added "Component patterns" section: notes on base-ui Button render-prop replacement and missing nativeButton verification, cautions for shadcn/ui-generated components (event cleanup/subscription gotchas), and guidance on string fallback semantics (String(x ?? "") vs `
CMS Seed Scripts
apps/cms/AGENTS.md
Added "Seed scripts" section advising idempotency checks must inspect nested components within content arrays (e.g., sections.bible-quotes-carousel inside sections.section) rather than only top-level __component checks to avoid skipping new nested content on re-runs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adding PR review and component pattern learnings to agent guides, which matches the documentation updates across three files.
Linked Issues check ✅ Passed All three acceptance criteria from issue #386 are met: handle-pr-review/SKILL.md updated with CodeRabbit multi-endpoint checking and bot suggestion verification; apps/web/AGENTS.md updated with base-ui Button, shadcn gotchas, and string fallback patterns; apps/cms/AGENTS.md updated with seed script idempotency guidance.
Out of Scope Changes check ✅ Passed All changes are in-scope: three documentation files updated per issue #386 requirements with agent guide learnings; no unrelated modifications present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/386-agent-guide-learnings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.cursor/skills/handle-pr-review/SKILL.md:
- Around line 39-49: Update the primary workflow's Step 1 so it fetches all
three GitHub surfaces and the GraphQL reviewThreads instead of only
get_review_comments and get_reviews: replace the single-line instruction that
calls get_review_comments and get_reviews with a directive to call GET
/repos/{owner}/{repo}/pulls/{n}/reviews (get_reviews), GET
/repos/{owner}/{repo}/pulls/{n}/comments (get_review_comments), GET
/repos/{owner}/{repo}/issues/{n}/comments (get_issue_comments or issues
comments), and the GraphQL reviewThreads query to surface thread IDs and
resolution status, and retain the "Currently processing new changes" wait/retry
guidance used elsewhere in the doc.

In `@apps/web/AGENTS.md`:
- Around line 26-27: Remove the stale "known issue" bullet about carousel.tsx in
AGENTS.md: update the documentation to delete or reword the sentence claiming
the generated carousel subscribes to Embla's reInit without unsubscribing, since
apps/web/src/components/ui/carousel.tsx now unsubscribes both reInit and select
in its cleanup; reference the carousel component name (carousel.tsx) and the
cleanup/unsubscribe behavior (reInit, select) when editing the doc to avoid
sending future contributors to chase a fixed bug.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3cfedeca-d0b2-40bc-8579-fff4e9a8511d

📥 Commits

Reviewing files that changed from the base of the PR and between 3be17a4 and 5b40dc8.

📒 Files selected for processing (3)
  • .cursor/skills/handle-pr-review/SKILL.md
  • apps/cms/AGENTS.md
  • apps/web/AGENTS.md

- Update Step 1 in handle-pr-review skill to reference all three GitHub
  API surfaces and GraphQL reviewThreads query
- Replace stale carousel.tsx known-issue with generic verification guidance
  (cleanup bug was already fixed)

Made-with: Cursor
@Kneesal
Copy link
Member Author

Kneesal commented Mar 11, 2026

Review feedback addressed (7ba2b6d)

Fixed:

  • .cursor/skills/handle-pr-review/SKILL.md: Updated Step 1 to reference all three GitHub API surfaces (PR reviews, inline comments, issue comments) plus GraphQL reviewThreads query, so agents no longer miss CodeRabbit issue comments
  • apps/web/AGENTS.md: Removed stale carousel.tsx known-issue (unsubscribe was already fixed at lines 102-105) and replaced with generic verification guidance

Not changed:

  • (none)

@Kneesal Kneesal closed this Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(tooling): add PR review and component pattern learnings to agent guides

1 participant