Skip to content

Suggestion: Split SettingsViewModel.kt into domain-specific ViewModels #111

Description

@adrielGGmotion

Suggestion: Split SettingsViewModel.kt into domain-specific ViewModels

Category: Large functions/files
File: composeApp/src/commonMain/kotlin/com/oak/app/ui/settings/SettingsViewModel.kt:1

SettingsViewModel.kt is 1302 lines and manages state and actions across multiple unrelated domains: heartbeat configuration, email settings, SMS settings, SSH server management, notification permissions, MCP server management, skills management, and local model downloads. This creates a single monolithic ViewModel that is difficult to test and maintain.

Suggested action: Split into smaller ViewModels per domain (e.g., HeartbeatSettingsViewModel, EmailSettingsViewModel, SmsSettingsViewModel, McpSettingsViewModel, SshSettingsViewModel) and compose them in the settings screen as needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    suggestionAI-generated code improvement suggestion

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions