From 5ffe7092ffe9dba561e10697cf5a62090abaa138 Mon Sep 17 00:00:00 2001 From: Yves Gugger Date: Wed, 17 Dec 2025 14:21:45 +0100 Subject: [PATCH] Hunter Companion UI-help: cover terminal root/welcome + robust fallback for every screen --- frontend/src/components/chat/terminalHelp.ts | 59 +++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/chat/terminalHelp.ts b/frontend/src/components/chat/terminalHelp.ts index c11bf2a..edac55e 100644 --- a/frontend/src/components/chat/terminalHelp.ts +++ b/frontend/src/components/chat/terminalHelp.ts @@ -11,6 +11,39 @@ type HelpDoc = { // Keep this doc aligned with actual Terminal pages and UI. // This is used for Scout UI-help (no LLM call) and as quick onboarding for all tiers. export const TERMINAL_HELP: Record = { + '/terminal': { + overview: [ + 'This is the Terminal home. It routes you into the active modules (Hunt, Market, Watchlist, Portfolio, etc.).', + 'Use the sidebar (desktop) or bottom navigation (mobile) to move between modules.', + ], + sections: [ + { + title: 'Quick start', + bullets: [ + 'Hunt: discover opportunities (auctions, drops, trends, brandables).', + 'Watchlist: track targets and availability.', + 'Portfolio: manage owned domains (renewals, ROI).', + 'For Sale: list domains and manage leads.', + ], + }, + ], + }, + '/terminal/welcome': { + overview: [ + 'Welcome is the onboarding entry inside the Terminal.', + 'It’s designed to orient you and push you into your first workflow.', + ], + sections: [ + { + title: 'What you can do next', + bullets: [ + 'Go to Hunt to find opportunities.', + 'Add a domain to Watchlist to start tracking.', + 'Open Portfolio to model renewals and risk.', + ], + }, + ], + }, '/terminal/hunt': { overview: [ 'The Hunt page is your discovery hub: auctions, drops, search, trends, and brandable generation.', @@ -158,9 +191,33 @@ function normalizePath(pathname: string): string { if (!pathname) return '/terminal/hunt' // Collapse dynamic subroutes to their base sections if (pathname.startsWith('/terminal/intel/')) return '/terminal/intel' + if (pathname === '/terminal/page' || pathname === '/terminal/page.tsx') return '/terminal' return pathname } +function genericTerminalHelp(): HelpDoc { + return { + overview: [ + 'I can explain what this screen does, where to click, and the recommended workflow.', + 'Tell me your goal (e.g. “find brandables under $100” or “sell a domain”) and I’ll guide you step-by-step.', + ], + sections: [ + { + title: 'Core modules', + bullets: [ + 'Hunt: discovery engines (auctions, drops, search, trends, forge).', + 'Market: browse opportunities with filters.', + 'Watchlist: track targets and availability.', + 'Portfolio: manage owned domains (renewals, ROI).', + 'Sniper: set automated alerts.', + 'For Sale: list domains + handle leads.', + 'Inbox: buyer/seller threads.', + ], + }, + ], + } +} + export function isUiHelpQuestion(text: string): boolean { const t = (text || '').toLowerCase() // English + German common help intents @@ -174,7 +231,7 @@ export function isUiHelpQuestion(text: string): boolean { export function buildUiHelpAnswer(pathname: string, question: string): string { const p = normalizePath(pathname) - const doc = TERMINAL_HELP[p] || TERMINAL_HELP['/terminal/hunt'] + const doc = TERMINAL_HELP[p] || genericTerminalHelp() const lines: string[] = [] lines.push("Here’s how the UI works on this page:")