Skip to content

feat: add Brave, Ecosia, and all search engine logos + launcher AI icon fix#238

Open
enzocarpentier wants to merge 3 commits intothe-ora:mainfrom
enzocarpentier:feat/add-search-engines-logos
Open

feat: add Brave, Ecosia, and all search engine logos + launcher AI icon fix#238
enzocarpentier wants to merge 3 commits intothe-ora:mainfrom
enzocarpentier:feat/add-search-engines-logos

Conversation

@enzocarpentier
Copy link
Copy Markdown
Contributor

Description

This PR adds Brave and Ecosia as default search engines and integrates official SVG logos for all search engines (conventional and AI) throughout the Ora app.
It also fixes a bug in the launcher where the wrong AI logo could appear (e.g., ChatGPT logo instead of Claude).

Main changes

  • Added Brave and Ecosia to the default search engines.
  • Integrated SVG logos for all engines (Google, Bing, DuckDuckGo, Kagi, X, Reddit, YouTube, Gemini, Copilot, Meta AI, etc.).
  • Cleaned up asset catalog: removed unnecessary duplicates, configured Xcode assets for proper Light/Dark mode support.
  • Fixed launcher bug: each AI suggestion now displays the correct logo (e.g., Claude shows the Claude logo, not the default AI).
  • Build, lint, and tests all pass.

Screenshots

Capture d’écran 2026-03-14 à 18 49 36 Capture d’écran 2026-03-14 à 18 50 10

…tion

Adds Brave and Ecosia to default search engines. Refactors capsule logic to use templates natively, avoiding duplicated inverted sets. Fixes bug in LauncherSuggestionsView rendering wrong AI logo. Integrates all SVG assets.
@tembo tembo bot added bug Something isn't working enhancement improvements labels Mar 14, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 14, 2026

Greptile Summary

This PR adds Brave and Ecosia as new default search engines, integrates SVG logos for all built-in engines (both conventional and AI), and fixes a launcher bug where AI suggestions always showed the default AI's logo instead of the correct engine-specific one.

  • New search engines: Brave and Ecosia added to SearchEngineService with proper URLs, colors, aliases, and icons
  • Logo integration: All built-in engines now have capsule logos via the Xcode asset catalog with light/dark mode support, replacing the previously empty icon strings
  • Launcher AI icon fix: LauncherSuggestionsView now resolves each AI suggestion to its specific engine (by name) rather than always falling back to the default AI chat engine, so Claude shows the Claude logo, ChatGPT shows the OpenAI logo, etc.
  • Asset cleanup: Removed redundant -inverted imageset variants (grok, openai) in favor of template rendering or light/dark asset catalog appearances
  • Issue: Gemini dark-mode asset has a double .svg.svg file extension that should be corrected
  • Issue: ora.entitlements has diverged from project.yml (source of truth) — entitlement removals here are dead changes that get overwritten by xcodegen

Confidence Score: 3/5

  • Functionally safe to merge — core logic changes are correct, but two file-level issues should be cleaned up first
  • The Swift code changes are well-structured and the new search engines are correctly defined. However, the Gemini asset has a double .svg extension that should be fixed to avoid potential dark-mode rendering issues, and the entitlements file has been manually edited to remove entries that project.yml still declares — creating a confusing mismatch even though xcodegen overwrites the file at build time.
  • ora/Assets/Catalogs/Capsule.xcassets/gemini-capsule-logo.imageset/Contents.json (double .svg extension) and ora/Info/ora.entitlements (out of sync with project.yml)

Important Files Changed

Filename Overview
ora/Features/Search/Services/SearchEngineService.swift Adds Brave and Ecosia search engines with correct URLs, icons, and aliases; populates icon strings for all existing engines. Clean additions.
ora/Features/Launcher/Suggestions/LauncherSuggestionItem.swift Simplifies AI icon logic by removing the inverted-icon computed property and using direct icon rendering with foregroundColor. Good cleanup.
ora/Features/Launcher/Suggestions/LauncherSuggestionsView.swift Fixes AI logo bug by resolving each suggestion's engine by name instead of always using the default. Contains a force-unwrap pattern that could be safer.
ora/Features/Settings/Sections/SearchEngineSettingsView.swift Adds .foregroundStyle(.primary) to engine icons in settings rows for proper light/dark mode rendering. Minimal, correct change.
ora/Info/ora.entitlements Removes network.client and public-key-credential entitlements, creating a mismatch with project.yml. Changes are overwritten by xcodegen at build time.
ora/Assets/Catalogs/Capsule.xcassets/gemini-capsule-logo.imageset/Contents.json Dark mode variant has double .svg.svg extension in filename reference — should be .svg.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[LauncherSuggestionsView] -->|ForEach suggestion| B{suggestion.type == .aiChat?}
    B -->|Yes, has name| C[getSearchEngine byName]
    B -->|No or no name| D[getDefaultAIChat]
    C --> E[LauncherSuggestionItem]
    D --> E
    E --> F{defaultAI has non-empty icon?}
    F -->|Yes| G["Image(aiIcon) with foregroundColor"]
    F -->|No| H[FavIcon / system icon fallback]
    G --> I[Render in Launcher]
    H --> I

    style C fill:#4CAF50,color:#fff
    style G fill:#4CAF50,color:#fff
Loading

Comments Outside Diff (1)

  1. ora/Info/ora.entitlements, line 1-28 (link)

    Entitlements file diverges from project.yml
    This PR removes com.apple.security.network.client and com.apple.developer.web-browser.public-key-credential from ora.entitlements. However, project.yml still declares both of these under entitlements.properties, and since xcodegen regenerates entitlements from project.yml, this file will be overwritten at build time.

    These manual edits to the .entitlements file are effectively dead changes that will be reverted by the next xcodegen run, creating a confusing mismatch between what's committed and what's actually used. Consider either:

    1. Reverting the changes to this file (since project.yml is the source of truth), or
    2. Also updating project.yml if the intent is to actually remove these entitlements (though removing network.client from a browser would break all network requests).

Last reviewed commit: 9d0ccb3

Comment on lines +17 to +18
let engine = suggestion.type == .aiChat && suggestion.name != nil ? searchEngineService
.getSearchEngine(byName: suggestion.name!) : searchEngineService.getDefaultAIChat()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Force-unwrap on suggestion.name
While the suggestion.name != nil check in the ternary condition guards the force-unwrap on suggestion.name!, this pattern is fragile — a future refactor could easily separate the nil check from the unwrap and introduce a crash. Consider using if let or flatMap for safer unwrapping:

Suggested change
let engine = suggestion.type == .aiChat && suggestion.name != nil ? searchEngineService
.getSearchEngine(byName: suggestion.name!) : searchEngineService.getDefaultAIChat()
let engine = suggestion.type == .aiChat && suggestion.name != nil ? searchEngineService
.getSearchEngine(byName: suggestion.name!) : searchEngineService.getDefaultAIChat()

A safer alternative would be:

let engine: SearchEngine? = {
    if suggestion.type == .aiChat, let name = suggestion.name {
        return searchEngineService.getSearchEngine(byName: name)
    }
    return searchEngineService.getDefaultAIChat()
}()

yonaries and others added 2 commits March 15, 2026 22:54
…set/Contents.json

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants