Skip to content

Add settings to disable pane ring and flash - #1217

Merged
lawrencecchen merged 5 commits into
mainfrom
task-add-setting-to-disable-blue-outline
Mar 13, 2026
Merged

lawrencecchen merged 5 commits into
mainfrom
task-add-setting-to-disable-blue-outline

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Mar 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add separate Settings toggles for the unread pane ring and the one-shot pane flash, both defaulting to on
  • gate terminal unread notification rings on the ring preference
  • gate terminal, browser, and markdown flash animations on the flash preference and add isolated defaults coverage for both settings

Testing

  • ./scripts/setup.sh (reused cached GhosttyKit.xcframework and fixed the worktree setup)
  • ./scripts/reload.sh --tag blue-outline (build succeeded and launched the tagged app after both changes)

Issues

  • Related: task request "add setting to disable blue outline"

Summary by CodeRabbit

  • New Features
    • Introduced Unread Pane Ring indicator and Pane Flash notification animation for visual feedback
    • Both notification indicators are independently toggleable in Settings and enabled by default
    • Enhanced multilingual support for notification options, workspace settings, and UI commands

@vercel

vercel Bot commented Mar 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Mar 13, 2026 10:46am

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 5 files

@greptile-apps

greptile-apps Bot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a user-facing toggle in the Notifications section of Settings to disable the blue unread-notification ring drawn around terminal panes. The implementation gates the showsUnreadNotificationRing parameter in TerminalPanelView on a new @AppStorage-backed boolean, wires a SettingsCardRow toggle in SettingsView, adds the localized strings for English and Japanese, includes the key in the settings-reset path, and provides isolated-defaults unit tests.

Key changes:

  • NotificationPaneRingSettings enum added to TerminalNotificationStore.swift with a enabledKey, defaultEnabled = true, and an isEnabled(defaults:) helper that mirrors NotificationBadgeSettings — however, unlike its counterpart, isEnabled() is never called from production code; only from tests.
  • TerminalPanelView reads the setting via @AppStorage and short-circuits showsUnreadNotificationRing to false when disabled — this is the actual production code path.
  • NotificationPaneRingSettingsTests is appended to UpdatePillReleaseVisibilityTests.swift, a semantically unrelated file, making the tests harder to discover.

Confidence Score: 4/5

  • Safe to merge — the feature is well-scoped, defaults to enabled (preserving existing behavior), and the reset path is covered.
  • The core toggle logic is straightforward and correct. The only issues are non-blocking: a static isEnabled() helper that is defined and tested but never called in production code, and new test cases placed in a semantically unrelated file. Neither impacts runtime correctness.
  • Sources/TerminalNotificationStore.swift — the dead isEnabled() helper may cause confusion about whether the setting is read correctly in non-SwiftUI code paths.

Important Files Changed

Filename Overview
Sources/TerminalNotificationStore.swift Adds NotificationPaneRingSettings enum following the NotificationBadgeSettings pattern; the static isEnabled(defaults:) helper is correct but is never called in production (only tested), making it dead code.
Sources/Panels/TerminalPanelView.swift Adds @AppStorage for notificationPaneRingEnabled and gates showsUnreadNotificationRing on it; straightforward and correct.
Sources/cmuxApp.swift Adds @AppStorage binding, a SettingsCardRow toggle UI, and resets the setting in the defaults-reset path; consistent with adjacent notification settings.
Resources/Localizable.xcstrings Adds English and Japanese localizations for the two new settings.notifications.paneRing.* keys; no issues found.
cmuxTests/UpdatePillReleaseVisibilityTests.swift Adds isolated-defaults tests for the default-enabled and persisted-disabled cases; tests are correct but the class is placed in a semantically unrelated file and tests a dead-code helper that is not wired to the UI.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User toggles Unread Pane Ring in SettingsView] -->|writes| B["UserDefaults: notificationPaneRingEnabled"]
    B -->|AppStorage binding| C[TerminalPanelView reads notificationPaneRingEnabled]
    C --> D{hasUnreadNotification AND notificationPaneRingEnabled?}
    D -->|true| E[showsUnreadNotificationRing = true - Blue ring visible]
    D -->|false| F[showsUnreadNotificationRing = false - Blue ring hidden]

    subgraph DeadCode [Unused in Production]
        G["NotificationPaneRingSettings.isEnabled(defaults:)"]
        H[Unit Tests only]
        G --> H
    end
Loading

Last reviewed commit: 75e8784

