Severity: Medium
Labels: bug, frontend, P2
Location: frontend/src/components/DocumentUploadModal.tsx:256-269 (addCourseInline), per-item course select :415-422
Description
addCourseInline calls addCourse(...), toasts success, and clears the search — but courses is owned by the parent (Library.load()), which only refetches in onComplete (fired on done/close). So after adding a course inline, the per-file Course dropdown still doesn't list it; the user can't assign their file to the just-added course without closing and reopening the modal.
Steps to reproduce
- In the upload modal, use "+ Add a course" to add a new course (success toast appears).
- Open a file's Course dropdown — the new course isn't there.
Expected vs actual
- Expected: the newly added course is immediately selectable.
- Actual: absent until the modal is reopened.
Suggested fix
Lift the added course into modal state and merge it into the dropdown options immediately (or expose an onCoursesChanged callback that refreshes the prop live).
Acceptance criteria
- A course added inline appears in the per-file dropdown without reopening the modal.
Severity: Medium
Labels: bug, frontend, P2
Location:
frontend/src/components/DocumentUploadModal.tsx:256-269(addCourseInline), per-item course select:415-422Description
addCourseInlinecallsaddCourse(...), toasts success, and clears the search — butcoursesis owned by the parent (Library.load()), which only refetches inonComplete(fired on done/close). So after adding a course inline, the per-file Course dropdown still doesn't list it; the user can't assign their file to the just-added course without closing and reopening the modal.Steps to reproduce
Expected vs actual
Suggested fix
Lift the added course into modal state and merge it into the dropdown options immediately (or expose an
onCoursesChangedcallback that refreshes the prop live).Acceptance criteria