docs: add projects feature documentation and finalize integration
- Add comprehensive projects feature documentation (docs/projects-feature.md) - Add testing guide and checklist (test_projects_feature.js) - Update .gitignore to exclude database files - Include Task 13 completion summary Documentation covers: - Feature overview and key capabilities - Project creation (manual and smart suggestions) - Session assignment (automatic and manual) - Project management (edit, delete, restore) - Complete API reference - Smart suggestions explanation - Troubleshooting and FAQ Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
144
test_projects_feature.js
Executable file
144
test_projects_feature.js
Executable file
@@ -0,0 +1,144 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Manual Testing Script for Projects Feature
|
||||
*
|
||||
* This script provides instructions for manual testing of the projects feature.
|
||||
* Since the API requires authentication, manual testing through the web interface
|
||||
* is the most reliable method.
|
||||
*/
|
||||
|
||||
console.log(`
|
||||
╔════════════════════════════════════════════════════════════════════════╗
|
||||
║ PROJECTS FEATURE - MANUAL TESTING GUIDE ║
|
||||
╚════════════════════════════════════════════════════════════════════════╝
|
||||
|
||||
Server Status Check:
|
||||
-------------------
|
||||
The server should be running on http://localhost:3010/claude
|
||||
|
||||
To verify: curl -s http://localhost:3010/claude | grep -q "Obsidian" && echo "✓ Server is running"
|
||||
|
||||
TESTING CHECKLIST:
|
||||
==================
|
||||
|
||||
1. NAVIGATE TO PROJECTS PAGE
|
||||
✓ Open browser to http://localhost:3010/claude
|
||||
✓ Look for "Projects" link in navigation
|
||||
✓ Click to navigate to /projects
|
||||
✓ Expected: Grid view with "New Project" and "Suggestions" buttons
|
||||
|
||||
2. CREATE A TEST PROJECT
|
||||
✓ Click "New Project" button
|
||||
✓ Fill in:
|
||||
- Name: "Test Project"
|
||||
- Path: "/test-project"
|
||||
- Description: "Testing the projects feature"
|
||||
- Icon: 🧪 (or any emoji)
|
||||
- Color: #ff5733 (or any color)
|
||||
✓ Click "Create Project"
|
||||
✓ Expected: Project card appears in grid with correct info
|
||||
|
||||
3. VERIFY PROJECT ON LANDING PAGE
|
||||
✓ Navigate back to home page
|
||||
✓ Look for "Projects" section
|
||||
✓ Expected: "Test Project" appears in the projects section
|
||||
|
||||
4. CREATE A SESSION (TEST AUTO-ASSIGN)
|
||||
✓ Create a new session while "Test Project" exists
|
||||
✓ Expected: Session automatically assigned to "Test Project"
|
||||
✓ Check session card for project badge/indicator
|
||||
|
||||
5. TEST MOVE SESSION VIA CONTEXT MENU
|
||||
✓ Create a second project: "Another Test"
|
||||
✓ Right-click (or long-press) on a session
|
||||
✓ Select "Move to Project" from context menu
|
||||
✓ Choose destination project
|
||||
✓ Expected: Session moves to new project
|
||||
|
||||
6. TEST SOFT DELETE TO RECYCLE BIN
|
||||
✓ On /projects page, click "Delete" on a project
|
||||
✓ Confirm deletion
|
||||
✓ Expected: Project removed from main view
|
||||
✓ Click "Recycle Bin" button
|
||||
✓ Expected: Deleted project appears in recycle bin
|
||||
|
||||
7. TEST RESTORE
|
||||
✓ In recycle bin, click "Restore" on deleted project
|
||||
✓ Expected: Project restored to main view
|
||||
✓ All settings preserved (name, color, etc.)
|
||||
|
||||
8. TEST PROJECT EDITING
|
||||
✓ Click "Edit" on a project card
|
||||
✓ Modify name, description, or color
|
||||
✓ Click "Save Changes"
|
||||
✓ Expected: Project updates with new values
|
||||
|
||||
9. TEST SUGGESTIONS FEATURE
|
||||
✓ On /projects page, click "Suggestions" (✨) button
|
||||
✓ Expected: Modal with AI-generated suggestions
|
||||
✓ Click "Use" on a suggestion
|
||||
✓ Expected: New project created with suggested name
|
||||
|
||||
10. TEST PROJECT FILTERING/SEARCHING
|
||||
✓ Create multiple projects with different names
|
||||
✓ Use search/filter if available
|
||||
✓ Expected: Can find specific projects quickly
|
||||
|
||||
DATABASE VERIFICATION:
|
||||
=====================
|
||||
To verify database state directly:
|
||||
|
||||
node -e "
|
||||
const db = require('better-sqlite3')('database.sqlite');
|
||||
const projects = db.prepare('SELECT * FROM projects WHERE deletedAt IS NULL').all();
|
||||
console.log('Active projects:', projects.length);
|
||||
console.log(JSON.stringify(projects, null, 2));
|
||||
"
|
||||
|
||||
API TESTING (with authentication token):
|
||||
========================================
|
||||
Once logged in, you can test API endpoints:
|
||||
|
||||
1. List Projects:
|
||||
curl http://localhost:3010/api/projects \\
|
||||
-H 'Cookie: your_session_cookie'
|
||||
|
||||
2. Create Project:
|
||||
curl -X POST http://localhost:3010/api/projects \\
|
||||
-H 'Content-Type: application/json' \\
|
||||
-H 'Cookie: your_session_cookie' \\
|
||||
-d '{"name":"API Test","path":"/api-test","description":"Created via API"}'
|
||||
|
||||
3. Get Suggestions:
|
||||
curl http://localhost:3010/api/projects/suggestions \\
|
||||
-H 'Cookie: your_session_cookie'
|
||||
|
||||
COMMON ISSUES TO CHECK:
|
||||
=======================
|
||||
✓ Projects not appearing → Check deletedAt IS NULL in database
|
||||
✓ Sessions not auto-assigning → Verify at least one active project exists
|
||||
✓ Can't delete project → Check if it's the only project (may be protected)
|
||||
✓ Color not displaying → Verify hex format (#RRGGBB)
|
||||
✓ Icon not showing → Use emoji characters only
|
||||
|
||||
CLEANUP AFTER TESTING:
|
||||
=====================
|
||||
To remove test data:
|
||||
|
||||
node -e "
|
||||
const db = require('better-sqlite3')('database.sqlite');
|
||||
db.prepare('DELETE FROM projects WHERE name LIKE \"Test%\"').run();
|
||||
console.log('Test projects removed');
|
||||
"
|
||||
|
||||
READY TO START:
|
||||
===============
|
||||
Open your browser to: http://localhost:3010/claude
|
||||
|
||||
Follow the checklist above and verify each feature works as expected.
|
||||
|
||||
═════════════════════════════════════════════════════════════════════════
|
||||
`);
|
||||
|
||||
process.exit(0);
|
||||
Reference in New Issue
Block a user