Team# 08: DayOneCrew: Added AI Agentic Search with Vector Recommendations using Valkey#7
Open
himanshug3385 wants to merge 9 commits into
Open
Team# 08: DayOneCrew: Added AI Agentic Search with Vector Recommendations using Valkey#7himanshug3385 wants to merge 9 commits into
himanshug3385 wants to merge 9 commits into
Conversation
rlunar
requested changes
May 24, 2026
rlunar
left a comment
Contributor
There was a problem hiding this comment.
Remove node_modules folder, check .gitignore from frontend directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix agent search relevance: Topic-aware NLU so queries like “cheaper vegetables” are not treated as price refinements of a prior science-gift search. New product domains (groceries vs science), topic-shift detection, and relevance filtering return only matching products—or a clear message when the category is not sold on the site.
Improve floating assistant UX: Agent FAB stays fixed, scroll-aware, and clickable (including when the chat panel is open).
Add light/dark theme (default dark): App-wide theme via ThemeProvider, with toggles in the AI assistant header and on the Valkey dashboard (/valkey-dashboard).
What changed
Backend (backend/services/agent.js)
Product domain detection (groceries, science/STEM).
isTopicShift() / updated isRefinementQuery() so “cheaper” only refines the same topic (e.g. “Show me cheaper options” after a science search still works).
filterRelevantProducts() drops irrelevant catalog matches.
Polite unavailable copy when users ask for groceries/vegetables (not in the mock catalog).
Removed hardcoded “science gift search” wording from refinement responses.
Frontend
ThemeContext, ThemeToggle, theme.scss — default dark, persisted in localStorage.
AgentAssistant — fixed layer, scroll-adjusted FAB position, visible close control when panel is open.
AgentSearchChat — theme toggle in header.
ValkeyDashboardPage + valkey-dashboard.scss — theme toggle and dark/light styling.
agent-assistant.scss — theme variables and layout fixes.
Test plan
Start backend + Valkey; open the AI assistant on any page.
Search: “birthday gift for 10-year-old nephew who likes science” → science/STEM products.
Follow up: “Show me cheaper options” → cheaper items from the same science context (not unrelated products).
New topic: “show me some cheaper vegetables” → no science kits; polite message that groceries are not available on this site.
Scroll a long page (e.g. home/shop) → orange FAB remains visible and clickable near the bottom.
Open assistant panel → FAB still works as close/minimize control.
Toggle dark/light in assistant header → UI updates; refresh → preference persists.
Open /valkey-dashboard → theme toggle works; panels/stats readable in both modes.
Run node backend/test-acceptance.js → all acceptance checks pass.
Notes
The mock catalog is science/STEM only; grocery queries intentionally return zero results with a helpful message instead of irrelevant kits.
Theme applies to the agent UI and Valkey dashboard; the main store pages keep their existing styling unless extended later.