Repository navigation
Add CONTRIBUTION conventions and refactor audit docs - #179
Conversation
📝 WalkthroughWalkthroughThe pull request adds contribution conventions and a comprehensive refactoring audit covering architectural standards, frontend and server examples, review checklists, planned umbrella issues, a roadmap, and explicit non-goals. ChangesContribution conventions and refactoring audit
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@docs/refactoring-audit-2026-07-18.md`:
- Line 626: Update the stale audit-document references in the documentation
template to link to docs/refactoring-audit-2026-07-18.md instead of
docs/refactor-audit.md, including both occurrences identified in the diff.
- Around line 492-495: Update the POST controller example around
GroupEventCompatService.toCreateEventRequest and createEvent to parse and
authenticate the incoming request, obtain the authenticated user ID, and pass
that ID together with the typed DTO according to createEvent(userId, params).
Remove the direct { request: forwarded } call while preserving the compatibility
conversion flow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: bf53e109-4481-4374-9571-72f3bc0425d7
📒 Files selected for processing (3)
AGENTS.mdCONVENTION.mddocs/refactoring-audit-2026-07-18.md
| // src/server/controllers/groups/compat-events.ts | ||
| export const POST = async ({ request, params }) => { | ||
| const forwarded = await GroupEventCompatService.toCreateEventRequest(request, params.groupId); | ||
| return createEvent({ request: forwarded }); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Align the compatibility example with the documented service contract.
createEvent is defined earlier as createEvent(userId, params), but this example passes a { request } object directly. Show the controller parsing/authenticating the request and then calling the service with a user ID and typed DTO.
🤖 Prompt for 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.
In `@docs/refactoring-audit-2026-07-18.md` around lines 492 - 495, Update the POST
controller example around GroupEventCompatService.toCreateEventRequest and
createEvent to parse and authenticate the incoming request, obtain the
authenticated user ID, and pass that ID together with the typed DTO according to
createEvent(userId, params). Remove the direct { request: forwarded } call while
preserving the compatibility conversion flow.
| ## Evidence | ||
|
|
||
| - Files, commands, metrics, or examples that prove the problem exists. | ||
| - Link to the relevant section of `docs/refactor-audit.md`. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the stale audit-document path.
Both references point to docs/refactor-audit.md, but this file is docs/refactoring-audit-2026-07-18.md. Update the template links before contributors copy them into issues.
Also applies to: 664-664
🤖 Prompt for 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.
In `@docs/refactoring-audit-2026-07-18.md` at line 626, Update the stale
audit-document references in the documentation template to link to
docs/refactoring-audit-2026-07-18.md instead of docs/refactor-audit.md,
including both occurrences identified in the diff.
Motivation
controller -> service -> repository) and recommend frontend ownership patterns to reduce route/component complexity and duplicated logic.Description
CONVENTION.mdas the canonical contributor guide describing server and frontend conventions, hook guidance, ownership patterns, examples (as-is/to-be), and a review checklist.AGENTS.mdto reference the newCONVENTION.mdand surface key short rules (server path, no direct DB in controllers/bootstrap, TanStack/route guidance, form/reducer preferences, UI primitives and states).docs/refactoring-audit-2026-07-18.md, a comprehensive audit covering code quality, frontend complexity, taste principles, findings, acceptance criteria, and a multi-phase refactor roadmap with recommended umbrella issues and deliverables.Testing
pnpm -s lint, which completed successfully.pnpm -s test, which completed successfully.pnpm -s typecheck, which completed successfully.Codex Task
Summary by CodeRabbit