Skip to content

fix: Refactor Search#69

Merged
icco merged 8 commits intomainfrom
search
Nov 22, 2025
Merged

fix: Refactor Search#69
icco merged 8 commits intomainfrom
search

Conversation

@icco
Copy link
Owner

@icco icco commented Nov 22, 2025

  • Remove search calls that were never done
  • Make sure rendering and not rendering are separated
  • Make sure we are consistent with our package choices

@icco icco self-assigned this Nov 22, 2025
@icco icco requested a review from Copilot November 22, 2025 15:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the search functionality by removing unused fallback mechanisms and simplifying the search implementation. The changes align with the stated goal of separating rendering concerns and removing code paths that were never executed.

Key Changes:

  • Removed unused fallback search methods (searchViaDatabaseQuery and matchesQuery) that were never called
  • Simplified error handling for tag generation in SaveEntry, treating tags as truly optional
  • Updated documentation to reflect the streamlined search approach

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI commented Nov 22, 2025

@icco I've opened a new pull request, #70, to work on those changes. Once the pull request is ready, I'll request review from you.

icco and others added 5 commits November 22, 2025 15:06
Addresses feedback on PR #69 where tag generation errors were silently
ignored, making AI service failures invisible to operators.

**Changes:**
- Restored `log.Printf` when tag generation fails, including entry text
length for debugging context
- Maintained "tags are optional" behavior - errors logged but don't
block entry creation

```go
if tagRes.err != nil {
    // Log error but continue - tags are optional
    log.Printf("could not generate tags for entry (%d chars): %s", len(text), tagRes.err)
    tagRes.tags = []string{}
}
```

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/icco/etu/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: icco <20201+icco@users.noreply.github.com>
@icco icco merged commit 72b8ea4 into main Nov 22, 2025
6 checks passed
@icco icco deleted the search branch November 22, 2025 15:17
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.

2 participants

Comments