Skip to content

Reorganize settings by task and reconcile with the menu bar#246

Merged
FuJacob merged 2 commits into
mainfrom
settings-reorder
May 25, 2026
Merged

Reorganize settings by task and reconcile with the menu bar#246
FuJacob merged 2 commits into
mainfrom
settings-reorder

Conversation

@FuJacob
Copy link
Copy Markdown
Owner

@FuJacob FuJacob commented May 25, 2026

Summary

Refactors the settings window so users can find what they need faster, without changing any underlying settings or persistence. Stays a single flat grouped Form (no tabs/sidebar) — just reordered, regrouped, and aligned with the menu bar.

Key changes:

  • Updates folded into the title header, right-aligned (version + Check for Updates), with Support pinned directly below — both kept at the top as requested.
  • Needs-attention banner near the top, shown only when a required permission is missing or the selected engine is unavailable, so the cause of "it's not working" isn't buried at the bottom.
  • Task-based regrouping of the previously scattered sections:
    • General — Enable Globally, Show Indicator, Allow Multi-line Suggestions, Include Clipboard Context, Open Welcome Guide
    • Model & Engine — engine picker + availability/runtime status merged with the formerly-distant Local Models block
    • Writing — Length, Language, Custom Rules, Name (was split across "Autocomplete" + "Profile")
    • Shortcuts (was "Keybind"), Apps (was "Disabled Apps"), Permissions, Uninstall
  • Menu ↔ Settings parity: added the multi-line toggle to Settings and aligned the indicator label to "Show Indicator" in both surfaces.

Validation

swiftlint lint --quiet Cotabby/UI/SettingsView.swift Cotabby/UI/MenuBarView.swift
# exit 0

xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' build
# ** BUILD SUCCEEDED **

Presentation-only; no SuggestionSettingsModel or persistence changes. Worth an eyeball in the running app to confirm the header layout and banner read well.

Linked issues

None.

Risk / rollout notes

UI-only reorganization. The per-app blocklist/allowlist polarity was intentionally left as-is (out of scope), and the prefix-autocorrect feature is not referenced here since it isn't on main yet.

Greptile Summary

This PR is a presentation-only reorganization of the settings window — no persistence, no model changes — that regroups controls by task, merges previously scattered sections, and adds a top-of-screen attention banner for blocked-autocomplete states.

  • Section consolidation: The old Autocomplete, Profile, and Local Models sections are merged into General, Writing, and a localModelControls group nested inside Model & Engine; KeybindShortcuts and Disabled AppsApps are pure renames.
  • Header + banner rework: The Updates section is dissolved into a compact trailing widget in the header row, and a new attentionBanner surfaces the three blocking states (missing permissions, Apple Intelligence unavailable, llama runtime failure) near the top without scrolling.
  • Menu-bar parity: multiLineEnabledBinding is added to wire the new "Allow Multi-line Suggestions" toggle in Settings, and the menu-bar label is trimmed from "Show Cotabby Indicator" to "Show Indicator" to match.

Confidence Score: 5/5

Safe to merge — purely presentation reorganization with no persistence, model, or behavioral changes.

Every changed line is SwiftUI layout: section renames, view moves, a new conditional banner, and one label string. No settings model mutations, no new side effects, no new async paths. The attention banner correctly covers all three blocking states (permissions, Apple Intelligence, llama failure). The new multiLineEnabledBinding follows the same pattern as every other binding in the file and hooks into a pre-existing model property. Nothing here can regress autocomplete behavior.

No files require special attention.

Important Files Changed

Filename Overview
Cotabby/UI/SettingsView.swift Major section restructuring — new attentionBanner, merged modelEngineSection/localModelControls, writingSection absorbs profile content, header hosts version+update button. No logic changes; bindings follow existing patterns correctly.
Cotabby/UI/MenuBarView.swift Single label change: 'Show Cotabby Indicator' → 'Show Indicator' for parity with SettingsView. No behavioral or binding changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[SettingsView body] --> B[settingsHeader\nversion + Check for Updates]
    A --> C[supportSection]
    A --> D{attentionBanner\nconditions}
    D -- permissions missing --> E[attentionRow: grant permissions]
    D -- appleIntelligence unavailable --> F[attentionRow: foundation model message]
    D -- llamaOpenSource failed --> G[attentionRow: runtime failure detail]
    D -- all OK --> H[EmptyView]
    A --> I[generalSection\nEnable / Indicator / Multi-line / Clipboard / Onboarding]
    A --> J[modelEngineSection\nEngine picker + availability/runtime status]
    J -- supportsLocalModelManagement --> K[localModelControls Group\ndescription / picker / catalog / folder]
    A --> L[writingSection\nLength / Language / Name / CustomRules]
    A --> M[shortcutsSection]
    A --> N[appsSection]
    A --> O[permissionsSection]
    A --> P[uninstallSection]
Loading

Comments Outside Diff (1)

  1. Cotabby/UI/SettingsView.swift, line 721-728 (link)

    P2 The .appleIntelligence branch of localModelsDescription is now unreachable. localModelControls — the only caller — is guarded by suggestionSettings.selectedEngine.supportsLocalModelManagement, which is almost certainly false for .appleIntelligence. As a result the string "These models are used when Engine is set to Open Source." can never appear in the UI, and the hint that local models exist (useful when a user is deciding whether to switch engines) is silently dropped. Consider removing the dead branch or restructuring the modelEngineSection to surface this hint another way.

    Fix in Codex Fix in Claude Code

Reviews (2): Last reviewed commit: "Surface the attention banner when the op..." | Re-trigger Greptile

Restructures the settings window so the controls people actually open it for
are findable without hunting:

- Fold the version + Check for Updates control into the title header bar
  (right-aligned), keeping Support pinned directly beneath it.
- Add a conditional "needs attention" banner near the top that fires when a
  required permission is missing or the selected engine is unavailable, so the
  user doesn't scroll to the bottom to find out why nothing works.
- Regroup the flat form by task: General (the everyday toggles + multi-line +
  welcome), Model & Engine (engine choice + availability + the previously
  far-away Local Models block, now merged), Writing (length, language, custom
  rules, name), Shortcuts (was "Keybind"), Apps (was "Disabled Apps"),
  Permissions, then Uninstall.
- Reconcile menu vs settings: add the multi-line toggle to settings for parity
  and align the indicator label to "Show Indicator" in both surfaces.

No settings-model or persistence changes — purely presentation, ordering, and
label parity.
Comment thread Cotabby/UI/SettingsView.swift
Greptile: the banner covered missing permissions and an unavailable Apple
Intelligence engine, but a failed .llamaOpenSource runtime was only visible
after scrolling to the Model & Engine row. Add the matching case so both
engine paths flag failure at the top.
@FuJacob
Copy link
Copy Markdown
Owner Author

FuJacob commented May 25, 2026

Addressed the banner gap in 617f7d5: attentionBanner now adds an .llamaOpenSource + case .failed branch, so a failed local runtime surfaces at the top (pointing to Model & Engine) the same way missing permissions and an unavailable Apple Intelligence engine already do.

Local CI parity on the branch: SwiftLint clean, build succeeded, 290 tests pass (3 skipped). No merge conflicts with current main.

@FuJacob FuJacob merged commit 7e84e68 into main May 25, 2026
3 checks passed
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.

1 participant