-
- Failed to fetch the thread, please refresh the page or start a new
- thread
+
{title}
+
{description}
o.extensions?.code === ERROR_CODE_NOT_FOUND)
) {
- return `The thread has expired`
+ return `The thread has expired or does not exist.`
}
return error.message || 'Failed to fetch'
diff --git a/ee/tabby-ui/components/not-found-page.tsx b/ee/tabby-ui/components/not-found-page.tsx
new file mode 100644
index 000000000000..ddecf5f1f554
--- /dev/null
+++ b/ee/tabby-ui/components/not-found-page.tsx
@@ -0,0 +1,69 @@
+'use client'
+
+import Image from 'next/image'
+import Link from 'next/link'
+import logoDarkUrl from '@/assets/logo-dark.png'
+import logoUrl from '@/assets/logo.png'
+
+import { cn } from '@/lib/utils'
+
+import { ClientOnly } from './client-only'
+import { BANNER_HEIGHT, useShowDemoBanner } from './demo-banner'
+import { ThemeToggle } from './theme-toggle'
+import { buttonVariants } from './ui/button'
+import { MyAvatar } from './user-avatar'
+import UserPanel from './user-panel'
+
+export default function NotFoundPage() {
+ const [isShowDemoBanner] = useShowDemoBanner()
+
+ const style = isShowDemoBanner
+ ? {
+ height: `calc(100vh - ${BANNER_HEIGHT})`
+ }
+ : { height: '100vh' }
+
+ return (
+
+
+
+
+ 404
+
+
+ Oops, it looks like the page you're looking for doesn't
+ exist.
+
+
+ Home
+
+
+
+ )
+}
+
+function Header() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/ee/tabby-ui/lib/tabby/gql.ts b/ee/tabby-ui/lib/tabby/gql.ts
index faacd7ef063e..544d8f107eb1 100644
--- a/ee/tabby-ui/lib/tabby/gql.ts
+++ b/ee/tabby-ui/lib/tabby/gql.ts
@@ -23,6 +23,7 @@ import {
GitRepositoriesQueryVariables,
ListIntegrationsQueryVariables,
ListInvitationsQueryVariables,
+ ListThreadsQueryVariables,
SourceIdAccessPoliciesQueryVariables,
UpsertUserGroupMembershipInput
} from '../gql/generates/graphql'
@@ -33,6 +34,7 @@ import {
listInvitations,
listRepositories,
listSourceIdAccessPolicies,
+ listThreads,
userGroupsQuery
} from './query'
import {
@@ -375,6 +377,33 @@ const client = new Client({
)
})
}
+ },
+ deleteThread(result, args, cache, info) {
+ if (result.deleteThread) {
+ cache
+ .inspectFields('Query')
+ // Update the cache within the thread-feeds only
+ .filter(
+ field =>
+ field.fieldName === 'threads' && !field.arguments?.ids
+ )
+ .forEach(field => {
+ cache.updateQuery(
+ {
+ query: listThreads,
+ variables: field.arguments as ListThreadsQueryVariables
+ },
+ data => {
+ if (data?.threads) {
+ data.threads.edges = data.threads.edges.filter(
+ e => e.node.id !== args.id
+ )
+ }
+ return data
+ }
+ )
+ })
+ }
}
}
},