Comment thread Sources/TerminalNotificationStore.swift
Comment thread cmuxTests/UpdatePillReleaseVisibilityTests.swift Outdated
@lawrencecchen lawrencecchen changed the title Add setting to disable unread pane ring Add settings to disable pane ring and flash Mar 12, 2026
@coderabbitai

coderabbitai Bot commented Mar 12, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9daa45dc-ea81-439a-bd44-f8bcfc5ef383

📥 Commits

Reviewing files that changed from the base of the PR and between 5d7a390 and 27aa73f.

📒 Files selected for processing (1)
  • Resources/Localizable.xcstrings
🚧 Files skipped from review as they are similar to previous changes (1)
  • Resources/Localizable.xcstrings

📝 Walkthrough

Walkthrough

This PR introduces two new notification UI feature flags—Pane Ring and Pane Flash—with accompanying localization strings, settings enums for UserDefaults-backed configuration, AppStorage integration in the SettingsView, and conditional logic across panel implementations to gate animations based on the new settings.

Changes

Cohort / File(s) Summary
Localization Additions
Resources/Localizable.xcstrings
Added 68 new localization keys for notification settings (pane ring/flash titles and subtitles), workspace placement options, update-related prompts, and UI command descriptions across multiple languages.
Notification Settings Configuration
Sources/TerminalNotificationStore.swift
Introduced two new public enums—NotificationPaneRingSettings and NotificationPaneFlashSettings—each with enabledKey, defaultEnabled, and isEnabled(defaults:) for UserDefaults-backed feature flag management.
Panel Flash Logic Gating
Sources/Panels/BrowserPanel.swift, Sources/Panels/MarkdownPanel.swift, Sources/Panels/TerminalPanel.swift
Added early-return guard clauses to triggerFlash() and related methods to conditionally skip flash animation when NotificationPaneFlashSettings.isEnabled() returns false.
UI Settings Integration
Sources/cmuxApp.swift, Sources/Panels/TerminalPanelView.swift
Added two AppStorage-backed properties (notificationPaneRingEnabled, notificationPaneFlashEnabled) in SettingsView with UI toggles; wired TerminalPanelView to gate unread notification ring display based on ring setting flag.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 Rings and flashes, now with care,
Settings toggle, flags declare,
Flash and ring bend to command,
Notifications under user's hand!
✨ A hoppy dance of UI delight!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title concisely describes the main change: adding settings to disable pane ring and flash notification features.
Description check ✅ Passed The description covers the main changes, testing approach, and related task, but lacks demo video and verification of specific checklist items.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch task-add-setting-to-disable-blue-outline
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Sources/cmuxApp.swift`:
- Around line 3515-3517: The Toggle controls currently use an empty label string
and .labelsHidden(), making them inaccessible to VoiceOver; update the Toggle
initializers (the ones bound to notificationPaneRingEnabled and the other toggle
at the following instance) to provide a semantic accessibility name by either
supplying a Text label (e.g., Text("Notifications: Ring") or appropriate short
title) as the first parameter or keep the empty label but add
.accessibilityLabel("...") with a descriptive string; ensure you update both
Toggle("", isOn: $notificationPaneRingEnabled) and the other Toggle("", isOn:
...) so the accessibility label matches the visible row title.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cc57a91c-a937-4b32-baa7-5a19bfe5a0e6

📥 Commits

Reviewing files that changed from the base of the PR and between 6272f50 and 5d7a390.

📒 Files selected for processing (8)
  • Resources/Localizable.xcstrings
  • Sources/Panels/BrowserPanel.swift
  • Sources/Panels/MarkdownPanel.swift
  • Sources/Panels/TerminalPanel.swift
  • Sources/Panels/TerminalPanelView.swift
  • Sources/TerminalNotificationStore.swift
  • Sources/cmuxApp.swift
  • cmuxTests/UpdatePillReleaseVisibilityTests.swift

Comment thread Sources/cmuxApp.swift
…isable-blue-outline

# Conflicts:
#	Sources/cmuxApp.swift
#	cmuxTests/CmuxWebViewKeyEquivalentTests.swift
@lawrencecchen
lawrencecchen merged commit 2596f78 into main Mar 13, 2026
12 checks passed
bn-l pushed a commit to bn-l/cmux that referenced this pull request Apr 3, 2026
* Add setting to disable unread pane ring

* Add setting to disable pane flash

* Label notification toggles for accessibility

* Clean up notification settings review follow-ups

This branch was successfully deployed

1 active deployment
Preview — 27aa73f4 Deployed Mar 13, 2026 by vercel[bot]
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