helpfulengineering / helpfulengineering/project-data-platform-ts

Header search box is wired to undefined handlers (query, handleSearch)

Open
#109 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vue
Stars
1
Forks
1
Avg merge
58m
Merged PRs (30d)
1

Description

What's happening

packages/front-end/components/AppHeader.vue has a search input and button in the template:

<input type="search" ... v-model="query" ... />
<button type="submit" ... @click="handleSearch">

(lines 19 and 26), but neither query nor handleSearch are declared anywhere in the component's <script setup> block (line 73-83).

Impact

  • Typing in the search box throws ReferenceError: query is not defined (strict-mode module scope) when the compiled v-model setter runs.
  • Clicking the search button throws TypeError: handleSearch is not a function.
  • The page itself loads fine (Vue only warns at render time — [Vue warn]: Property "query" was accessed during render but is not defined on instance — it doesn't throw until you actually interact with the input/button).

This means the header search feature is completely non-functional across every page (AppHeader is global).

Evidence

Confirmed via browser console during E2E test development this session. The E2E suite (packages/e2e/tests/main-workflow.spec.ts) deliberately avoids interacting with the search box so it doesn't trip over this unrelated, pre-existing bug.

Likely fix

Add const query = ref(""); and a handleSearch function (e.g. navigating to a search results route, or filtering the current product list) to AppHeader.vue's <script setup>.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open packages/front-end/components/AppHeader.vue and inspect the <script setup> block around lines 73–83. Use packages/e2e/tests/main-workflow.spec.ts as the available test entry point, then verify that typing and submitting the header search no longer produce the reported console errors; the intended search-results behavior still needs clarification.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.