Skip to content

feat(agent-question): the React UI's bundle committed and served at the root; the vanilla page retired - #76

Merged
acn-ericlaw merged 5 commits into
mainfrom
feat/agent-question-ui-bundle
Nov 20, 2026
Merged

acn-ericlaw merged 5 commits into
mainfrom
feat/agent-question-ui-bundle

Conversation

@acn-ericlaw

@acn-ericlaw acn-ericlaw commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • The React UI's bundle in extensions/agent-question/resources/public (RFC-0014 round 4, section 21.4; build plan step 11), built in the Node.js pack (mercury-nodejs extensions/agent-question-ui, feat(agent-question-ui): the React UI - the one front-end of the agent-question app, with an actuator menu mercury-nodejs#141) and deployed here by its release script; the host's static content service serves it at / from the same origin - no CORS, nothing configured.
  • The vanilla page retired: GET /questions/app and the generated page are gone from agent_question.py; the engines' actuator endpoints (/info, /info/routes, /health, /env, /livenessprobe) stay at their paths beside the bundle and the UI offers them as a menu.
  • A test that the committed bundle (/, the hashed script and stylesheet, /favicon.svg) and the five actuator endpoints are served; README; CHANGELOG Added 9, Changed 4. ruff clean, basedpyright 0, 775 passed / 76 skipped.

Why

One front-end to maintain in one place for both packs' backends (Eric, 2026-11-19), served from each backend's own origin. The actuator endpoints are preserved because a container manager's probes depend on them in the cloud (Eric, 2026-11-20). A change to the UI is a build in the Node.js pack and a commit of the bundle here.

Also in this PR - from the live drive (2026-11-20)

  • Platform.on_shutdown(callback) (CHANGELOG Added 10): aiohttp's on_shutdown - the moment the application starts to stop, while the host still holds its connections and before it waits for the requests in flight. The drive found that a device holding the agent-question stream kept a stopping backend alive: after SIGTERM the host stopped listening within two seconds but waited for the stream, which never ends on its own, and the process was still there 75 seconds later - in a container, the grace period and a SIGKILL. The app now ends every device's stream in that hook (close_streams); re-driven, the process was gone within a second and the device reconnected three seconds after the restart, nothing missed. Tested: a stream ends on the hook, a stream opened while stopping ends at once, _attach registers the hook. The Node.js twin is Platform.onShutdown (mercury-nodejs #141).
  • The bundle rebuilt with the UI fixes of the drive (a case's cards in the order they were recorded; the device-side seen state with Mark all notices as seen).
  • Driven live through this backend and the Node.js one, and a Keycloak issuer (PKCE sign-in, a decision recorded under the token's name): the report is docs/test-reports/agent-question-ui-live-drive.md in mercury-composable (PR to follow).

🤖 Generated with Claude Code

…he root; the vanilla page retired

RFC-0014 round 4, section 21.4; build plan step 11. The front-end is built in the Node.js pack (mercury-nodejs
extensions/agent-question-ui) and its bundle deployed into extensions/agent-question/resources/public, which the
host's static content service serves at / from the same origin - no CORS, nothing configured. GET /questions/app and
the generated page are gone; the engines' actuator endpoints stay at their paths beside the bundle for Kubernetes
probes and operations, and the UI offers them as a menu; the test checks the committed bundle and the five endpoints
are served.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
acn-ericlaw and others added 4 commits November 20, 2026 17:47
… when the application stops; the bundle rebuilt

Found by the live drive of the React UI (mercury-composable docs/test-reports/agent-question-ui-live-drive.md): a
device holding the agent-question stream kept a stopping backend alive - after SIGTERM the host stopped listening
within two seconds but aiohttp waited for the stream, which never ends on its own, and the process was still there 75
seconds later; in a container, the grace period and a SIGKILL. Platform.on_shutdown maps to aiohttp's on_shutdown: the
moment the application starts to stop, before the host waits for the requests in flight; the agent-question app ends
every device's stream there (close_streams) and the devices reconnect to the next instance from their last sequence.
Re-driven: the process gone within a second of SIGTERM, the device connected again three seconds after the restart.
The bundle rebuilt in the Node.js pack (the card order within a case, mark all notices as seen) and recommitted here.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@acn-ericlaw
acn-ericlaw merged commit 5cc9fcc into main Nov 20, 2026
5 checks passed
@acn-ericlaw
acn-ericlaw deleted the feat/agent-question-ui-bundle branch November 20, 2026 10:26
acn-ericlaw added a commit that referenced this pull request Nov 20, 2026
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.

1 participant