Fix: Session queue pause/resume buttons disabled in single-user and multiuser modes#83
Conversation
lstein
left a comment
There was a problem hiding this comment.
A problem was identified during testing. In single-user mode, clicking on the pause button fails to pause processing and the frontend shows a message saying "Problem Pausing Processor."
The root cause was in the backend: the pause and resume endpoints used Fixed in commit |
In single-user mode, currentUser is never populated (no auth), so `currentUser?.is_admin ?? false` always returns false, disabling the buttons. Follow the same pattern as useIsModelManagerEnabled: treat as admin when multiuser mode is disabled, and check is_admin flag when enabled. Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
d52fc85 to
dc9c837
Compare
Summary
The session queue Pause and Resume buttons were disabled in both single-user mode and multiuser mode. There were two bugs working together:
Frontend:
usePauseProcessoranduseResumeProcessorcomputed admin status ascurrentUser?.is_admin ?? false. In single-user mode,currentUseris never populated (no auth flow runs), sois_adminalways defaulted tofalse, permanently disabling both buttons.Backend: The pause and resume API endpoints used the
AdminUserdependency, which requires a valid Bearer token. In single-user mode, no token is sent, so the backend returned 401/403 — causing a "Problem Pausing Processor" error even after the frontend buttons were re-enabled.Frontend fix: Both hooks now mirror the pattern in
useIsModelManagerEnabled— treat as admin when multiuser is disabled, checkis_adminwhen it's enabled:Backend fix: Changed both pause and resume endpoints from
AdminUsertoAdminUserOrDefault.AdminUserOrDefaultreturns a system admin user in single-user mode without requiring a token, while still validating the token and enforcing admin privileges in multiuser mode.Related Issues / Discussions
QA Instructions
Merge Plan
Checklist
What's Newcopy (if doing a release after this PR)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.