Repository navigation
fix(webui): track current run on relaunch, support run-scoped services, and streamline group toggle - #313
Merged
bpiwowar merged 6 commits intoNov 4, 2026
Conversation
…ices
- Invalidate StateProvider and WorkspaceStateProvider experiment query cache on new run events so current run updates on relaunch
- Add experiment_id and run_id to ServiceAddedEvent and RunCompletedEvent, and invalidate services query cache on ServiceAddedEvent
- Support runId in find_service, WebUI WebSocket handlers, proxy routes, and logs routes
- Scope WebUI service keys by run (${experiment_id}/${run_id}/${id}) and render RunSelector in the services view
- Clear cached jobs in Redux when current_run_id changes for the active experiment
- Rebuild frontend production bundle and add query cache unit tests
…search - Add CollapseExpandIcon rendering vertical >< (collapse) / <> (expand) - Merge separate expand and collapse buttons into a single toggle button - Relocate toggle button directly to the left of the search/filter input - Rebuild frontend production bundle
- Service state changes update the cached services in place; a new service only drops the cached lists of its run that miss it (the started service instances are kept) - No cache wipe on any event of another run: run/experiment events do it - get_services resolves an empty run id (events without a run) to the current run - Factor the jobs reset on run change in the reducer, remove unused _in_thread kwargs, ruff format - Tests: services cache, run-scoped services over the WebSocket (scenario service in a former run); docs; rebuilt frontend Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The button was small (forced to 31px in the jobs toolbar) next to a default-size input: it now has the default size, like the input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
event_run_id() reads the run id of the events that belong to a run, instead of getattr(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # src/experimaestro/webui/data/index.js
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.
Summary
This PR addresses two issues with run tracking and service inspection in the WebUI when an experiment is relaunched or when inspecting services across runs, plus a UI layout enhancement for collapsing/expanding task/experiment groups:
1. Track current run on relaunch & cache invalidation
WorkspaceStateProvider._on_experiment_events_created, clear the experiment cache and emitExperimentUpdatedEventunconditionally so newly discovered runs become current immediately.StateProvider.apply_eventandWorkspaceStateProvider._handle_experiment_event, invalidate cached experiment queries ("current_run","jobs", etc.) when receiving events associated with a new run, preventing stale query cache hits or job pollution across runs.reducers.ts), when viewing "Current run" (currentRun === null) andcurrent_run_idchanges for the active experiment, clear cachedjobsandjobsRequestedto trigger an automatic reload of the new run's jobs.2. Run-scoped services & service cache invalidation
experiment.py, includeexperiment_idandrun_idinServiceAddedEventandRunCompletedEvent.StateProvider.apply_event, drop cached("services", ...)queries whenServiceAddedEventarrives so newly added services appear without restarting the app.run_idinservice_operations.find_service, WebUI WebSocket handlers (services,service.start,service.stop), proxy routes, and service log endpoints.<RunSelector />in theservicesview, passrunIddown to all service actions/links/logs, and scope service Redux keys by run (${experiment_id}/${run_id}/${id}).3. Merged Collapse/Expand Groups Button
CollapseExpandIconrendering vertical><(collapse) /<>(expand) with clear chevron spacing and centering.Testing
test_state_cache.py(test_current_run_invalidated_on_new_run_eventandtest_service_added_event_invalidates_services_cache).test_state_cache.py,test_webui_websocket.py,test_webui_serialization.py, UI driver tests).