Plex: budget-exhausted message says "Use Refresh" but there is no global Refresh when zero servers exist #367

Closed
opened 2026-07-16 14:33:45 +02:00 by timothy · 2 comments
Owner

Problem

Surfaced during the #345 review (PR #366), pre-existing and orthogonal to that fix.

In the Plex source screen (web/src/screens/PlexSourceScreen.tsx), when a large first sync legitimately holds the Plex lock past the 150s poll budget, the pin-flow status shows the budget-exhausted message:

Still working — this can take a while on a large first sync. Use Refresh to check again.

But the only Refresh control is per-server (in the Servers card), which is not rendered when servers is empty. In the budget-exhausted + zero-servers state, polling has stopped and there is no global Refresh affordance, so the user's only way to re-check discovery is a full page reload. The message points at an action that doesn't exist in that state.

Expected

Either:

  • provide a global "Refresh / check again" control on the Plex screen that re-fetches GET /api/v1/media-sources/plex (and, if still authorized+locked, resumes/re-arms the poll), or
  • reword the budget-exhausted message so it doesn't reference a control that isn't present when there are no servers.

Notes

  • Low priority: only hits the rare large-first-sync-past-budget case with zero discovered servers.
  • Behavior context lives in web/src/mediaSources/pinFlowPoll.ts (budget-exhausted terminal) and the Servers card gating in PlexSourceScreen.tsx.

Done-when

  • The budget-exhausted no-servers state either offers a working re-check control or the message no longer references a nonexistent Refresh.
  • A regression test covers the chosen behavior.
  • SPA quality gates pass.
## Problem Surfaced during the #345 review (PR #366), pre-existing and orthogonal to that fix. In the Plex source screen (`web/src/screens/PlexSourceScreen.tsx`), when a large first sync legitimately holds the Plex lock past the 150s poll budget, the pin-flow status shows the `budget-exhausted` message: > Still working — this can take a while on a large first sync. **Use Refresh to check again.** But the only Refresh control is **per-server** (in the Servers card), which is not rendered when `servers` is empty. In the `budget-exhausted` + zero-servers state, polling has stopped and there is no global Refresh affordance, so the user's only way to re-check discovery is a full page reload. The message points at an action that doesn't exist in that state. ## Expected Either: - provide a global "Refresh / check again" control on the Plex screen that re-fetches `GET /api/v1/media-sources/plex` (and, if still authorized+locked, resumes/re-arms the poll), or - reword the `budget-exhausted` message so it doesn't reference a control that isn't present when there are no servers. ## Notes - Low priority: only hits the rare large-first-sync-past-budget case with zero discovered servers. - Behavior context lives in `web/src/mediaSources/pinFlowPoll.ts` (`budget-exhausted` terminal) and the Servers card gating in `PlexSourceScreen.tsx`. ## Done-when - [ ] The budget-exhausted no-servers state either offers a working re-check control or the message no longer references a nonexistent Refresh. - [ ] A regression test covers the chosen behavior. - [ ] SPA quality gates pass.
timothy added the bugpriority: lowfrontend labels 2026-07-16 14:33:45 +02:00
timothy added the in-progress label 2026-07-18 16:30:46 +02:00
Author
Owner

🤖 Claiming as part of a batched small-issue sweep this session (parallel worktrees, one PR per item). Will post a close comment per the Task Completion Protocol when its PR merges.

🤖 Claiming as part of a batched small-issue sweep this session (parallel worktrees, one PR per item). Will post a close comment per the Task Completion Protocol when its PR merges.
Author
Owner

✅ Merged via PR #450 (squash). Done: the budget-exhausted poll message no longer tells the user to 'Use Refresh' when 0 Plex servers exist; reworded it and added an always-available Check again button (one-off re-fetch; deliberately does not re-arm the spent 150s poll loop). Files: web/src/mediaSources/pinFlowPoll.ts, web/src/screens/PlexSourceScreen.tsx (+ regression test). typecheck/lint/vitest green (21). Pure-SPA leaf; independent review skipped per skip rubric (stated). No docs change.

✅ Merged via PR #450 (squash). **Done:** the `budget-exhausted` poll message no longer tells the user to 'Use Refresh' when 0 Plex servers exist; reworded it and added an always-available **Check again** button (one-off re-fetch; deliberately does not re-arm the spent 150s poll loop). **Files:** `web/src/mediaSources/pinFlowPoll.ts`, `web/src/screens/PlexSourceScreen.tsx` (+ regression test). typecheck/lint/vitest green (21). Pure-SPA leaf; independent review skipped per skip rubric (stated). No docs change.
timothy removed the in-progress label 2026-07-18 18:22:16 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: timothy/ersatztv#367