Skip to content

fix: AI Chat Go to Settings button does nothing on macOS 14+#1056

Merged
datlechin merged 1 commit into
mainfrom
fix/ai-not-configured-go-to-settings
May 7, 2026
Merged

fix: AI Chat Go to Settings button does nothing on macOS 14+#1056
datlechin merged 1 commit into
mainfrom
fix/ai-not-configured-go-to-settings

Conversation

@datlechin

Copy link
Copy Markdown
Member

Bug

On the AI Chat panel's "AI Not Configured" empty state, clicking "Go to Settings..." does nothing.

Root cause

AIChatPanelView.noProviderState's action posted the legacy AppKit selector showSettingsWindow: via NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil). This selector was the responder-chain entry point for the legacy "Preferences" responder pattern. macOS 13+ renamed Preferences to Settings, and the SwiftUI Settings { ... } scene installs Selector(("showSettingsWindow:")) only when no other entry point is present. With TablePro's setup (where Settings is opened via WindowOpener.openSettings(tab:)), this responder selector is never registered, so the call silently fails.

TablePro's minimum target is macOS 14, so this code path has been broken across every shipped version that exposes the empty state.

Fix

Route through the project's canonical entry point:

WindowOpener.shared.openSettings(tab: .ai)

WindowOpener.openSettings(tab:) writes the requested tab to selectedSettingsTab (which SettingsView's @AppStorage reads back) and invokes the action wired up in WindowOpener.start(...) from TableProApp.swift. Same path used by SyncStatusIndicator and other settings entry points.

Scope check

I grepped for all uses of the buggy pattern. Only one occurrence in the codebase:

$ grep -rn 'NSApp\.sendAction(Selector' TablePro --include="*.swift"
TablePro/Views/AIChat/AIChatPanelView.swift:171:    NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)

No other entry points use the legacy selector pattern, so this PR is one file, one line.

CHANGELOG

Entry under [Unreleased] -> Fixed.

Test plan

  • Open TablePro with no AI provider configured.
  • Open the AI Chat panel.
  • Click "Go to Settings...".
  • Settings window opens, AI tab selected.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@datlechin datlechin merged commit 330a136 into main May 7, 2026
1 check passed
@datlechin datlechin deleted the fix/ai-not-configured-go-to-settings branch May 7, 2026 02:03
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