Skip to content

Error crash fix - #46

Merged
patrickjquinn merged 28 commits into
mainfrom
error-crash-fix
Jan 18, 2026
Merged

patrickjquinn merged 28 commits into
mainfrom
error-crash-fix

Conversation

@patrickjquinn

Copy link
Copy Markdown
Owner

okay this started as an attempt to try and fix some crashing and incorrectly wired up DBus services that the shell was exposing to apps.

It has turned into a substantial series of fixes including, but not limited to:

  • Continue removal core services from QML to C++ to align with suggestions made by Deepak (ongoing work, apps TBD).
  • Fixes to the 'test app' which was previously broken (The test app can now trigger notifications, calls, alarms etc etc again).
  • Consolidation of helpers to singletons (for things that are frequently accessed globally).
  • Linting and formatting.
  • Refactor of project structure to group C++ services logically by purpose.
  • OOBE improvements for on-boarding (you can now set scale for the display when you're onboarding).
  • Removal of bad patterns (too many 'what' comments, not enough 'why').
  • Other misc improvements for issues I ran into while testing.
  • Some basic unit testing.

Move shell C++ services, managers, models, controllers, and components into
scoped directories and update build wiring/includes to match the new layout.
Remove QML service singletons and update shell UI, stores, and keyboard
components to use the C++ managers and service APIs.
Update MarathonUI QML components and build configuration to match current
layouts, styling, and lint expectations.
Update Marathon services managers to align APIs and cleanup related
call history, contacts, SMS, and media handling.
Update marathon-keyboard QML and engine bindings for safer layout sizing,
input context handling, and haptic calls.
Update app QML and supporting C++ to use revised service APIs, improve
bindings, and resolve runtime/lint issues across bundled apps.
Tighten Marathon core app metadata, scanning, and verification helpers to
support updated app behaviors.
Add calendar manager support and expand shell IPC clients, with related
runner wiring and tool entrypoint adjustments.
Tighten QML lint configuration and build/run defaults to match the
current project layout.
Add scripts to build QML dependency stubs and strip comments for linting.
Replace the QML SessionStore with a C++ QML_SINGLETON and update shell
components to import MarathonOS.Shell for session state access.
Ensure SessionStore is registered from C++ and reset on startup so the lock flow initializes consistently.
Accept conversation taps with missing ids and guard unread badges to avoid runtime errors in test notifications.
Replace QML system stores with C++ singletons, wire them in main, and update build sources so store logic lives in C++.
Import the shell module where needed and route app restore through UIStore to keep app window state consistent.
Register system store clients as module singletons and align navigation signals so apps can access shell state without QML errors.
Replace QML router, surface registry, language, predictors, dictionary, and autocorrect with C++ singletons and update the keyboard integration.
Replace the QML keyboard settings singleton with a C++ store and wire the settings page to use it directly.
Centralize search focus and keyboard visibility to ensure the quick search overlay brings up input immediately.
Replace the QML input context with a C++ QML element and drop unused keyboard performance singleton QML.
Replace the QML calendar store with a C++ backing store that proxies CalendarManager and keeps the app state in C++.
Drop unused keyboard performance and data singleton QML files to keep the module UI-only.
Register the InputContext QML type explicitly and refresh its input mode when focus changes.
Delete the CalendarWorker.js file and update CMakeLists.txt to exclude it from the build, streamlining the project by removing unused QML services.
…ates

Add a MouseArea to the MarathonOOBE component to improve user interaction by accepting all mouse events. Update icon names from "check-circle" to "circle-check" for consistency and adjust sizes accordingly.
Introduce a new scale page in the MarathonOOBE component, allowing users to select their preferred display size with adjustable text and UI element scaling. This enhancement improves accessibility and user experience by providing multiple scaling options.
@patrickjquinn
patrickjquinn requested a review from Copilot January 18, 2026 08:54

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 addresses critical crash fixes and implements a comprehensive refactoring of the Marathon OS shell architecture. The changes focus on migrating core services from QML to C++ for improved performance and stability, consolidating project structure, and fixing broken functionality in the test application.

Changes:

  • Migrated multiple core services (state management, notifications, telephony, search) from QML to C++ singletons
  • Restructured C++ source files into logical directories (services, managers, controllers, components, models)
  • Fixed test application service integration with proper availability checks
  • Removed unnecessary comments and improved code maintainability
  • Added basic unit testing infrastructure and QML linting improvements

Reviewed changes

Copilot reviewed 186 out of 432 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
shell/CMakeLists.txt Reorganized source files into logical directories and added new C++ service implementations
scripts/strip_comments.py Added utility script for removing code comments during cleanup
scripts/build_qml_dependencies.py Added script to generate QML module dependency metadata for linting
run.sh Added QML import path environment variable for shell modules
marathon-ui/Theme/*.qml Removed explanatory comments from theme configuration files
marathon-ui/Navigation/*.qml Cleaned up navigation component comments
marathon-ui/Modals/*.qml Removed implementation comments from modal components and added open/close aliases
marathon-ui/Effects/*.qml Updated PropertyChanges syntax and removed comments from effects
marathon-ui/Core/*.qml Cleaned up core UI component comments
marathon-ui/Controls/*.qml Fixed MRadioGroup selection logic and removed comments
marathon-ui/Containers/*.qml Removed implementation comments from container components
marathon-ui/CMakeLists.txt Added QML type generation and linting infrastructure
marathon-services/src/.h/.cpp Removed implementation comments from service headers and implementations
marathon-keyboard/src/.h/.cpp Removed documentation comments from keyboard IME implementation
marathon-keyboard/qml/**/*.qml Removed comments from keyboard layouts and components, deleted QML-based Dictionary and AutoCorrect
marathon-core/src/.h/.cpp Removed comments from app management infrastructure
diagnostics.qml Removed section header comments
cmake/QMLLint.cmake Added import paths for shell QML modules in linting
apps/test/**/*.qml Fixed service availability checks and updated to use C++ service APIs
apps/terminal/**/*.qml Fixed import ordering and removed comments from terminal components
apps/template/**/*.qml Fixed import ordering in template app
apps/store/**/*.qml Updated to use MarathonUI components and fixed import ordering
apps/settings/src/KeyboardSettingsStore.* Migrated keyboard settings from QML singleton to C++ implementation
apps/settings/pages/NotificationsPage.qml Fixed import ordering
apps/settings/manifest.json Added network permission

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

Comment thread shell/CMakeLists.txt Outdated
src/managers/sensormanagercpp.cpp
src/managers/settingsmanager.h
src/managers/settingsmanager.cpp
src/managers/platform.h

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

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

The file 'platform.h' is listed but 'platformcpp.h' is also present on the next line. This appears to be inconsistent naming - either both should include 'cpp' suffix or neither should.

Copilot uses AI. Check for mistakes.
Comment thread marathon-ui/Effects/MRipple.qml Outdated
Comment on lines +28 to +29
rippleCircle.width: Math.max(root.width, root.height) * MMotion.rippleMaxRadius
rippleCircle.height: Math.max(root.width, root.height) * MMotion.rippleMaxRadius

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

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

The calculation Math.max(root.width, root.height) * MMotion.rippleMaxRadius is duplicated. Consider storing this value in a local variable to avoid redundant computation.

Copilot uses AI. Check for mistakes.
Comment thread marathon-ui/Controls/MRadioGroup.qml Outdated
property int selectedIndex: -1
property alias options: optionsRepeater.model
property alias spacing: root.spacing
property int spacingValue: MSpacing.sm

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

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

The property name 'spacingValue' is redundant since 'spacing' already implies it's a value. Consider keeping the original 'spacing' alias pattern or renaming to something more descriptive if the alias was causing issues.

Copilot uses AI. Check for mistakes.
import QtQuick
import MarathonApp.Terminal
import QtQuick.Layouts
import MarathonApp.Terminal

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

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

Duplicate import statement for 'MarathonApp.Terminal'. Remove one of the duplicate lines.

Suggested change
import MarathonApp.Terminal

Copilot uses AI. Check for mistakes.
import QtQuick
import MarathonApp.Terminal
import QtQuick.Layouts
import MarathonApp.Terminal

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

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

Duplicate import statement for 'MarathonApp.Terminal'. Remove one of the duplicate lines.

Suggested change
import MarathonApp.Terminal

Copilot uses AI. Check for mistakes.
import QtQuick
import MarathonApp.Terminal
import QtQuick.Layouts
import MarathonApp.Terminal

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

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

Duplicate import statement for 'MarathonApp.Terminal'. Remove one of the duplicate lines.

Suggested change
import MarathonApp.Terminal

Copilot uses AI. Check for mistakes.
Comment thread apps/terminal/TerminalApp.qml Outdated
onCurrentTabIndexChanged: {
Qt.callLater(() => {
var tab = tabs[currentTabIndex];
if (tab && tab.session && terminalApp.Window.window && terminalApp.Window.window.active)

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

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

The property access terminalApp.Window.window is repeated. Consider caching this in a local variable for better readability and performance.

Suggested change
if (tab && tab.session && terminalApp.Window.window && terminalApp.Window.window.active)
var appWindow = terminalApp.Window.window;
if (tab && tab.session && appWindow && appWindow.active)

Copilot uses AI. Check for mistakes.
Comment thread apps/store/components/InfoRow.qml Outdated
width: 100
color: MTheme.onSurfaceVariant
variant: "small"
color: MColors.textSecondary

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

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

Color properties should be set on MLabel using the 'variant' property rather than directly setting the 'color' property, to maintain consistent theming patterns.

Copilot uses AI. Check for mistakes.
Remove redundant import statements in TerminalSession, TerminalTabButton, and VirtualKeyRow components. Update focus handling logic in TerminalApp to enhance clarity and maintainability.
@patrickjquinn
patrickjquinn merged commit 685ed9e into main Jan 18, 2026
1 check passed
@patrickjquinn
patrickjquinn deleted the error-crash-fix branch September 3, 2026 11:53
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