Hunter Companion UI-help: cover terminal root/welcome + robust fallback for every screen
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
This commit is contained in:
@ -11,6 +11,39 @@ type HelpDoc = {
|
|||||||
// Keep this doc aligned with actual Terminal pages and UI.
|
// 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.
|
// This is used for Scout UI-help (no LLM call) and as quick onboarding for all tiers.
|
||||||
export const TERMINAL_HELP: Record<string, HelpDoc> = {
|
export const TERMINAL_HELP: Record<string, HelpDoc> = {
|
||||||
|
'/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': {
|
'/terminal/hunt': {
|
||||||
overview: [
|
overview: [
|
||||||
'The Hunt page is your discovery hub: auctions, drops, search, trends, and brandable generation.',
|
'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'
|
if (!pathname) return '/terminal/hunt'
|
||||||
// Collapse dynamic subroutes to their base sections
|
// Collapse dynamic subroutes to their base sections
|
||||||
if (pathname.startsWith('/terminal/intel/')) return '/terminal/intel'
|
if (pathname.startsWith('/terminal/intel/')) return '/terminal/intel'
|
||||||
|
if (pathname === '/terminal/page' || pathname === '/terminal/page.tsx') return '/terminal'
|
||||||
return pathname
|
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 {
|
export function isUiHelpQuestion(text: string): boolean {
|
||||||
const t = (text || '').toLowerCase()
|
const t = (text || '').toLowerCase()
|
||||||
// English + German common help intents
|
// English + German common help intents
|
||||||
@ -174,7 +231,7 @@ export function isUiHelpQuestion(text: string): boolean {
|
|||||||
|
|
||||||
export function buildUiHelpAnswer(pathname: string, question: string): string {
|
export function buildUiHelpAnswer(pathname: string, question: string): string {
|
||||||
const p = normalizePath(pathname)
|
const p = normalizePath(pathname)
|
||||||
const doc = TERMINAL_HELP[p] || TERMINAL_HELP['/terminal/hunt']
|
const doc = TERMINAL_HELP[p] || genericTerminalHelp()
|
||||||
|
|
||||||
const lines: string[] = []
|
const lines: string[] = []
|
||||||
lines.push("Here’s how the UI works on this page:")
|
lines.push("Here’s how the UI works on this page:")
|
||||||
|
|||||||
Reference in New Issue
Block a user