Draft
Conversation
- Replace basic 2-test suite with comprehensive 37-test coverage - Add 6 test categories: Happy path, Error handling, Edge cases, Hook integration, Performance, and Schema validation - Utilize new flattened Mock API structure - Cover navigation flattening, friend link transformation, plugin extensions, error fallbacks, circular references, and concurrent requests - Maintain 80% test coverage requirement for server-ng module
- remove AdminMetaModule directory and all its files - update AdminModule to remove AdminMetaModule import - update AdminModule tests to remove meta module references
- remove getArticlesByTagName from tag contract - remove deprecation message from v1-deprecation middleware - remove getArticlesByTagName method from TagService
- add missing UserService mock methods (getAdminUser, findByUsername, findByUsernameWithPassword) - add missing CategoryService mock method (getArticlesByCategoryName) - remove deprecated TagService.getArticlesByTagName mock method - add MetaService and BootstrapService mock factories - remove db-worker-setup related exclusions from vitest config
- update zlib mock to support both callback and promise-based APIs - fix BackupService tests to work with updated zlib mock
- add @perm decorators to Analytics, Article, Draft, DraftVersion controllers - add @UseGuards(JwtAuthGuard) to LoginLogController for authentication - add @UseGuards(JwtAuthGuard) to plugin HTTP routes - replace Math.random() with crypto.randomBytes() for CSRF token generation - add rate limiting to CSRF token endpoint
- update CategoryController tests to use new Mock API - update TagController and TagService tests - update UserController and UserService tests - refactor tests to remove duplicate logic and improve coverage - fix unused variables in test files
- update BootstrapController and BootstrapService tests - update MetaController and tests - update SettingCoreController tests - add permissions decorator to MetricsController - add comments to custom-page and init controllers
- update login-log E2E tests to require authentication - update settings-validation E2E tests with new API paths - update plugin-lifecycle E2E tests with proper assertions - add authentication tests for protected endpoints
- add no-unsafe-assignment rule exception for user.controller.ts - this allows ts-rest handler pattern in controller methods
…ctor dependency - replace @Cron decorators with manual setInterval in AnalyticsCacheService - replace @Cron decorators with manual setInterval in DemoService - add OnModuleInit and OnModuleDestroy lifecycle hooks for proper cleanup - add automatic database schema creation for development environment - remove ScheduleModule import from app.module.ts This fixes the NestJS 11 compatibility issue where ScheduleModule's SchedulerMetadataAccessor cannot access Reflector provider.
- document integration test results (149/149 tests passed) - record ScheduleModule Reflector dependency issue - record database auto-creation issue and workaround
- add Trellis multi-agent workflow system with phase management - add backend and frontend development guidelines - add code reuse and cross-layer thinking guides - add AI agent definitions (check, debug, dispatch, implement, plan, research) - add Trellis commands (onboard, parallel, record-session, etc.) - add project workspace and task tracking - add git hooks for subagent context injection - update Claude settings and Serena project configuration
- add missing imports for eslint-plugin-react and eslint-plugin-react-hooks - install eslint-plugin-react and eslint-plugin-react-hooks in root workspace - properly register plugins in React configuration section
- update getPublicMeta response to match backend unified format - fix Category dto and schema for proper type validation - update Article schemas for consistency
- update auth controller and strategy for better error responses - fix category controller response format consistency - update meta controller to include user data in response - fix permission service error handling - update article service and DTO for proper type validation
- rewrite Login component using native Ant Design Form instead of ProForm this fixes the field value accumulation bug with React 19 - add proper TypeScript types to authFetch wrapper - fix fetchAllMeta to return correct response format - update vite proxy configuration to match server port - add debug logging for login flow troubleshooting - fix component display names for User.jsx, Restore, and CollaboratorModal
- archive completed schedule-db task - record login form fix session in journal
- add explicit path and version to DraftController - convert PipelineController to ts-rest handlers - import PipelineModule in app.module.ts - update pipeline controller tests for ts-rest pattern - fix permissions format in PipelineModule Fixes 404 errors for: - GET /api/v2/drafts - GET /api/v2/pipelines
- add API token management (ApiTokenController + ApiTokenService) - add Caddy log management controller - implement all settings endpoints (Social, Waline, ISR, Login, HTTPS, Static, Rewards) - add backup/restore endpoints with file upload support - add user profile update endpoint via ts-rest - add ISR trigger endpoint New endpoints implemented: - GET/POST/DELETE /api/v2/admin/tokens - GET/PUT /api/v2/admin/settings/social - DELETE /api/v2/admin/settings/social/:type - GET /api/v2/admin/settings/social/types - GET/PUT /api/v2/admin/settings/waline - GET/PUT /api/v2/admin/settings/isr - GET/PUT /api/v2/admin/settings/login - GET/PUT /api/v2/admin/settings/https - GET/PUT /api/v2/admin/settings/static - GET/POST/PUT/DELETE /api/v2/admin/settings/donations - GET/DELETE /api/v2/admin/caddy/logs - GET /api/v2/admin/caddy/config - POST /api/v2/backup/import - GET /api/v2/backup/export - POST /api/v2/backup/restore - PUT /api/v2/users/profile - POST /api/v2/isr/trigger
The root cause was that @TsRestHandler decorators alone don't register routes in NestJS. Adding standard @Get/@Post/@delete decorators alongside ts-rest handlers makes routes accessible via HTTP. Changes: - add standard NestJS handlers to DraftController - add standard NestJS handlers to PipelineController - add standard NestJS handlers to ApiTokenController - add standard NestJS handlers to BackupController - fix contract paths for tokens, users/collaborators, and media - add PermissionModule.forFeature for user permissions - fix missing return statement in CollaboratorModal component All endpoints now return 200 OK: - GET /api/v2/tokens (create, delete also working) - GET /api/v2/drafts - GET /api/v2/pipelines - GET /api/v2/backup/export - GET /api/v2/admin/users - GET /api/v2/admin/media
This is a systemic fix for ALL ts-rest handlers in the codebase. Problem: @TsRestHandler decorators alone don't register NestJS HTTP routes. Solution: Add standard NestJS decorators (@get, @post, @put, @delete, @patch) alongside ts-rest handlers for all controllers. Fixed 18 controller files, adding 91+ HTTP method decorators: - app.controller.ts - analytics.controller.ts - api-token.controller.ts - auth.controller.ts - backup.controller.ts - caddy.controller.ts - category.controller.ts - compatibility.controller.ts - draft.controller.ts - draft-version.controller.ts - meta.controller.ts - pipeline.controller.ts - rss.controller.ts - setting-core.controller.ts - tag.controller.ts - timeline.controller.ts - user.controller.ts - article.controller.ts All ts-rest API endpoints are now accessible via HTTP.
- Fix undefined query params handling (use nullish coalescing) - Update mock to include updateByName/removeByName methods - Fix test method names for ts-rest handlers - Update test expectations for actual response structures
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
E2E API Walk - Walk all server-ng APIs via admin DOM operations
Requirements
Acceptance Criteria
API Coverage List
Auth Module
Article Module
Draft Module
Category Module
Tag Module
Media Module
User Module
Settings Module
Backup Module
Pipeline Module
Plugin Module
Testing Approach
Deliverables