Skip to content

Feature/track b engagement#153

Open
thxforall wants to merge 10 commits intodevfrom
feature/track-b-engagement
Open

Feature/track b engagement#153
thxforall wants to merge 10 commits intodevfrom
feature/track-b-engagement

Conversation

@thxforall
Copy link
Contributor

No description provided.

thxforall and others added 10 commits January 29, 2026 19:07
Track B: Engagement
- 2 plans in 1 wave (parallel execution)
- B-01: Vote system (types, API, hooks, proxy routes)
- B-02: Comment CRUD operations (types, API, hooks, proxy routes)

Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- CommentResponse: Full comment object with user, timestamps, nested replies
- CommentUser: Minimal user info for comment display
- CreateCommentDto: Request body for creating comments
- UpdateCommentDto: Request body for updating comments
- Add VoteType enum (accurate | different)
- Add VoteStatsResponse, CreateVoteDto, VoteResponse interfaces
- Add MatchType enum (perfect | close)
- Add AdoptSolutionDto, AdoptResponse, UpdatedSpotInfo interfaces
- All types match OpenAPI spec exactly
- comments.ts: fetchComments, createComment, updateComment, deleteComment
- API proxy routes for /posts/[postId]/comments (GET, POST)
- API proxy routes for /comments/[commentId] (PATCH, DELETE)
- Updated index.ts to export comment functions
- Add votes.ts with fetchVoteStats, createVote, deleteVote, adoptSolution, unadoptSolution
- Export vote functions from api/index.ts
- Create API proxy route for votes (GET, POST, DELETE)
- Create API proxy route for adopt (POST, DELETE)
- All functions follow established patterns with apiClient
- useComments: Query for fetching comments list
- useCreateComment: Mutation with optimistic updates (supports replies)
- useUpdateComment: Mutation with optimistic updates and rollback
- useDeleteComment: Mutation with optimistic removal and rollback
- All hooks handle nested replies via recursive updates
- Add useVoteStats hook for fetching vote stats
- Add useVote hook for creating votes
- Add useRetractVote hook for deleting votes
- Add useAdoptSolution hook for adopting solutions
- Add useUnadoptSolution hook for unadopting solutions
- All hooks follow established React Query patterns with proper cache invalidation
Tasks completed: 3/3
- Task 1: Add Comment types to types.ts
- Task 2: Create comment API functions and proxy routes
- Task 3: Create React Query hooks for comments

SUMMARY: .planning/phases/B-engagement/B-02-SUMMARY.md
Tasks completed: 3/3
- Add vote and adopt types
- Create API functions and proxy routes
- Create React Query hooks

SUMMARY: .planning/phases/B-engagement/B-01-SUMMARY.md
- Mark Track B as complete in ROADMAP.md
- Update all VOTE-* and CMNT-* requirements to Complete
- Update STATE.md to reflect track completion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant