Skip to content

Commit 6480e87

Browse files
bkudiessCopilot
andcommitted
Defer provider reconciliation closure
Co-authored-by: Copilot App <[email protected]>
1 parent 602183a commit 6480e87

2 files changed

Lines changed: 6 additions & 16 deletions

File tree

‎docs/ARCHITECTURE.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ These are the canonical homes. Do not reintroduce private copies elsewhere.
7373
| If you are editing… | Do not grow it. Extract toward… |
7474
| --- | --- |
7575
| `src/OpenClaw.Tray.WinUI/App.xaml.cs` | `IWindowManager`, `ITrayController`, `IActivationRouter`, `ISettingsChangeCoordinator`, `AppBootstrapper` |
76-
| `src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs` | `ChatSendQueue`, `ChatBridgeEventPump`, `ChatHistoryLoader`, `ChatSnapshotProjector`, `AttachmentMetadataStore`; thinking-level clear reconciliation is closed and stays in `ThinkingLevelClearReconciler` |
76+
| `src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs` | `ChatSendQueue`, `ChatBridgeEventPump`, `ChatHistoryLoader`, `ChatSnapshotProjector`, `AttachmentMetadataStore`, `ThinkingLevelClearReconciler` (production delegation planned in Layer 3) |
7777
| `src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs` | `ReactorChatTimeline` (production `ItemsView` / `ItemContainer`), `ChatBubbleRenderer`, `ToolCallCardRenderer`, `PermissionRequestCard`, `AttachmentBubbleRenderer` |
7878
| `src/OpenClaw.Tray.WinUI/Chat/OpenClawComposer.cs` | `ComposerViewModel`, `SlashCommandPalette`, `AttachmentPreviewStrip`, `VoiceComposerController` |
7979
| `src/OpenClaw.Tray.WinUI/Pages/ConnectionPage.xaml.cs` | `ConnectionPagePlan` (pure), `ConnectionPageViewModel`, gateway row models |
@@ -129,8 +129,8 @@ leading and trailing pipe. Columns, in order:
129129
| chat-send-queue | planned | src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs | send queue/admission/abort state | ChatSendQueue | - | queued send/abort/generation semantics preserved | none | review-only | extracted in Phase 4 |
130130
| gateway-pending-requests | authoritative | src/OpenClaw.Shared/OpenClawGatewayClient.cs | request-id -> method/completion tracking | PendingRequestRegistry | response payload interpretation remains in OpenClawGatewayClient | one atomic owner per request id; tombstoned duplicate and late responses are suppressed; genuinely ownerless responses preserve generic compatibility routing; disconnect closes registration and cancels active owners | PendingRequestRegistryTests.ConcurrentRegisterAndTake_LeavesNoActiveRequestsAndBoundsTombstones | behavioral | - |
131131
| gateway-client-pending-requests-closed | closed | src/OpenClaw.Shared/OpenClawGatewayClient.cs | independent method, wizard, chat-send, approval, or session-snapshot pending stores and locks | PendingRequestRegistry | request creation, typed response interpretation, and legacy ownerless response routing only | OpenClawGatewayClient has one PendingRequestRegistry and no private pending-request dictionaries or locks | PendingRequestRegistryArchitectureTests.OpenClawGatewayClient_DelegatesPendingBookkeepingToRegistry | source-shape | when gateway response interpretation moves to GatewayMessageRouter |
132-
| chat-thinking-level-clear-reconciliation | authoritative | src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs | per-thread thinking-level clear versions, connection generations, protected canonical intent, patch acknowledgement, correlated snapshot acceptance, bounded retry, supersession, interruption, and disposal state | ThinkingLevelClearReconciler | provider invokes patch and snapshot requests, stores canonical session snapshots, and owns errors, notifications, and thread UI state | stale and uncorrelated snapshots cannot clear protected intent; only current-generation correlated snapshots confirm or externally converge; retries remain bounded and can restart on later current-generation evidence | ThinkingLevelClearReconcilerTests.PreAckNull_IsProtectedUntilPostAckCorrelatedNull | behavioral | - |
133-
| chat-provider-thinking-level-clear-closed | closed | src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs | private thinking-level clear state dictionaries, operation records, retry counters, timers, and connection-generation transitions | ThinkingLevelClearReconciler | narrow calls that begin operations, apply effective thinking levels, and execute emitted refresh requests | OpenClawChatDataProvider never regains an independent reasoning-clear state machine | ThinkingLevelClearReconcilerArchitectureTests.Provider_DoesNotOwnThinkingLevelClearReconciliationState | source-shape | when OpenClawChatDataProvider is replaced by narrower chat coordinators |
132+
| chat-thinking-level-clear-reconciliation | authoritative | dependent Layer 3 design for OpenClawChatDataProvider | UI-free per-thread thinking-level clear state-machine seam for versions, connection generations, protected canonical intent, patch acknowledgement, correlated snapshot acceptance, bounded retry, supersession, interruption, and disposal | ThinkingLevelClearReconciler | no production provider delegation in Layer 2; callers remain responsible for gateway requests and canonical snapshot storage | stale and uncorrelated snapshots cannot clear protected intent; only current-generation correlated snapshots confirm or externally converge; retries remain bounded and can restart on later current-generation evidence | ThinkingLevelClearReconcilerTests.PreAckNull_IsProtectedUntilPostAckCorrelatedNull | behavioral | - |
133+
| chat-provider-thinking-level-clear-closure | planned | src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs | production delegation of thinking-level clear reconciliation and removal of provider-local state | ThinkingLevelClearReconciler | provider remains unchanged in Layer 2 | production provider delegates reconciliation state and transitions to ThinkingLevelClearReconciler | none | review-only | delivered in Layer 3 |
134134
| connect-envelope | planned | src/OpenClaw.Shared/OpenClawGatewayClient.cs + WindowsNodeClient.cs | connect message + auth precedence + signature version | ConnectEnvelopeBuilder | - | credential precedence never downgrades a device token; v3->v2 fallback preserved | none | review-only | extracted in Phase 4 |
135135
| ui-dispatcher | authoritative | src/OpenClaw.Tray.WinUI/App.xaml.cs | UI-thread marshaling abstraction for presentation code | IUiDispatcher | App and existing WinUI code may call DispatcherQueue directly until the view-model migration | presentation view models depend on IUiDispatcher not a concrete DispatcherQueue | UiDispatcherContractTests.PageViewModel_ReceivesRegisteredDispatcher | behavioral | - |
136136
| navigation-scope | authoritative | src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml.cs | page view-model activation/deactivation and disposal lifetime | NavigationScopeManager | HubWindow keeps frame navigation back-stack and rail selection | transient page view models are activated on navigation and deactivated then disposed on navigate-away | NavigationScopeManagerTests.NavigatingAway_DeactivatesAndDisposesPreviousViewModel | behavioral | - |

