Critical Bug Fixes:
1. Prompt IDs are UUIDs (strings), NOT numbers
2. parseInt(UUID) produces wrong results:
- parseInt("3b4d7d64-...") = 3 (truncates at first non-digit)
- parseInt("aa291dde-...") = NaN
3. This caused:
- Prompt selection: saved as NaN instead of UUID
- Load workflow: GET /api/prompts/3 instead of /api/prompts/3b4d7d64-...
- 405 Method Not Allowed errors
Changes:
- useEffect: loadWorkflow(id) instead of loadWorkflow(parseInt(id))
- Prompt onChange: prompt_id: promptId (string) instead of parseInt(promptId)
- Removed NaN check (unnecessary for UUID strings)
Root Cause: Backend uses UUID primary keys, frontend assumed integer IDs
Testing: Console logs still active for verification
|
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| Dockerfile | ||
| index.html | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| vite.config.js | ||