remove dead skill-update UI leftover from sync layer

- drop undefined setSkillsExpanded call in settings-dialog (would
  ReferenceError on every tab click)
- drop skillUpdateCount state, effect, and sidebar badge that filtered
  ResolvedSkill by a hasUpdate field removed with the sync layer
- drop unused React namespace import in skills-settings
This commit is contained in:
tusharmagar 2026-05-12 23:48:26 +05:30
parent e23f4ad6d2
commit 46054bda71
3 changed files with 0 additions and 16 deletions

View file

@ -1598,7 +1598,6 @@ export function SettingsDialog({ children, initialTab }: SettingsDialogProps) {
}, [open, activeTab, isJsonTab, loadConfig])
const handleTabChange = (tab: ConfigTab) => {
if (tab !== "skills") setSkillsExpanded(false)
if (isJsonTab && hasChanges) {
if (!confirm("You have unsaved changes. Discard them?")) {
return

View file

@ -1,6 +1,5 @@
"use client"
import * as React from "react"
import { useState, useEffect, useCallback } from "react"
import { ArrowLeft } from "lucide-react"
import { Button } from "@/components/ui/button"

View file

@ -436,7 +436,6 @@ export function SidebarContentPanel({
const [loggingIn, setLoggingIn] = useState(false)
const [appUrl, setAppUrl] = useState<string | null>(null)
const { billing } = useBilling(isRowboatConnected)
const [skillUpdateCount, setSkillUpdateCount] = useState(0)
const handleRowboatLogin = useCallback(async () => {
try {
@ -488,14 +487,6 @@ export function SidebarContentPanel({
setLoggingIn(false)
})
// Check for skill updates
window.ipc.invoke('skills:list', null).then((result) => {
if (mounted) {
const count = result.skills.filter((s: { hasUpdate?: boolean }) => s.hasUpdate).length
setSkillUpdateCount(count)
}
}).catch(() => {})
return () => {
mounted = false
cleanup()
@ -741,11 +732,6 @@ export function SidebarContentPanel({
<button className="flex w-full items-center gap-2 rounded-md px-2 py-1 text-xs text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground transition-colors">
<Settings className="size-4" />
<span>Settings</span>
{skillUpdateCount > 0 && (
<span className="ml-auto text-[10px] text-amber-600 dark:text-amber-400 font-medium">
{skillUpdateCount} skill {skillUpdateCount === 1 ? "update" : "updates"}
</span>
)}
</button>
</SettingsDialog>
<HelpPopover>