Repository navigation
Add message-bus redesign plan for MainWindowViewModel - #236
Merged
Merged
Conversation
Capture a new holistic target architecture for moving the remaining Explorer/Request panel state out of MainWindowViewModel: feature VMs own their state, the ILeftPanelContext/IRequestPanelContext facades are retired, and cross-feature notifications flow over a UI-agnostic custom Rx message bus in Core. Command flows stay direct (returning outcome records) by default, with a mediator used selectively. Delivered incrementally, one slice per PR. Cross-link the new plan from the two existing architecture plans. https://claude.ai/code/session_01GSb4ZCyb4wFsk3wjcZgQSf
Introduce IMessageBus and a Subject-backed MessageBus in Arbor.HttpClient.Core/Messaging as the foundation for cross-feature notifications in the MainWindowViewModel redesign. The bus is framework-agnostic (depends only on System.Reactive, already pinned) and scheduler-agnostic; UI consumers marshal to their own scheduler at the subscription site. Nothing is wired to the bus yet. Covered by MessageBusTests (delivery, type isolation, multi-subscriber, dispose, ordering, no-replay) and the full solution suite stays green. https://claude.ai/code/session_01GSb4ZCyb4wFsk3wjcZgQSf
Move the History tab's state out of MainWindowViewModel into a dedicated HistoryPanelViewModel that owns the request-history list, its search filter, and the reload/load commands. Loading a history entry now publishes a HistoryRequestLoadRequested message on the bus instead of mutating the request editor directly, so the History panel no longer depends on the request panel; Main subscribes and applies the entry to the active editor. - ILeftPanelContext drops HistorySearchQuery/History/LoadHistoryRequestCommand in favour of a single HistoryPanel child VM; LeftPanelView rebinds the History tab through it. - App composes one application-wide MessageBus and injects it into Main, which passes it to the History panel. - Add a project-wide global-using alias so the Core bus names resolve unambiguously alongside ReactiveUI's unused IMessageBus/MessageBus. - DI slice deferred as premature; plan doc updated to reflect progress. Covered by new HistoryPanelViewModelTests and updated UI tests; full solution suite green (Core 242, Integration 9, Sqlite 32, E2E 602). https://claude.ai/code/session_01GSb4ZCyb4wFsk3wjcZgQSf
Move the Scheduled Jobs tab's state out of MainWindowViewModel into a dedicated ScheduledJobsPanelViewModel that owns the job list and the add/remove commands (wrapping ScheduledJobsWorkflow). Application-options values it needs (default interval, follow-redirects, auto-start) are supplied as delegates, and the add-job tab switch is preserved via an onJobAdded callback, so the panel does not depend on the options or tab-selector state that remains in Main. - ILeftPanelContext drops ScheduledJobs/AddScheduledJobCommand/ RemoveScheduledJobCommand in favour of a single ScheduledJobsPanel child VM; LeftPanelView and the LeftPanelViewModel proxy rebind through it. - Main drops the workflow field, the Add/Remove commands, and routes load/dispose through the panel VM. Re-sequenced the Collections slice (3) to after the request panel (5): its load/add/inherited-header flows are bound to the request tabs and editor, so a clean extraction is blocked until the request panel owns them. Plan doc updated. Covered by new ScheduledJobsPanelViewModelTests and updated UI/decoupling/ screenshot-generator tests; full solution suite green (Core 242, Integration 9, Sqlite 32, E2E 606). https://claude.ai/code/session_01GSb4ZCyb4wFsk3wjcZgQSf
Move the integrated response panel's display state (status, timing, body/raw/headers tabs, web-view preview) and the project/snapshot/restore/ clear logic out of MainWindowViewModel into a dedicated, independently tested ResponseStateViewModel. To keep this step low-risk, MainWindowViewModel retains thin delegating response properties and forwards the sub-VM's PropertyChanged as its own, so IRequestPanelContext/IResponseActionsContext, both response views, and their code-behind subscriptions are untouched. Rebinding views to App.Response and retiring the contract members is deferred to a later sub-step of the request-panel slice. Covered by new ResponseStateViewModelTests; response-state setters in the deadlock/shortcuts/execution UI tests now go through viewModel.Response. Full solution suite green (Core 242, Integration 9, Sqlite 32, E2E 611); response screenshots unchanged. https://claude.ai/code/session_01GSb4ZCyb4wFsk3wjcZgQSf
Owner
Author
|
@copilot fix review comment |
…pper Co-authored-by: niklaslundberg <1242006+niklaslundberg@users.noreply.github.com>
Contributor
Fixed in the latest commit. |
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.
Capture a new holistic target architecture for moving the remaining
Explorer/Request panel state out of MainWindowViewModel: feature VMs own
their state, the ILeftPanelContext/IRequestPanelContext facades are
retired, and cross-feature notifications flow over a UI-agnostic custom
Rx message bus in Core. Command flows stay direct (returning outcome
records) by default, with a mediator used selectively. Delivered
incrementally, one slice per PR.
Cross-link the new plan from the two existing architecture plans.
https://claude.ai/code/session_01GSb4ZCyb4wFsk3wjcZgQSf