Skip to content

feat: implement search bar inside of the settings#1686

Closed
janburzinski wants to merge 4 commits intogeneralaction:mainfrom
janburzinski:feature/semantic-settings-search
Closed

feat: implement search bar inside of the settings#1686
janburzinski wants to merge 4 commits intogeneralaction:mainfrom
janburzinski:feature/semantic-settings-search

Conversation

@janburzinski
Copy link
Copy Markdown
Collaborator

@janburzinski janburzinski commented Apr 7, 2026

Summary

finally able to search for the setting i was looking for quicker lol

very open on the design btw but its ok for testing this out for now
maybe we should make this just a search icon and when you click on it it expands(???) but then again i thought that would be too hard to maybe notice idk lol

this in general could also be a lil overcomplicated maybe but i really wanted to be able to search for e.g. jira or ticket and find jira and stuff

Fixes

#1682

Snapshot

Screen.Recording.2026-04-07.at.10.57.33.mov

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • This change requires a documentation update

Mandatory Tasks

  • I have self-reviewed the code

Checklist

  • I have read the contributing guide
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked if my PR needs changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Summary by CodeRabbit

  • New Features
    • Added settings search on the Settings page with a search bar and clear button.
    • Results are grouped by category, show total counts, and highlight matching keywords.
    • Use Cmd/Ctrl+F to focus the settings search; Esc still closes the panel.
    • Click a search result to jump directly to that setting.

janburzinski and others added 3 commits April 7, 2026 09:39
Implement search functionality for settings with:
- Search input component
- Search results overlay
- useSettingsSearch hook
- Updated all settings cards to support search indexing
Collapse keywords/synonyms into a single aliases array, drop unused
category/matches fields and the duplicated getHighlightSegments helper,
and replace the multi-tier similarity + word fallback with a flat
exact/startsWith/includes scorer. Behaviour for normal queries is
unchanged; edge cases (special chars, 1-char queries) are more
predictable.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

@janburzinski is attempting to deploy a commit to the General Action Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a615cb41-55ec-4bd0-b4b2-0019b7b1aec0

📥 Commits

Reviewing files that changed from the base of the PR and between 35be7fc and afa4f84.

📒 Files selected for processing (3)
  • src/renderer/components/SettingsPage.tsx
  • src/renderer/components/SettingsSearchResults.tsx
  • src/renderer/hooks/useSettingsSearch.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/hooks/useSettingsSearch.ts

📝 Walkthrough

Walkthrough

Added stable DOM id attributes to many settings UI components; introduced a settings search feature (input, results, search index, and wiring into SettingsPage) and added a typed integration registry used by IntegrationsCard. Tests validate registry/index consistency.

Changes

Cohort / File(s) Summary
Settings Component DOM IDs
src/renderer/components/BrowserPreviewSettingsCard.tsx, src/renderer/components/DefaultAgentSettingsCard.tsx, src/renderer/components/HiddenToolsSettingsCard.tsx, src/renderer/components/KeyboardSettingsCard.tsx, src/renderer/components/NotificationSettingsCard.tsx, src/renderer/components/RepositorySettingsCard.tsx, src/renderer/components/ResourceMonitorSettingsCard.tsx, src/renderer/components/ReviewAgentSettingsCard.tsx, src/renderer/components/RightSidebarSettingsCard.tsx, src/renderer/components/TaskHoverActionCard.tsx, src/renderer/components/TaskSettingsRows.tsx, src/renderer/components/TelemetryCard.tsx, src/renderer/components/TerminalSettingsCard.tsx, src/renderer/components/ThemeCard.tsx, src/renderer/components/WorkspaceProviderInfoCard.tsx
Added explicit id attributes to root/container elements for stable DOM targeting; no logic or prop/signature changes.
Integration Registry & Refactor
src/renderer/components/integrations/registry.ts, src/renderer/components/IntegrationsCard.tsx
New readonly INTEGRATION_REGISTRY and IntegrationId type; IntegrationsCard now maps registry metadata and separates runtime UI state from static metadata; added id="integrations-card".
Settings Search UI
src/renderer/components/SettingsSearchInput.tsx, src/renderer/components/SettingsSearchResults.tsx
Added controlled search input (keyboard hint, clear action, forwarded ref) and results component (group-by-tab, highlighted matches, animated sections, result click callback).
Search Index & Utilities
src/renderer/hooks/useSettingsSearch.ts
New SETTINGS_INDEX of searchable settings, SearchableSetting/SearchResult types, searchSettings(query) scoring (weighted across label/description/aliases), and groupResultsByTab.
SettingsPage Integration
src/renderer/components/SettingsPage.tsx
Wired search into header and content area: searchQuery/searchResults state, focus handling (Cmd/Ctrl+F interception), result navigation that clears search and scrolls to target, and conditional rendering of search results vs. tab content.
Tests
src/test/renderer/settingsSearchIndex.test.ts
Added tests ensuring integration IDs in INTEGRATION_REGISTRY are present in SETTINGS_INDEX and mapped to the integrations tab.

