Skip to content

feat(signalr): show the server's restart reasons to admins - #1483

Open
revam wants to merge 2 commits into
masterfrom
split/06-restart-reasons
Open

revam wants to merge 2 commits into
masterfrom
split/06-restart-reasons

Conversation

@revam

@revam revam commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Why

The server now keeps why it needs a restart (GET /api/v3/Init/RestartReasons, and the admin-only restart feed). This is the first part that needs a newer server, so it raises the minimum to 6.0.0-dev.495.

What changed

  • RestartNotice (replacing the toast signalr.ts raised, now mounted in MainPage): lists each reason's plugin or setting and why, beside the configuration:requiresRestart notice, follows restart:reasonsChanged and closes once no reason is left.
  • MainPage waits for the current user before connecting (useFreshCurrentUser, shared with RestartNotice), and MAINPAGE_LOADED carries isAdmin; only admins join the restart feed and call the route.
  • The configuration:requiresRestart flag lives in the mainpage slice, so it resets on logout.
  • vite.config.mjs: minimum server version 6.0.0-dev.479 → 6.0.0-dev.495.
  • AGENTS.md: notes the admin-only feed.

Note for review: Permissions: the feed and route are admin-only on the server; the WebUI only skips them for other users. The SignalR connection now starts after the current user is loaded. The minimum server version rises.

Where to look first

  • src/components/RestartNotice.tsx: the new prompt.
  • src/core/signalr/signalr.ts: joining the feed for admins only.

Feedback wanted

Whether waiting for the current user before connecting SignalR is acceptable.

Stack

Part 6 of 12 in the split of #1477. Below: Part 5, two-parameter filter conditions. Above: Part 7, the scheduled actions page.

Testing

pnpm tscheck, pnpm lint, pnpm test and pnpm build pass at this branch's tip. Manual, on 6.0.0-dev.495: as an admin, change a setting that needs a restart and see the reason listed; as a non-admin, no restart feed or RestartReasons call.

@revam
revam added this pull request to stack #1490 October 3, 2026 17:38
@revam revam changed the title split/06 restart reasons feat(signalr): show the server's restart reasons to admins Oct 3, 2026
@harshithmohan
harshithmohan force-pushed the split/06-restart-reasons branch from 74723ef to 82ef6f6 Compare October 3, 2026 17:43
@revam
revam force-pushed the split/06-restart-reasons branch from 82ef6f6 to bdf640d Compare October 3, 2026 18:48
@revam
revam force-pushed the split/05-filters branch from 54a57b2 to 1e9e38c Compare October 3, 2026 18:48
@harshithmohan
harshithmohan force-pushed the split/06-restart-reasons branch 3 times, most recently from a9d855a to 9fc2f62 Compare October 4, 2026 08:00
@harshithmohan
harshithmohan force-pushed the split/06-restart-reasons branch from 9fc2f62 to 4a29f31 Compare October 5, 2026 17:38
@harshithmohan
harshithmohan removed this pull request from stack #1490 October 5, 2026 17:42
@harshithmohan
harshithmohan changed the base branch from split/05-filters to revam October 5, 2026 17:42
@harshithmohan
harshithmohan added this pull request to stack #1492 October 5, 2026 17:42
Base automatically changed from revam to master October 6, 2026 13:44
revam added 2 commits October 6, 2026 19:16
- Joined the admin-only `restart` feed and fetched `GET Init/RestartReasons` for admins only, as `MAINPAGE_LOADED` now carries `isAdmin`
- Moved the restart prompt into `RestartNotice`, which lists each reason's plugin or setting and description beside the `configuration:requiresRestart` notice, updates with the feed and closes once no reason is left
@harshithmohan
harshithmohan force-pushed the split/06-restart-reasons branch from 4a29f31 to 8b7270d Compare October 6, 2026 13:50
@harshithmohan
harshithmohan removed this pull request from stack #1492 October 6, 2026 13:53

@hidden4003 hidden4003 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be available to all users not just admins

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants