Skip to content

Register four IPC channels nobody registered, and guard the exit (#155) - #156

Merged
CaYatur merged 1 commit into
mainfrom
fix/ipc-handlers-and-quit-guard
Jul 29, 2026
Merged

Register four IPC channels nobody registered, and guard the exit (#155)#156
CaYatur merged 1 commit into
mainfrom
fix/ipc-handlers-and-quit-guard

Conversation

@CaYatur

@CaYatur CaYatur commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Closes #155.

No handler registered for 'rbac:list-roles'

rbac:list-roles, rbac:upsert-role, rbac:delete-role and web:user-roles were declared in ipc.ts, exposed by the preload and called by the panel — and none of them had a handler. Every one has answered "no handler registered" since the day it was written, so named roles have never worked.

It stayed hidden because the panel loaded them inside a chain that swallowed the rejection — which is also why the API keys after them never appeared (#153). Fixing that chain last release is what made this visible, which is the whole argument for surfacing errors rather than eating them.

The class of bug now has a test

Every channel the preload exposes must be registered in register.ts. It found web:user-roles immediately — a second one nobody had reported.

It was vacuous twice before it worked, and only breaking it on purpose showed that:

Attempt What happened
first Commenting the handler out left IPC.rbacList in the comment. The scan found it and the gate stayed green over a channel that answers nothing.
second Stripping comments made it flag three channels that were fine — they are registered as H(\n IPC.x, across two lines and the pattern wanted one.
now the preload calls rbacList and nothing registers a handler — exactly the one removed.

Closing MSMS with a server running

It refuses and names the servers that are up. Confirmed, it stops them the way an operator would: immediate is gone, so the configured countdown is broadcast to players and the world gets time to save. Anything still up after 45 seconds is killed rather than left orphaned holding the world files.

Asked on the window's own close as well as on before-quit — a dialog that appears after the window has already gone reads as the app having crashed and then argued about it.

API keys: where to read more

The key panel links to the route reference this install serves itself, so it always matches the running version, and to the repository for the written documentation and the source. Both surfaces.

README

Version, the new shutdown behaviour, touch on the map, named roles, and the map page taking the site's colours.

12/12 gates.

    Error invoking remote method 'rbac:list-roles':
    No handler registered for 'rbac:list-roles'

`rbac:list-roles`, `rbac:upsert-role`, `rbac:delete-role` and
`web:user-roles` were declared in ipc.ts, exposed by the preload and
called by the panel — and none of them had a handler. Every one has
answered "no handler registered" since the day it was written, so named
roles have never worked at all.

It stayed hidden because the panel loaded them inside a chain that
swallowed the rejection, which is also why the API keys after them never
appeared (#153). Fixing that chain in the last release is what made this
visible, which is the whole argument for surfacing errors instead of
eating them.

The class of bug now has a test: every channel the PRELOAD exposes must
be registered in `register.ts`. It found `web:user-roles` immediately —
a second one I had not been told about.

That test was vacuous twice before it worked, and both times only
breaking it on purpose showed that:

  Commenting the handler out left `IPC.rbacList` sitting in the comment,
  the scan found it, and the gate stayed GREEN over a channel that
  answers nothing. Comments are stripped first now.

  Then it flagged three channels that were fine, because they are
  registered as `H(\n  IPC.x,` across two lines and the pattern wanted
  them on one.

---

MSMS no longer closes silently while a server is running. It names the
servers that are up and asks. Confirmed, it stops them the way an
operator would: `immediate` is gone, so the configured countdown is
broadcast to players and the world gets time to save. Anything still up
after 45 seconds is killed rather than left orphaned holding the world
files.

Asked on the window's own close as well as on before-quit — a dialog
that appears after the window has already gone reads as the app having
crashed and then argued about it.

---

The API key panel now links to the route reference this install serves
itself — so it always matches the running version — and to the
repository for the written documentation and the source. Both surfaces,
desktop and web.

README updated: version, the new shutdown behaviour, touch on the map,
named roles, and the map page taking the site's colours.

Verified: 12/12 gates. Removing the handler again fails with "the
preload calls rbacList and nothing registers a handler".
Copilot AI review requested due to automatic review settings July 29, 2026 19:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CaYatur
CaYatur merged commit 5f3c7ad into main Jul 29, 2026
1 check passed
@CaYatur
CaYatur deleted the fix/ipc-handlers-and-quit-guard branch July 29, 2026 19:43
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.

Four IPC channels were never registered, and MSMS closes without warning while a server runs

2 participants