Skip to content

chore(cursor): Add Cursor hooks for auto-format and validation - #1263

Merged
gabrielseco merged 5 commits into
mainfrom
feature/cursor-auto-format-hooks
Aug 21, 2026
Merged

chore(cursor): Add Cursor hooks for auto-format and validation#1263
gabrielseco merged 5 commits into
mainfrom
feature/cursor-auto-format-hooks

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds automated Cursor hooks that run during agent sessions to ensure code quality and prevent format/validation failures in PRs.

Done to improve cursor cloud agents PRs

Reviewed by Cursor Bugbot for commit 35604ee. Bugbot is set up for automated code reviews on this repo. Configure here.

Add automated hooks that run during agent sessions to ensure code quality:

1. afterFileEdit hook (.cursor/hooks/auto-format.sh):
   - Runs automatically after any file edit
   - Executes 'npm run format' to format code with oxfmt
   - Prevents format check failures in CI

2. stop hook (.cursor/hooks/validate-all.sh):
   - Runs when agent session completes
   - Executes format check, lint, and type check
   - Reports validation results to the agent
   - Helps agents fix issues before creating PRs

Benefits:
- Cloud agents no longer create PRs with format issues
- Immediate feedback on validation failures
- No manual intervention needed
- Works for local and cloud agents

Related: PBYR-4544
@gabrielremote gabrielremote changed the title feat: Add Cursor hooks for auto-format and validation chore(cursor): Add Cursor hooks for auto-format and validation Aug 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚪ Coverage unchanged

Metric Current Previous Change Status
Lines 85.44% 85.44% 0%
Statements 85.00% 85.00% 0%
Functions 83.66% 83.66% 0%
Branches 76.89% 76.89% 0%

Detailed Breakdown

Lines Coverage
  • Covered: 4291 / 5022
  • Coverage: 85.44%
  • Change: 0% (0 lines)
Statements Coverage
  • Covered: 4364 / 5134
  • Coverage: 85.00%
  • Change: 0% (0 statements)
Functions Coverage
  • Covered: 1142 / 1365
  • Coverage: 83.66%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 2679 / 3484
  • Coverage: 76.89%
  • Change: 0% (0 branches)

✅ Coverage check passed

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-7wor7tvy2-remotecom.vercel.app
Latest Commit:43aec29

Deployed with vercel-action

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-e2ti3xinc-remotecom.vercel.app
Latest Commit:43aec29

Deployed with vercel-action

Comment thread .cursor/hooks/auto-format.sh
Comment thread .cursor/hooks/validate-all.sh Outdated

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0643ee0. Configure here.

Comment thread .cursor/hooks/auto-format.sh Outdated
@gabrielseco
gabrielseco merged commit 1f426af into main Aug 21, 2026
10 checks passed
@gabrielseco
gabrielseco deleted the feature/cursor-auto-format-hooks branch August 21, 2026 13:43
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