Skip to content

Surface sidebar attention dots and flip Settings redesign default on#367

Merged
FuJacob merged 2 commits into
mainfrom
feat/settings-redesign-attention-flip
May 28, 2026
Merged

Surface sidebar attention dots and flip Settings redesign default on#367
FuJacob merged 2 commits into
mainfrom
feat/settings-redesign-attention-flip

Conversation

@FuJacob

@FuJacob FuJacob commented May 28, 2026

Copy link
Copy Markdown
Owner

Re-opened after base branch deletion. Rebased onto current main, build/tests/lint clean locally.

Greptile Summary

This PR completes the Settings redesign rollout: it surfaces per-pane orange attention dots in the sidebar (driven by a new pure SettingsAttentionEvaluator), flips the redesign feature flag default to true, and deletes the now-redundant PlaceholderPaneView scaffold.

  • Attention evaluator (SettingsAttentionEvaluator.swift): a stateless enum that maps a flat Inputs snapshot to both the set of sidebar categories needing a dot and the per-pane callout message, making the rule unit-testable without AppKit.
  • Sidebar dot rendering (SettingsSidebarView): a 7 pt orange Circle at the trailing edge of affected rows, with an accessibilityLabel; the attentionCategories set is computed from live @ObservedObject observables in SettingsContainerView so dots clear automatically on state recovery.
  • Feature flag flip (SettingsCoordinator): uses object(forKey:) as? Bool instead of bool(forKey:) to distinguish an absent key (default true) from an explicit false opt-out, with the legacy path retained for a one-defaults write rollback.

Confidence Score: 4/5

Safe to merge with the dot-condition fix applied; the legacy rollback path remains intact.

The evaluator's dot condition for Apple Intelligence and its callout guard are not aligned on the message-emptiness check, which could produce a silent orange dot with no pane explanation. Everything else in the PR is clean.

Cotabby/Support/SettingsAttentionEvaluator.swift — specifically the Apple Intelligence branch in categoriesNeedingAttention.

Important Files Changed

Filename Overview
Cotabby/Support/SettingsAttentionEvaluator.swift New pure evaluator for sidebar attention dots and pane callouts; the dot condition for Apple Intelligence does not match the callout guard (message non-emptiness), creating a scenario where a dot appears with no explanatory callout in the pane.
Cotabby/App/Coordinators/SettingsCoordinator.swift Correctly flips redesign default to true using object(forKey:) as? Bool to distinguish absent key from an explicit false opt-out.
Cotabby/UI/Settings/SettingsContainerView.swift Threads attentionCategories down from the observable graph to the sidebar; computed property drives reactive updates correctly.
Cotabby/UI/Settings/SettingsSidebarView.swift Adds attentionCategories parameter and renders a 7 pt orange dot at the trailing edge of affected rows; .tag placement on the outer HStack is correct for List selection.
CotabbyTests/SettingsAttentionEvaluatorTests.swift Good coverage of happy path, engine-scoped flags, and callout content; missing a test case where foundationModelAvailable == false and `foundationModelMessage == "".
Cotabby/UI/Settings/Panes/PlaceholderPaneView.swift Deleted scaffold placeholder; removal is expected now that all real panes are wired up.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[SettingsContainerView] -->|builds Inputs snapshot| B[SettingsAttentionEvaluator]
    B -->|Set of SettingsCategory| C[SettingsSidebarView]
    C -->|contains category| D{Show dot?}
    D -- Yes --> E[Orange 7pt Circle]
    D -- No --> F[Normal row]
    A -->|user opens pane| G[calloutMessage for category]
    G -->|non-nil| H[Pane callout banner]
    G -->|nil| I[Pane renders healthy]
    P[permissionManager] --> A
    Q[suggestionSettings] --> A
    R[foundationModelAvailabilityService] --> A
    S[runtimeModel.state.failureDetail] --> A
Loading

Fix All in Codex Fix All in Claude Code

Reviews (1): Last reviewed commit: "Address Greptile feedback: drop empty ca..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

@FuJacob FuJacob merged commit 09d90c1 into main May 28, 2026
4 checks passed
@FuJacob FuJacob deleted the feat/settings-redesign-attention-flip branch May 28, 2026 10:39
Comment on lines +35 to +39
case .appleIntelligence:
if !inputs.foundationModelAvailable {
categories.insert(.appleIntelligence)
categories.insert(.engineAndModel)
}

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.

P1 categoriesNeedingAttention inserts .appleIntelligence whenever foundationModelAvailable is false, with no regard for the message string. calloutMessage(for: .appleIntelligence, ...) adds the extra guard !inputs.foundationModelMessage.isEmpty. If foundationModelAvailabilityService.userVisibleMessage ever returns an empty string while isAvailable is false — a defensive empty-string default, a service that hasn't yet loaded its message, etc. — the sidebar dot appears but the pane renders no callout, so the user sees an unexplained orange dot with no actionable copy below it. The dot condition and the callout guard should use the same criteria.

Suggested change
case .appleIntelligence:
if !inputs.foundationModelAvailable {
categories.insert(.appleIntelligence)
categories.insert(.engineAndModel)
}
case .appleIntelligence:
if !inputs.foundationModelAvailable, !inputs.foundationModelMessage.isEmpty {
categories.insert(.appleIntelligence)
categories.insert(.engineAndModel)
}

Fix in Codex Fix in Claude Code

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