Skip to content

fix: settings model container and spaces UI - #127

Merged
kenenisa merged 6 commits into
the-ora:mainfrom
croossin:roo/fix/settings
Sep 28, 2025
Merged

kenenisa merged 6 commits into
the-ora:mainfrom
croossin:roo/fix/settings

Conversation

@croossin

Copy link
Copy Markdown
Contributor

Root Cause

The Settings window wasn't connected to the same SwiftData database as the main browser:

  • Main browser windows: Properly configured with modelContext
  • Settings window: Missing SwiftData context, querying empty database

Solution

Fixed SwiftData Context

Added shared ModelContainer to Settings window that connects to the same database. Settings now properly displays all created containers/spaces.

Centralized Configuration

Created ModelConfiguration+Shared.swift to eliminate code duplication between OraRoot.swift and oraApp.swift. Both files now use the same database configuration, providing a single source of truth for schema, database path, and container creation.

Spaces UI Enhancement

Made the Spaces settings tab look a little cleaner

Before

CleanShot 2025-09-27 at 10 48 41@2x

After

CleanShot 2025-09-27 at 10 49 21@2x CleanShot 2025-09-27 at 10 49 25@2x

Comment thread ora/oraApp.swift Outdated
@kenenisa
kenenisa requested a review from Copilot September 28, 2025 22:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fixes a critical SwiftData connectivity issue where the Settings window couldn't access the main browser's database. The solution centralizes database configuration and improves the Spaces settings UI with better visual design and organization.

  • Fixed Settings window SwiftData context to connect to the same database as main browser
  • Centralized ModelContainer configuration to eliminate code duplication
  • Enhanced Spaces settings UI with improved layout, styling, and organization

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
ora/oraApp.swift Added shared ModelContainer for Settings window with fallback UI
ora/OraRoot.swift Refactored to use centralized database configuration
ora/Modules/Settings/Sections/SpacesSettingsView.swift Improved UI layout with better styling and organization
ora/Common/Extensions/ModelConfiguration+Shared.swift New centralized database configuration utilities

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kenenisa
kenenisa merged commit 37d07e1 into the-ora:main Sep 28, 2025
2 checks passed
kenenisa pushed a commit that referenced this pull request Sep 29, 2025
* fix: settings model container

* fix: space settings ui more digestible

* fix: move extension file to extension directory

* fix: refactor retry of container creation failure

* fix: allow left and right settings view in spaces to scroll independently
kenenisa pushed a commit that referenced this pull request Oct 6, 2025
* fix: settings model container

* fix: space settings ui more digestible

* fix: move extension file to extension directory

* fix: refactor retry of container creation failure

* fix: allow left and right settings view in spaces to scroll independently
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.

3 participants