Skip to content

Commit fba9f7d

Browse files
committed
fix(server-ng): fix query validation and test compatibility issues
- 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
1 parent 458094a commit fba9f7d

23 files changed

Lines changed: 649 additions & 154 deletions

File tree

.trellis/tasks/01-31-fix-login-input-bug/check.jsonl renamed to .trellis/tasks/archive/2026-02/01-31-fix-login-input-bug/check.jsonl

File renamed without changes.

.trellis/tasks/01-31-fix-login-input-bug/debug.jsonl renamed to .trellis/tasks/archive/2026-02/01-31-fix-login-input-bug/debug.jsonl

File renamed without changes.

.trellis/tasks/01-31-fix-login-input-bug/implement.jsonl renamed to .trellis/tasks/archive/2026-02/01-31-fix-login-input-bug/implement.jsonl

File renamed without changes.

.trellis/tasks/01-31-fix-login-input-bug/prd.md renamed to .trellis/tasks/archive/2026-02/01-31-fix-login-input-bug/prd.md

File renamed without changes.

.trellis/tasks/01-31-fix-login-input-bug/task.json renamed to .trellis/tasks/archive/2026-02/01-31-fix-login-input-bug/task.json

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,35 @@
33
"name": "fix-login-input-bug",
44
"title": "Fix login page input value accumulation bug",
55
"description": "",
6-
"status": "planning",
6+
"status": "completed",
77
"dev_type": null,
88
"scope": null,
99
"priority": "P2",
1010
"creator": "CornWorld",
1111
"assignee": "CornWorld",
1212
"createdAt": "2026-01-31",
13-
"completedAt": null,
13+
"completedAt": "2026-02-02",
1414
"branch": null,
1515
"base_branch": null,
1616
"worktree_path": null,
1717
"current_phase": 0,
1818
"next_action": [
19-
{ "phase": 1, "action": "implement" },
20-
{ "phase": 2, "action": "check" },
21-
{ "phase": 3, "action": "finish" },
22-
{ "phase": 4, "action": "create-pr" }
19+
{
20+
"phase": 1,
21+
"action": "implement"
22+
},
23+
{
24+
"phase": 2,
25+
"action": "check"
26+
},
27+
{
28+
"phase": 3,
29+
"action": "finish"
30+
},
31+
{
32+
"phase": 4,
33+
"action": "create-pr"
34+
}
2335
],
2436
"commit": null,
2537
"pr_url": null,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{"file": ".claude/commands/trellis/finish-work.md", "reason": "Finish work checklist"}
2+
{"file": ".trellis/spec/shared/index.md", "reason": "Shared coding standards"}
3+
{"file": ".claude/commands/trellis/check-backend.md", "reason": "Backend check spec"}
4+
{"file": ".claude/commands/trellis/check-frontend.md", "reason": "Frontend check spec"}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{"file": ".trellis/spec/shared/index.md", "reason": "Shared coding standards"}
2+
{"file": ".claude/commands/trellis/check-backend.md", "reason": "Backend check spec"}
3+
{"file": ".claude/commands/trellis/check-frontend.md", "reason": "Frontend check spec"}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{"file": ".trellis/workflow.md", "reason": "Project workflow and conventions"}
2+
{"file": ".trellis/spec/shared/index.md", "reason": "Shared coding standards"}
3+
{"file": ".trellis/spec/backend/index.md", "reason": "Backend development guide"}
4+
{"file": ".trellis/spec/backend/api-module.md", "reason": "API module conventions"}
5+
{"file": ".trellis/spec/backend/quality.md", "reason": "Code quality requirements"}
6+
{"file": ".trellis/spec/frontend/index.md", "reason": "Frontend development guide"}
7+
{"file": ".trellis/spec/frontend/components.md", "reason": "Component conventions"}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# E2E Verification: Walk all server-ng APIs via admin DOM
2+
3+
## Background
4+
5+
After fixing the login form bug, we need to verify that all APIs between admin (frontend) and server-ng (backend) are working correctly. This task involves systematically walking through all accessible API endpoints by interacting with the admin UI DOM.
6+
7+
## Requirements
8+
9+
### Primary Goal
10+
11+
Verify all server-ng APIs are accessible and functional through the admin interface by:
12+
13+
1. **Authentication & User Management**
14+
- Login/Logout flow
15+
- User profile viewing
16+
- Collaborator management
17+
18+
2. **Content Management**
19+
- Article CRUD (Create, Read, Update, Delete)
20+
- Draft management
21+
- Category CRUD
22+
- Tag CRUD
23+
- Custom page management
24+
25+
3. **Media Management**
26+
- Image upload
27+
- Image listing
28+
- Image deletion
29+
30+
4. **System Settings**
31+
- Site info configuration
32+
- SEO settings
33+
- Layout settings
34+
- Comment system (Waline) configuration
35+
- Caddy configuration
36+
- Backup/restore
37+
38+
5. **Data & Analytics**
39+
- Welcome dashboard loading
40+
- Log viewing
41+
- Analytics data
42+
43+
### Method
44+
45+
Use Chrome DevTools MCP to:
46+
47+
1. Navigate to each admin page
48+
2. Take snapshots to verify page loads
49+
3. Interact with forms and buttons
50+
4. Check network requests for API calls
51+
5. Verify responses are correct
52+
53+
## Acceptance Criteria
54+
55+
- [ ] All main navigation items accessible
56+
- [ ] Login flow works (username/password → submit → redirect)
57+
- [ ] Welcome/Dashboard page loads with user data
58+
- [ ] Article list page loads
59+
- [ ] Article editor opens (new and existing)
60+
- [ ] Draft list page loads
61+
- [ ] Image management page loads
62+
- [ ] Category management page loads
63+
- [ ] Tag management page loads
64+
- [ ] System settings tabs load:
65+
- [ ] Site Info
66+
- [ ] User Management
67+
- [ ] Image Settings
68+
- [ ] Waline
69+
- [ ] Plugin
70+
- [ ] Caddy
71+
- [ ] Advanced
72+
- [ ] Migration
73+
- [ ] Backup
74+
- [ ] Token
75+
- [ ] Data management page loads
76+
- [ ] Log management page loads
77+
- [ ] Comment management page loads
78+
- [ ] Pipeline page loads
79+
80+
## Success Metrics
81+
82+
- Zero 404 errors on API calls
83+
- All pages render without JavaScript errors
84+
- Authentication state persists across navigation
85+
- Forms can be submitted successfully
86+
87+
## Notes
88+
89+
- Use the Chrome DevTools MCP tools
90+
- Start from http://localhost:3002/admin/user/login
91+
- Test credentials: admin / admin123
92+
- Document any failures with specific API endpoint and error message
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"id": "e2e-api-walk",
3+
"name": "e2e-api-walk",
4+
"title": "E2E Verification: Walk all server-ng APIs via admin DOM",
5+
"description": "",
6+
"status": "completed",
7+
"dev_type": null,
8+
"scope": null,
9+
"priority": "P2",
10+
"creator": "CornWorld",
11+
"assignee": "CornWorld",
12+
"createdAt": "2026-02-02",
13+
"completedAt": "2026-02-02",
14+
"branch": "refactor/baseline",
15+
"base_branch": null,
16+
"worktree_path": null,
17+
"current_phase": 0,
18+
"next_action": [
19+
{
20+
"phase": 1,
21+
"action": "implement"
22+
},
23+
{
24+
"phase": 2,
25+
"action": "check"
26+
},
27+
{
28+
"phase": 3,
29+
"action": "finish"
30+
},
31+
{
32+
"phase": 4,
33+
"action": "create-pr"
34+
}
35+
],
36+
"commit": null,
37+
"pr_url": null,
38+
"subtasks": [],
39+
"relatedFiles": [],
40+
"notes": ""
41+
}

0 commit comments

Comments
 (0)