diff --git a/apps/sim/app/layout.tsx b/apps/sim/app/layout.tsx index 12b5a343521..7fc27f4970f 100644 --- a/apps/sim/app/layout.tsx +++ b/apps/sim/app/layout.tsx @@ -112,7 +112,7 @@ export default function RootLayout({ children }: { children: React.ReactNode }) // needs the same variables set before first paint. try { var path = window.location.pathname; - if (path.indexOf('/workspace/') === -1 && path.indexOf('/o/') !== 0) { + if (path.indexOf('/workspace/') === -1 && path.indexOf('/o/') !== 0 && path.indexOf('/account/settings') !== 0 && path.indexOf('/selfhost/settings') !== 0) { return; } } catch (e) { @@ -123,7 +123,7 @@ export default function RootLayout({ children }: { children: React.ReactNode }) // 30% of the viewport capped at 400px, and never below the 224px // minimum, so a narrow window yields a width >= MIN instead of a // sub-minimum sliver. - var defaultSidebarWidth = 256; + var defaultSidebarWidth = 224; try { // Collapse comes from the cookie (independent of localStorage // parsing); the persisted width is read defensively below. Match the diff --git a/apps/sim/app/o/[organizationId]/components/organization-sidebar/components/chats-section/chats-section.tsx b/apps/sim/app/o/[organizationId]/components/organization-sidebar/components/chats-section/chats-section.tsx index b349e283201..51e7cf33625 100644 --- a/apps/sim/app/o/[organizationId]/components/organization-sidebar/components/chats-section/chats-section.tsx +++ b/apps/sim/app/o/[organizationId]/components/organization-sidebar/components/chats-section/chats-section.tsx @@ -1,6 +1,6 @@ 'use client' -import { chipVariants, cn, DropdownMenuItem, Loader, OverflowText, Skeleton } from '@sim/emcn' +import { chipVariants, cn, DropdownMenuItem, OverflowText } from '@sim/emcn' import { MoreHorizontal, Pin, Task } from '@sim/emcn/icons' import type { OrganizationChat } from '@/app/o/[organizationId]/components/organization-sidebar/hooks' import { useOrganizationChatActions } from '@/app/o/[organizationId]/components/organization-sidebar/hooks/use-organization-chat-actions' @@ -20,15 +20,6 @@ import { SIDEBAR_SECTION_GAP_CLASS, } from '@/app/workspace/[workspaceId]/w/components/sidebar/constants' -/** Stands in for a chip row while the list loads, so it carries no margin either. */ -function ChatRowSkeleton() { - return ( -
Choose the days to search.
- ) : fetching || (pending && !failed) ? ( -+ {pending ? 'Searching…' : 'Updating results…'} +
+ ) : pending && !failed ? null : ({failed ? 'Search couldn’t run.' @@ -445,13 +446,16 @@ function LiveSearchResults({ ]), ] return ( -
+ {isPending ? 'Searching…' : 'Updating results…'} +
+ )} + {(awaitingRange || isError) && (Choose the days to search.
- ) : isPending || isFetching ? ( -
Search couldn’t run.
diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/knowledge-search-results/search-transitions.test.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/knowledge-search-results/search-transitions.test.tsx
index ddba2c4c0ab..1c277b9ab49 100644
--- a/apps/sim/app/workspace/[workspaceId]/home/components/knowledge-search-results/search-transitions.test.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/home/components/knowledge-search-results/search-transitions.test.tsx
@@ -140,7 +140,7 @@ async function render({
+ {history.isPending
+ ? 'Loading sources…'
+ : history.isError
+ ? 'Unable to load sources. Try reopening this conversation.'
+ : 'No cited sources are available for this response.'}
+
- {history.isPending
- ? 'Loading sources…'
- : history.isError
- ? 'Unable to load sources. Try reopening this conversation.'
- : 'No cited sources are available for this response.'}
-
+ {sources.map((source) => {
+ const hostname = externalLinkHostname(source.url)
+ return (
+
+
- ) : null
-
if (dense) {
return (
-
- ) : null}
+
setFailedHostname(hostname)}
+ />
+ )
+ }
+ return
+ Sources
+
+ {sources.length ? ` · ${sources.length}` : ''}
+
+
+ {sources.length ? (
+ sources.map((source) =>