Skip to content

Commit 2eaa625

Browse files
fix: drop Docs nav and View as hover tooltips
The Docs sidebar tab is no longer a product surface. Persisted docs nav state now lands on Agent. Remove HelpTooltip wrappers from the profile-switch CTAs so they no longer intercept clicks. Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
1 parent ff55e78 commit 2eaa625

5 files changed

Lines changed: 16 additions & 33 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ src/ # Frontend (React)
110110
components/ # UI components
111111
tabs/ # 40+ specialized tabs
112112
sections/ # Top-level sidebar destinations (Agent, Dashboards, Brain,
113-
# Performance = Slow Queries + Workload, Editor, Docs)
113+
# Performance = Slow Queries + Workload, Editor)
114114
lib/
115115
api/client.js # Centralized API layer (axios, 25+ modules)
116116
stores/ # Zustand stores (dashboard, connection, chat, UI)

src/components/layout/AppSidebar.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState, useEffect, useRef } from 'react'
2-
import { BookOpen, Brain, Code2, Database, Settings, PanelLeftClose, PanelLeftOpen, LogOut, User, ChevronDown, Check, Newspaper, Gauge, MessageSquare, LayoutDashboard } from 'lucide-react'
2+
import { Brain, Code2, Database, Settings, PanelLeftClose, PanelLeftOpen, LogOut, User, ChevronDown, Check, Newspaper, Gauge, MessageSquare, LayoutDashboard } from 'lucide-react'
33
import { useActiveSection, useSetActiveSection } from '@/lib/stores/useNavStore'
44
import { useConnectionManager } from '@/lib/hooks/useConnectionManager'
55
import { AGENTS_ENABLED, canAccessHomeSection, getConnectionAccessBadge, getConnectionAccessLabel } from '@/lib/features'
@@ -16,7 +16,6 @@ const NAV_ITEMS = [
1616
{ id: 'company-knowledge', label: 'Brain', icon: Brain },
1717
{ id: 'performance', label: 'Performance', icon: Gauge },
1818
{ id: 'editor', label: 'Editor', icon: Code2 },
19-
{ id: 'docs', label: 'Docs', icon: BookOpen },
2019
]
2120

2221
export default function AppSidebar() {
@@ -92,8 +91,7 @@ export default function AppSidebar() {
9291
<nav className={styles.nav}>
9392
{visibleNavItems.map(({ id, label, icon: Icon }) => {
9493
// Freeze these sections until the first DB connection is added.
95-
// Docs is reference content — available even without any connection.
96-
const requiresConnection = id !== 'agent' && id !== 'digest' && id !== 'docs'
94+
const requiresConnection = id !== 'agent' && id !== 'digest'
9795
const isLocked = requiresConnection && connections.length === 0
9896
const lockTitle = isLocked
9997
? 'Add a database connection to unlock'

src/components/layout/ProfileSwitch.jsx

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useCallback, useEffect, useRef, useState } from 'react'
22
import { ArrowLeftRight, Check, ChevronDown, X } from 'lucide-react'
3-
import HelpTooltip from '@/components/tabs/Brain/components/HelpTooltip'
43
import { useAuth } from '@/hooks/useAuth'
54
import { getDefaultHomeSection } from '@/lib/features'
65
import { adminAPI } from '@/lib/api/client'
@@ -109,22 +108,16 @@ export default function ProfileSwitch() {
109108
Switch user
110109
<ChevronDown size={14} />
111110
</button>
112-
<HelpTooltip
113-
content={{
114-
title: 'Exit profile',
115-
description: 'Return to your administrator session. Policies and permissions go back to full admin access.',
116-
}}
111+
<button
112+
type="button"
113+
className={styles.exitBtn}
114+
onClick={handleStop}
115+
disabled={switching}
116+
data-testid="profile-switch-exit"
117117
>
118-
<button
119-
type="button"
120-
className={styles.exitBtn}
121-
onClick={handleStop}
122-
disabled={switching}
123-
>
124-
<X size={14} />
125-
Exit
126-
</button>
127-
</HelpTooltip>
118+
<X size={14} />
119+
Exit
120+
</button>
128121
</div>
129122
{open && (
130123
<CandidateMenu
@@ -141,12 +134,6 @@ export default function ProfileSwitch() {
141134

142135
return (
143136
<div className={styles.switchWrap} ref={rootRef} data-testid="profile-switch">
144-
<HelpTooltip
145-
content={{
146-
title: 'Switch profile',
147-
description: 'View the product as a sub-user to verify connection access, chat policies, and role permissions. Only administrators can do this. Your admin session stays signed in.',
148-
}}
149-
>
150137
<button
151138
type="button"
152139
className={styles.trigger}
@@ -159,7 +146,6 @@ export default function ProfileSwitch() {
159146
<span>View as</span>
160147
<ChevronDown size={14} />
161148
</button>
162-
</HelpTooltip>
163149
{open && (
164150
<CandidateMenu
165151
candidates={candidates}

src/lib/features.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const BASE_SECTION_MIN_ROLE = {
1717
dashboards: ROLES.DEVELOPER,
1818
performance: ROLES.ADMIN,
1919
editor: ROLES.DEVELOPER,
20-
docs: ROLES.DEVELOPER,
2120
}
2221

2322
function resolveSectionAlias(section) {
@@ -37,6 +36,9 @@ function resolveSectionAlias(section) {
3736
// Schema Docs was folded into Company Knowledge → Schema Context tab.
3837
// Persisted nav state from older sessions still routes correctly.
3938
return 'company-knowledge'
39+
case 'docs':
40+
// The Docs sidebar tab was removed.
41+
return 'agent-chat'
4042
case 'slow-queries':
4143
case 'workload-analysis':
4244
// Slow Queries and Workload Analysis were merged into Performance.
@@ -80,10 +82,9 @@ export function getDefaultHomeSection(role, connection = null) {
8082
'company-knowledge',
8183
'performance',
8284
'editor',
83-
'docs',
8485
]
8586
const firstVisible = orderedSections.find((section) => canAccessHomeSection(section, role, connection))
86-
return firstVisible || 'docs'
87+
return firstVisible || 'agent-chat'
8788
}
8889

8990
export function normalizeHomeSection(section, role, connection = null) {

src/pages/Home.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import DigestFeedSection from '@/components/sections/DigestSection'
77
import BrainSection from '@/components/sections/BrainSection'
88
import CompanyKnowledgeSection from '@/components/sections/CompanyKnowledgeSection'
99
import DashboardsSection from '@/components/sections/DashboardsSection'
10-
import DocsSection from '@/components/sections/DocsSection'
1110
import EditorSection from '@/components/sections/EditorSection'
1211
import SlowQueriesSection from '@/components/sections/SlowQueriesSection'
1312
import PageTransitionBar from '@/components/layout/PageTransitionBar'
@@ -25,7 +24,6 @@ const SECTION_MAP = {
2524
'company-knowledge': CompanyKnowledgeSection,
2625
performance: SlowQueriesSection,
2726
editor: EditorSection,
28-
docs: DocsSection,
2927
}
3028

3129
export default function Home() {

0 commit comments

Comments
 (0)