Skip to content

Commit 2e86fb9

Browse files
committed
removed unused notification bell, notification hooks, and cleaned settings pages
1 parent 9285030 commit 2e86fb9

4 files changed

Lines changed: 6 additions & 374 deletions

File tree

apps/desktop-ui/app/(app)/settings/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client"
22

33
import { useState, useEffect, useCallback, Suspense } from "react"
4-
import { Settings, Loader2, Globe, Palette, Bell, Cpu, Shield, Key, Database, Brain, User as UserIcon, Building2 } from "lucide-react"
4+
import { Settings, Loader2, Globe, Palette, Cpu, Shield, Key, Database, Brain, User as UserIcon, Building2 } from "lucide-react"
55
import { useRouter, useSearchParams } from "next/navigation"
66
import { toast } from "sonner"
77
import { getActiveRepository } from "@/lib/api"
@@ -13,21 +13,21 @@ import { WorkspacesSection } from "@/components/settings/workspaces-section"
1313
import { ProfileSection } from "@/components/settings/profile-section"
1414
import { GeneralSection } from "@/components/settings/general-section"
1515
import { AppearanceSection } from "@/components/settings/appearance-section"
16-
import { NotificationsSection } from "@/components/settings/notifications-section"
16+
1717
import { AIExecutionSection } from "@/components/settings/ai-execution-section"
1818
import { SecuritySection } from "@/components/settings/security-section"
1919

2020
type SettingsSection =
2121
| "profile" | "workspaces" | "general" | "appearance"
22-
| "notifications" | "ai-execution" | "ai-providers"
22+
| "ai-execution" | "ai-providers"
2323
| "security" | "api-keys" | "database"
2424

2525
const NAV_ITEMS: { id: SettingsSection; label: string; icon: React.ElementType }[] = [
2626
{ id: "profile", label: "Profile", icon: UserIcon },
2727
{ id: "workspaces", label: "Workspaces", icon: Building2 },
2828
{ id: "general", label: "General", icon: Globe },
2929
{ id: "appearance", label: "Appearance", icon: Palette },
30-
{ id: "notifications", label: "Notifications", icon: Bell },
30+
3131
{ id: "ai-execution", label: "AI Execution", icon: Cpu },
3232
{ id: "ai-providers", label: "AI Providers", icon: Brain },
3333
{ id: "security", label: "Security & Privacy", icon: Shield },
@@ -124,7 +124,7 @@ function SettingsContent() {
124124
case "workspaces": return <WorkspacesSection />
125125
case "general": return <GeneralSection taskDeletionMode={taskDeletionMode} setTaskDeletionMode={setTaskDeletionMode} />
126126
case "appearance": return <AppearanceSection />
127-
case "notifications": return <NotificationsSection />
127+
128128
case "ai-execution": return (
129129
<AIExecutionSection
130130
loading={loading}

apps/desktop-ui/app/(app)/teams/manage/page.tsx

Lines changed: 1 addition & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
Pencil,
1313
Settings,
1414
FolderKanban,
15-
ListTodo,
1615
} from "lucide-react"
1716
import { Button } from "@/components/ui/button"
1817
import { buttonVariants } from "@/components/ui/button"
@@ -23,13 +22,9 @@ import {
2322
SettingsSection,
2423
} from "@/components/settings/settings-layout"
2524
import {
26-
PRIORITY_COLORS,
2725
PROJECT_STATUS_COLORS,
28-
STATUS_COLORS,
2926
TEAM_ROLE_COLORS,
3027
type ColorTriad,
31-
type PriorityKey,
32-
type StatusKey,
3328
} from "@/lib/design-tokens"
3429
import { Input } from "@/components/ui/input"
3530
import { Label } from "@/components/ui/label"
@@ -78,24 +73,8 @@ const roleIcons = {
7873
member: User,
7974
}
8075

81-
const taskStatusColorKeys: Record<string, StatusKey> = {
82-
backlog: "todo",
83-
completed: "done",
84-
done: "done",
85-
in_progress: "in_progress",
86-
todo: "todo",
87-
}
88-
8976
const getBadgeColorClasses = (colors: ColorTriad) => cn(colors.text, "bg-transparent border-linear-border")
9077

91-
interface Task {
92-
id: string
93-
title: string
94-
status: string
95-
priority: string
96-
identifier: string | null
97-
}
98-
9978
export default function TeamDetailPage() {
10079
return (
10180
<Suspense fallback={null}>
@@ -117,8 +96,6 @@ function TeamDetailPageContent() {
11796
const [teamColor, setTeamColor] = useState("#10b981")
11897
const [isSavingTeam, setIsSavingTeam] = useState(false)
11998
const [copiedInviteCode, setCopiedInviteCode] = useState(false)
120-
const [tasks, setTasks] = useState<Task[]>([])
121-
const [isLoadingTasks, setIsLoadingTasks] = useState(false)
12299
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false)
123100
const [isDeleting, setIsDeleting] = useState(false)
124101
const [removeMemberId, setRemoveMemberId] = useState<string | null>(null)
@@ -140,34 +117,14 @@ function TeamDetailPageContent() {
140117
}
141118
}, [teamId])
142119

143-
const loadTasks = useCallback(async () => {
144-
if (!teamId) return
145-
try {
146-
setIsLoadingTasks(true)
147-
const data = await apiFetch<{ items: Task[] } | Task[]>(`/api/tasks?teamId=${teamId}`)
148-
setTasks(Array.isArray(data) ? data : data.items)
149-
} catch (error) {
150-
console.error("Failed to fetch tasks:", error)
151-
if (!(error instanceof ApiError && error.status === 401)) {
152-
toast.error(error instanceof Error ? error.message : 'Failed to fetch tasks')
153-
}
154-
} finally {
155-
setIsLoadingTasks(false)
156-
}
157-
}, [teamId])
158-
159120
useEffect(() => {
160121
loadTeam()
161-
loadTasks()
162-
}, [loadTeam, loadTasks])
122+
}, [loadTeam])
163123

