Skip to content

Remove general board and add comment features#4

Merged
yulmwu merged 5 commits intomainfrom
feat/comments
Mar 23, 2026
Merged

Remove general board and add comment features#4
yulmwu merged 5 commits intomainfrom
feat/comments

Conversation

@yulmwu
Copy link
Member

@yulmwu yulmwu commented Mar 23, 2026

  • Completely removed the General board
    • Deleted src/modules/community/general/* and removed related modules and routing
    • Removed General-related documentation and reorganized the structure

This allows administrators to later create a general board within Topics and unify the structure.

  • The key addition is the implementation of comments and nested replies, which are managed through separate database tables and APIs for the Anonymous board and Topic board, respectively.
  • Improved parts of the DTO structure, documentation, and integration tests

For more details, refer to the REST API Docs.

@yulmwu yulmwu self-assigned this Mar 23, 2026
@yulmwu yulmwu added the enhancement New feature or request label Mar 23, 2026
@yulmwu yulmwu requested a review from Copilot March 23, 2026 00:12
@codecov
Copy link

codecov bot commented Mar 23, 2026

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the legacy General community board and introduces comments + one-level replies for both Anonymous posts and Topic posts, along with supporting DTO/docs/test updates to unify the community structure around Topics going forward.

Changes:

  • Deleted the General board module (entities/services/controllers/tests/docs/frontend hooks).
  • Added comment/reply entities, services, controllers, DTOs, and migration support for Anonymous + Topic posts.
  • Added integration test harness and new integration specs; updated REST API docs and adjusted Jest config/dependencies.

Reviewed changes

Copilot reviewed 36 out of 39 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test/integration/users.e2e.spec.ts Adds integration coverage for user lookup endpoint.
test/integration/topics.e2e.spec.ts Adds integration coverage for topic CRUD endpoints.
test/integration/topic-posts.e2e.spec.ts Adds integration coverage for topic post CRUD endpoints.
test/integration/topic-comments.e2e.spec.ts Adds integration coverage for topic post comments + replies endpoints.
test/integration/anonymous-posts.e2e.spec.ts Adds integration coverage for anonymous post CRUD endpoints.
test/integration/anonymous-comments.e2e.spec.ts Adds integration coverage for anonymous comments + replies endpoints.
test/integration/health.e2e.spec.ts Adds integration coverage for health endpoint.
test/integration/helpers/test-app.ts Provides reusable Nest test app bootstrap + auth helpers for integration tests.
test/integration/testcontainers-env.ts Ensures DB/Redis env via testcontainers when not externally provided.
src/modules/community/topic-posts/topic-post-comments.service.ts Implements topic post comment/reply create/list/update/delete logic.
src/modules/community/topic-posts/topic-post-comments.service.spec.ts Unit tests for topic post comments service behavior.
src/modules/community/topic-posts/topic-post-comments.controller.ts Exposes topic post comment/reply REST endpoints.
src/modules/community/topic-posts/topic-post-comment.entity.ts Adds TypeORM entity for topic post comments/replies.
src/modules/community/topic-posts/topic-post-comment.dto.ts Adds Swagger DTOs for topic post comments/replies APIs.
src/modules/community/anonymous/anonymous-comments.service.ts Implements anonymous comment/reply create/list/update/delete logic with password auth.
src/modules/community/anonymous/anonymous-comments.service.spec.ts Unit tests for anonymous comments service behavior.
src/modules/community/anonymous/anonymous-comments.controller.ts Exposes anonymous comment/reply REST endpoints.
src/modules/community/anonymous/anonymous-comment.entity.ts Adds TypeORM entity for anonymous comments/replies.
src/modules/community/anonymous/anonymous-comment.dto.ts Adds Swagger DTOs for anonymous comments/replies APIs.
src/modules/community/dto/posts.dto.ts Introduces shared CommentContentDto validation/transform.
src/modules/community/dto/comment.dto.ts Introduces shared base DTOs for comment list/reply list response shapes.
src/modules/community/community.module.ts Wires in new comment entities/services/controllers and removes General board wiring.
src/migrations/1774222245483-Init.ts Updates init schema: removes general_posts and adds topic_post_comments + anonymous_comments.
src/common/dto/pagination.dto.ts Adds cursor-based pagination query/meta DTOs for replies.
package.json Adds test deps (supertest/types) and npm overrides.
package-lock.json Lockfile updates reflecting new deps/overrides.
jest.config.js Lowers global coverage thresholds.
docs/RESTAPI/community-topic.md Removes General section and adds Topic comments API documentation.
docs/RESTAPI/community-anonymous.md New Anonymous module doc, including anonymous comments API documentation.
docs/RESTAPI/README.md Splits community docs into community-anonymous and community-topic.
mvp-frontend/index.html Removes General UI and adds comment/reply controls for anonymous/topic boards.
mvp-frontend/app.js Removes General handlers and adds comment/reply API calls for anonymous/topic boards.
src/modules/community/general/general-posts.service.ts Removes General board post service.
src/modules/community/general/general-posts.service.spec.ts Removes General board post service tests.
src/modules/community/general/general-posts.controller.ts Removes General board posts controller.
src/modules/community/general/general-posts.controller.spec.ts Removes General board posts controller tests.
src/modules/community/general/general-post.entity.ts Removes General board post entity.
src/modules/community/general/general-post.dto.ts Removes General board post DTOs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 39 out of 42 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yulmwu
Copy link
Member Author

yulmwu commented Mar 23, 2026

Good.

@yulmwu yulmwu merged commit e65a7fb into main Mar 23, 2026
6 checks passed
@yulmwu yulmwu deleted the feat/comments branch March 23, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants