Skip to content

feat: adds fuzzy search in the automation list page#71

Merged
MatteoGabriele merged 3 commits intomainfrom
feat/fuzzy-search-in-automations-list
Apr 22, 2026
Merged

feat: adds fuzzy search in the automation list page#71
MatteoGabriele merged 3 commits intomainfrom
feat/fuzzy-search-in-automations-list

Conversation

@MatteoGabriele
Copy link
Copy Markdown
Owner

@MatteoGabriele MatteoGabriele commented Apr 22, 2026

We are getting more and more clankers, so perhaps a small search box could help.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added search functionality to find automations by username with fuzzy character matching
    • Introduced minimal layout with back navigation for privacy policy and automations pages
  • Style

    • Increased main content container width for improved display
    • Automation list now displays more items per page

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 22, 2026

Deploy Preview for agentscan ready!

Name Link
🔨 Latest commit f8b1a53
🔍 Latest deploy log https://app.netlify.com/projects/agentscan/deploys/69e8c5fddb36e80007594e54
😎 Deploy Preview https://deploy-preview-71--agentscan.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 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: 9e552798-7b57-4530-b898-94bf6f4c3e76

📥 Commits

Reviewing files that changed from the base of the PR and between 216e2f0 and f8b1a53.

📒 Files selected for processing (1)
  • app/pages/automations.vue
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/pages/automations.vue

📝 Walkthrough

Walkthrough

The PR introduces a new minimal layout component, implements search and fuzzy-filter functionality for automations, increases the default layout width constraint, updates the automation list display limit to a configurable constant, and applies the minimal layout to relevant pages.

Changes

Cohort / File(s) Summary
New Minimal Layout
app/layouts/minimal.vue
Added a new layout component with a back button and content slot for pages requiring a simplified container structure.
Automations Search & Filtering
app/pages/automations.vue
Introduced client-side search input with fuzzy search logic; added filteredItems computed property; applied minimal layout; added empty-state messaging when no results match.
Automation Display Limits
app/components/Verified/AutomationList.vue
Introduced MAX_VISIBLE constant (10) replacing hardcoded limit of 3 for both rendering visible items and skeleton placeholders during loading.
Layout & Styling Updates
app/layouts/default.vue, app/pages/privacy-policy.vue
Increased default layout max-width from max-w-screen-sm to max-w-screen-md; applied minimal layout to privacy policy page and removed outer container styling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A search bar hops into the fray,
Fuzzy matching shows the way,
Layouts minimal, containers tight,
Ten automations shine so bright!
thump thump — the PR feels right! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change—adding fuzzy search functionality to the automations list page—which is a primary objective evident across multiple files (AutomationList.vue, automations.vue).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fuzzy-search-in-automations-list

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.

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: 3

🧹 Nitpick comments (1)
app/pages/automations.vue (1)

62-67: Give the search field an explicit accessible name and visible focus state.

The placeholder should not be the only label for this control, and focus:outline-none leaves only a subtle border-color change for keyboard users.

Proposed refinement
     <input
       v-model="search"
       type="text"
+      aria-label="Search verified automations by username"
       placeholder="Search by username..."
-      class="mt-12 w-full px-3 py-2 bg-gh-bg border border-gh-border rounded text-sm text-gh-text placeholder:text-gh-muted focus:outline-none focus:border-gh-border/80"
+      class="mt-12 w-full px-3 py-2 bg-gh-bg border border-gh-border rounded text-sm text-gh-text placeholder:text-gh-muted focus:outline-none focus:border-gh-border/80 focus-visible:ring-2 focus-visible:ring-gh-border/60"
     />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/pages/automations.vue` around lines 62 - 67, The search input currently
uses placeholder text and removes visible focus with focus:outline-none; update
the input in automations.vue (the element with v-model="search") to include an
explicit accessible name (add an aria-label like aria-label="Search by username"
or associate a visible <label> for the input) and restore a clear keyboard focus
indicator by removing focus:outline-none and adding a visible focus class (e.g.
focus:ring or focus-visible:ring or a stronger focus:border class) so keyboard
users can both identify and see focus on the control.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/composables/useVerifiedAutomations.ts`:
- Around line 4-6: The current useVerifiedAutomations composable calls
useAsyncData eagerly, which blocks SSR while /api/verified-automations resolves;
change it to lazy loading by passing { lazy: true } to useAsyncData (or make it
accept an options param to toggle eager vs lazy) so consumers can fetch on
client hydration instead of during SSR, and update any components that assume
data is immediately present (e.g., CardError.vue and Analysis/Card.vue) to
handle undefined data or check pending.value before dereferencing; locate
useVerifiedAutomations and the useAsyncData call to implement the change and add
the options flag if route-specific eager fetching is needed.

In `@app/layouts/minimal.vue`:
- Around line 5-11: Replace the direct call to $router.back() in the back button
with a small handler (e.g., handleGoBack or goBack) that checks
window.history.length > 1 and calls $router.back() only when true, otherwise
falls back to a safe navigation like $router.push('/') or $router.push({ name:
'home' }); update the button to call that handler instead of $router.back() so
direct visits or external referrers don't navigate unpredictably.

In `@app/pages/automations.vue`:
- Around line 22-25: The computed filteredItems uses search.value.trim() to
decide early-return but still calls fuzzySearch with the untrimmed search.value;
change filteredItems to capture the trimmed query (e.g., const q =
search.value.trim()) and use that trimmed q in the items.value.filter call
(fuzzySearch(q, item.username)) so queries with surrounding whitespace like "
octocat " will match correctly.

---

Nitpick comments:
In `@app/pages/automations.vue`:
- Around line 62-67: The search input currently uses placeholder text and
removes visible focus with focus:outline-none; update the input in
automations.vue (the element with v-model="search") to include an explicit
accessible name (add an aria-label like aria-label="Search by username" or
associate a visible <label> for the input) and restore a clear keyboard focus
indicator by removing focus:outline-none and adding a visible focus class (e.g.
focus:ring or focus-visible:ring or a stronger focus:border class) so keyboard
users can both identify and see focus on the control.
🪄 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: d1a16ff1-9854-492a-8e18-d0c859800811

📥 Commits

Reviewing files that changed from the base of the PR and between b692fb7 and 216e2f0.

📒 Files selected for processing (6)
  • app/components/Verified/AutomationList.vue
  • app/composables/useVerifiedAutomations.ts
  • app/layouts/default.vue
  • app/layouts/minimal.vue
  • app/pages/automations.vue
  • app/pages/privacy-policy.vue

Comment thread app/composables/useVerifiedAutomations.ts Outdated
Comment thread app/layouts/minimal.vue
Comment on lines +5 to +11
<button
@click="$router.back()"
class="text-gh-muted hover:text-gh-text transition-colors flex items-center gap-2"
>
<span class="text-lg i-carbon:arrow-left"></span>
Go back
</button>
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

🧩 Analysis chain

🏁 Script executed:

# Check if the file exists and review its content
cat -n app/layouts/minimal.vue

Repository: MatteoGabriele/agentscan

Length of output: 575


🏁 Script executed:

# Check the framework and dependencies
head -30 package.json

Repository: MatteoGabriele/agentscan

Length of output: 846


🏁 Script executed:

# Look for nuxt.config or other framework configuration
ls -la | grep -E "(nuxt|vue|tsconfig)" | head -20

Repository: MatteoGabriele/agentscan

Length of output: 200


🏁 Script executed:

# Search for router.back() usage patterns
rg "router\.back\(\)" --type vue --type ts --type js

Repository: MatteoGabriele/agentscan

Length of output: 95


🏁 Script executed:

# Search for navigateTo usage (Nuxt pattern)
rg "navigateTo" --type vue --type ts --type js

Repository: MatteoGabriele/agentscan

Length of output: 95


🏁 Script executed:

# Search for useRouter usage
rg "useRouter" --type vue --type ts --type js

Repository: MatteoGabriele/agentscan

Length of output: 95


🏁 Script executed:

# Search for history.state checks
rg "history\.state" --type vue --type ts --type js

Repository: MatteoGabriele/agentscan

Length of output: 95


🏁 Script executed:

# Search for any router or navigation related middleware/composables
fd -e ts -e js -e vue | xargs grep -l "navigation\|router" | head -20

Repository: MatteoGabriele/agentscan

Length of output: 137


🏁 Script executed:

# Search for router.back() usage
rg "router\.back\(\)" -g "*.vue" -g "*.ts" -g "*.js"

Repository: MatteoGabriele/agentscan

Length of output: 121


🏁 Script executed:

# Search for navigateTo usage (Nuxt pattern)
rg "navigateTo" -g "*.vue" -g "*.ts" -g "*.js"

Repository: MatteoGabriele/agentscan

Length of output: 50


🏁 Script executed:

# Search for useRouter usage
rg "useRouter" -g "*.vue" -g "*.ts" -g "*.js"

Repository: MatteoGabriele/agentscan

Length of output: 169


🏁 Script executed:

# Search for history.state or back entry checks
rg "history\.state|history\.back" -g "*.vue" -g "*.ts" -g "*.js"

Repository: MatteoGabriele/agentscan

Length of output: 50


🏁 Script executed:

# Check app structure
tree -L 3 app/ 2>/dev/null || find app -maxdepth 3 -type f | head -40

Repository: MatteoGabriele/agentscan

Length of output: 728


🏁 Script executed:

# Search for layout references
rg "definePageMeta.*minimal|layout.*minimal" -g "*.vue"

Repository: MatteoGabriele/agentscan

Length of output: 164


🏁 Script executed:

# Check the pages that likely use minimal layout
cat -n app/pages/automations.vue

Repository: MatteoGabriele/agentscan

Length of output: 5109


🏁 Script executed:

# Check privacy-policy page
cat -n app/pages/privacy-policy.vue

Repository: MatteoGabriele/agentscan

Length of output: 4444


🏁 Script executed:

# Check default layout to compare
cat -n app/layouts/default.vue

Repository: MatteoGabriele/agentscan

Length of output: 1948


🏁 Script executed:

# Check for any middleware or app-level navigation patterns
find app -name "*.ts" -o -name "*.js" | xargs grep -l "router\|navigate" 2>/dev/null | head -20

Repository: MatteoGabriele/agentscan

Length of output: 50


🏁 Script executed:

# Check if there are any plugins related to router
ls -la app/plugins 2>/dev/null || echo "No plugins directory found"

Repository: MatteoGabriele/agentscan

Length of output: 94


🏁 Script executed:

# Check nuxt.config to see router setup
cat -n nuxt.config.ts

Repository: MatteoGabriele/agentscan

Length of output: 2103


🏁 Script executed:

# Verify if composables use useRouter in specific ways
cat -n app/pages/index.vue | head -50

Repository: MatteoGabriele/agentscan

Length of output: 477


🏁 Script executed:

# Search for any window.history usage
rg "window\.history|history\.length|history\.back" -g "*.vue" -g "*.ts" -g "*.js"

Repository: MatteoGabriele/agentscan

Length of output: 50


🏁 Script executed:

# Check if router.push is used as fallback pattern elsewhere
rg "router\.push" -g "*.vue" -g "*.ts" -g "*.js" -A 2

Repository: MatteoGabriele/agentscan

Length of output: 341


🏁 Script executed:

# Check index.vue to understand the home page route
cat -n app/pages/index.vue

Repository: MatteoGabriele/agentscan

Length of output: 477


Use a more reliable check for back navigation fallback.

Direct visits to /automations or /privacy-policy have no back history. When router.back() is called on a direct visit, it either does nothing or navigates to an external site (if the user came from external search). Add a fallback to navigate to home when there is no back entry available.

For the history check, use window.history.length > 1 instead of window.history.state?.back, which is more reliable and standard across browsers.

Proposed fix
-<script setup lang="ts"></script>
+<script setup lang="ts">
+const router = useRouter();
+
+const goBack = () => {
+  if (window.history.length > 1) {
+    router.back();
+    return;
+  }
+
+  navigateTo("/");
+};
+</script>
 
 <template>
   <div class="mx-auto max-w-2xl p-6 pb-12 w-full">
     <button
-      `@click`="$router.back()"
+      type="button"
+      `@click`="goBack"
       class="text-gh-muted hover:text-gh-text transition-colors flex items-center gap-2"
     >
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/layouts/minimal.vue` around lines 5 - 11, Replace the direct call to
$router.back() in the back button with a small handler (e.g., handleGoBack or
goBack) that checks window.history.length > 1 and calls $router.back() only when
true, otherwise falls back to a safe navigation like $router.push('/') or
$router.push({ name: 'home' }); update the button to call that handler instead
of $router.back() so direct visits or external referrers don't navigate
unpredictably.

Comment thread app/pages/automations.vue Outdated
@MatteoGabriele MatteoGabriele merged commit de52af1 into main Apr 22, 2026
5 checks passed
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