Sequence Diagram

sequenceDiagram
    actor User
    participant SettingsPage
    participant SearchInput as SettingsSearchInput
    participant SearchIndex as useSettingsSearch
    participant SearchResults as SettingsSearchResults
    participant DOM

    User->>SearchInput: types query
    SearchInput->>SettingsPage: onQueryChange(query)
    SettingsPage->>SearchIndex: searchSettings(query)
    SearchIndex-->>SettingsPage: SearchResult[]
    SettingsPage->>SearchResults: render(results, query)
    SearchResults->>User: display grouped results
    User->>SearchResults: click result
    SearchResults->>SettingsPage: onResultClick(tabId, elementId)
    SettingsPage->>SettingsPage: set active tab, clear search
    SettingsPage->>DOM: scrollIntoView(elementId)
    DOM-->>User: scroll to setting
Loading

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly Related PRs

Poem

🐰 A hop, a nibble, I catalog each key,
DOM ids in neat rows so tests can see.
A search that scurries through settings like light,
Integrations lined up, all tidy and bright.
Tap a result — I’ll scroll you there, quick as a bite.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and accurately describes the main feature addition: implementing a search functionality within the settings UI. It is concise, specific, and directly reflects the primary change across the changeset.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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.

@janburzinski
Copy link
Copy Markdown
Collaborator Author

now that i look at it another idea where to put it: inside of the settings sidebar
mhmmm

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (5)
src/test/renderer/settingsSearchIndex.test.ts (1)

20-27: Consider adding a failure message for misrouted integrations.

Current assertion is correct; a message would make CI failures faster to diagnose.

🔎 Optional diagnostics improvement
-    expect(misrouted).toEqual([]);
+    expect(
+      misrouted,
+      `Integration entries must use tabId="integrations". Misrouted ids: ${misrouted
+        .map((entry) => entry.id)
+        .join(', ')}`
+    ).toEqual([]);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/test/renderer/settingsSearchIndex.test.ts` around lines 20 - 27, Add an
explicit failure message when misrouted integrations are found: after computing
misrouted (from INTEGRATION_REGISTRY and SETTINGS_INDEX) add a guard like if
(misrouted.length > 0) throw new Error(`Misrouted integrations:
${misrouted.map(m => `${m.id} (expected tabId=integrations)`).join(', ')}`) so
CI shows the specific IDs and details before the existing expect check in the
test that routes entries to the integrations tab.
src/renderer/components/SettingsSearchInput.tsx (1)

4-6: Import statement ordering is unconventional.

The isMac constant is declared between import statements, which breaks the typical import-first convention. Consider moving it after all imports:

♻️ Suggested reordering
 import React, { forwardRef } from 'react';
 import { Search, X } from 'lucide-react';
-
-const isMac = typeof navigator !== 'undefined' && /mac|iphone|ipad|ipod/i.test(navigator.platform);
 import { Input } from '@/components/ui/input';
 import { Button } from '@/components/ui/button';
+
+const isMac = typeof navigator !== 'undefined' && /mac|iphone|ipad|ipod/i.test(navigator.platform);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/renderer/components/SettingsSearchInput.tsx` around lines 4 - 6, Move the
top-level isMac constant declaration so all import statements come first;
specifically, relocate the line that defines isMac (using navigator.platform and
the /mac|iphone|ipad|ipod/i test) to appear after the imports of Input and
Button in SettingsSearchInput.tsx, preserving the same expression and any usages
of isMac elsewhere in that file.
src/renderer/components/SettingsSearchResults.tsx (2)

