Skip to content

fix: search reliability#1061

Draft
MatteoGabriele wants to merge 2 commits intonpmx-dev:mainfrom
MatteoGabriele:fix/search-reliability
Draft

fix: search reliability#1061
MatteoGabriele wants to merge 2 commits intonpmx-dev:mainfrom
MatteoGabriele:fix/search-reliability

Conversation

@MatteoGabriele
Copy link
Contributor

Changes aimed at increasing the reliability and precision of the search input.

  • Reduces the number of watchers and timeouts
  • Removes the page transition

@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 6, 2026 0:00am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 6, 2026 0:00am
npmx-lunaria Ignored Ignored Feb 6, 2026 0:00am

Request Review

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/pages/index.vue 20.00% 2 Missing and 2 partials ⚠️
app/components/AppHeader.vue 0.00% 1 Missing ⚠️
app/components/Header/SearchBox.vue 75.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

This pull request refactors the search functionality and focus management across multiple components. Changes include removing automatic focus synchronisation with page visibility in the header, eliminating internal focus state tracking in the search box component, and simplifying the search flow in the home page to use direct route navigation. The search results page no longer delays interaction tracking during initial render. Additionally, the experimental View Transition feature is disabled in the Nuxt configuration.

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description directly relates to the changeset, accurately describing the intent to increase search reliability by reducing watchers, timeouts, and removing page transitions.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 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.

Copy link
Contributor

@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 (1)
app/pages/index.vue (1)

6-17: Missing await on navigateTo.

The function is declared async but navigateTo is not awaited. Either add await to properly propagate navigation errors, or remove the async keyword if fire-and-forget is intentional.

Proposed fix
-async function search() {
+function search() {
   if (!searchQuery.value) {
     return
   }

Or, if you want to handle errors:

-  navigateTo({
+  await navigateTo({
     name: 'search',
     query: {
       q: searchQuery.value,
     },
   })

Comment on lines +67 to 70
<div class="relative group">
<div
class="absolute -inset-px rounded-lg bg-gradient-to-r from-fg/0 via-fg/5 to-fg/0 opacity-0 transition-opacity duration-500 blur-sm group-[.is-focused]:opacity-100"
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Gradient glow effect is now inert — is-focused class is never applied.

The group-[.is-focused]:opacity-100 on line 69 depends on the parent .group div having an is-focused class. Since the dynamic class binding that previously toggled is-focused has been removed from line 67, this gradient overlay will permanently stay at opacity-0. Either remove the dead overlay div, or replace the trigger with a CSS-only approach (e.g. group-focus-within:opacity-100).

Option: use CSS focus-within instead
               class="absolute -inset-px rounded-lg bg-gradient-to-r from-fg/0 via-fg/5 to-fg/0 opacity-0 transition-opacity duration-500 blur-sm group-[.is-focused]:opacity-100"
+              class="absolute -inset-px rounded-lg bg-gradient-to-r from-fg/0 via-fg/5 to-fg/0 opacity-0 transition-opacity duration-500 blur-sm group-focus-within:opacity-100"
📝 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
<div class="relative group">
<div
class="absolute -inset-px rounded-lg bg-gradient-to-r from-fg/0 via-fg/5 to-fg/0 opacity-0 transition-opacity duration-500 blur-sm group-[.is-focused]:opacity-100"
/>
<div class="relative group">
<div
class="absolute -inset-px rounded-lg bg-gradient-to-r from-fg/0 via-fg/5 to-fg/0 opacity-0 transition-opacity duration-500 blur-sm group-focus-within:opacity-100"
/>

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