Repository navigation
Follow the server's resources on a Resources page, and start, stop, restart or rescan them - #57
Merged
Merged
Conversation
…nd let Observer write start, stop, restart and refresh on its console
…Server's sources say, and list them as the bridge does
… rescan them through the API under a permission of their own
… and start, stop or restart them, naming what stops with each
…page, then start them back
This was referenced Nov 11, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five commits, one per piece of work, each of which builds and passes on its own, then
main(#56) merged in. Together: the bridge lists every resource FXServer knows, Observer writes FXServer's ownstart,stop,restartandrefreshon its console when someone asks, and a Resources page shows the resources by folder as they stand, live, with a start, a stop or a restart of each. A stop or a restart that takes other resources down names them before it acts.What changed
The bridge lists the resources, and Observer writes their commands (
9f8918e)resource/observer/server.lua: once the cfg has run, and after eachrefresh(onResourceListRefresh), the bridge reports every resource FXServer knows, in pages of 100: its name, state, path, manifest version,dependencyanddependencies, andprovide. An internal report (resource_list): the contract stays at 4.observer-fxserver(resources): what a run knows of its resources. The folder comes from the path, the[x]folders that end it being its categories ([core]/[ox]), andsystem_resourcesmarking the build's own. The bridge is left out. Each resource keeps what last happened to it in the run, and the resource it stopped with when FXServer stopped it along with another. The started resources that depend on one are found asResourceDependencyLoader.cppandResourceManager.cppfind them,provideincluded.stdin:start|stop|restart <name>andrefreshjoin the lines Observer may write, with a name of ASCII letters, digits,_,.and-, 64 at most (ResourceName). A line written for someone is echoed in the console as their command.start: what FXServer said of each resource as it started it, kept until the next start: that it could not start it, its warnings, heavy and oversized files and missing files, and what the lastrefreshfound.supervisor:resources(),resource()andrefresh_resources(). A run's list is reset at each spawn and dropped at the exit.The fake FXServer does them as FXServer does (
ad2af30)start,stop,restart,ensureandrefreshfollow FXServer's sources: a stop takes what depends on the resource first and starts none of it again, a start brings what the resource depends on first, a restart of a stopped resource answers "Can't restart a stopped resource.", andrefreshreads the folders again and prints what it found. The fake reports the list as the bridge does (fake_resource_page), and its report of the resources started 500 ms after the last change, as the bridge does.The service and the API (
2a39c3f)observer-domain(resources):ResourcesView, the whole list at each change,ResourceOrderandResourceAck. PermissionRESOURCES_CONTROL, bit 26, sensitive, in the Server area. Audit actionsresource_started,resource_stopped,resource_restartedandresources_rescanned, each with the console command, and for a stop or a restart that takes others along, those it stopped and whether they were started again. Error codesresources_not_listed,resource_not_found,resource_name_refused,resource_busyandresource_changed. Topicserver.resources, forDASHBOARD_VIEWorRESOURCES_CONTROL.observer-app(supervision/resources): follows the supervisor and sends the list at most every 250 ms, and each second while a panel watches it, for what only the console says, such as a start that failed. An order is audited before its line is written and counts in the user's commands window. It shows on the list, with who asked, until FXServer answers it, and no other order is taken on that resource meanwhile. A restart can start again what FXServer stopped with the resource, with onestarteach. The bridge is never named in an order.observer-web:POST /servers/default/resources/start,/stop,/restartand/rescan, behindRESOURCES_CONTROL. The list has no route: it comes on the topic.The Resources page (
5fda1b9)Segmentedtakes a count beside each choice. The audit log words the details of the new actions.End to end (
bbcee69)Notes for review
STOP_RESOURCErefuseschat,monitor,spawnmanager,mapmanager,baseevents,sessionmanagerand the resource that calls it (ServerResources.cpp).ResourceDependencyLoader.cpp). The page names them before a stop or a restart, and a restart can start them again. This goes past what the page was asked to do; it was kept.crates/observer-web/src/tests.rs(7ffffffhere) andKEEPERincrates/observer-web/src/tests/resources.rs.Verified
mainat Run the fake FXServer tests on ports the system gives, so that two runs on one host no longer collide #56 merged in:cargo xtask checkwhole, exit 0. That iscargo fmt --all --check,cargo xtask icons --check, clippy on all targets with-D warningswith and withoutobserver/test-catalog,cargo test --workspace(2,743 passed, none failed, one ignored as onmain),cargo xtask bindingsleaving the tree as it is, and the panel's format, lint, type check, 794 tests and build. The panel ran under Node 26.13.cargo fmt --all --check, clippy on all targets, the tests of its layer (observer-fxserver's, then the fake's), bindings unchanged aftercargo xtask bindings, and the panel's format, lint, type check and tests for the last two.cargo build --locked -p observer -p fake-fxserver --features observer/test-catalog, then the flows ofweb/e2ethrough Playwright 1.65 with the Chromium installed here (1248, where Playwright wants 1254): 11 passed, the new one among them, and the 2 that run only on Linux skipped.Not verified
GetNumResources,GetResourceByFindIndex,GetResourceState,GetResourcePath,GetResourceMetadata,GetNumResourceMetadata),onResourceListRefresh, the commands written on its console and what it prints for them, and the stop of the dependants. The Lua parses (lua-language-server --check); it has never run.cfg(unix)orcfg(windows)code.cargo xtask e2eas such: Playwright asks for a newer Chromium than the one installed here, so the flows ran through the same Playwright with the installed one.