Skip to content

Commit 14923aa

Browse files
committed
improvement(ui): home credits + suggested actions, integrations route, sidebar polish
- home: add CreditsChip and SuggestedActions to the empty home state; widen greeting to fit prompts - integrations: promote to a top-level workspace route (/integrations) and drop the settings tab - sidebar: rebuild collapsed flyout items on top of the new DropdownMenuItemAction slot; portal sub-content; quieter hover/active states - search-modal: add Home and Integrations pages, surface tasks above workflows, tighten spacing and radii - emcn/dropdown: add action prop to DropdownMenuItem, new DropdownMenuItemAction button, asChild on SubTrigger; align item heights to 30px and radii to lg - emcn/button: add quiet variant for inline chip-style buttons - icons: refresh weights to 1.55, redraw Eye, add Credit and Task icons - task status: replace the Blimp + dot pattern with a Linear-style TaskStatusDot (active / unread / done) - workflows/colors: regroup palette by hue family so the picker can render columns - tasks query: skip cache cancellation when no list is cached and reconcile in onSuccess so the in-flight initial fetch isn't orphaned - styles: nudge --text-icon shades for both themes
1 parent 1722cb7 commit 14923aa

128 files changed

Lines changed: 1403 additions & 1186 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/sim/app/_styles/globals.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ html[data-sidebar-collapsed] .sidebar-container .sidebar-collapse-btn {
206206
--text-muted: #707070;
207207
--text-subtle: #8c8c8c;
208208
--text-body: #3b3b3b;
209-
--text-icon: #5e5e5e;
209+
--text-icon: #525252;
210210

211211
--text-inverse: #ffffff;
212212
--text-muted-inverse: #a0a0a0;
@@ -362,7 +362,7 @@ html[data-sidebar-collapsed] .sidebar-container .sidebar-collapse-btn {
362362
--text-muted: #787878;
363363
--text-subtle: #7d7d7d;
364364
--text-body: #cdcdcd;
365-
--text-icon: #939393;
365+
--text-icon: #a0a0a0;
366366

367367
--text-inverse: #1b1b1b;
368368
--text-muted-inverse: #b3b3b3;

apps/sim/app/chat/components/input/input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export const ChatInput: React.FC<{
182182
<div
183183
onClick={handleContainerClick}
184184
className={cn(
185-
'relative z-10 cursor-text rounded-[20px] border border-[var(--border-1)] bg-[var(--landing-bg-elevated)] px-2.5 py-2',
185+
'relative z-10 cursor-text rounded-2xl border border-[var(--border-1)] bg-[var(--landing-bg-elevated)] px-2.5 py-2',
186186
isDragOver && 'border-purple-500'
187187
)}
188188
onDragEnter={(e) => {

apps/sim/app/workspace/[workspaceId]/components/conversation-list-item.tsx

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { ReactNode } from 'react'
2-
import { Blimp } from '@/components/emcn'
32
import { cn } from '@/lib/core/utils/cn'
43

54
interface ConversationListItemProps {
@@ -14,34 +13,12 @@ interface ConversationListItemProps {
1413

1514
export function ConversationListItem({
1615
title,
17-
isActive = false,
18-
isUnread = false,
1916
className,
2017
titleClassName,
21-
statusIndicatorClassName,
2218
actions,
2319
}: ConversationListItemProps) {
2420
return (
2521
<div className={cn('flex w-full min-w-0 items-center gap-2', className)}>
26-
<span className='relative flex-shrink-0'>
27-
<Blimp className='h-[16px] w-[16px] text-[var(--text-icon)]' />
28-
{isActive && (
29-
<span
30-
className={cn(
31-
'-right-[1px] -bottom-[1px] absolute h-[6px] w-[6px] rounded-full border border-[var(--surface-1)] bg-amber-400',
32-
statusIndicatorClassName
33-
)}
34-
/>
35-
)}
36-
{!isActive && isUnread && (
37-
<span
38-
className={cn(
39-
'-right-[1px] -bottom-[1px] absolute h-[6px] w-[6px] rounded-full border border-[var(--surface-1)] bg-[var(--indicator-online)]',
40-
statusIndicatorClassName
41-
)}
42-
/>
43-
)}
44-
</span>
4522
<span className={cn('min-w-0 flex-1 truncate', titleClassName)}>{title}</span>
4623
{actions && <div className='ml-auto flex flex-shrink-0 items-center'>{actions}</div>}
4724
</div>

apps/sim/app/workspace/[workspaceId]/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ export type {
2828
SelectableConfig,
2929
} from './resource/resource'
3030
export { Resource, ResourceTable } from './resource/resource'
31+
export { TaskStatusDot } from './task-status-dot'
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import type { SVGProps } from 'react'
2+
import { cn } from '@/lib/core/utils/cn'
3+
4+
type TaskStatus = 'active' | 'unread' | 'done'
5+
6+
const STATUS_COLOR_CLASS: Record<TaskStatus, string> = {
7+
active: 'text-yellow-500',
8+
unread: 'text-[var(--brand-accent)]',
9+
done: 'text-[var(--text-icon)]',
10+
}
11+
12+
interface TaskStatusDotProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {
13+
isActive?: boolean
14+
isUnread?: boolean
15+
}
16+
17+
/**
18+
* Linear-style task status indicator.
19+
*
20+
* - **active** — outlined ring with a play wedge (in progress).
21+
* - **unread** — outlined ring with a half-pie fill (started, awaiting attention).
22+
* - **done** — filled disc with an inverse-color check (settled).
23+
*
24+
* Renders as a 16×16 SVG so it slots into rows beside other 16/14px row icons.
25+
* Override size via `className` (e.g. `h-[14px] w-[14px]`) — the SVG scales.
26+
*/
27+
export function TaskStatusDot({ isActive, isUnread, className, ...props }: TaskStatusDotProps) {
28+
const status: TaskStatus = isActive ? 'active' : isUnread ? 'unread' : 'done'
29+
30+
return (
31+
<svg
32+
aria-hidden='true'
33+
viewBox='0 0 16 16'
34+
fill='none'
35+
className={cn('h-[16px] w-[16px] flex-shrink-0', STATUS_COLOR_CLASS[status], className)}
36+
{...props}
37+
>
38+
{status === 'done' ? (
39+
<>
40+
<circle cx='8' cy='8' r='7' fill='currentColor' />
41+
<path
42+
d='M4.75 8.25 L6.85 10.35 L11.25 5.95'
43+
stroke='var(--text-inverse)'
44+
strokeWidth='1.5'
45+
strokeLinecap='round'
46+
strokeLinejoin='round'
47+
/>
48+
</>
49+
) : (
50+
<>
51+
<circle cx='8' cy='8' r='6.5' stroke='currentColor' strokeWidth='1.5' />
52+
{status === 'active' ? (
53+
<path d='M6.75 5.5 L10.5 8 L6.75 10.5 Z' fill='currentColor' />
54+
) : (
55+
<path d='M8 3.25 A 4.75 4.75 0 0 1 8 12.75 Z' fill='currentColor' />
56+
)}
57+
</>
58+
)}
59+
</svg>
60+
)
61+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
'use client'
2+
3+
import { Credit } from '@/components/emcn/icons'
4+
import { formatCredits } from '@/lib/billing/credits/conversion'
5+
import { isBillingEnabled } from '@/app/workspace/[workspaceId]/settings/navigation'
6+
import { useSubscriptionData } from '@/hooks/queries/subscription'
7+
import { useSettingsNavigation } from '@/hooks/use-settings-navigation'
8+
9+
export function CreditsChip() {
10+
if (!isBillingEnabled) return null
11+
12+
return <CreditsChipInner />
13+
}
14+
15+
function CreditsChipInner() {
16+
const { data, isLoading } = useSubscriptionData()
17+
const { navigateToSettings } = useSettingsNavigation()
18+
19+
if (isLoading || !data?.data) return null
20+
21+
const chipLabel = formatCredits(data.data.creditBalance)
22+
23+
return (
24+
<button
25+
type='button'
26+
aria-label='Manage subscription'
27+
onClick={() => navigateToSettings({ section: 'subscription' })}
28+
className='group mx-0.5 inline-flex h-[30px] items-center gap-1.5 rounded-lg px-2 transition-colors hover-hover:bg-[var(--surface-active)]'
29+
>
30+
<Credit className='h-[16px] w-[16px] flex-shrink-0 text-[var(--text-icon)]' />
31+
<span className='font-base text-[var(--text-body)] text-sm'>{chipLabel}</span>
32+
</button>
33+
)
34+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { CreditsChip } from './credits-chip'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
export { ChatMessageAttachments } from './chat-message-attachments'
22
export { ContextMentionIcon } from './context-mention-icon'
3+
export { CreditsChip } from './credits-chip'
34
export {
45
assistantMessageHasRenderableContent,
56
MessageContent,
67
} from './message-content'
78
export { MothershipChat } from './mothership-chat/mothership-chat'
89
export { MothershipView } from './mothership-view'
910
export { QueuedMessages } from './queued-messages'
11+
export { SuggestedActions } from './suggested-actions'
1012
export { UserInput } from './user-input'
1113
export { UserMessageContent } from './user-message-content'

apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/mothership-chat-skeleton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Skeleton } from '@/components/emcn'
22

33
const LAYOUT_SKELETON_STYLES = {
44
'mothership-view': {
5-
content: 'mx-auto max-w-[42rem] space-y-6',
5+
content: 'mx-auto max-w-[44rem] space-y-6',
66
userRow: 'flex flex-col items-end gap-[6px] pt-3',
77
},
88
'copilot-view': {

apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/mothership-chat.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ const LAYOUT_STYLES = {
5757
'mothership-view': {
5858
scrollContainer:
5959
'min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-6 pt-4 pb-8 [scrollbar-gutter:stable_both-edges]',
60-
content: 'mx-auto max-w-[42rem] space-y-6',
60+
content: 'mx-auto max-w-[44rem] space-y-6',
6161
userRow: 'flex flex-col items-end gap-[6px] pt-3',
6262
attachmentWidth: 'max-w-[70%]',
6363
userBubble: 'max-w-[70%] overflow-hidden rounded-[16px] bg-[var(--surface-5)] px-3.5 py-2',
6464
assistantRow: 'group/msg',
6565
footer: 'flex-shrink-0 px-[24px] pb-[16px]',
66-
footerInner: 'mx-auto max-w-[42rem]',
66+
footerInner: 'mx-auto max-w-[44rem]',
6767
},
6868
'copilot-view': {
6969
scrollContainer: 'min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-3 pt-2 pb-4',

0 commit comments

Comments
 (0)