‎tests/OpenClaw.Tray.Tests/ThinkingLevelClearReconcilerArchitectureTests.cs‎

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,20 @@ namespace OpenClaw.Tray.Tests;
33
public sealed class ThinkingLevelClearReconcilerArchitectureTests
44
{
55
[Fact]
6-
public void Provider_DoesNotOwnThinkingLevelClearReconciliationState()
6+
public void Reconciler_DefinesUiFreeProviderFacingSeam()
77
{
88
var root = TestRepositoryPaths.GetRepositoryRoot();
9-
var provider = File.ReadAllText(Path.Combine(
10-
root,
11-
"src",
12-
"OpenClaw.Tray.WinUI",
13-
"Chat",
14-
"OpenClawChatDataProvider.cs"));
159
var reconciler = File.ReadAllText(Path.Combine(
1610
root,
1711
"src",
1812
"OpenClaw.Chat",
1913
"ThinkingLevelClearReconciler.cs"));
2014

21-
Assert.DoesNotContain("PendingThinkingLevelClear", provider);
22-
Assert.DoesNotContain("ThinkingLevelReconciliation", provider);
23-
Assert.DoesNotContain("_thinkingLevelClearVersions", provider);
24-
Assert.DoesNotContain("MaxThinkingLevelRefreshAttempts", provider);
25-
Assert.DoesNotContain("ScheduleThinkingLevelRetryAsync", provider);
26-
2715
Assert.Contains("public sealed class ThinkingLevelClearReconciler", reconciler);
2816
Assert.Contains("public SnapshotResolution ApplyCorrelatedSnapshot", reconciler);
2917
Assert.Contains("public async Task<RefreshRequest?> RetryAfterFailureAsync", reconciler);
3018
Assert.Contains("public IReadOnlyList<RefreshRequest> OnConnectionChanged", reconciler);
19+
Assert.DoesNotContain("Microsoft.UI.Xaml", reconciler);
20+
Assert.DoesNotContain("OpenClawGatewayClient", reconciler);
3121
}
3222
}

0 commit comments

Comments
 (0)