8-16: Consider sharing TAB_LABELS with SettingsPage.

TAB_LABELS duplicates the tab label mapping that exists implicitly in SettingsPage.tsx (in the tabs array). If tab names change, they'd need to be updated in multiple places.

This is minor since the labels are unlikely to change frequently and the duplication is small.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/renderer/components/SettingsSearchResults.tsx` around lines 8 - 16,
TAB_LABELS in SettingsSearchResults.tsx duplicates the tab-to-label mapping
already defined in SettingsPage's tabs array; to avoid drift, export the
canonical labels from SettingsPage (or a shared module) and import them into
SettingsSearchResults instead of maintaining TAB_LABELS. Update SettingsPage to
expose the mapping (e.g., export const TAB_LABELS or export the tabs array) and
replace the local TAB_LABELS usage in SettingsSearchResults.tsx with an import
of that exported symbol so both components read the single source of truth.

60-66: Empty state could benefit from sanitizing the displayed query.

The query is rendered directly in the empty state message. If the query contains special characters or is very long, this could cause display issues. Consider truncating long queries:

♻️ Optional: Truncate long queries in empty state
     return (
       <div className="flex flex-col items-center justify-center py-20 text-center">
-        <p className="text-sm text-muted-foreground">No settings found for "{query}"</p>
+        <p className="text-sm text-muted-foreground">
+          No settings found for "{query.length > 50 ? `${query.slice(0, 50)}…` : query}"
+        </p>
       </div>
     );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/renderer/components/SettingsSearchResults.tsx` around lines 60 - 66, The
