Skip to content

Logs tab, Responsive Layouts - #4

Merged
Nechja merged 9 commits into
mainfrom
rework/logs
Feb 8, 2026
Merged

Logs tab, Responsive Layouts#4
Nechja merged 9 commits into
mainfrom
rework/logs

Conversation

@Nechja

@Nechja Nechja commented Feb 8, 2026

Copy link
Copy Markdown
Owner

Started with thinking logs needed to not be a second window, ended up fixing some reactivity stuff that was bugging me.

robot spam follows:

Testing improvements

  • Added comprehensive unit tests for log filtering, error overview, and command handling in LogsViewModelTests.cs, ensuring correct behavior for log loading, searching, error handling, and safe disposal.
  • Introduced responsive layout tests in ResponsiveLayoutTests.cs to verify compact mode toggling and screen breakpoints for container and image cards.

Log viewing refactor

  • Introduced a new LogsPanelViewModel class to encapsulate log streaming, exporting, and UI commands, separating concerns and improving code clarity.
  • Refactored LogsViewModel to support multiple containers, error overview, search filtering, and improved log streaming lifecycle management. [1] [2] [3]

Dependency injection and service changes

  • Removed the log view model factory and its usage from DialogService, simplifying dependency injection and service registration. [1] [2]
  • Updated IDialogService interface to remove the ShowLogsWindow method, reflecting the new approach for log viewing.

UI properties

  • Added IsCompactMode observable property to ContainerViewModel and ImageViewModel to support responsive layouts and compact mode toggling. [1] [2]

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves container log viewing into the main window (as a “Logs” tab) and introduces responsive UI behaviors for small screens and compact card layouts, alongside related DI/service cleanup and new tests.

Changes:

  • Replaces the dedicated LogsWindow with an in-app LogsView and adds “LOGS” navigation (including a small-screen hamburger menu).
  • Adds responsive state (IsSmallScreen, IsCompactMode) to drive compact layouts for container/image cards.
  • Refactors log viewing into new/updated view models (LogsViewModel, LogsPanelViewModel) and removes dialog-based log window plumbing.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 31 comments.

Show a summary per file
File Description
Views/MainWindow.axaml.cs Tracks window width changes to toggle IsSmallScreen.
Views/MainWindow.axaml Adds responsive navigation + embeds LogsView in main content.
Views/LogsWindow.axaml(.cs) Removes the standalone logs window implementation.
Views/Components/LogsView.axaml(.cs) Adds the new logs tab UI (container selector, search, error overview).
Views/Components/LogsPanel.axaml(.cs) Introduces a log panel component/view model (currently appears unused).
Views/Components/ImageCard.axaml(.cs) Adds compact-mode UI (buttons collapse into a menu).
Views/Components/ContainerCard.axaml(.cs) Adds compact-mode UI + menu actions + stats toggle wiring.
ViewModels/MainWindowViewModel.cs Adds ShowLogs, IsSmallScreen, logs navigation, and log-loading flow.
ViewModels/LogsViewModel.cs Refactors logs to support selection, filtering, “search all”, and error overview.
ViewModels/LogsPanelViewModel.cs New view model for panel-style log streaming/export/close.
ViewModels/ImageViewModel.cs Adds IsCompactMode.
ViewModels/ContainerViewModel.cs Adds IsCompactMode.
Services/ServiceCollectionExtensions.cs Removes the LogsViewModel factory registration.
Services/IDialogService.cs / Services/DialogService.cs Removes log window API and implementation.
OrbitalDocking.Tests/ViewModels/ResponsiveLayoutTests.cs Adds unit tests for compact/small-screen breakpoints.
OrbitalDocking.Tests/ViewModels/LogsViewModelTests.cs Adds unit tests around filtering/error overview/commands (currently with issues).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ViewModels/LogsViewModel.cs
Comment thread ViewModels/LogsViewModel.cs
Comment thread Views/Components/ContainerCard.axaml.cs
Comment thread Views/Components/LogsView.axaml.cs Outdated
Comment on lines +55 to +56
if (value is not null)
_ = LoadContainerLogsAsync(value.Id, value.Name);

Copilot AI Feb 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SelectedContainer change triggers LoadContainerLogsAsync (fire-and-forget), but callers (e.g. ShowContainerLogs, ViewContainerLogs) also call LoadContainerLogsAsync explicitly. This causes duplicate loads/stream restarts and can cancel an in-flight stream unexpectedly. Consider choosing one mechanism: either remove the OnSelectedContainerChanged auto-load, or remove the explicit LoadContainerLogsAsync calls and await/serialize the single load task.

Suggested change
if (value is not null)
_ = LoadContainerLogsAsync(value.Id, value.Name);
// Intentionally left blank: logs are loaded explicitly via commands
// to avoid duplicate loads and stream restarts.

Copilot uses AI. Check for mistakes.
Comment thread ViewModels/LogsViewModel.cs
Comment thread ViewModels/LogsViewModel.cs
Comment thread ViewModels/LogsViewModel.cs
Comment thread ViewModels/MainWindowViewModel.cs
Comment thread ViewModels/MainWindowViewModel.cs
@Nechja
Nechja merged commit cfda33a into main Feb 8, 2026
1 check passed
@Nechja
Nechja deleted the rework/logs branch February 8, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants