feat: separate-routes
This commit is contained in:
38
TASK.md
Normal file
38
TASK.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Task: Separate Routes for Each Section
|
||||
|
||||
## Current State
|
||||
- Single page app with client-side navigation
|
||||
- Navigation links: Tasks, Wiki, Agents, Usage
|
||||
- All content in one index.html
|
||||
|
||||
## Required Changes
|
||||
1. Add Express routes in server.js:
|
||||
- GET /tasks - Renders tasks page with kanban board
|
||||
- GET /wiki - Renders wiki page with documentation list
|
||||
- GET /agents - Renders agents page with agent cards
|
||||
- GET /usage - Renders usage page with provider info
|
||||
- GET / - Redirect to /tasks or render tasks page
|
||||
|
||||
2. Create separate HTML templates or use template rendering:
|
||||
- Each page should have its own route
|
||||
- Navigation should use standard anchor links (href=/tasks, etc.)
|
||||
- Remove client-side navigation JavaScript
|
||||
|
||||
3. Keep API endpoints unchanged:
|
||||
- /api/tasks, /api/wiki, /api/agents, /api/usage remain as JSON APIs
|
||||
- Pages can fetch data client-side from these APIs after loading
|
||||
|
||||
4. Remove SPA logic from app.js:
|
||||
- Remove nav-link click handlers
|
||||
- Remove page switching logic
|
||||
- Keep only data loading for each page
|
||||
|
||||
## Files to Modify
|
||||
- server.js - Add route handlers for each page
|
||||
- public/index.html - Either split or make it a template
|
||||
- public/app.js - Remove SPA navigation, keep data loading
|
||||
|
||||
## After Completion
|
||||
git add -A
|
||||
git commit -m "feat: separate routes for each section"
|
||||
git push origin feat/separate-routes
|
||||
Reference in New Issue
Block a user