empty-state renders the raw query in SettingsSearchResults, which can be too
long or contain problematic characters; add a small helper (e.g.,
truncateQuery(query: string, max = 50): string) and use it when rendering the
<p> so the displayed string is shortened with an ellipsis if over the limit (and
continue to rely on React's text rendering for escaping); update the JSX in
SettingsSearchResults where it currently renders `No settings found for
"{query}"` to use the truncated/sanitized value (e.g., truncated =
truncateQuery(query) and render `No settings found for "{truncated}"`).
src/renderer/components/IntegrationsCard.tsx (1)

558-561: Type assertion is safe but could be stricter.

The entry.id as IntegrationId assertion works because INTEGRATION_REGISTRY defines all valid IDs. However, if a new integration is added to the registry without adding a corresponding entry to integrationRuntime, this would compile but fail at runtime with undefined properties.

Consider adding a compile-time check or runtime guard:

♻️ Optional: Add runtime safety check
 const integrations = INTEGRATION_REGISTRY.map((entry) => ({
   ...entry,
-  ...integrationRuntime[entry.id as IntegrationId],
+  ...integrationRuntime[entry.id as IntegrationId] ?? (() => {
+    console.warn(`Missing runtime config for integration: ${entry.id}`);
+    return { logoSvg: '', connected: false, loading: false, onConnect: () => {}, onDisconnect: () => {} };
+  })(),
 }));
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/renderer/components/IntegrationsCard.tsx` around lines 558 - 561, The
code maps INTEGRATION_REGISTRY and force-casts entry.id to IntegrationId which
can mask missing keys in integrationRuntime; update the mapping to explicitly
guard or assert presence of a runtime entry: for each entry from
INTEGRATION_REGISTRY, lookup integrationRuntime[entry.id] into a local (e.g.,
runtime) and if absent either throw a clear error or merge with safe defaults
before spreading into integrations; alternatively tighten types so
INTEGRATION_REGISTRY entries are constrained to keys of integrationRuntime (use
a Record or TypeScript's satisfies/const patterns) so missing runtimes are a
compile-time error—apply this change around the integrations construction where
INTEGRATION_REGISTRY, integrationRuntime, IntegrationId, and integrations are
referenced.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/renderer/components/SettingsPage.tsx`:
- Around line 101-139: SETTINGS_INDEX contains individual integration IDs
(github, gitlab, jira, linear, plain, forgejo, sentry) but SETTING_ELEMENT_IDS
lacks mappings for those keys, so clicking an integration search result switches
to the Integrations tab without scrolling; update SETTING_ELEMENT_IDS to include
entries for "github", "gitlab", "jira", "linear", "plain", "forgejo", and
"sentry" and map each to 'integrations-card' so the useSettingsSearch scroll
logic finds a valid elementId. Ensure you modify the exported
SETTING_ELEMENT_IDS constant in SettingsPage.tsx to add these keys.

---

Nitpick comments:
In `@src/renderer/components/IntegrationsCard.tsx`:
- Around line 558-561: The code maps INTEGRATION_REGISTRY and force-casts
entry.id to IntegrationId which can mask missing keys in integrationRuntime;
update the mapping to explicitly guard or assert presence of a runtime entry:
for each entry from INTEGRATION_REGISTRY, lookup integrationRuntime[entry.id]
into a local (e.g., runtime) and if absent either throw a clear error or merge
with safe defaults before spreading into integrations; alternatively tighten
types so INTEGRATION_REGISTRY entries are constrained to keys of
integrationRuntime (use a Record or TypeScript's satisfies/const patterns) so
missing runtimes are a compile-time error—apply this change around the
integrations construction where INTEGRATION_REGISTRY, integrationRuntime,
IntegrationId, and integrations are referenced.

In `@src/renderer/components/SettingsSearchInput.tsx`:
- Around line 4-6: Move the top-level isMac constant declaration so all import
statements come first; specifically, relocate the line that defines isMac (using
navigator.platform and the /mac|iphone|ipad|ipod/i test) to appear after the
imports of Input and Button in SettingsSearchInput.tsx, preserving the same
expression and any usages of isMac elsewhere in that file.

In `@src/renderer/components/SettingsSearchResults.tsx`:
- Around line 8-16: TAB_LABELS in SettingsSearchResults.tsx duplicates the
tab-to-label mapping already defined in SettingsPage's tabs array; to avoid
drift, export the canonical labels from SettingsPage (or a shared module) and
import them into SettingsSearchResults instead of maintaining TAB_LABELS. Update
SettingsPage to expose the mapping (e.g., export const TAB_LABELS or export the
tabs array) and replace the local TAB_LABELS usage in SettingsSearchResults.tsx
with an import of that exported symbol so both components read the single source
of truth.
- Around line 60-66: The empty-state renders the raw query in
SettingsSearchResults, which can be too long or contain problematic characters;
add a small helper (e.g., truncateQuery(query: string, max = 50): string) and
use it when rendering the <p> so the displayed string is shortened with an
ellipsis if over the limit (and continue to rely on React's text rendering for
escaping); update the JSX in SettingsSearchResults where it currently renders
`No settings found for "{query}"` to use the truncated/sanitized value (e.g.,
truncated = truncateQuery(query) and render `No settings found for
"{truncated}"`).

In `@src/test/renderer/settingsSearchIndex.test.ts`:
- Around line 20-27: Add an explicit failure message when misrouted integrations
are found: after computing misrouted (from INTEGRATION_REGISTRY and
SETTINGS_INDEX) add a guard like if (misrouted.length > 0) throw new
Error(`Misrouted integrations: ${misrouted.map(m => `${m.id} (expected
tabId=integrations)`).join(', ')}`) so CI shows the specific IDs and details
before the existing expect check in the test that routes entries to the
integrations tab.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d78976a1-f2d7-46bb-91fc-95a47aa76740

📥 Commits

Reviewing files that changed from the base of the PR and between c797ed5 and 35be7fc.

📒 Files selected for processing (22)
  • src/renderer/components/BrowserPreviewSettingsCard.tsx
  • src/renderer/components/DefaultAgentSettingsCard.tsx
  • src/renderer/components/HiddenToolsSettingsCard.tsx
  • src/renderer/components/IntegrationsCard.tsx
  • src/renderer/components/KeyboardSettingsCard.tsx
  • src/renderer/components/NotificationSettingsCard.tsx
  • src/renderer/components/RepositorySettingsCard.tsx
  • src/renderer/components/ResourceMonitorSettingsCard.tsx
  • src/renderer/components/ReviewAgentSettingsCard.tsx
  • src/renderer/components/RightSidebarSettingsCard.tsx
  • src/renderer/components/SettingsPage.tsx
  • src/renderer/components/SettingsSearchInput.tsx
  • src/renderer/components/SettingsSearchResults.tsx
  • src/renderer/components/TaskHoverActionCard.tsx
  • src/renderer/components/TaskSettingsRows.tsx
  • src/renderer/components/TelemetryCard.tsx
  • src/renderer/components/TerminalSettingsCard.tsx
  • src/renderer/components/ThemeCard.tsx
  • src/renderer/components/WorkspaceProviderInfoCard.tsx
  • src/renderer/components/integrations/registry.ts
  • src/renderer/hooks/useSettingsSearch.ts
  • src/test/renderer/settingsSearchIndex.test.ts

Comment on lines +101 to +139
// Map setting IDs to their DOM element IDs for scrolling
export const SETTING_ELEMENT_IDS: Record<string, string> = {
// General
telemetry: 'telemetry-card',
'auto-generate-task-names': 'auto-generate-task-names-row',
'auto-infer-task-names': 'auto-infer-task-names-row',
'auto-approve-by-default': 'auto-approve-by-default-row',
'create-worktree-by-default': 'create-worktree-by-default-row',
'auto-trust-worktrees': 'auto-trust-worktrees-row',
'notifications-enabled': 'notification-settings-card',
'notification-sound': 'notification-settings-card',
'os-notifications': 'notification-settings-card',
'sound-focus-mode': 'notification-settings-card',
'sound-profile': 'notification-settings-card',
// Agents
'default-agent': 'default-agent-settings-card',
'review-agent': 'review-agent-settings-card',
'review-prompt': 'review-agent-settings-card',
'cli-agents': 'cli-agents-section',
// Integrations
integrations: 'integrations-card',
'workspace-provider': 'workspace-provider-card',
// Repository
'branch-prefix': 'repository-settings-card',
'push-on-create': 'repository-settings-card',
'auto-close-issues': 'repository-settings-card',
// Interface
theme: 'theme-card',
'terminal-font-family': 'terminal-settings-card',
'terminal-font-size': 'terminal-settings-card',
'auto-copy-selection': 'terminal-settings-card',
'mac-option-is-meta': 'terminal-settings-card',
'keyboard-shortcuts': 'keyboard-settings-card',
'auto-right-sidebar': 'right-sidebar-settings-card',
'resource-monitor': 'resource-monitor-settings-card',
'browser-preview': 'browser-preview-settings-card',
'task-hover-action': 'task-hover-action-card',
'hidden-tools': 'hidden-tools-settings-card',
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Missing element ID mappings for individual integration search results.

SETTINGS_INDEX (in useSettingsSearch.ts) includes entries for individual integrations (github, gitlab, jira, linear, plain, forgejo, sentry), but these IDs are not mapped in SETTING_ELEMENT_IDS. When a user clicks on a search result for "GitHub" or "Jira", the tab will switch to Integrations but no scroll will occur since elementId will be undefined.

Consider mapping all individual integration IDs to the integrations card:

🔧 Proposed fix to add missing integration mappings
   // Integrations
   integrations: 'integrations-card',
+  github: 'integrations-card',
+  gitlab: 'integrations-card',
+  jira: 'integrations-card',
+  linear: 'integrations-card',
+  plain: 'integrations-card',
+  forgejo: 'integrations-card',
+  sentry: 'integrations-card',
   'workspace-provider': 'workspace-provider-card',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Map setting IDs to their DOM element IDs for scrolling
export const SETTING_ELEMENT_IDS: Record<string, string> = {
// General
telemetry: 'telemetry-card',
'auto-generate-task-names': 'auto-generate-task-names-row',
'auto-infer-task-names': 'auto-infer-task-names-row',
'auto-approve-by-default': 'auto-approve-by-default-row',
'create-worktree-by-default': 'create-worktree-by-default-row',
'auto-trust-worktrees': 'auto-trust-worktrees-row',
'notifications-enabled': 'notification-settings-card',
'notification-sound': 'notification-settings-card',
'os-notifications': 'notification-settings-card',
'sound-focus-mode': 'notification-settings-card',
'sound-profile': 'notification-settings-card',
// Agents
'default-agent': 'default-agent-settings-card',
'review-agent': 'review-agent-settings-card',
'review-prompt': 'review-agent-settings-card',
'cli-agents': 'cli-agents-section',
// Integrations
integrations: 'integrations-card',
'workspace-provider': 'workspace-provider-card',
// Repository
'branch-prefix': 'repository-settings-card',
'push-on-create': 'repository-settings-card',
'auto-close-issues': 'repository-settings-card',
// Interface
theme: 'theme-card',
'terminal-font-family': 'terminal-settings-card',
'terminal-font-size': 'terminal-settings-card',
'auto-copy-selection': 'terminal-settings-card',
'mac-option-is-meta': 'terminal-settings-card',
'keyboard-shortcuts': 'keyboard-settings-card',
'auto-right-sidebar': 'right-sidebar-settings-card',
'resource-monitor': 'resource-monitor-settings-card',
'browser-preview': 'browser-preview-settings-card',
'task-hover-action': 'task-hover-action-card',
'hidden-tools': 'hidden-tools-settings-card',
};
// Map setting IDs to their DOM element IDs for scrolling
export const SETTING_ELEMENT_IDS: Record<string, string> = {
// General
telemetry: 'telemetry-card',
'auto-generate-task-names': 'auto-generate-task-names-row',
'auto-infer-task-names': 'auto-infer-task-names-row',
'auto-approve-by-default': 'auto-approve-by-default-row',
'create-worktree-by-default': 'create-worktree-by-default-row',
'auto-trust-worktrees': 'auto-trust-worktrees-row',
'notifications-enabled': 'notification-settings-card',
'notification-sound': 'notification-settings-card',
'os-notifications': 'notification-settings-card',
'sound-focus-mode': 'notification-settings-card',
'sound-profile': 'notification-settings-card',
// Agents
'default-agent': 'default-agent-settings-card',
'review-agent': 'review-agent-settings-card',
'review-prompt': 'review-agent-settings-card',
'cli-agents': 'cli-agents-section',
// Integrations
integrations: 'integrations-card',
github: 'integrations-card',
gitlab: 'integrations-card',
jira: 'integrations-card',
linear: 'integrations-card',
plain: 'integrations-card',
forgejo: 'integrations-card',
sentry: 'integrations-card',
'workspace-provider': 'workspace-provider-card',
// Repository
'branch-prefix': 'repository-settings-card',
'push-on-create': 'repository-settings-card',
'auto-close-issues': 'repository-settings-card',
// Interface
theme: 'theme-card',
'terminal-font-family': 'terminal-settings-card',
'terminal-font-size': 'terminal-settings-card',
'auto-copy-selection': 'terminal-settings-card',
'mac-option-is-meta': 'terminal-settings-card',
'keyboard-shortcuts': 'keyboard-settings-card',
'auto-right-sidebar': 'right-sidebar-settings-card',
'resource-monitor': 'resource-monitor-settings-card',
'browser-preview': 'browser-preview-settings-card',
'task-hover-action': 'task-hover-action-card',
'hidden-tools': 'hidden-tools-settings-card',
};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/renderer/components/SettingsPage.tsx` around lines 101 - 139,
SETTINGS_INDEX contains individual integration IDs (github, gitlab, jira,
linear, plain, forgejo, sentry) but SETTING_ELEMENT_IDS lacks mappings for those
keys, so clicking an integration search result switches to the Integrations tab
without scrolling; update SETTING_ELEMENT_IDS to include entries for "github",
"gitlab", "jira", "linear", "plain", "forgejo", and "sentry" and map each to
'integrations-card' so the useSettingsSearch scroll logic finds a valid
elementId. Ensure you modify the exported SETTING_ELEMENT_IDS constant in
SettingsPage.tsx to add these keys.

Move elementId from a separate SETTING_ELEMENT_IDS map in SettingsPage
into the SearchableSetting type as a required field. Single source of
truth, and TypeScript now enforces that every searchable setting has a
scroll target.
@janburzinski
Copy link
Copy Markdown
Collaborator Author

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@janburzinski janburzinski closed this by deleting the head repository Apr 7, 2026
@janburzinski
Copy link
Copy Markdown
Collaborator Author

lol didnt know deleting my forked repo will also completely destroy this PR.

will make a new pr asap lol

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