PromptResultRouter

Push a MessagePromptActivity and give its answer to one callback, matched by the prompt id.

Inherits QObject

In the namespace octomy::activity. Declared in src/libs/libactivity/activity/PromptResultRouter.hpp.

Detailed description

A prompt on the activity stack is asynchronous. The answer comes back through ActivityStack::activityPopped as id, token. Each caller that pushes a prompt must then listen to the stack, match its own id, disconnect, and run its handler. This class does that one time, for every caller.

Two callers use it:

- Activity::pushPromptForResult, for an activity that asks. - octomy::window::WindowPromptHost, for a window that asks (§ACW-7.5, W7 slice 3).

Before 2026-10-11 the activity had this code as private members, and NodeWindow had eight hand-written copies of it. This class is the one copy.

The rules:

- arguments[0] is the prompt id, and it is mandatory. The id is what routes the answer back. - The handler runs at most one time. It disconnects before it runs. - A pop with a different id, or of a different activity, leaves the handler armed. - A second push with the same id replaces the first handler. It does not add a second handler, because two handlers answer the same pop. - The handler is armed before the push, so a stack that pops the prompt synchronously is still heard. - If the push fails, the handler is disarmed and push returns false. - If this object is destroyed first, no handler runs. Qt disconnects every connection whose context is this object.

Note: §ACF-5 classification: **GLUE**. No lifecycle tier, no Node.

In this section