From df43ae9cd1eef5b67d40ea42b03717b5bdbcd818 Mon Sep 17 00:00:00 2001 From: DevMando Date: Tue, 3 Nov 2026 22:57:21 -0800 Subject: [PATCH] chore: organize Desktop controls services and window files --- CHANGELOG.md | 5 +- docs/ARCHITECTURE.md | 22 ++-- .../BrowserSmokeTests.csproj | 10 +- .../MandoCode.Desktop.Tests.csproj | 106 +++++++++--------- .../Assets/images/backgrounds/README.md | 2 +- .../{ => Chat}/ChatTabView.Approvals.cs | 0 .../{ => Chat}/ChatTabView.BrowserTabs.cs | 0 .../{ => Chat}/ChatTabView.BrowserTools.cs | 0 .../{ => Chat}/ChatTabView.ContextMeter.cs | 0 .../{ => Chat}/ChatTabView.Explorer.cs | 0 .../Controls/{ => Chat}/ChatTabView.Header.cs | 0 .../Controls/{ => Chat}/ChatTabView.Input.cs | 0 .../{ => Chat}/ChatTabView.Settings.cs | 0 .../{ => Chat}/ChatTabView.Snapshot.cs | 0 .../{ => Chat}/ChatTabView.Transcript.cs | 0 .../{ => Chat}/ChatTabView.ViewModels.cs | 0 .../Controls/{ => Chat}/ChatTabView.xaml | 0 .../Controls/{ => Chat}/ChatTabView.xaml.cs | 0 .../Controls/{ => Common}/DragHandleGrid.cs | 0 .../Controls/{ => Common}/ResizeGrip.cs | 0 .../Controls/{ => Common}/WrapPanel.cs | 0 .../Controls/{ => Notes}/NoteAskBar.xaml | 0 .../Controls/{ => Notes}/NoteAskBar.xaml.cs | 0 .../{ => Notes}/NoteEditorPane.Actions.cs | 0 .../{ => Notes}/NoteEditorPane.Sync.cs | 0 .../Controls/{ => Notes}/NoteEditorPane.xaml | 0 .../{ => Notes}/NoteEditorPane.xaml.cs | 0 src/MandoCode.Desktop/Controls/README.md | 13 +++ .../Controls/{ => Settings}/SettingsForm.xaml | 0 .../{ => Settings}/SettingsForm.xaml.cs | 0 .../{ => Terminal}/TerminalPanel.xaml | 0 .../{ => Terminal}/TerminalPanel.xaml.cs | 0 .../Agents}/MainWindow.Split.cs | 0 .../Agents}/MainWindow.Tabs.cs | 0 .../Agents}/MainWindow.Workspaces.cs | 0 .../{ => MainWindow}/MainWindow.xaml | 0 .../{ => MainWindow}/MainWindow.xaml.cs | 0 .../Navigation}/MainWindow.Navigation.cs | 0 .../Panels}/MainWindow.History.cs | 0 .../Panels}/MainWindow.Notes.cs | 0 .../Panels}/MainWindow.Snapshots.cs | 0 .../Panels}/MainWindow.Terminal.cs | 0 src/MandoCode.Desktop/MainWindow/README.md | 16 +++ .../Settings}/MainWindow.Appearance.cs | 0 .../Settings}/MainWindow.Mcp.cs | 0 .../Settings}/MainWindow.Music.cs | 0 .../Settings}/MainWindow.Settings.cs | 0 .../Settings}/MainWindow.Skills.cs | 0 .../Settings}/MainWindow.Tags.cs | 0 .../Shared}/MainWindow.Shared.cs | 0 .../Shared}/MainWindow.ViewModels.cs | 0 .../Services/{ => Agents}/AgentCallsigns.cs | 0 .../Services/{ => Agents}/AgentDirectory.cs | 0 .../AgentDirectoryTools.Interactions.cs | 0 .../{ => Agents}/AgentDirectoryTools.cs | 0 .../Services/{ => Agents}/AgentInbox.cs | 0 .../{ => Agents}/AgentInteractionRunner.cs | 0 .../Services/{ => Agents}/AgentNaming.cs | 0 .../Services/{ => Agents}/AgentPeer.cs | 0 .../Services/{ => Agents}/Delegations.cs | 0 .../{ => Agents}/PeerMessageEnvelope.cs | 0 .../Services/{ => Agents}/PeerTurnPolicy.cs | 0 .../Services/{ => Agents}/SessionAgentPeer.cs | 0 .../Services/{ => Ai}/AiServiceAdapter.cs | 0 .../Services/{ => Ai}/IAiService.cs | 0 .../Services/{ => Ai}/ModelOrdering.cs | 0 .../{ => Appearance}/BuiltInBackgrounds.cs | 0 .../Services/{ => Appearance}/ColorMath.cs | 0 .../{ => Appearance}/ContextMeterColors.cs | 0 .../PinnedOpacityConverter.cs | 0 .../Services/{ => Appearance}/ThemeManager.cs | 0 .../Services/{ => Appearance}/UiTheme.cs | 0 .../Services/{ => Approval}/ApprovalModels.cs | 0 .../{ => Approval}/WinUiApprovalService.cs | 0 .../Services/{ => Browser}/AgentImageSink.cs | 0 .../Services/{ => Browser}/BrowserFrames.cs | 0 .../{ => Browser}/BrowserRequestContext.cs | 0 .../{ => Browser}/DesktopPreviewKeys.cs | 0 .../{ => Browser}/DesktopPreviewScripts.cs | 0 .../{ => Browser}/DesktopPreviewTools.cs | 0 .../{ => Configuration}/AgentConfigStore.cs | 0 .../{ => Configuration}/ConfigCloning.cs | 0 .../{ => Configuration}/ConfigCoordinator.cs | 0 .../{ => Configuration}/ItemTagStore.cs | 0 .../{ => Configuration}/MandoCliDetector.cs | 0 .../{ => Configuration}/McpCoordinator.cs | 0 .../{ => Configuration}/SettingsScope.cs | 0 .../{ => Configuration}/SkillAuthor.cs | 0 .../{ => Configuration}/SkillCoordinator.cs | 0 .../Services/{ => Diagnostics}/CrashLog.cs | 0 .../{ => Diagnostics}/UiUpdateCheckService.cs | 0 .../Services/{ => Input}/CommandSuggestion.cs | 0 .../Services/{ => Input}/PromptFileLookup.cs | 0 .../{ => Input}/PromptMentionPicker.cs | 0 .../Services/{ => Music}/MusicPlaylists.cs | 0 .../Services/{ => Notes}/NoteAssistant.cs | 0 .../Services/{ => Notes}/NoteEntry.cs | 0 .../Services/{ => Notes}/NoteStore.cs | 0 .../Services/{ => Notes}/NoteText.cs | 0 .../Services/{ => Project}/GitQuickStatus.cs | 0 .../Services/{ => Project}/ProjectDisplay.cs | 0 .../Services/{ => Project}/ShellOpen.cs | 0 .../{ => Project}/WorkspaceDeltaTracker.cs | 0 src/MandoCode.Desktop/Services/README.md | 24 ++++ .../{ => Rendering}/BusyStateService.cs | 0 .../{ => Rendering}/ITranscriptHtml.cs | 0 .../{ => Rendering}/ModelNoticeReplay.cs | 0 .../Services/{ => Rendering}/PlanCardHtml.cs | 0 .../{ => Rendering}/StableCollection.cs | 0 .../{ => Rendering}/TranscriptHtmlBuilder.cs | 0 .../{ => Rendering}/TranscriptWriter.cs | 0 .../Services/{ => Sessions}/AgentSession.cs | 0 .../Services/{ => Sessions}/CardPreview.cs | 0 .../{ => Sessions}/ConversationLog.cs | 0 .../{ => Sessions}/ConversationSearch.cs | 0 .../{ => Sessions}/ConversationTextCache.cs | 0 .../{ => Sessions}/HistorySummarizer.cs | 0 .../{ => Sessions}/SessionArchiveStore.cs | 0 .../{ => Sessions}/SessionHistoryStore.cs | 0 .../Services/{ => Sessions}/SessionManager.cs | 0 .../{ => Sessions}/TranscriptJournal.cs | 0 .../{ => Snapshots}/ContextSnapshot.cs | 0 .../{ => Snapshots}/SnapshotEnhancer.cs | 0 .../{ => Snapshots}/SnapshotNaming.cs | 0 .../Services/{ => Snapshots}/SnapshotStore.cs | 0 .../{ => Terminal}/AgentCommandFormat.cs | 0 .../{ => Terminal}/AgentCommandLog.cs | 0 .../Services/{ => Terminal}/PseudoConsole.cs | 0 .../Services/{ => Terminal}/ShellRunner.cs | 0 .../{ => Terminal}/TerminalSession.cs | 0 .../Services/{ => Workspaces}/PaneLayout.cs | 0 .../Services/{ => Workspaces}/PanelState.cs | 0 .../{ => Workspaces}/WorkspaceState.cs | 0 133 files changed, 130 insertions(+), 68 deletions(-) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.Approvals.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.BrowserTabs.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.BrowserTools.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.ContextMeter.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.Explorer.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.Header.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.Input.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.Settings.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.Snapshot.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.Transcript.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.ViewModels.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.xaml (100%) rename src/MandoCode.Desktop/Controls/{ => Chat}/ChatTabView.xaml.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Common}/DragHandleGrid.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Common}/ResizeGrip.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Common}/WrapPanel.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Notes}/NoteAskBar.xaml (100%) rename src/MandoCode.Desktop/Controls/{ => Notes}/NoteAskBar.xaml.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Notes}/NoteEditorPane.Actions.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Notes}/NoteEditorPane.Sync.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Notes}/NoteEditorPane.xaml (100%) rename src/MandoCode.Desktop/Controls/{ => Notes}/NoteEditorPane.xaml.cs (100%) create mode 100644 src/MandoCode.Desktop/Controls/README.md rename src/MandoCode.Desktop/Controls/{ => Settings}/SettingsForm.xaml (100%) rename src/MandoCode.Desktop/Controls/{ => Settings}/SettingsForm.xaml.cs (100%) rename src/MandoCode.Desktop/Controls/{ => Terminal}/TerminalPanel.xaml (100%) rename src/MandoCode.Desktop/Controls/{ => Terminal}/TerminalPanel.xaml.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Agents}/MainWindow.Split.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Agents}/MainWindow.Tabs.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Agents}/MainWindow.Workspaces.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow}/MainWindow.xaml (100%) rename src/MandoCode.Desktop/{ => MainWindow}/MainWindow.xaml.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Navigation}/MainWindow.Navigation.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Panels}/MainWindow.History.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Panels}/MainWindow.Notes.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Panels}/MainWindow.Snapshots.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Panels}/MainWindow.Terminal.cs (100%) create mode 100644 src/MandoCode.Desktop/MainWindow/README.md rename src/MandoCode.Desktop/{ => MainWindow/Settings}/MainWindow.Appearance.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Settings}/MainWindow.Mcp.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Settings}/MainWindow.Music.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Settings}/MainWindow.Settings.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Settings}/MainWindow.Skills.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Settings}/MainWindow.Tags.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Shared}/MainWindow.Shared.cs (100%) rename src/MandoCode.Desktop/{ => MainWindow/Shared}/MainWindow.ViewModels.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/AgentCallsigns.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/AgentDirectory.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/AgentDirectoryTools.Interactions.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/AgentDirectoryTools.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/AgentInbox.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/AgentInteractionRunner.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/AgentNaming.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/AgentPeer.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/Delegations.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/PeerMessageEnvelope.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/PeerTurnPolicy.cs (100%) rename src/MandoCode.Desktop/Services/{ => Agents}/SessionAgentPeer.cs (100%) rename src/MandoCode.Desktop/Services/{ => Ai}/AiServiceAdapter.cs (100%) rename src/MandoCode.Desktop/Services/{ => Ai}/IAiService.cs (100%) rename src/MandoCode.Desktop/Services/{ => Ai}/ModelOrdering.cs (100%) rename src/MandoCode.Desktop/Services/{ => Appearance}/BuiltInBackgrounds.cs (100%) rename src/MandoCode.Desktop/Services/{ => Appearance}/ColorMath.cs (100%) rename src/MandoCode.Desktop/Services/{ => Appearance}/ContextMeterColors.cs (100%) rename src/MandoCode.Desktop/Services/{ => Appearance}/PinnedOpacityConverter.cs (100%) rename src/MandoCode.Desktop/Services/{ => Appearance}/ThemeManager.cs (100%) rename src/MandoCode.Desktop/Services/{ => Appearance}/UiTheme.cs (100%) rename src/MandoCode.Desktop/Services/{ => Approval}/ApprovalModels.cs (100%) rename src/MandoCode.Desktop/Services/{ => Approval}/WinUiApprovalService.cs (100%) rename src/MandoCode.Desktop/Services/{ => Browser}/AgentImageSink.cs (100%) rename src/MandoCode.Desktop/Services/{ => Browser}/BrowserFrames.cs (100%) rename src/MandoCode.Desktop/Services/{ => Browser}/BrowserRequestContext.cs (100%) rename src/MandoCode.Desktop/Services/{ => Browser}/DesktopPreviewKeys.cs (100%) rename src/MandoCode.Desktop/Services/{ => Browser}/DesktopPreviewScripts.cs (100%) rename src/MandoCode.Desktop/Services/{ => Browser}/DesktopPreviewTools.cs (100%) rename src/MandoCode.Desktop/Services/{ => Configuration}/AgentConfigStore.cs (100%) rename src/MandoCode.Desktop/Services/{ => Configuration}/ConfigCloning.cs (100%) rename src/MandoCode.Desktop/Services/{ => Configuration}/ConfigCoordinator.cs (100%) rename src/MandoCode.Desktop/Services/{ => Configuration}/ItemTagStore.cs (100%) rename src/MandoCode.Desktop/Services/{ => Configuration}/MandoCliDetector.cs (100%) rename src/MandoCode.Desktop/Services/{ => Configuration}/McpCoordinator.cs (100%) rename src/MandoCode.Desktop/Services/{ => Configuration}/SettingsScope.cs (100%) rename src/MandoCode.Desktop/Services/{ => Configuration}/SkillAuthor.cs (100%) rename src/MandoCode.Desktop/Services/{ => Configuration}/SkillCoordinator.cs (100%) rename src/MandoCode.Desktop/Services/{ => Diagnostics}/CrashLog.cs (100%) rename src/MandoCode.Desktop/Services/{ => Diagnostics}/UiUpdateCheckService.cs (100%) rename src/MandoCode.Desktop/Services/{ => Input}/CommandSuggestion.cs (100%) rename src/MandoCode.Desktop/Services/{ => Input}/PromptFileLookup.cs (100%) rename src/MandoCode.Desktop/Services/{ => Input}/PromptMentionPicker.cs (100%) rename src/MandoCode.Desktop/Services/{ => Music}/MusicPlaylists.cs (100%) rename src/MandoCode.Desktop/Services/{ => Notes}/NoteAssistant.cs (100%) rename src/MandoCode.Desktop/Services/{ => Notes}/NoteEntry.cs (100%) rename src/MandoCode.Desktop/Services/{ => Notes}/NoteStore.cs (100%) rename src/MandoCode.Desktop/Services/{ => Notes}/NoteText.cs (100%) rename src/MandoCode.Desktop/Services/{ => Project}/GitQuickStatus.cs (100%) rename src/MandoCode.Desktop/Services/{ => Project}/ProjectDisplay.cs (100%) rename src/MandoCode.Desktop/Services/{ => Project}/ShellOpen.cs (100%) rename src/MandoCode.Desktop/Services/{ => Project}/WorkspaceDeltaTracker.cs (100%) create mode 100644 src/MandoCode.Desktop/Services/README.md rename src/MandoCode.Desktop/Services/{ => Rendering}/BusyStateService.cs (100%) rename src/MandoCode.Desktop/Services/{ => Rendering}/ITranscriptHtml.cs (100%) rename src/MandoCode.Desktop/Services/{ => Rendering}/ModelNoticeReplay.cs (100%) rename src/MandoCode.Desktop/Services/{ => Rendering}/PlanCardHtml.cs (100%) rename src/MandoCode.Desktop/Services/{ => Rendering}/StableCollection.cs (100%) rename src/MandoCode.Desktop/Services/{ => Rendering}/TranscriptHtmlBuilder.cs (100%) rename src/MandoCode.Desktop/Services/{ => Rendering}/TranscriptWriter.cs (100%) rename src/MandoCode.Desktop/Services/{ => Sessions}/AgentSession.cs (100%) rename src/MandoCode.Desktop/Services/{ => Sessions}/CardPreview.cs (100%) rename src/MandoCode.Desktop/Services/{ => Sessions}/ConversationLog.cs (100%) rename src/MandoCode.Desktop/Services/{ => Sessions}/ConversationSearch.cs (100%) rename src/MandoCode.Desktop/Services/{ => Sessions}/ConversationTextCache.cs (100%) rename src/MandoCode.Desktop/Services/{ => Sessions}/HistorySummarizer.cs (100%) rename src/MandoCode.Desktop/Services/{ => Sessions}/SessionArchiveStore.cs (100%) rename src/MandoCode.Desktop/Services/{ => Sessions}/SessionHistoryStore.cs (100%) rename src/MandoCode.Desktop/Services/{ => Sessions}/SessionManager.cs (100%) rename src/MandoCode.Desktop/Services/{ => Sessions}/TranscriptJournal.cs (100%) rename src/MandoCode.Desktop/Services/{ => Snapshots}/ContextSnapshot.cs (100%) rename src/MandoCode.Desktop/Services/{ => Snapshots}/SnapshotEnhancer.cs (100%) rename src/MandoCode.Desktop/Services/{ => Snapshots}/SnapshotNaming.cs (100%) rename src/MandoCode.Desktop/Services/{ => Snapshots}/SnapshotStore.cs (100%) rename src/MandoCode.Desktop/Services/{ => Terminal}/AgentCommandFormat.cs (100%) rename src/MandoCode.Desktop/Services/{ => Terminal}/AgentCommandLog.cs (100%) rename src/MandoCode.Desktop/Services/{ => Terminal}/PseudoConsole.cs (100%) rename src/MandoCode.Desktop/Services/{ => Terminal}/ShellRunner.cs (100%) rename src/MandoCode.Desktop/Services/{ => Terminal}/TerminalSession.cs (100%) rename src/MandoCode.Desktop/Services/{ => Workspaces}/PaneLayout.cs (100%) rename src/MandoCode.Desktop/Services/{ => Workspaces}/PanelState.cs (100%) rename src/MandoCode.Desktop/Services/{ => Workspaces}/WorkspaceState.cs (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88533d4..8a28157 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ submodule. - **More ways for agents to collaborate.** Agents can ask for an immediate answer or a background reply, send information, request a read-only review, hand off work, and update or cancel individual jobs. Messages and results appear in expandable transcript entries that identify the agents involved. Background jobs use readable IDs such as `job1`, support bounded waits, and cancel when an associated agent closes. The existing `ask_agent` tool remains available alongside `ask_agent_and_wait`. ### Changed +- **Organize Desktop source by feature.** Group Controls and Services into feature folders and MainWindow partial files by responsibility. Keep XAML and code-behind together, update test-project source links, and add folder guides. Existing namespaces, control identities, and application behavior remain unchanged. - **Two levels of tabs with matching scroll spacing.** Workspace tabs sit above agent tabs. Split and New agent stay beside the agents they control in the selected workspace. Both rows reserve space beneath their tabs for horizontal scrollbars, and agent mentions show the workspace name alongside the project folder. - **Separate Files and Agents mentions.** Typing `@` opens Files first; press Tab to switch to Agents and back. Gold headers explain the switch. Agent rows show name and project folder, files retain explicit paths when names collide, and quoted paths/names support spaces. - **Responsive file tagging on large projects.** Reuse the CLI's asynchronous file index, early root listing, shared scan/cache, query debounce, and filesystem watcher. Closing the picker keeps indexing in progress. Build result rows off the UI thread, replace the list in one batch, preserve selection across updates, ignore stale lookups, and show loading/indexing feedback. End drill-down when a selected folder is empty, and dispose file watchers when the tab closes. @@ -634,7 +635,7 @@ are visible until you actually open a second tab. typing never waits on file IO and 60 logs aren't re-read per keystroke. Each scan carries a generation stamp so a slower earlier scan can't overwrite a later keystroke's results, and queries under two characters don't trigger one at all. Matching and snippet extraction live in - `Services/ConversationSearch.cs`, kept pure and unit tested (+24 tests). + `Services/Sessions/ConversationSearch.cs`, kept pure and unit tested (+24 tests). - **Snapshots panel — grouping, search, and a cleaner import.** Snapshot cards now group by the project they were taken in (freshest project first), a search box filters by title/recap/model/ project, and Import closes the panel and focuses the chat so the "context armed" confirmation is @@ -667,7 +668,7 @@ are visible until you actually open a second tab. of them. Panes are ordinary agent views moved between grid cells via `Grid.SetColumn`/`Grid.SetRow` — never re-parented — so every WebView and its live transcript survives the switch; the row and column tracks are rebuilt in code per pane count, and track definitions plus dividers are the only - things that change. Geometry and divider math live in `Services/PaneLayout.cs`, free of WinUI types + things that change. Geometry and divider math live in `Services/Workspaces/PaneLayout.cs`, free of WinUI types and unit tested. The split bar uses chips with `MenuFlyout` pickers rather than `ComboBox`es, which sidesteps the `COMException 0x80070490` that rebuilding ComboBox item containers triggers. Named *split view* rather than *compare* because comparing two models on one prompt is only one of diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index d259e43..4bc7bc8 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -31,19 +31,27 @@ compile independently of the CLI's originals): | Desktop port | CLI original | |---|---| | `ViewModels/ChatController.cs` | `Components/App.razor` interactive loop | -| `Services/WinUiApprovalService.cs` | `Services/Approval/DiffApprovalHandler.cs` | -| `Services/TranscriptHtmlBuilder.cs` | `MarkdownHtmlRenderer` / `OperationDisplayRenderer` | +| `Services/Approval/WinUiApprovalService.cs` | `Services/Approval/DiffApprovalHandler.cs` | +| `Services/Rendering/TranscriptHtmlBuilder.cs` | `MarkdownHtmlRenderer` / `OperationDisplayRenderer` | The harness is safe to instantiate once per agent — its statics are pure functions and readonly `Regex`, and `AIService` takes every collaborator by constructor. Rolling the pin forward, watch for that changing. +## Source organization + +The window XAML and its code-behind live under `MainWindow/`. Partial files are grouped into Agents, Navigation, Panels, Settings, and Shared; see the [window guide](../src/MandoCode.Desktop/MainWindow/README.md). They retain the same namespaces and still form the same window. + +Desktop controls are grouped by feature under `Controls/`; keep each control's XAML, code-behind, and partial files together. See the [control guide](../src/MandoCode.Desktop/Controls/README.md). + +Services follow the same feature-folder convention; see the [service guide](../src/MandoCode.Desktop/Services/README.md). Source folders do not change the existing namespaces or XAML class names. The unit-test and browser smoke-test projects link selected service source files directly, so file moves must update those compile paths. + ## Layer map | Layer | CLI (MandoCode) | Desktop (this app) | |---|---|---| | Orchestrator | `Components/App.razor` interactive loop | `ViewModels/ChatController.cs` (faithful port), one per agent | -| Approvals | `DiffApprovalHandler` (Spectre panels) | `Services/WinUiApprovalService.cs` + each agent's own XAML overlay (same labels, bypass state, `DiffApprovalResult` contract) | +| Approvals | `DiffApprovalHandler` (Spectre panels) | `Services/Approval/WinUiApprovalService.cs` + each agent's own XAML overlay (same labels, bypass state, `DiffApprovalResult` contract) | | Transcript | ANSI scrollback + Spectre renderables | WebView2 + `TranscriptHtmlBuilder` (Markdig HTML, themed) | | Busy/spinner | `SpinnerService` (ANSI) | `BusyStateService` → ProgressRing | | Onboarding | `OnboardingFlow` terminal prompts | In-chat guided wizard (auto on first launch, `/setup` after) + Settings page | @@ -56,7 +64,7 @@ progress events, `DiffService` diff models. ## Agents -Each tab is an independent agent. `Services/AgentSession.cs` hand-constructs one agent's object +Each tab is an independent agent. `Services/Sessions/AgentSession.cs` hand-constructs one agent's object graph; `SessionManager` owns the set of them. The split matters: | Per agent | App-wide | @@ -102,7 +110,7 @@ Panes are ordinary agent views moved between grid cells with `Grid.SetColumn`/`G whole reason the tab surface is built the way it is (see below). The row and column tracks are rebuilt in code per pane count, interleaving a divider track between adjacent panes; track definitions and dividers are the only things that change, so no agent view ever leaves the tree. -The geometry and divider math live in `Services/PaneLayout.cs`, kept free of WinUI types so they're +The geometry and divider math live in `Services/Workspaces/PaneLayout.cs`, kept free of WinUI types so they're unit tested directly. The split bar uses chips with `MenuFlyout` pickers rather than `ComboBox`es on purpose: rebuilding @@ -205,7 +213,7 @@ about the pad: every note's title and first line, plus the full text of whatever currently matching, and the bar states what it was given (`12 notes listed · 3 read in full`) because a capped read that looks total is the one thing an "ask about all my notes" box must not do. -`Services/NoteAssistant.cs` builds a bare Ollama kernel with **no plugins, filters, or tools** — the +`Services/Notes/NoteAssistant.cs` builds a bare Ollama kernel with **no plugins, filters, or tools** — the same shape as `SnapshotEnhancer`. That's the design, not an optimization: with no file tools, "nothing writes your note but you" is true by construction rather than by policy, and no approval machinery is needed because the only route from a reply into a note is a button you pressed. It also isn't an @@ -218,7 +226,7 @@ The editor is not the only thing that writes these files, and doesn't assume it `FileSystemWatcher` compares the file against what the editor last wrote: identical means the write was ours; changed-while-clean is adopted silently; changed-while-you-were-typing raises a conflict you resolve — *use the version on disk* or *keep what I typed*. A note deleted from under unsaved edits -offers to save it back. `Services/NoteText.cs` handles the newline round trip, because a WinUI +offers to save it back. `Services/Notes/NoteText.cs` handles the newline round trip, because a WinUI `TextBox` normalizes every newline to a bare CR — write that straight back out and a Notepad-authored CRLF note becomes one endless line. Both of those are why `NoteStore`, `NoteEntry`, and `NoteText` are WinUI-free with an injectable pad root: the tests drive them against real temp folders. diff --git a/src/MandoCode.Desktop.BrowserSmokeTests/BrowserSmokeTests.csproj b/src/MandoCode.Desktop.BrowserSmokeTests/BrowserSmokeTests.csproj index d00ca4b..c4f52ec 100644 --- a/src/MandoCode.Desktop.BrowserSmokeTests/BrowserSmokeTests.csproj +++ b/src/MandoCode.Desktop.BrowserSmokeTests/BrowserSmokeTests.csproj @@ -9,11 +9,11 @@ - - - - - + + + + + diff --git a/src/MandoCode.Desktop.Tests/MandoCode.Desktop.Tests.csproj b/src/MandoCode.Desktop.Tests/MandoCode.Desktop.Tests.csproj index 5ad680e..e379531 100644 --- a/src/MandoCode.Desktop.Tests/MandoCode.Desktop.Tests.csproj +++ b/src/MandoCode.Desktop.Tests/MandoCode.Desktop.Tests.csproj @@ -31,79 +31,79 @@ Windows App SDK into the test host). If these files ever grow UI dependencies, that's a design regression this project exists to catch. --> - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + + - - + + - + - - + + - - - - - + + + + + @@ -112,11 +112,11 @@ - - - - - + + + + + diff --git a/src/MandoCode.Desktop/Assets/images/backgrounds/README.md b/src/MandoCode.Desktop/Assets/images/backgrounds/README.md index 166ffd6..337c9d3 100644 --- a/src/MandoCode.Desktop/Assets/images/backgrounds/README.md +++ b/src/MandoCode.Desktop/Assets/images/backgrounds/README.md @@ -4,7 +4,7 @@ Images in this folder ship with the release and appear as tiles in **Settings background**, above "Choose image…". Users can still pick any file of their own; these are just the ones that come in the box. -Nothing here is registered in code. `Services/BuiltInBackgrounds.cs` reads the folder at startup, so +Nothing here is registered in code. `Services/Appearance/BuiltInBackgrounds.cs` reads the folder at startup, so **adding an image is a file drop** — copy it in, and it's in the gallery on the next run. Removing one is a delete; anyone already using it keeps their copy (see "How selection works" below). diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.Approvals.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.Approvals.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.Approvals.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.Approvals.cs diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.BrowserTabs.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.BrowserTabs.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.BrowserTabs.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.BrowserTabs.cs diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.BrowserTools.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.BrowserTools.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.BrowserTools.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.BrowserTools.cs diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.ContextMeter.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.ContextMeter.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.ContextMeter.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.ContextMeter.cs diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.Explorer.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.Explorer.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.Explorer.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.Explorer.cs diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.Header.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.Header.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.Header.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.Header.cs diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.Input.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.Input.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.Input.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.Input.cs diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.Settings.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.Settings.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.Settings.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.Settings.cs diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.Snapshot.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.Snapshot.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.Snapshot.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.Snapshot.cs diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.Transcript.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.Transcript.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.Transcript.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.Transcript.cs diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.ViewModels.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.ViewModels.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.ViewModels.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.ViewModels.cs diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.xaml b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.xaml similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.xaml rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.xaml diff --git a/src/MandoCode.Desktop/Controls/ChatTabView.xaml.cs b/src/MandoCode.Desktop/Controls/Chat/ChatTabView.xaml.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ChatTabView.xaml.cs rename to src/MandoCode.Desktop/Controls/Chat/ChatTabView.xaml.cs diff --git a/src/MandoCode.Desktop/Controls/DragHandleGrid.cs b/src/MandoCode.Desktop/Controls/Common/DragHandleGrid.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/DragHandleGrid.cs rename to src/MandoCode.Desktop/Controls/Common/DragHandleGrid.cs diff --git a/src/MandoCode.Desktop/Controls/ResizeGrip.cs b/src/MandoCode.Desktop/Controls/Common/ResizeGrip.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/ResizeGrip.cs rename to src/MandoCode.Desktop/Controls/Common/ResizeGrip.cs diff --git a/src/MandoCode.Desktop/Controls/WrapPanel.cs b/src/MandoCode.Desktop/Controls/Common/WrapPanel.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/WrapPanel.cs rename to src/MandoCode.Desktop/Controls/Common/WrapPanel.cs diff --git a/src/MandoCode.Desktop/Controls/NoteAskBar.xaml b/src/MandoCode.Desktop/Controls/Notes/NoteAskBar.xaml similarity index 100% rename from src/MandoCode.Desktop/Controls/NoteAskBar.xaml rename to src/MandoCode.Desktop/Controls/Notes/NoteAskBar.xaml diff --git a/src/MandoCode.Desktop/Controls/NoteAskBar.xaml.cs b/src/MandoCode.Desktop/Controls/Notes/NoteAskBar.xaml.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/NoteAskBar.xaml.cs rename to src/MandoCode.Desktop/Controls/Notes/NoteAskBar.xaml.cs diff --git a/src/MandoCode.Desktop/Controls/NoteEditorPane.Actions.cs b/src/MandoCode.Desktop/Controls/Notes/NoteEditorPane.Actions.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/NoteEditorPane.Actions.cs rename to src/MandoCode.Desktop/Controls/Notes/NoteEditorPane.Actions.cs diff --git a/src/MandoCode.Desktop/Controls/NoteEditorPane.Sync.cs b/src/MandoCode.Desktop/Controls/Notes/NoteEditorPane.Sync.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/NoteEditorPane.Sync.cs rename to src/MandoCode.Desktop/Controls/Notes/NoteEditorPane.Sync.cs diff --git a/src/MandoCode.Desktop/Controls/NoteEditorPane.xaml b/src/MandoCode.Desktop/Controls/Notes/NoteEditorPane.xaml similarity index 100% rename from src/MandoCode.Desktop/Controls/NoteEditorPane.xaml rename to src/MandoCode.Desktop/Controls/Notes/NoteEditorPane.xaml diff --git a/src/MandoCode.Desktop/Controls/NoteEditorPane.xaml.cs b/src/MandoCode.Desktop/Controls/Notes/NoteEditorPane.xaml.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/NoteEditorPane.xaml.cs rename to src/MandoCode.Desktop/Controls/Notes/NoteEditorPane.xaml.cs diff --git a/src/MandoCode.Desktop/Controls/README.md b/src/MandoCode.Desktop/Controls/README.md new file mode 100644 index 0000000..2c9bdbf --- /dev/null +++ b/src/MandoCode.Desktop/Controls/README.md @@ -0,0 +1,13 @@ +# Desktop controls + +| Folder | Responsibility | +| --- | --- | +| Chat | ChatTabView XAML, code-behind, and all partial files | +| Notes | Note editor and AI ask bar | +| Settings | Shared settings form | +| Terminal | Integrated terminal panel | +| Common | Shared layout panels and resize/drag controls | + +Keep a control's XAML, code-behind, and partial files together. +Namespaces and XAML class names are independent of these source folders and stay +unchanged so existing consumers keep resolving the same control types. diff --git a/src/MandoCode.Desktop/Controls/SettingsForm.xaml b/src/MandoCode.Desktop/Controls/Settings/SettingsForm.xaml similarity index 100% rename from src/MandoCode.Desktop/Controls/SettingsForm.xaml rename to src/MandoCode.Desktop/Controls/Settings/SettingsForm.xaml diff --git a/src/MandoCode.Desktop/Controls/SettingsForm.xaml.cs b/src/MandoCode.Desktop/Controls/Settings/SettingsForm.xaml.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/SettingsForm.xaml.cs rename to src/MandoCode.Desktop/Controls/Settings/SettingsForm.xaml.cs diff --git a/src/MandoCode.Desktop/Controls/TerminalPanel.xaml b/src/MandoCode.Desktop/Controls/Terminal/TerminalPanel.xaml similarity index 100% rename from src/MandoCode.Desktop/Controls/TerminalPanel.xaml rename to src/MandoCode.Desktop/Controls/Terminal/TerminalPanel.xaml diff --git a/src/MandoCode.Desktop/Controls/TerminalPanel.xaml.cs b/src/MandoCode.Desktop/Controls/Terminal/TerminalPanel.xaml.cs similarity index 100% rename from src/MandoCode.Desktop/Controls/TerminalPanel.xaml.cs rename to src/MandoCode.Desktop/Controls/Terminal/TerminalPanel.xaml.cs diff --git a/src/MandoCode.Desktop/MainWindow.Split.cs b/src/MandoCode.Desktop/MainWindow/Agents/MainWindow.Split.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Split.cs rename to src/MandoCode.Desktop/MainWindow/Agents/MainWindow.Split.cs diff --git a/src/MandoCode.Desktop/MainWindow.Tabs.cs b/src/MandoCode.Desktop/MainWindow/Agents/MainWindow.Tabs.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Tabs.cs rename to src/MandoCode.Desktop/MainWindow/Agents/MainWindow.Tabs.cs diff --git a/src/MandoCode.Desktop/MainWindow.Workspaces.cs b/src/MandoCode.Desktop/MainWindow/Agents/MainWindow.Workspaces.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Workspaces.cs rename to src/MandoCode.Desktop/MainWindow/Agents/MainWindow.Workspaces.cs diff --git a/src/MandoCode.Desktop/MainWindow.xaml b/src/MandoCode.Desktop/MainWindow/MainWindow.xaml similarity index 100% rename from src/MandoCode.Desktop/MainWindow.xaml rename to src/MandoCode.Desktop/MainWindow/MainWindow.xaml diff --git a/src/MandoCode.Desktop/MainWindow.xaml.cs b/src/MandoCode.Desktop/MainWindow/MainWindow.xaml.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.xaml.cs rename to src/MandoCode.Desktop/MainWindow/MainWindow.xaml.cs diff --git a/src/MandoCode.Desktop/MainWindow.Navigation.cs b/src/MandoCode.Desktop/MainWindow/Navigation/MainWindow.Navigation.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Navigation.cs rename to src/MandoCode.Desktop/MainWindow/Navigation/MainWindow.Navigation.cs diff --git a/src/MandoCode.Desktop/MainWindow.History.cs b/src/MandoCode.Desktop/MainWindow/Panels/MainWindow.History.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.History.cs rename to src/MandoCode.Desktop/MainWindow/Panels/MainWindow.History.cs diff --git a/src/MandoCode.Desktop/MainWindow.Notes.cs b/src/MandoCode.Desktop/MainWindow/Panels/MainWindow.Notes.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Notes.cs rename to src/MandoCode.Desktop/MainWindow/Panels/MainWindow.Notes.cs diff --git a/src/MandoCode.Desktop/MainWindow.Snapshots.cs b/src/MandoCode.Desktop/MainWindow/Panels/MainWindow.Snapshots.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Snapshots.cs rename to src/MandoCode.Desktop/MainWindow/Panels/MainWindow.Snapshots.cs diff --git a/src/MandoCode.Desktop/MainWindow.Terminal.cs b/src/MandoCode.Desktop/MainWindow/Panels/MainWindow.Terminal.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Terminal.cs rename to src/MandoCode.Desktop/MainWindow/Panels/MainWindow.Terminal.cs diff --git a/src/MandoCode.Desktop/MainWindow/README.md b/src/MandoCode.Desktop/MainWindow/README.md new file mode 100644 index 0000000..83bd96d --- /dev/null +++ b/src/MandoCode.Desktop/MainWindow/README.md @@ -0,0 +1,16 @@ +# MainWindow + +The XAML and startup/shutdown code-behind stay together at this folder's root. +Partial files are grouped by responsibility: + +| Folder | Responsibility | +| --- | --- | +| Agents | Agent tabs, split layouts, and workspaces | +| Navigation | Sidebar and page navigation | +| Panels | History, snapshots, notes, and terminal panels | +| Settings | Settings, appearance, skills, MCP, tags, and music | +| Shared | Shared helpers and window-level view models | + +These files retain their existing namespaces and class names. MainWindow partial +files still form the same window; this folder organization does not introduce +separate controls or change ownership of state. diff --git a/src/MandoCode.Desktop/MainWindow.Appearance.cs b/src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Appearance.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Appearance.cs rename to src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Appearance.cs diff --git a/src/MandoCode.Desktop/MainWindow.Mcp.cs b/src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Mcp.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Mcp.cs rename to src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Mcp.cs diff --git a/src/MandoCode.Desktop/MainWindow.Music.cs b/src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Music.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Music.cs rename to src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Music.cs diff --git a/src/MandoCode.Desktop/MainWindow.Settings.cs b/src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Settings.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Settings.cs rename to src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Settings.cs diff --git a/src/MandoCode.Desktop/MainWindow.Skills.cs b/src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Skills.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Skills.cs rename to src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Skills.cs diff --git a/src/MandoCode.Desktop/MainWindow.Tags.cs b/src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Tags.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Tags.cs rename to src/MandoCode.Desktop/MainWindow/Settings/MainWindow.Tags.cs diff --git a/src/MandoCode.Desktop/MainWindow.Shared.cs b/src/MandoCode.Desktop/MainWindow/Shared/MainWindow.Shared.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.Shared.cs rename to src/MandoCode.Desktop/MainWindow/Shared/MainWindow.Shared.cs diff --git a/src/MandoCode.Desktop/MainWindow.ViewModels.cs b/src/MandoCode.Desktop/MainWindow/Shared/MainWindow.ViewModels.cs similarity index 100% rename from src/MandoCode.Desktop/MainWindow.ViewModels.cs rename to src/MandoCode.Desktop/MainWindow/Shared/MainWindow.ViewModels.cs diff --git a/src/MandoCode.Desktop/Services/AgentCallsigns.cs b/src/MandoCode.Desktop/Services/Agents/AgentCallsigns.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentCallsigns.cs rename to src/MandoCode.Desktop/Services/Agents/AgentCallsigns.cs diff --git a/src/MandoCode.Desktop/Services/AgentDirectory.cs b/src/MandoCode.Desktop/Services/Agents/AgentDirectory.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentDirectory.cs rename to src/MandoCode.Desktop/Services/Agents/AgentDirectory.cs diff --git a/src/MandoCode.Desktop/Services/AgentDirectoryTools.Interactions.cs b/src/MandoCode.Desktop/Services/Agents/AgentDirectoryTools.Interactions.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentDirectoryTools.Interactions.cs rename to src/MandoCode.Desktop/Services/Agents/AgentDirectoryTools.Interactions.cs diff --git a/src/MandoCode.Desktop/Services/AgentDirectoryTools.cs b/src/MandoCode.Desktop/Services/Agents/AgentDirectoryTools.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentDirectoryTools.cs rename to src/MandoCode.Desktop/Services/Agents/AgentDirectoryTools.cs diff --git a/src/MandoCode.Desktop/Services/AgentInbox.cs b/src/MandoCode.Desktop/Services/Agents/AgentInbox.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentInbox.cs rename to src/MandoCode.Desktop/Services/Agents/AgentInbox.cs diff --git a/src/MandoCode.Desktop/Services/AgentInteractionRunner.cs b/src/MandoCode.Desktop/Services/Agents/AgentInteractionRunner.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentInteractionRunner.cs rename to src/MandoCode.Desktop/Services/Agents/AgentInteractionRunner.cs diff --git a/src/MandoCode.Desktop/Services/AgentNaming.cs b/src/MandoCode.Desktop/Services/Agents/AgentNaming.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentNaming.cs rename to src/MandoCode.Desktop/Services/Agents/AgentNaming.cs diff --git a/src/MandoCode.Desktop/Services/AgentPeer.cs b/src/MandoCode.Desktop/Services/Agents/AgentPeer.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentPeer.cs rename to src/MandoCode.Desktop/Services/Agents/AgentPeer.cs diff --git a/src/MandoCode.Desktop/Services/Delegations.cs b/src/MandoCode.Desktop/Services/Agents/Delegations.cs similarity index 100% rename from src/MandoCode.Desktop/Services/Delegations.cs rename to src/MandoCode.Desktop/Services/Agents/Delegations.cs diff --git a/src/MandoCode.Desktop/Services/PeerMessageEnvelope.cs b/src/MandoCode.Desktop/Services/Agents/PeerMessageEnvelope.cs similarity index 100% rename from src/MandoCode.Desktop/Services/PeerMessageEnvelope.cs rename to src/MandoCode.Desktop/Services/Agents/PeerMessageEnvelope.cs diff --git a/src/MandoCode.Desktop/Services/PeerTurnPolicy.cs b/src/MandoCode.Desktop/Services/Agents/PeerTurnPolicy.cs similarity index 100% rename from src/MandoCode.Desktop/Services/PeerTurnPolicy.cs rename to src/MandoCode.Desktop/Services/Agents/PeerTurnPolicy.cs diff --git a/src/MandoCode.Desktop/Services/SessionAgentPeer.cs b/src/MandoCode.Desktop/Services/Agents/SessionAgentPeer.cs similarity index 100% rename from src/MandoCode.Desktop/Services/SessionAgentPeer.cs rename to src/MandoCode.Desktop/Services/Agents/SessionAgentPeer.cs diff --git a/src/MandoCode.Desktop/Services/AiServiceAdapter.cs b/src/MandoCode.Desktop/Services/Ai/AiServiceAdapter.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AiServiceAdapter.cs rename to src/MandoCode.Desktop/Services/Ai/AiServiceAdapter.cs diff --git a/src/MandoCode.Desktop/Services/IAiService.cs b/src/MandoCode.Desktop/Services/Ai/IAiService.cs similarity index 100% rename from src/MandoCode.Desktop/Services/IAiService.cs rename to src/MandoCode.Desktop/Services/Ai/IAiService.cs diff --git a/src/MandoCode.Desktop/Services/ModelOrdering.cs b/src/MandoCode.Desktop/Services/Ai/ModelOrdering.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ModelOrdering.cs rename to src/MandoCode.Desktop/Services/Ai/ModelOrdering.cs diff --git a/src/MandoCode.Desktop/Services/BuiltInBackgrounds.cs b/src/MandoCode.Desktop/Services/Appearance/BuiltInBackgrounds.cs similarity index 100% rename from src/MandoCode.Desktop/Services/BuiltInBackgrounds.cs rename to src/MandoCode.Desktop/Services/Appearance/BuiltInBackgrounds.cs diff --git a/src/MandoCode.Desktop/Services/ColorMath.cs b/src/MandoCode.Desktop/Services/Appearance/ColorMath.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ColorMath.cs rename to src/MandoCode.Desktop/Services/Appearance/ColorMath.cs diff --git a/src/MandoCode.Desktop/Services/ContextMeterColors.cs b/src/MandoCode.Desktop/Services/Appearance/ContextMeterColors.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ContextMeterColors.cs rename to src/MandoCode.Desktop/Services/Appearance/ContextMeterColors.cs diff --git a/src/MandoCode.Desktop/Services/PinnedOpacityConverter.cs b/src/MandoCode.Desktop/Services/Appearance/PinnedOpacityConverter.cs similarity index 100% rename from src/MandoCode.Desktop/Services/PinnedOpacityConverter.cs rename to src/MandoCode.Desktop/Services/Appearance/PinnedOpacityConverter.cs diff --git a/src/MandoCode.Desktop/Services/ThemeManager.cs b/src/MandoCode.Desktop/Services/Appearance/ThemeManager.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ThemeManager.cs rename to src/MandoCode.Desktop/Services/Appearance/ThemeManager.cs diff --git a/src/MandoCode.Desktop/Services/UiTheme.cs b/src/MandoCode.Desktop/Services/Appearance/UiTheme.cs similarity index 100% rename from src/MandoCode.Desktop/Services/UiTheme.cs rename to src/MandoCode.Desktop/Services/Appearance/UiTheme.cs diff --git a/src/MandoCode.Desktop/Services/ApprovalModels.cs b/src/MandoCode.Desktop/Services/Approval/ApprovalModels.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ApprovalModels.cs rename to src/MandoCode.Desktop/Services/Approval/ApprovalModels.cs diff --git a/src/MandoCode.Desktop/Services/WinUiApprovalService.cs b/src/MandoCode.Desktop/Services/Approval/WinUiApprovalService.cs similarity index 100% rename from src/MandoCode.Desktop/Services/WinUiApprovalService.cs rename to src/MandoCode.Desktop/Services/Approval/WinUiApprovalService.cs diff --git a/src/MandoCode.Desktop/Services/AgentImageSink.cs b/src/MandoCode.Desktop/Services/Browser/AgentImageSink.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentImageSink.cs rename to src/MandoCode.Desktop/Services/Browser/AgentImageSink.cs diff --git a/src/MandoCode.Desktop/Services/BrowserFrames.cs b/src/MandoCode.Desktop/Services/Browser/BrowserFrames.cs similarity index 100% rename from src/MandoCode.Desktop/Services/BrowserFrames.cs rename to src/MandoCode.Desktop/Services/Browser/BrowserFrames.cs diff --git a/src/MandoCode.Desktop/Services/BrowserRequestContext.cs b/src/MandoCode.Desktop/Services/Browser/BrowserRequestContext.cs similarity index 100% rename from src/MandoCode.Desktop/Services/BrowserRequestContext.cs rename to src/MandoCode.Desktop/Services/Browser/BrowserRequestContext.cs diff --git a/src/MandoCode.Desktop/Services/DesktopPreviewKeys.cs b/src/MandoCode.Desktop/Services/Browser/DesktopPreviewKeys.cs similarity index 100% rename from src/MandoCode.Desktop/Services/DesktopPreviewKeys.cs rename to src/MandoCode.Desktop/Services/Browser/DesktopPreviewKeys.cs diff --git a/src/MandoCode.Desktop/Services/DesktopPreviewScripts.cs b/src/MandoCode.Desktop/Services/Browser/DesktopPreviewScripts.cs similarity index 100% rename from src/MandoCode.Desktop/Services/DesktopPreviewScripts.cs rename to src/MandoCode.Desktop/Services/Browser/DesktopPreviewScripts.cs diff --git a/src/MandoCode.Desktop/Services/DesktopPreviewTools.cs b/src/MandoCode.Desktop/Services/Browser/DesktopPreviewTools.cs similarity index 100% rename from src/MandoCode.Desktop/Services/DesktopPreviewTools.cs rename to src/MandoCode.Desktop/Services/Browser/DesktopPreviewTools.cs diff --git a/src/MandoCode.Desktop/Services/AgentConfigStore.cs b/src/MandoCode.Desktop/Services/Configuration/AgentConfigStore.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentConfigStore.cs rename to src/MandoCode.Desktop/Services/Configuration/AgentConfigStore.cs diff --git a/src/MandoCode.Desktop/Services/ConfigCloning.cs b/src/MandoCode.Desktop/Services/Configuration/ConfigCloning.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ConfigCloning.cs rename to src/MandoCode.Desktop/Services/Configuration/ConfigCloning.cs diff --git a/src/MandoCode.Desktop/Services/ConfigCoordinator.cs b/src/MandoCode.Desktop/Services/Configuration/ConfigCoordinator.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ConfigCoordinator.cs rename to src/MandoCode.Desktop/Services/Configuration/ConfigCoordinator.cs diff --git a/src/MandoCode.Desktop/Services/ItemTagStore.cs b/src/MandoCode.Desktop/Services/Configuration/ItemTagStore.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ItemTagStore.cs rename to src/MandoCode.Desktop/Services/Configuration/ItemTagStore.cs diff --git a/src/MandoCode.Desktop/Services/MandoCliDetector.cs b/src/MandoCode.Desktop/Services/Configuration/MandoCliDetector.cs similarity index 100% rename from src/MandoCode.Desktop/Services/MandoCliDetector.cs rename to src/MandoCode.Desktop/Services/Configuration/MandoCliDetector.cs diff --git a/src/MandoCode.Desktop/Services/McpCoordinator.cs b/src/MandoCode.Desktop/Services/Configuration/McpCoordinator.cs similarity index 100% rename from src/MandoCode.Desktop/Services/McpCoordinator.cs rename to src/MandoCode.Desktop/Services/Configuration/McpCoordinator.cs diff --git a/src/MandoCode.Desktop/Services/SettingsScope.cs b/src/MandoCode.Desktop/Services/Configuration/SettingsScope.cs similarity index 100% rename from src/MandoCode.Desktop/Services/SettingsScope.cs rename to src/MandoCode.Desktop/Services/Configuration/SettingsScope.cs diff --git a/src/MandoCode.Desktop/Services/SkillAuthor.cs b/src/MandoCode.Desktop/Services/Configuration/SkillAuthor.cs similarity index 100% rename from src/MandoCode.Desktop/Services/SkillAuthor.cs rename to src/MandoCode.Desktop/Services/Configuration/SkillAuthor.cs diff --git a/src/MandoCode.Desktop/Services/SkillCoordinator.cs b/src/MandoCode.Desktop/Services/Configuration/SkillCoordinator.cs similarity index 100% rename from src/MandoCode.Desktop/Services/SkillCoordinator.cs rename to src/MandoCode.Desktop/Services/Configuration/SkillCoordinator.cs diff --git a/src/MandoCode.Desktop/Services/CrashLog.cs b/src/MandoCode.Desktop/Services/Diagnostics/CrashLog.cs similarity index 100% rename from src/MandoCode.Desktop/Services/CrashLog.cs rename to src/MandoCode.Desktop/Services/Diagnostics/CrashLog.cs diff --git a/src/MandoCode.Desktop/Services/UiUpdateCheckService.cs b/src/MandoCode.Desktop/Services/Diagnostics/UiUpdateCheckService.cs similarity index 100% rename from src/MandoCode.Desktop/Services/UiUpdateCheckService.cs rename to src/MandoCode.Desktop/Services/Diagnostics/UiUpdateCheckService.cs diff --git a/src/MandoCode.Desktop/Services/CommandSuggestion.cs b/src/MandoCode.Desktop/Services/Input/CommandSuggestion.cs similarity index 100% rename from src/MandoCode.Desktop/Services/CommandSuggestion.cs rename to src/MandoCode.Desktop/Services/Input/CommandSuggestion.cs diff --git a/src/MandoCode.Desktop/Services/PromptFileLookup.cs b/src/MandoCode.Desktop/Services/Input/PromptFileLookup.cs similarity index 100% rename from src/MandoCode.Desktop/Services/PromptFileLookup.cs rename to src/MandoCode.Desktop/Services/Input/PromptFileLookup.cs diff --git a/src/MandoCode.Desktop/Services/PromptMentionPicker.cs b/src/MandoCode.Desktop/Services/Input/PromptMentionPicker.cs similarity index 100% rename from src/MandoCode.Desktop/Services/PromptMentionPicker.cs rename to src/MandoCode.Desktop/Services/Input/PromptMentionPicker.cs diff --git a/src/MandoCode.Desktop/Services/MusicPlaylists.cs b/src/MandoCode.Desktop/Services/Music/MusicPlaylists.cs similarity index 100% rename from src/MandoCode.Desktop/Services/MusicPlaylists.cs rename to src/MandoCode.Desktop/Services/Music/MusicPlaylists.cs diff --git a/src/MandoCode.Desktop/Services/NoteAssistant.cs b/src/MandoCode.Desktop/Services/Notes/NoteAssistant.cs similarity index 100% rename from src/MandoCode.Desktop/Services/NoteAssistant.cs rename to src/MandoCode.Desktop/Services/Notes/NoteAssistant.cs diff --git a/src/MandoCode.Desktop/Services/NoteEntry.cs b/src/MandoCode.Desktop/Services/Notes/NoteEntry.cs similarity index 100% rename from src/MandoCode.Desktop/Services/NoteEntry.cs rename to src/MandoCode.Desktop/Services/Notes/NoteEntry.cs diff --git a/src/MandoCode.Desktop/Services/NoteStore.cs b/src/MandoCode.Desktop/Services/Notes/NoteStore.cs similarity index 100% rename from src/MandoCode.Desktop/Services/NoteStore.cs rename to src/MandoCode.Desktop/Services/Notes/NoteStore.cs diff --git a/src/MandoCode.Desktop/Services/NoteText.cs b/src/MandoCode.Desktop/Services/Notes/NoteText.cs similarity index 100% rename from src/MandoCode.Desktop/Services/NoteText.cs rename to src/MandoCode.Desktop/Services/Notes/NoteText.cs diff --git a/src/MandoCode.Desktop/Services/GitQuickStatus.cs b/src/MandoCode.Desktop/Services/Project/GitQuickStatus.cs similarity index 100% rename from src/MandoCode.Desktop/Services/GitQuickStatus.cs rename to src/MandoCode.Desktop/Services/Project/GitQuickStatus.cs diff --git a/src/MandoCode.Desktop/Services/ProjectDisplay.cs b/src/MandoCode.Desktop/Services/Project/ProjectDisplay.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ProjectDisplay.cs rename to src/MandoCode.Desktop/Services/Project/ProjectDisplay.cs diff --git a/src/MandoCode.Desktop/Services/ShellOpen.cs b/src/MandoCode.Desktop/Services/Project/ShellOpen.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ShellOpen.cs rename to src/MandoCode.Desktop/Services/Project/ShellOpen.cs diff --git a/src/MandoCode.Desktop/Services/WorkspaceDeltaTracker.cs b/src/MandoCode.Desktop/Services/Project/WorkspaceDeltaTracker.cs similarity index 100% rename from src/MandoCode.Desktop/Services/WorkspaceDeltaTracker.cs rename to src/MandoCode.Desktop/Services/Project/WorkspaceDeltaTracker.cs diff --git a/src/MandoCode.Desktop/Services/README.md b/src/MandoCode.Desktop/Services/README.md new file mode 100644 index 0000000..feee041 --- /dev/null +++ b/src/MandoCode.Desktop/Services/README.md @@ -0,0 +1,24 @@ +# Desktop services + +Services are grouped by feature, while retaining the shared +`MandoCode.Desktop.Services` namespace. + +- **Agents**: `AgentCallsigns`, `AgentDirectory`, `AgentDirectoryTools`, `AgentDirectoryTools.Interactions`, `AgentInbox`, `AgentInteractionRunner`, `AgentNaming`, `AgentPeer`, `Delegations`, `PeerMessageEnvelope`, `PeerTurnPolicy`, `SessionAgentPeer`. +- **Ai**: `AiServiceAdapter`, `IAiService`, `ModelOrdering`. +- **Approval**: `ApprovalModels`, `WinUiApprovalService`. +- **Browser**: `AgentImageSink`, `BrowserFrames`, `BrowserRequestContext`, `DesktopPreviewKeys`, `DesktopPreviewScripts`, `DesktopPreviewTools`. +- **Configuration**: `AgentConfigStore`, `ConfigCloning`, `ConfigCoordinator`, `ItemTagStore`, `MandoCliDetector`, `McpCoordinator`, `SettingsScope`, `SkillAuthor`, `SkillCoordinator`. +- **Input**: `CommandSuggestion`, `PromptFileLookup`, `PromptMentionPicker`. +- **Notes**: `NoteAssistant`, `NoteEntry`, `NoteStore`, `NoteText`. +- **Project**: `GitQuickStatus`, `ProjectDisplay`, `ShellOpen`, `WorkspaceDeltaTracker`. +- **Rendering**: `BusyStateService`, `ITranscriptHtml`, `ModelNoticeReplay`, `PlanCardHtml`, `StableCollection`, `TranscriptHtmlBuilder`, `TranscriptWriter`. +- **Sessions**: `AgentSession`, `CardPreview`, `ConversationLog`, `ConversationSearch`, `ConversationTextCache`, `HistorySummarizer`, `SessionArchiveStore`, `SessionHistoryStore`, `SessionManager`, `TranscriptJournal`. +- **Snapshots**: `ContextSnapshot`, `SnapshotEnhancer`, `SnapshotNaming`, `SnapshotStore`. +- **Terminal**: `AgentCommandFormat`, `AgentCommandLog`, `PseudoConsole`, `ShellRunner`, `TerminalSession`. +- **Appearance**: `BuiltInBackgrounds`, `ColorMath`, `ContextMeterColors`, `PinnedOpacityConverter`, `ThemeManager`, `UiTheme`. +- **Workspaces**: `PaneLayout`, `PanelState`, `WorkspaceState`. +- **Music**: `MusicPlaylists`. +- **Diagnostics**: `CrashLog`, `UiUpdateCheckService`. + +When moving a source file, update direct compile links in the Desktop test and +browser smoke-test projects, along with current documentation paths. diff --git a/src/MandoCode.Desktop/Services/BusyStateService.cs b/src/MandoCode.Desktop/Services/Rendering/BusyStateService.cs similarity index 100% rename from src/MandoCode.Desktop/Services/BusyStateService.cs rename to src/MandoCode.Desktop/Services/Rendering/BusyStateService.cs diff --git a/src/MandoCode.Desktop/Services/ITranscriptHtml.cs b/src/MandoCode.Desktop/Services/Rendering/ITranscriptHtml.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ITranscriptHtml.cs rename to src/MandoCode.Desktop/Services/Rendering/ITranscriptHtml.cs diff --git a/src/MandoCode.Desktop/Services/ModelNoticeReplay.cs b/src/MandoCode.Desktop/Services/Rendering/ModelNoticeReplay.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ModelNoticeReplay.cs rename to src/MandoCode.Desktop/Services/Rendering/ModelNoticeReplay.cs diff --git a/src/MandoCode.Desktop/Services/PlanCardHtml.cs b/src/MandoCode.Desktop/Services/Rendering/PlanCardHtml.cs similarity index 100% rename from src/MandoCode.Desktop/Services/PlanCardHtml.cs rename to src/MandoCode.Desktop/Services/Rendering/PlanCardHtml.cs diff --git a/src/MandoCode.Desktop/Services/StableCollection.cs b/src/MandoCode.Desktop/Services/Rendering/StableCollection.cs similarity index 100% rename from src/MandoCode.Desktop/Services/StableCollection.cs rename to src/MandoCode.Desktop/Services/Rendering/StableCollection.cs diff --git a/src/MandoCode.Desktop/Services/TranscriptHtmlBuilder.cs b/src/MandoCode.Desktop/Services/Rendering/TranscriptHtmlBuilder.cs similarity index 100% rename from src/MandoCode.Desktop/Services/TranscriptHtmlBuilder.cs rename to src/MandoCode.Desktop/Services/Rendering/TranscriptHtmlBuilder.cs diff --git a/src/MandoCode.Desktop/Services/TranscriptWriter.cs b/src/MandoCode.Desktop/Services/Rendering/TranscriptWriter.cs similarity index 100% rename from src/MandoCode.Desktop/Services/TranscriptWriter.cs rename to src/MandoCode.Desktop/Services/Rendering/TranscriptWriter.cs diff --git a/src/MandoCode.Desktop/Services/AgentSession.cs b/src/MandoCode.Desktop/Services/Sessions/AgentSession.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentSession.cs rename to src/MandoCode.Desktop/Services/Sessions/AgentSession.cs diff --git a/src/MandoCode.Desktop/Services/CardPreview.cs b/src/MandoCode.Desktop/Services/Sessions/CardPreview.cs similarity index 100% rename from src/MandoCode.Desktop/Services/CardPreview.cs rename to src/MandoCode.Desktop/Services/Sessions/CardPreview.cs diff --git a/src/MandoCode.Desktop/Services/ConversationLog.cs b/src/MandoCode.Desktop/Services/Sessions/ConversationLog.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ConversationLog.cs rename to src/MandoCode.Desktop/Services/Sessions/ConversationLog.cs diff --git a/src/MandoCode.Desktop/Services/ConversationSearch.cs b/src/MandoCode.Desktop/Services/Sessions/ConversationSearch.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ConversationSearch.cs rename to src/MandoCode.Desktop/Services/Sessions/ConversationSearch.cs diff --git a/src/MandoCode.Desktop/Services/ConversationTextCache.cs b/src/MandoCode.Desktop/Services/Sessions/ConversationTextCache.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ConversationTextCache.cs rename to src/MandoCode.Desktop/Services/Sessions/ConversationTextCache.cs diff --git a/src/MandoCode.Desktop/Services/HistorySummarizer.cs b/src/MandoCode.Desktop/Services/Sessions/HistorySummarizer.cs similarity index 100% rename from src/MandoCode.Desktop/Services/HistorySummarizer.cs rename to src/MandoCode.Desktop/Services/Sessions/HistorySummarizer.cs diff --git a/src/MandoCode.Desktop/Services/SessionArchiveStore.cs b/src/MandoCode.Desktop/Services/Sessions/SessionArchiveStore.cs similarity index 100% rename from src/MandoCode.Desktop/Services/SessionArchiveStore.cs rename to src/MandoCode.Desktop/Services/Sessions/SessionArchiveStore.cs diff --git a/src/MandoCode.Desktop/Services/SessionHistoryStore.cs b/src/MandoCode.Desktop/Services/Sessions/SessionHistoryStore.cs similarity index 100% rename from src/MandoCode.Desktop/Services/SessionHistoryStore.cs rename to src/MandoCode.Desktop/Services/Sessions/SessionHistoryStore.cs diff --git a/src/MandoCode.Desktop/Services/SessionManager.cs b/src/MandoCode.Desktop/Services/Sessions/SessionManager.cs similarity index 100% rename from src/MandoCode.Desktop/Services/SessionManager.cs rename to src/MandoCode.Desktop/Services/Sessions/SessionManager.cs diff --git a/src/MandoCode.Desktop/Services/TranscriptJournal.cs b/src/MandoCode.Desktop/Services/Sessions/TranscriptJournal.cs similarity index 100% rename from src/MandoCode.Desktop/Services/TranscriptJournal.cs rename to src/MandoCode.Desktop/Services/Sessions/TranscriptJournal.cs diff --git a/src/MandoCode.Desktop/Services/ContextSnapshot.cs b/src/MandoCode.Desktop/Services/Snapshots/ContextSnapshot.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ContextSnapshot.cs rename to src/MandoCode.Desktop/Services/Snapshots/ContextSnapshot.cs diff --git a/src/MandoCode.Desktop/Services/SnapshotEnhancer.cs b/src/MandoCode.Desktop/Services/Snapshots/SnapshotEnhancer.cs similarity index 100% rename from src/MandoCode.Desktop/Services/SnapshotEnhancer.cs rename to src/MandoCode.Desktop/Services/Snapshots/SnapshotEnhancer.cs diff --git a/src/MandoCode.Desktop/Services/SnapshotNaming.cs b/src/MandoCode.Desktop/Services/Snapshots/SnapshotNaming.cs similarity index 100% rename from src/MandoCode.Desktop/Services/SnapshotNaming.cs rename to src/MandoCode.Desktop/Services/Snapshots/SnapshotNaming.cs diff --git a/src/MandoCode.Desktop/Services/SnapshotStore.cs b/src/MandoCode.Desktop/Services/Snapshots/SnapshotStore.cs similarity index 100% rename from src/MandoCode.Desktop/Services/SnapshotStore.cs rename to src/MandoCode.Desktop/Services/Snapshots/SnapshotStore.cs diff --git a/src/MandoCode.Desktop/Services/AgentCommandFormat.cs b/src/MandoCode.Desktop/Services/Terminal/AgentCommandFormat.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentCommandFormat.cs rename to src/MandoCode.Desktop/Services/Terminal/AgentCommandFormat.cs diff --git a/src/MandoCode.Desktop/Services/AgentCommandLog.cs b/src/MandoCode.Desktop/Services/Terminal/AgentCommandLog.cs similarity index 100% rename from src/MandoCode.Desktop/Services/AgentCommandLog.cs rename to src/MandoCode.Desktop/Services/Terminal/AgentCommandLog.cs diff --git a/src/MandoCode.Desktop/Services/PseudoConsole.cs b/src/MandoCode.Desktop/Services/Terminal/PseudoConsole.cs similarity index 100% rename from src/MandoCode.Desktop/Services/PseudoConsole.cs rename to src/MandoCode.Desktop/Services/Terminal/PseudoConsole.cs diff --git a/src/MandoCode.Desktop/Services/ShellRunner.cs b/src/MandoCode.Desktop/Services/Terminal/ShellRunner.cs similarity index 100% rename from src/MandoCode.Desktop/Services/ShellRunner.cs rename to src/MandoCode.Desktop/Services/Terminal/ShellRunner.cs diff --git a/src/MandoCode.Desktop/Services/TerminalSession.cs b/src/MandoCode.Desktop/Services/Terminal/TerminalSession.cs similarity index 100% rename from src/MandoCode.Desktop/Services/TerminalSession.cs rename to src/MandoCode.Desktop/Services/Terminal/TerminalSession.cs diff --git a/src/MandoCode.Desktop/Services/PaneLayout.cs b/src/MandoCode.Desktop/Services/Workspaces/PaneLayout.cs similarity index 100% rename from src/MandoCode.Desktop/Services/PaneLayout.cs rename to src/MandoCode.Desktop/Services/Workspaces/PaneLayout.cs diff --git a/src/MandoCode.Desktop/Services/PanelState.cs b/src/MandoCode.Desktop/Services/Workspaces/PanelState.cs similarity index 100% rename from src/MandoCode.Desktop/Services/PanelState.cs rename to src/MandoCode.Desktop/Services/Workspaces/PanelState.cs diff --git a/src/MandoCode.Desktop/Services/WorkspaceState.cs b/src/MandoCode.Desktop/Services/Workspaces/WorkspaceState.cs similarity index 100% rename from src/MandoCode.Desktop/Services/WorkspaceState.cs rename to src/MandoCode.Desktop/Services/Workspaces/WorkspaceState.cs