Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ struct AgentsListScreenView: View {
}
}
.navigationTitle(BluerageStrings.agentsListNavigationTitle)
.toolbarTitleDisplayMode(.inlineLarge)
}
Comment on lines +62 to 63
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Guard inlineLarge behind an iOS 18 availability check.

ToolbarTitleDisplayMode.inlineLarge is only available starting iOS 18. Without an availability gate, we’ll fail to build (or crash at runtime if we bump the deployment target later) on any deployment target < 18. Please add a fallback—.inline keeps the intent intact for older OS versions.

Apply this diff to reuse the mode everywhere in the view:

-                .toolbarTitleDisplayMode(.inlineLarge)
+                .toolbarTitleDisplayMode(self.toolbarTitleDisplayMode)

Add this helper inside AgentsListScreenView:

private var toolbarTitleDisplayMode: ToolbarTitleDisplayMode {
    if #available(iOS 18.0, *) {
        return .inlineLarge
    } else {
        return .inline
    }
}
🤖 Prompt for AI Agents
In Bluerage/Sources/UI/Screens/Agents/AgentsList/AgentsListScreenView.swift
around lines 62–63 the code uses ToolbarTitleDisplayMode.inlineLarge which is
only available on iOS 18+, so add an availability-safe helper property inside
AgentsListScreenView that returns .inlineLarge when #available(iOS 18.0, *) and
.inline otherwise, and replace the direct .toolbarTitleDisplayMode(.inlineLarge)
call with .toolbarTitleDisplayMode(toolbarTitleDisplayMode) so older deployment
targets compile and behave correctly.

.background(UIColor.systemGroupedBackground.swiftUI)
.errorAlert(error: self.viewModel.state.alertError) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ struct CustomModelsListScreenView: View {
self.viewModel.connect()
}
.navigationTitle(BluerageStrings.customModelsNavigationTitle)
.toolbarTitleDisplayMode(.inlineLarge)
.background(UIColor.systemGroupedBackground.swiftUI)
Comment on lines +54 to 55
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Match the availability guard for inlineLarge.

Same concern here: .inlineLarge requires iOS 18+, so we need the same guard/fallback as the agents list to keep the build green on earlier iOS versions.

-            .toolbarTitleDisplayMode(.inlineLarge)
+            .toolbarTitleDisplayMode(self.toolbarTitleDisplayMode)

Add alongside the other helpers in this view:

private var toolbarTitleDisplayMode: ToolbarTitleDisplayMode {
    if #available(iOS 18.0, *) {
        return .inlineLarge
    } else {
        return .inline
    }
}
🤖 Prompt for AI Agents
In
Bluerage/Sources/UI/Screens/CustomModels/CustomModelsList/CustomModelsListScreenView.swift
around lines 54–55, the view uses .toolbarTitleDisplayMode(.inlineLarge) which
requires iOS 18+, so add a private computed helper property (near the other
helpers in this view) that returns .inlineLarge when #available(iOS 18.0, *) and
.inline otherwise, then replace the direct
.toolbarTitleDisplayMode(.inlineLarge) call with
.toolbarTitleDisplayMode(toolbarTitleDisplayMode) to provide the
availability-safe fallback.

.errorAlert(error: self.viewModel.state.alertError) {
self.viewModel.resetAlertError()
Expand Down
Loading