@assistkick/create 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/create.d.ts +2 -0
- package/dist/bin/create.js +25 -0
- package/dist/bin/create.js.map +1 -0
- package/dist/src/scaffolder.d.ts +22 -0
- package/dist/src/scaffolder.js +120 -0
- package/dist/src/scaffolder.js.map +1 -0
- package/package.json +24 -0
- package/templates/product-system/.env.example +8 -0
- package/templates/product-system/CLAUDE.md +45 -0
- package/templates/product-system/package.json +32 -0
- package/templates/product-system/packages/backend/package.json +37 -0
- package/templates/product-system/packages/backend/src/middleware/auth_middleware.test.ts +86 -0
- package/templates/product-system/packages/backend/src/middleware/auth_middleware.ts +35 -0
- package/templates/product-system/packages/backend/src/routes/auth.ts +463 -0
- package/templates/product-system/packages/backend/src/routes/coherence.ts +187 -0
- package/templates/product-system/packages/backend/src/routes/graph.ts +67 -0
- package/templates/product-system/packages/backend/src/routes/kanban.ts +201 -0
- package/templates/product-system/packages/backend/src/routes/pipeline.ts +41 -0
- package/templates/product-system/packages/backend/src/routes/projects.ts +122 -0
- package/templates/product-system/packages/backend/src/routes/users.ts +97 -0
- package/templates/product-system/packages/backend/src/server.ts +159 -0
- package/templates/product-system/packages/backend/src/services/auth_service.test.ts +115 -0
- package/templates/product-system/packages/backend/src/services/auth_service.ts +82 -0
- package/templates/product-system/packages/backend/src/services/coherence-review.ts +339 -0
- package/templates/product-system/packages/backend/src/services/email_service.ts +75 -0
- package/templates/product-system/packages/backend/src/services/init.ts +80 -0
- package/templates/product-system/packages/backend/src/services/invitation_service.test.ts +235 -0
- package/templates/product-system/packages/backend/src/services/invitation_service.ts +193 -0
- package/templates/product-system/packages/backend/src/services/password_reset_service.test.ts +151 -0
- package/templates/product-system/packages/backend/src/services/password_reset_service.ts +135 -0
- package/templates/product-system/packages/backend/src/services/project_service.test.ts +215 -0
- package/templates/product-system/packages/backend/src/services/project_service.ts +171 -0
- package/templates/product-system/packages/backend/src/services/pty_session_manager.test.ts +88 -0
- package/templates/product-system/packages/backend/src/services/pty_session_manager.ts +279 -0
- package/templates/product-system/packages/backend/src/services/terminal_ws_handler.ts +133 -0
- package/templates/product-system/packages/backend/src/services/user_management_service.test.ts +158 -0
- package/templates/product-system/packages/backend/src/services/user_management_service.ts +128 -0
- package/templates/product-system/packages/backend/tsconfig.json +22 -0
- package/templates/product-system/packages/frontend/index.html +13 -0
- package/templates/product-system/packages/frontend/package-lock.json +2666 -0
- package/templates/product-system/packages/frontend/package.json +30 -0
- package/templates/product-system/packages/frontend/public/favicon.svg +16 -0
- package/templates/product-system/packages/frontend/src/App.tsx +29 -0
- package/templates/product-system/packages/frontend/src/api/client.ts +386 -0
- package/templates/product-system/packages/frontend/src/api/client_projects.test.ts +104 -0
- package/templates/product-system/packages/frontend/src/api/client_refresh.test.ts +145 -0
- package/templates/product-system/packages/frontend/src/components/CoherenceView.tsx +414 -0
- package/templates/product-system/packages/frontend/src/components/GraphLegend.tsx +124 -0
- package/templates/product-system/packages/frontend/src/components/GraphSettings.tsx +112 -0
- package/templates/product-system/packages/frontend/src/components/GraphView.tsx +370 -0
- package/templates/product-system/packages/frontend/src/components/InviteUserDialog.tsx +85 -0
- package/templates/product-system/packages/frontend/src/components/KanbanView.tsx +470 -0
- package/templates/product-system/packages/frontend/src/components/LoginPage.tsx +116 -0
- package/templates/product-system/packages/frontend/src/components/ProjectSelector.tsx +187 -0
- package/templates/product-system/packages/frontend/src/components/QaIssueSheet.tsx +192 -0
- package/templates/product-system/packages/frontend/src/components/SidePanel.tsx +231 -0
- package/templates/product-system/packages/frontend/src/components/TerminalView.tsx +200 -0
- package/templates/product-system/packages/frontend/src/components/Toolbar.tsx +84 -0
- package/templates/product-system/packages/frontend/src/components/UsersView.tsx +249 -0
- package/templates/product-system/packages/frontend/src/constants/graph.ts +191 -0
- package/templates/product-system/packages/frontend/src/hooks/useAuth.tsx +54 -0
- package/templates/product-system/packages/frontend/src/hooks/useGraph.ts +27 -0
- package/templates/product-system/packages/frontend/src/hooks/useKanban.ts +21 -0
- package/templates/product-system/packages/frontend/src/hooks/useProjects.ts +86 -0
- package/templates/product-system/packages/frontend/src/hooks/useTheme.ts +26 -0
- package/templates/product-system/packages/frontend/src/hooks/useToast.tsx +62 -0
- package/templates/product-system/packages/frontend/src/hooks/use_projects_logic.test.ts +61 -0
- package/templates/product-system/packages/frontend/src/main.tsx +12 -0
- package/templates/product-system/packages/frontend/src/pages/accept_invitation_page.tsx +167 -0
- package/templates/product-system/packages/frontend/src/pages/forgot_password_page.tsx +100 -0
- package/templates/product-system/packages/frontend/src/pages/register_page.tsx +137 -0
- package/templates/product-system/packages/frontend/src/pages/reset_password_page.tsx +146 -0
- package/templates/product-system/packages/frontend/src/routes/ProtectedRoute.tsx +12 -0
- package/templates/product-system/packages/frontend/src/routes/accept_invitation.tsx +14 -0
- package/templates/product-system/packages/frontend/src/routes/dashboard.tsx +221 -0
- package/templates/product-system/packages/frontend/src/routes/forgot_password.tsx +13 -0
- package/templates/product-system/packages/frontend/src/routes/login.tsx +14 -0
- package/templates/product-system/packages/frontend/src/routes/register.tsx +14 -0
- package/templates/product-system/packages/frontend/src/routes/reset_password.tsx +13 -0
- package/templates/product-system/packages/frontend/src/styles/index.css +3358 -0
- package/templates/product-system/packages/frontend/src/utils/auth_validation.test.ts +51 -0
- package/templates/product-system/packages/frontend/src/utils/auth_validation.ts +19 -0
- package/templates/product-system/packages/frontend/src/utils/login_validation.test.ts +61 -0
- package/templates/product-system/packages/frontend/src/utils/login_validation.ts +24 -0
- package/templates/product-system/packages/frontend/src/utils/logout.test.ts +63 -0
- package/templates/product-system/packages/frontend/src/utils/node_sizing.test.ts +62 -0
- package/templates/product-system/packages/frontend/src/utils/node_sizing.ts +24 -0
- package/templates/product-system/packages/frontend/src/utils/task_status.test.ts +53 -0
- package/templates/product-system/packages/frontend/src/utils/task_status.ts +14 -0
- package/templates/product-system/packages/frontend/tsconfig.json +21 -0
- package/templates/product-system/packages/frontend/vite.config.ts +20 -0
- package/templates/product-system/packages/shared/.env.example +3 -0
- package/templates/product-system/packages/shared/README.md +1 -0
- package/templates/product-system/packages/shared/db/migrate.ts +32 -0
- package/templates/product-system/packages/shared/db/migrations/0000_dashing_gorgon.sql +128 -0
- package/templates/product-system/packages/shared/db/migrations/meta/0000_snapshot.json +819 -0
- package/templates/product-system/packages/shared/db/migrations/meta/_journal.json +13 -0
- package/templates/product-system/packages/shared/db/schema.ts +137 -0
- package/templates/product-system/packages/shared/drizzle.config.js +14 -0
- package/templates/product-system/packages/shared/lib/claude-service.ts +215 -0
- package/templates/product-system/packages/shared/lib/coherence.ts +278 -0
- package/templates/product-system/packages/shared/lib/completeness.ts +30 -0
- package/templates/product-system/packages/shared/lib/constants.ts +327 -0
- package/templates/product-system/packages/shared/lib/db.ts +81 -0
- package/templates/product-system/packages/shared/lib/git_workflow.ts +110 -0
- package/templates/product-system/packages/shared/lib/graph.ts +186 -0
- package/templates/product-system/packages/shared/lib/kanban.ts +161 -0
- package/templates/product-system/packages/shared/lib/markdown.ts +205 -0
- package/templates/product-system/packages/shared/lib/pipeline-state-store.ts +124 -0
- package/templates/product-system/packages/shared/lib/pipeline.ts +489 -0
- package/templates/product-system/packages/shared/lib/prompt_builder.ts +170 -0
- package/templates/product-system/packages/shared/lib/relevance_search.ts +159 -0
- package/templates/product-system/packages/shared/lib/session.ts +152 -0
- package/templates/product-system/packages/shared/lib/validator.ts +117 -0
- package/templates/product-system/packages/shared/lib/work_summary_parser.ts +130 -0
- package/templates/product-system/packages/shared/package.json +30 -0
- package/templates/product-system/packages/shared/scripts/assign-project.ts +52 -0
- package/templates/product-system/packages/shared/tools/add_edge.ts +61 -0
- package/templates/product-system/packages/shared/tools/add_node.ts +101 -0
- package/templates/product-system/packages/shared/tools/end_session.ts +87 -0
- package/templates/product-system/packages/shared/tools/get_gaps.ts +87 -0
- package/templates/product-system/packages/shared/tools/get_kanban.ts +125 -0
- package/templates/product-system/packages/shared/tools/get_node.ts +78 -0
- package/templates/product-system/packages/shared/tools/get_status.ts +98 -0
- package/templates/product-system/packages/shared/tools/migrate_to_turso.ts +385 -0
- package/templates/product-system/packages/shared/tools/move_card.ts +143 -0
- package/templates/product-system/packages/shared/tools/rebuild_index.ts +77 -0
- package/templates/product-system/packages/shared/tools/remove_edge.ts +59 -0
- package/templates/product-system/packages/shared/tools/remove_node.ts +96 -0
- package/templates/product-system/packages/shared/tools/resolve_question.ts +75 -0
- package/templates/product-system/packages/shared/tools/search_nodes.ts +106 -0
- package/templates/product-system/packages/shared/tools/start_session.ts +144 -0
- package/templates/product-system/packages/shared/tools/update_node.ts +133 -0
- package/templates/product-system/packages/shared/tsconfig.json +24 -0
- package/templates/product-system/pnpm-workspace.yaml +2 -0
- package/templates/product-system/smoke_test.ts +219 -0
- package/templates/product-system/tests/coherence_review.test.ts +562 -0
- package/templates/product-system/tests/db_sqlite_fallback.test.ts +75 -0
- package/templates/product-system/tests/edge_type_color_coding.test.ts +147 -0
- package/templates/product-system/tests/emit-tool-use-events.test.ts +85 -0
- package/templates/product-system/tests/feature_kind.test.ts +139 -0
- package/templates/product-system/tests/gap_indicators.test.ts +199 -0
- package/templates/product-system/tests/graceful_init.test.ts +142 -0
- package/templates/product-system/tests/graph_legend.test.ts +314 -0
- package/templates/product-system/tests/graph_settings_sheet.test.ts +804 -0
- package/templates/product-system/tests/hide_defined_filter.test.ts +205 -0
- package/templates/product-system/tests/kanban.test.ts +529 -0
- package/templates/product-system/tests/neighborhood_focus.test.ts +132 -0
- package/templates/product-system/tests/node_search.test.ts +340 -0
- package/templates/product-system/tests/node_sizing.test.ts +170 -0
- package/templates/product-system/tests/node_type_toggle_filters.test.ts +285 -0
- package/templates/product-system/tests/node_type_visual_encoding.test.ts +103 -0
- package/templates/product-system/tests/pipeline-state-store.test.ts +268 -0
- package/templates/product-system/tests/pipeline-unit.test.ts +593 -0
- package/templates/product-system/tests/pipeline.test.ts +195 -0
- package/templates/product-system/tests/pipeline_stats_all_cards.test.ts +193 -0
- package/templates/product-system/tests/play_all.test.ts +296 -0
- package/templates/product-system/tests/qa_issue_sheet.test.ts +464 -0
- package/templates/product-system/tests/relevance_search.test.ts +186 -0
- package/templates/product-system/tests/search_reorder.test.ts +88 -0
- package/templates/product-system/tests/serve_ui.test.ts +281 -0
- package/templates/product-system/tests/serve_ui_drizzle.test.ts +114 -0
- package/templates/product-system/tests/session_context_recall.test.ts +135 -0
- package/templates/product-system/tests/side_panel.test.ts +345 -0
- package/templates/product-system/tests/spec_completeness_label.test.ts +69 -0
- package/templates/product-system/tests/url_routing_test.ts +122 -0
- package/templates/product-system/tests/user_login.test.ts +150 -0
- package/templates/product-system/tests/user_registration.test.ts +205 -0
- package/templates/product-system/tests/web_terminal.test.ts +572 -0
- package/templates/product-system/tests/work_summary.test.ts +211 -0
- package/templates/product-system/tests/zoom_pan.test.ts +43 -0
- package/templates/product-system/tsconfig.json +24 -0
- package/templates/skills/product-bootstrap/SKILL.md +312 -0
- package/templates/skills/product-code-reviewer/SKILL.md +147 -0
- package/templates/skills/product-debugger/SKILL.md +206 -0
- package/templates/skills/product-debugger/references/agent-browser.md +1156 -0
- package/templates/skills/product-developer/SKILL.md +182 -0
- package/templates/skills/product-interview/SKILL.md +220 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
2
|
+
import { useLocation, useNavigate } from 'react-router-dom';
|
|
3
|
+
import { Toolbar } from '../components/Toolbar';
|
|
4
|
+
import { GraphView } from '../components/GraphView';
|
|
5
|
+
import type { GraphViewHandle } from '../components/GraphView';
|
|
6
|
+
import { GraphLegend } from '../components/GraphLegend';
|
|
7
|
+
import { GraphSettings } from '../components/GraphSettings';
|
|
8
|
+
import { KanbanView } from '../components/KanbanView';
|
|
9
|
+
import { CoherenceView } from '../components/CoherenceView';
|
|
10
|
+
import { TerminalView } from '../components/TerminalView';
|
|
11
|
+
import { UsersView } from '../components/UsersView';
|
|
12
|
+
import { SidePanel, openSidePanel, closeSidePanel } from '../components/SidePanel';
|
|
13
|
+
import { QaIssueSheet } from '../components/QaIssueSheet';
|
|
14
|
+
import { useTheme } from '../hooks/useTheme';
|
|
15
|
+
import { useGraph } from '../hooks/useGraph';
|
|
16
|
+
import { useAuth } from '../hooks/useAuth';
|
|
17
|
+
import { useProjects } from '../hooks/useProjects';
|
|
18
|
+
import { apiClient } from '../api/client';
|
|
19
|
+
import { ToastProvider } from '../hooks/useToast';
|
|
20
|
+
|
|
21
|
+
const VALID_TABS = new Set(['graph', 'kanban', 'coherence', 'users', 'terminal']);
|
|
22
|
+
|
|
23
|
+
function tabFromPath(pathname: string): string {
|
|
24
|
+
const seg = pathname.replace(/^\//, '');
|
|
25
|
+
return VALID_TABS.has(seg) ? seg : 'graph';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function DashboardRoute() {
|
|
29
|
+
const location = useLocation();
|
|
30
|
+
const navigate = useNavigate();
|
|
31
|
+
const { theme, toggleTheme } = useTheme();
|
|
32
|
+
const { user } = useAuth();
|
|
33
|
+
const isAdmin = user?.role === 'admin';
|
|
34
|
+
const {
|
|
35
|
+
projects, selectedProjectId, selectProject,
|
|
36
|
+
createProject, renameProject, archiveProject,
|
|
37
|
+
} = useProjects();
|
|
38
|
+
const { graphData, error: graphError } = useGraph(selectedProjectId);
|
|
39
|
+
const graphRef = useRef<GraphViewHandle>(null);
|
|
40
|
+
const activeTab = tabFromPath(location.pathname);
|
|
41
|
+
const [settingsOpen, setSettingsOpen] = useState(false);
|
|
42
|
+
const [legendVisible, setLegendVisible] = useState(true);
|
|
43
|
+
const [hiddenTypes, setHiddenTypes] = useState<Set<string>>(new Set());
|
|
44
|
+
|
|
45
|
+
// QA Issue Sheet state
|
|
46
|
+
const [qaOpen, setQaOpen] = useState(false);
|
|
47
|
+
const [qaFeatureId, setQaFeatureId] = useState<string | null>(null);
|
|
48
|
+
const [qaFeatureName, setQaFeatureName] = useState('');
|
|
49
|
+
const [qaColumn, setQaColumn] = useState('');
|
|
50
|
+
const [qaNotes, setQaNotes] = useState<any[]>([]);
|
|
51
|
+
const [qaReviews, setQaReviews] = useState<any[]>([]);
|
|
52
|
+
|
|
53
|
+
const completeness = graphData
|
|
54
|
+
? Math.round((graphData.nodes.reduce((acc: number, n: any) => acc + (n.completeness || 0), 0) / Math.max(graphData.nodes.length, 1)) * 100)
|
|
55
|
+
: 0;
|
|
56
|
+
|
|
57
|
+
const switchTab = useCallback((tab: string) => {
|
|
58
|
+
navigate(`/${tab}`);
|
|
59
|
+
}, [navigate]);
|
|
60
|
+
|
|
61
|
+
const handleLogout = useCallback(async () => {
|
|
62
|
+
try {
|
|
63
|
+
await apiClient.logout();
|
|
64
|
+
} catch {
|
|
65
|
+
// Clear cookies failed on server — still redirect
|
|
66
|
+
}
|
|
67
|
+
navigate('/login', { replace: true });
|
|
68
|
+
}, [navigate]);
|
|
69
|
+
|
|
70
|
+
// Keyboard
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
const handler = (e: KeyboardEvent) => {
|
|
73
|
+
if (e.key === 'Escape') {
|
|
74
|
+
closeSidePanel();
|
|
75
|
+
setSettingsOpen(false);
|
|
76
|
+
setQaOpen(false);
|
|
77
|
+
graphRef.current?.clearSelection();
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
document.addEventListener('keydown', handler);
|
|
81
|
+
return () => document.removeEventListener('keydown', handler);
|
|
82
|
+
}, []);
|
|
83
|
+
|
|
84
|
+
// Window resize
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
const handler = () => graphRef.current?.fitToView();
|
|
87
|
+
window.addEventListener('resize', handler);
|
|
88
|
+
return () => window.removeEventListener('resize', handler);
|
|
89
|
+
}, []);
|
|
90
|
+
|
|
91
|
+
const handleNodeClick = useCallback(async (node: any) => {
|
|
92
|
+
openSidePanel(node);
|
|
93
|
+
}, []);
|
|
94
|
+
|
|
95
|
+
const handleEdgeClick = useCallback((neighborId: string) => {
|
|
96
|
+
const node = graphRef.current?.getNodeById(neighborId);
|
|
97
|
+
if (node) {
|
|
98
|
+
graphRef.current?.focusNode(neighborId);
|
|
99
|
+
openSidePanel(node);
|
|
100
|
+
}
|
|
101
|
+
}, []);
|
|
102
|
+
|
|
103
|
+
const handleFit = useCallback(() => {
|
|
104
|
+
graphRef.current?.fitToView();
|
|
105
|
+
}, []);
|
|
106
|
+
|
|
107
|
+
const handleTypeToggle = useCallback((newHiddenTypes: Set<string>) => {
|
|
108
|
+
setHiddenTypes(newHiddenTypes);
|
|
109
|
+
graphRef.current?.setHiddenTypes(newHiddenTypes);
|
|
110
|
+
}, []);
|
|
111
|
+
|
|
112
|
+
const handleSearchChange = useCallback((query: string) => {
|
|
113
|
+
graphRef.current?.highlightBySearch(query);
|
|
114
|
+
}, []);
|
|
115
|
+
|
|
116
|
+
const handleIssuesClick = useCallback((featureId: string, featureName: string, column: string, notes: any[], reviews: any[]) => {
|
|
117
|
+
setQaFeatureId(featureId);
|
|
118
|
+
setQaFeatureName(featureName);
|
|
119
|
+
setQaColumn(column);
|
|
120
|
+
setQaNotes(notes);
|
|
121
|
+
setQaReviews(reviews);
|
|
122
|
+
setQaOpen(true);
|
|
123
|
+
}, []);
|
|
124
|
+
|
|
125
|
+
const handleNotesChanged = useCallback(() => {
|
|
126
|
+
// The kanban view will re-fetch on its own
|
|
127
|
+
}, []);
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<ToastProvider>
|
|
131
|
+
<div className="app-container">
|
|
132
|
+
<Toolbar
|
|
133
|
+
activeTab={activeTab}
|
|
134
|
+
onTabChange={switchTab}
|
|
135
|
+
completeness={completeness}
|
|
136
|
+
onFit={handleFit}
|
|
137
|
+
onSettingsToggle={() => setSettingsOpen(v => !v)}
|
|
138
|
+
settingsOpen={settingsOpen}
|
|
139
|
+
theme={theme}
|
|
140
|
+
onThemeToggle={toggleTheme}
|
|
141
|
+
isAdmin={isAdmin}
|
|
142
|
+
onLogout={handleLogout}
|
|
143
|
+
projects={projects}
|
|
144
|
+
selectedProjectId={selectedProjectId}
|
|
145
|
+
onProjectSelect={selectProject}
|
|
146
|
+
onProjectCreate={createProject}
|
|
147
|
+
onProjectRename={renameProject}
|
|
148
|
+
onProjectArchive={archiveProject}
|
|
149
|
+
/>
|
|
150
|
+
|
|
151
|
+
<div className="main-content">
|
|
152
|
+
{/* Graph View */}
|
|
153
|
+
{graphError ? (
|
|
154
|
+
<div id="graph-container" style={{ display: activeTab === 'graph' ? 'block' : 'none' }}>
|
|
155
|
+
<div className="error-msg">Failed to load graph data. Is the server running?</div>
|
|
156
|
+
</div>
|
|
157
|
+
) : graphData ? (
|
|
158
|
+
<GraphView ref={graphRef} graphData={graphData} onNodeClick={handleNodeClick} visible={activeTab === 'graph'} />
|
|
159
|
+
) : null}
|
|
160
|
+
|
|
161
|
+
{/* Graph Legend */}
|
|
162
|
+
{activeTab === 'graph' && (
|
|
163
|
+
<GraphLegend
|
|
164
|
+
visible={legendVisible}
|
|
165
|
+
onTypeToggle={handleTypeToggle}
|
|
166
|
+
onSearchChange={handleSearchChange}
|
|
167
|
+
/>
|
|
168
|
+
)}
|
|
169
|
+
|
|
170
|
+
{/* Graph Settings */}
|
|
171
|
+
<GraphSettings
|
|
172
|
+
isOpen={settingsOpen && activeTab === 'graph'}
|
|
173
|
+
onClose={() => setSettingsOpen(false)}
|
|
174
|
+
graphRef={graphRef}
|
|
175
|
+
/>
|
|
176
|
+
|
|
177
|
+
{/* Kanban View */}
|
|
178
|
+
<div id="kanban-container" style={{ display: activeTab === 'kanban' ? 'flex' : 'none' }}>
|
|
179
|
+
{activeTab === 'kanban' && graphData && (
|
|
180
|
+
<KanbanView
|
|
181
|
+
graphData={graphData}
|
|
182
|
+
projectId={selectedProjectId}
|
|
183
|
+
onCardClick={handleNodeClick}
|
|
184
|
+
onIssuesClick={handleIssuesClick}
|
|
185
|
+
/>
|
|
186
|
+
)}
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
{/* Coherence View */}
|
|
190
|
+
<div id="coherence-container" style={{ display: activeTab === 'coherence' ? 'block' : 'none' }}>
|
|
191
|
+
{activeTab === 'coherence' && graphData && (
|
|
192
|
+
<CoherenceView graphData={graphData} onNodeClick={handleNodeClick} projectId={selectedProjectId} />
|
|
193
|
+
)}
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
{/* Users View (admin-only) */}
|
|
197
|
+
{isAdmin && <UsersView visible={activeTab === 'users'} />}
|
|
198
|
+
|
|
199
|
+
{/* Terminal View (admin-only) */}
|
|
200
|
+
{isAdmin && <TerminalView visible={activeTab === 'terminal'} />}
|
|
201
|
+
|
|
202
|
+
{/* Side Panel */}
|
|
203
|
+
<SidePanel graphData={graphData} onEdgeClick={handleEdgeClick} />
|
|
204
|
+
|
|
205
|
+
{/* QA Issue Sheet */}
|
|
206
|
+
<QaIssueSheet
|
|
207
|
+
isOpen={qaOpen}
|
|
208
|
+
featureId={qaFeatureId}
|
|
209
|
+
featureName={qaFeatureName}
|
|
210
|
+
column={qaColumn}
|
|
211
|
+
notes={qaNotes}
|
|
212
|
+
reviews={qaReviews}
|
|
213
|
+
onClose={() => setQaOpen(false)}
|
|
214
|
+
onNotesChanged={handleNotesChanged}
|
|
215
|
+
/>
|
|
216
|
+
</div>
|
|
217
|
+
|
|
218
|
+
</div>
|
|
219
|
+
</ToastProvider>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Navigate } from 'react-router-dom';
|
|
3
|
+
import { ForgotPasswordPage } from '../pages/forgot_password_page';
|
|
4
|
+
import { useAuth } from '../hooks/useAuth';
|
|
5
|
+
|
|
6
|
+
export function ForgotPasswordRoute() {
|
|
7
|
+
const { user, loading } = useAuth();
|
|
8
|
+
|
|
9
|
+
if (loading) return null;
|
|
10
|
+
if (user) return <Navigate to="/" replace />;
|
|
11
|
+
|
|
12
|
+
return <ForgotPasswordPage />;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Navigate, useNavigate } from 'react-router-dom';
|
|
3
|
+
import { LoginPage } from '../components/LoginPage';
|
|
4
|
+
import { useAuth } from '../hooks/useAuth';
|
|
5
|
+
|
|
6
|
+
export function LoginRoute() {
|
|
7
|
+
const { user, loading } = useAuth();
|
|
8
|
+
const navigate = useNavigate();
|
|
9
|
+
|
|
10
|
+
if (loading) return null;
|
|
11
|
+
if (user) return <Navigate to="/" replace />;
|
|
12
|
+
|
|
13
|
+
return <LoginPage onLoginSuccess={() => navigate('/', { replace: true })} />;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Navigate, useNavigate } from 'react-router-dom';
|
|
3
|
+
import { RegisterPage } from '../pages/register_page';
|
|
4
|
+
import { useAuth } from '../hooks/useAuth';
|
|
5
|
+
|
|
6
|
+
export function RegisterRoute() {
|
|
7
|
+
const { user, loading } = useAuth();
|
|
8
|
+
const navigate = useNavigate();
|
|
9
|
+
|
|
10
|
+
if (loading) return null;
|
|
11
|
+
if (user) return <Navigate to="/" replace />;
|
|
12
|
+
|
|
13
|
+
return <RegisterPage onSuccess={() => navigate('/', { replace: true })} />;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Navigate } from 'react-router-dom';
|
|
3
|
+
import { ResetPasswordPage } from '../pages/reset_password_page';
|
|
4
|
+
import { useAuth } from '../hooks/useAuth';
|
|
5
|
+
|
|
6
|
+
export function ResetPasswordRoute() {
|
|
7
|
+
const { user, loading } = useAuth();
|
|
8
|
+
|
|
9
|
+
if (loading) return null;
|
|
10
|
+
if (user) return <Navigate to="/" replace />;
|
|
11
|
+
|
|
12
|
+
return <ResetPasswordPage />;
|
|
13
|
+
}
|