164124
useSSESubscription((eventType) => {
165125
if (['team:created', 'team:updated', 'team:deleted'].includes(eventType)) {
166126
loadTeam()
167127
}
168-
if (['task:created', 'task:updated', 'task:deleted'].includes(eventType)) {
169-
loadTasks()
170-
}
171128
})
172129

173130
const handleSaveTeamInfo = async (e: React.FormEvent) => {
@@ -255,15 +212,6 @@ function TeamDetailPageContent() {
255212
.slice(0, 2)
256213
}
257214

258-
const getPriorityColor = (priority: string) => {
259-
const key = priority.toLowerCase() as PriorityKey
260-
return getBadgeColorClasses(PRIORITY_COLORS[key] ?? PRIORITY_COLORS.low)
261-
}
262-
263-
const getStatusColor = (status: string) => {
264-
return getBadgeColorClasses(STATUS_COLORS[taskStatusColorKeys[status.toLowerCase()] ?? "todo"])
265-
}
266-
267215
const getProjectStatusColor = (status: string) => {
268216
const key = status as keyof typeof PROJECT_STATUS_COLORS
269217
return getBadgeColorClasses(PROJECT_STATUS_COLORS[key] ?? PROJECT_STATUS_COLORS.planned)
@@ -500,68 +448,6 @@ function TeamDetailPageContent() {
500448
)}
501449
</SettingsSection>
502450

503-
<SettingsSection
504-
title="Issues"
505-
description={`${tasks.length} ${tasks.length === 1 ? "issue" : "issues"} currently attached to this team`}
506-
icon={<ListTodo className="h-4 w-4" />}
507-
>
508-
<SettingsPanel className="overflow-hidden">
509-
{isLoadingTasks ? (
510-
<div className="py-8 text-center text-linear-text-tertiary">Loading issues...</div>
511-
) : tasks.length > 0 ? (
512-
<table className="w-full">
513-
<thead>
514-
<tr className="border-b border-linear-border bg-linear-bg-tertiary/50">
515-
<th className="text-left py-2 px-4 text-xs font-medium text-linear-text-tertiary uppercase tracking-wider">
516-
Title
517-
</th>
518-
<th className="text-left py-2 px-4 text-xs font-medium text-linear-text-tertiary uppercase tracking-wider w-[120px]">
519-
Status
520-
</th>
521-
<th className="text-left py-2 px-4 text-xs font-medium text-linear-text-tertiary uppercase tracking-wider w-[120px]">
522-
Priority
523-
</th>
524-
</tr>
525-
</thead>
526-
<tbody>
527-
{tasks.map((task) => (
528-
<tr
529-
key={task.id}
530-
className="border-b border-linear-border/50 hover:bg-linear-bg-tertiary/30 transition-colors cursor-pointer"
531-
onClick={() => router.push(`/?teamId=${teamId}`)}
532-
>
533-
<td className="py-3 px-4">
534-
<div className="flex items-center gap-2">
535-
{task.identifier && (
536-
<span className="text-xs font-mono text-linear-text-tertiary">{task.identifier}</span>
537-
)}
538-
<span className="text-sm text-linear-text truncate">{task.title}</span>
539-
</div>
540-
</td>
541-
<td className="py-3 px-4">
542-
<Badge variant="outline" className={cn(getStatusColor(task.status), "text-xs capitalize whitespace-nowrap")}>
543-
{task.status.replace('_', ' ')}
544-
</Badge>
545-
</td>
546-
<td className="py-3 px-4">
547-
<Badge variant="outline" className={cn(getPriorityColor(task.priority), "text-xs capitalize whitespace-nowrap")}>
548-
{task.priority}
549-
</Badge>
550-
</td>
551-
</tr>
552-
))}
553-
</tbody>
554-
</table>
555-
) : (
556-
<div className="text-center py-8">
557-
<ListTodo className="w-8 h-8 text-linear-text-tertiary mx-auto mb-2" />
558-
<p className="text-sm text-linear-text-secondary">No issues yet</p>
559-
<p className="text-xs text-linear-text-tertiary">Issues assigned to this team will appear here</p>
560-
</div>
561-
)}
562-
</SettingsPanel>
563-
</SettingsSection>
564-
565451
<SettingsSection
566452
title="Parent project"
567453
description="Teams now belong to one project. Use project settings for project-level access and lifecycle."

apps/desktop-ui/components/notifications/notification-bell.tsx

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)