Use inlineLarge toolbar title display mode#1
Conversation
WalkthroughApplied the SwiftUI modifier toolbarTitleDisplayMode(.inlineLarge) to two list screen views, adjusting the navigation title presentation. No changes to data flow, logic, or public APIs. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Bluerage/Sources/UI/Screens/Agents/AgentsList/AgentsListScreenView.swift(1 hunks)Bluerage/Sources/UI/Screens/CustomModels/CustomModelsList/CustomModelsListScreenView.swift(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Lint & Format
Bluerage/Sources/UI/Screens/CustomModels/CustomModelsList/CustomModelsListScreenView.swift
[error] 96-96: Line Length Violation: Line should be 120 characters or less; currently 125 characters
[error] 108-108: Line Length Violation: Line should be 120 characters or less; currently 122 characters
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Generate and Check Licenses
| .toolbarTitleDisplayMode(.inlineLarge) | ||
| } |
There was a problem hiding this comment.
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.
| .toolbarTitleDisplayMode(.inlineLarge) | ||
| .background(UIColor.systemGroupedBackground.swiftUI) |
There was a problem hiding this comment.
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.
…-toolbar-titles Use inlineLarge toolbar title display mode
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68d47bdbcc788331bdaa962f0d282901
Summary by CodeRabbit