pediatric-ai-scribe-v3/public
Daniel Onyejesi 9d63625987 AI panel context-aware options, delete wording, httpOnly cookie auth
AI Generate panel:
- Content type synced from editor on open
- Article/Pearl: optional word count field
- Presentation: optional slide count field
- Questions row: checkbox toggle for article/pearl (optional), always on for quiz,
  hidden for presentation; count input shown only when enabled
- Backend: passes wordCount/slideCount to prompt; questionCount=0 skips questions

Delete confirmation:
- Wording built dynamically from content type
- Presentation: no mention of questions
- Quiz: "All quiz questions will be permanently removed"
- Article/pearl: "Any quiz questions attached will also be removed"

Auth refactor — JWT → httpOnly cookie:
- Backend: setAuthCookie() sets ped_auth as httpOnly, Secure, SameSite=Lax, 7d
- Backend: clearAuthCookie() on POST /api/auth/logout (new endpoint)
- Backend: auth middleware reads ped_auth cookie first, falls back to Bearer header
- Login/register: no longer return token in JSON body; cookie is the session
- Frontend: getAuthHeaders() returns only Content-Type (no Authorization header)
- Frontend: session check uses /api/auth/me via cookie (no localStorage token)
- Frontend: clearSession() calls /api/auth/logout to clear cookie server-side
- Frontend: no token in localStorage; window.AUTH_TOKEN removed
- All FormData fetches use credentials:'same-origin' (cookie sent automatically)
- index.html: optimistic auth-screen hide (removed localStorage token check)

Tested: login, logout, /api/auth/me, admin routes, FormData uploads, cookie httpOnly
flag, 401 without cookie, cookie cleared on logout.
2026-03-24 01:46:07 -04:00
..
components AI panel context-aware options, delete wording, httpOnly cookie auth 2026-03-24 01:46:07 -04:00
css Fix delete bar always visible, slide preview modal, Marp textarea hint 2026-03-24 01:13:55 -04:00
icons Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
js AI panel context-aware options, delete wording, httpOnly cookie auth 2026-03-24 01:46:07 -04:00
vendor Replace Quill with Tiptap rich text editor 2026-03-23 23:32:41 -04:00
404.html Add proper 404 handling and custom error page 2026-03-23 23:47:50 -04:00
favicon.ico Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
index.html AI panel context-aware options, delete wording, httpOnly cookie auth 2026-03-24 01:46:07 -04:00
manifest.json v2.0.0: Pediatric AI Scribe 2026-03-21 16:55:50 -04:00
sw.js Fix: service worker only intercepts same-origin requests, preventing CDN fetch errors 2026-03-22 00:41:24 -04:00