Skip to content

Comments

Feat/general fixes#311

Merged
judekim0507 merged 4 commits intonook-browser:devfrom
judekim0507:feat/general-fixes
Feb 20, 2026
Merged

Feat/general fixes#311
judekim0507 merged 4 commits intonook-browser:devfrom
judekim0507:feat/general-fixes

Conversation

@judekim0507
Copy link
Member

@judekim0507 judekim0507 commented Feb 20, 2026

Summary by CodeRabbit

  • New Features

    • Added custom search engine management – create and manage your own search providers in Settings
    • Dynamic color-based UI theming for improved contrast and visibility in AI chat, history sidebar, and search interfaces
  • Bug Fixes

    • Improved tab creation reliability to eliminate potential race conditions when opening new tabs

@judekim0507 judekim0507 marked this pull request as ready for review February 20, 2026 06:28
@judekim0507 judekim0507 merged commit 5ea8508 into nook-browser:dev Feb 20, 2026
1 check was pending
@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR introduces custom search engine support with user-facing management UI, refactors tab creation to accept initial URLs, implements contrast-based color theming across sidebar components, and updates search URL normalization to use templates instead of provider enums.

Changes

Cohort / File(s) Summary
Custom Search Engine Management
Nook/Components/Settings/SettingsView.swift, Nook/Components/Settings/Tabs/General.swift, Nook/Models/Settings/SiteSearch.swift, Settings/NookSettingsService.swift
Adds CustomSearchEngine model, UI controls for adding/removing custom engines in Settings, persistence layer for customSearchEngines array, and resolvedSearchEngineTemplate computed property. Refactors searchEngine enum storage to searchEngineId string for flexibility.
Tab Creation & URL Handling
Nook/Managers/BrowserManager/BrowserManager.swift, Nook/Managers/TabManager/TabManager.swift, Nook/Managers/SearchManager/Utils.swift, Nook/Models/Tab/Tab.swift, CommandPalette/CommandPaletteView.swift
Updates createNewTab to accept optional URL parameter, normalizeURL to use queryTemplate string instead of SearchProvider enum, and eliminates separate URL-load steps after tab creation. Adds profile backfill logic when creating tabs in spaces without profileId.
Contrast-Based Color Theming
Nook/Components/Sidebar/AIChat/SidebarAIChat.swift, Nook/Components/Sidebar/Menu/SidebarMenuHistoryTab.swift, Nook/Managers/DialogManager/DialogManager.swift
Introduces GradientColorManager environment object for dynamic contrast color computation. Replaces static white/opaque colors with contrast-based theming (contrastText, contrastTextSecondary) across AI chat UI, history sidebar, and dialogs.
Documentation & Configuration
.gitignore, CLAUDE.md, README.md
Removes CLAUDE.md from gitignore to enable tracking, adds comprehensive Claude Code guidance document, and appends Star History visualization to README.

Sequence Diagram

sequenceDiagram
    participant User as User Interface
    participant Settings as Settings Views
    participant Manager as NookSettingsService
    participant BrowserMgr as BrowserManager
    participant TabMgr as TabManager
    participant SearchMgr as SearchManager
    
    User->>Settings: Add/select custom search engine
    Settings->>Manager: customSearchEngines.append(engine)
    Settings->>Manager: searchEngineId = engine.id
    Manager->>Manager: Persist to UserDefaults
    
    User->>Settings: Create new tab via CommandPalette
    Settings->>BrowserMgr: createNewTab(in: windowState, url: userInput)
    BrowserMgr->>Manager: resolvedSearchEngineTemplate
    Manager-->>BrowserMgr: queryTemplate for selected engine
    BrowserMgr->>SearchMgr: normalizeURL(userInput, queryTemplate: template)
    SearchMgr-->>BrowserMgr: normalized URL
    BrowserMgr->>TabMgr: createNewTab(url: normalizedURL, in: space)
    TabMgr->>TabMgr: Backfill default profile if needed
    TabMgr-->>User: New tab created with URL
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

in progress

Poem

🐰 A custom search for every dream,
Where templates flow like a gentle stream,
Contrast colors shine so bright,
Tabs appear with the perfect light,
Settings bloom in thoughtful delight!

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant