π€― LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
π style(home): bring the home page onto Compact density (#23542)
Innei2cd1e7107608
diff --git a/src/features/Home/AgentSelect/index.tsx b/src/features/Home/AgentSelect/index.tsxindex e06e32a36b4..7866d27f972 100644--- a/src/features/Home/AgentSelect/index.tsx+++ b/src/features/Home/AgentSelect/index.tsx@@ -23,6 +23,7 @@ import { useAgentStore } from '@/store/agent';import { agentSelectors, builtinAgentSelectors } from '@/store/agent/selectors';import { useHomeStore } from '@/store/home';import { homeAgentListSelectors } from '@/store/home/selectors';+import { useDensity } from '@/styles/density';import { densityVars } from '@/styles/densityVars';import AgentList from './AgentList';@@ -74,6 +75,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({const AgentSelect = memo(() => {const { t } = useTranslation(['chat', 'common']);const [open, setOpen] = useState(false);+ const { compact } = useDensity();const { error, mutate } = useFetchAgentList();const inboxAgentId = useAgentStore(builtinAgentSelectors.inboxAgentId);const selectHomeAgent = useSelectHomeAgent();@@ -129,7 +131,7 @@ const AgentSelect = memo(() => {background={displayMeta?.backgroundColor || undefined}name={displayTitle}shape={'square'}- size={24}+ size={compact ? 20 : 24}/><Text ellipsis className={styles.name} style={{ minWidth: 0 }} weight={600}>{displayTitle}diff --git a/src/features/Home/CustomizeModal/Content.tsx b/src/features/Home/CustomizeModal/Content.tsxindex 175e1e41a92..1c9afc1a267 100644--- a/src/features/Home/CustomizeModal/Content.tsx+++ b/src/features/Home/CustomizeModal/Content.tsx@@ -26,24 +26,24 @@ const styles = createStaticStyles(({ css, cssVar }) => ({body: css`overflow-y: auto;max-block-size: min(70vh, 560px);- padding-block: ${densityVars.contentGap} 20px;- padding-inline: 20px;+ padding-block: ${densityVars.contentGap} ${densityVars.modalPadding};+ padding-inline: ${densityVars.modalPadding};`,footer: css`padding-block: ${densityVars.contentGap};- padding-inline: ${densityVars.contentGap} 20px;+ padding-inline: ${densityVars.contentGap} ${densityVars.modalPadding};border-block-start: 1px solid ${cssVar.colorBorderSecondary};`,header: css`padding-block: ${densityVars.cardPadding} 4px;- padding-inline: 20px;+ padding-inline: ${densityVars.modalPadding};`,}));const CustomizeModalContent = memo(() => {const { t } = useTranslation('home');const { close } = useModalContext();- const { pageTitleFontSize, sectionGap } = useDensityTokens();+ const { modalPadding, pageTitleFontSize, sectionGap } = useDensityTokens();const {applyPreset,isWidgetHidden,@@ -79,7 +79,7 @@ const CustomizeModalContent = memo(() => {/></Flexbox>- <Flexbox className={styles.body} gap={20}>+ <Flexbox className={styles.body} gap={modalPadding}><SettingRow title={t('dashboard.customize.preset.label')}><PresetBar value={preset} onChange={applyPreset} /></SettingRow>diff --git a/src/features/Home/EmptySuggestions.tsx b/src/features/Home/EmptySuggestions.tsxindex f65c11f585a..1542a789026 100644--- a/src/features/Home/EmptySuggestions.tsx+++ b/src/features/Home/EmptySuggestions.tsx@@ -3,13 +3,19 @@ import { FileTextIcon, ListTodoIcon, SearchIcon } from 'lucide-react';import { memo } from 'react';import { useTranslation } from 'react-i18next';+import { useDensityTokens } from '@/styles/density';import { densityVars } from '@/styles/densityVars';import { homeType } from './components/homeType';const styles = createStaticStyles(({ css, cssVar }) => ({description: css`+ font-size: 13px;color: ${cssVar.colorTextTertiary};++ html[data-density='compact'] & {+ font-size: 12px;+ }`,icon: css`flex: none;@@ -26,6 +32,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({padding-block: 9px;padding-inline: 10px;border: 0;++ html[data-density='compact'] & {+ padding-block: 6px;+ }border-radius: ${cssVar.borderRadiusLG};text-align: start;@@ -51,6 +61,7 @@ interface EmptySuggestionsProps {const EmptySuggestions = memo<EmptySuggestionsProps>(({ onSelect }) => {const { t } = useTranslation('home');+ const { contentGap, iconSize } = useDensityTokens();return (// Inset from the column edge: the composer above and the list rows below@@ -67,15 +78,15 @@ const EmptySuggestions = memo<EmptySuggestionsProps>(({ onSelect }) => {return (<Button className={styles.row} key={key} type={'text'} onClick={() => onSelect(prompt)}>- <Flexbox horizontal align={'flex-start'} gap={12} style={{ width: '100%' }}>+ <Flexbox horizontal align={'flex-start'} gap={contentGap} style={{ width: '100%' }}><Flexbox className={styles.icon}>- <Icon icon={icon} size={18} />+ <Icon icon={icon} size={iconSize} /></Flexbox><Flexbox gap={2} style={{ flex: 1, minWidth: 0 }}><Text className={homeType.itemTitleProse}>{t(`dashboard.empty.${key}.title`)}</Text>- <Text className={styles.description} fontSize={13}>+ <Text className={styles.description}>{t(`dashboard.empty.${key}.description`)}</Text></Flexbox>diff --git a/src/features/Home/HomeHeader.tsx b/src/features/Home/HomeHeader.tsxindex 34529ace6e0..112ec7379c2 100644--- a/src/features/Home/HomeHeader.tsx+++ b/src/features/Home/HomeHeader.tsx@@ -1,9 +1,10 @@-import { createStaticStyles, Flexbox, Text } from '@lobehub/ui';+import { createStaticStyles, cx, Flexbox, Text } from '@lobehub/ui';import { memo } from 'react';import { useTranslation } from 'react-i18next';import { useUserStore } from '@/store/user';import { authSelectors, userProfileSelectors } from '@/store/user/slices/auth/selectors';+import { densityVars } from '@/styles/densityVars';import AgentSelect from './AgentSelect';import { getGreetingKey } from './greeting';@@ -24,11 +25,17 @@ const styles = createStaticStyles(({ css }) => ({font-size: 22px;line-height: 1.4;letter-spacing: -0.01em;++ html[data-density='compact'] & {+ font-size: 20px;+ }`,- toolbar: css`- width: 100%;- min-width: 0;- min-height: 48px;+ /* The nav header floats over the scroll area, so the page padding alone would+ tuck the switcher right under it; clear the header by one section gap. */+ dashboard: css`+ padding-block-start: calc(+ ${densityVars.headerHeight} + ${densityVars.sectionGap} - ${densityVars.pagePaddingBlockStart}+ );`,}));@@ -47,18 +54,11 @@ const HomeHeader = memo<HomeHeaderProps>(({ centered }) => {: t(`dashboard.greeting.${greetingKey}Guest`);return (- // Minimal mode keeps the full layout's stacking order β the switcher names- // who speaks, the greeting answers below β but drops the toolbar chrome and- // its 48px lane, so the pair reads as one compact block flush with the- // composer. The layout's lift math (MINIMAL_LIFT) counts on these heights.- <Flexbox className={styles.root} gap={centered ? 8 : 16} justify={'center'}>- {centered ? (- <AgentSelect />- ) : (- <Flexbox horizontal align={'center'} className={styles.toolbar}>- <AgentSelect />- </Flexbox>- )}+ // The switcher names who speaks and the greeting answers right below it, so+ // the pair reads as one block. The minimal layout's lift math (MINIMAL_LIFT)+ // counts on these heights.+ <Flexbox className={cx(styles.root, !centered && styles.dashboard)} gap={8} justify={'center'}>+ <AgentSelect /><Text as={'h1'} className={styles.greeting} weight={600}>{greeting}</Text>diff --git a/src/features/Home/HomeModeContent.tsx b/src/features/Home/HomeModeContent.tsxindex ad26b9d0b54..7026a0ec6a4 100644--- a/src/features/Home/HomeModeContent.tsx+++ b/src/features/Home/HomeModeContent.tsx@@ -36,7 +36,7 @@ import { taskListSelectors } from '@/store/task/selectors';import type { TaskListItem } from '@/store/task/slices/list/initialState';import { useUserStore } from '@/store/user';import { authSelectors, userProfileSelectors } from '@/store/user/slices/auth/selectors';-import { useDensityTokens } from '@/styles/density';+import { useDensity, useDensityTokens } from '@/styles/density';import { densityVars } from '@/styles/densityVars';import { markdownToTxt } from '@/utils/markdownToTxt';@@ -48,6 +48,7 @@ import Time from './components/Time';import { isHomeWidgetHidden } from './CustomizeModal/config';import EmptySuggestions from './EmptySuggestions';import { isRecentsSnapshotSettled, resolveHomeChatContentState } from './homeChatContentState';+import { useHomeSpacing } from './homeDensity';import type { HomeMode } from './types';const styles = createStaticStyles(({ css, cssVar }) => ({@@ -92,6 +93,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({margin-inline: -10px;padding-block: 9px;padding-inline: 10px;++ html[data-density='compact'] & {+ padding-block: 6px;+ }`,rowText: css`flex: 1;@@ -284,23 +289,43 @@ const SKELETON_ROWS = [* skeleton: a concrete leading icon would read as already-loaded content and* then be swapped for an avatar, which is precisely the wrong promise to make.*/+const SKELETON_LINES = {+ compact: { meta: 16, supporting: 18, title: 20 },+ loose: { meta: 18, supporting: 20, title: 22 },+} as const;+const LoadingRows = memo<{ avatarSize?: number; withTime?: boolean }>(- ({ avatarSize = 22, withTime }) => (- <Flexbox aria-hidden gap={4}>- {SKELETON_ROWS.map(({ description, title }, index) => (- <Flexbox horizontal align={'flex-start'} className={styles.rowBox} gap={12} key={index}>- <Flexbox flex={'none'} paddingBlock={3}>- <Skeleton.Avatar className={styles.topicAvatar} shape={'circle'} size={avatarSize} />- </Flexbox>- <Flexbox className={styles.rowText} gap={3}>- <SkeletonLine bar={14} line={22} width={title} />- <SkeletonLine bar={12} line={20} width={description} />+ ({ avatarSize, withTime }) => {+ const { density, tokens } = useDensity();+ const lines = SKELETON_LINES[density];++ return (+ <Flexbox aria-hidden gap={4}>+ {SKELETON_ROWS.map(({ description, title }, index) => (+ <Flexbox+ horizontal+ align={'flex-start'}+ className={styles.rowBox}+ gap={tokens.contentGap}+ key={index}+ >+ <Flexbox flex={'none'} paddingBlock={3}>+ <Skeleton.Avatar+ className={styles.topicAvatar}+ shape={'circle'}+ size={avatarSize ?? tokens.largeIconSize}+ />+ </Flexbox>+ <Flexbox className={styles.rowText} gap={3}>+ <SkeletonLine bar={14} line={lines.title} width={title} />+ <SkeletonLine bar={12} line={lines.supporting} width={description} />+ </Flexbox>+ {withTime && <SkeletonLine bar={10} flex={'none'} line={lines.meta} width={52} />}</Flexbox>- {withTime && <SkeletonLine bar={10} flex={'none'} line={18} width={52} />}- </Flexbox>- ))}- </Flexbox>- ),+ ))}+ </Flexbox>+ );+ },);/**@@ -473,6 +498,7 @@ const ScheduledTaskContent = memo(() => {const HomeModeContent = memo<HomeModeContentProps>(({ inlineRail, mode, onSuggestionSelect }) => {const { t } = useTranslation('home');+ const { blockGap } = useHomeSpacing();const isLogin = useUserStore(authSelectors.isLogin);const authLoaded = useUserStore(authSelectors.isLoaded);const myId = useUserStore(userProfileSelectors.userId);@@ -538,7 +564,7 @@ const HomeModeContent = memo<HomeModeContentProps>(({ inlineRail, mode, onSuggesif (!inlineRail) return starters;return (- <Flexbox gap={32}>+ <Flexbox gap={blockGap}>{starters}<EntityLinkHostProvider portal={HOME_ENTITY_PORTAL_SCOPE}><HomeInbox inlineRail variant={'main'} />@@ -549,7 +575,7 @@ const HomeModeContent = memo<HomeModeContentProps>(({ inlineRail, mode, onSugges}return (- <Flexbox gap={32}>+ <Flexbox gap={blockGap}><EntityLinkHostProvider portal={HOME_ENTITY_PORTAL_SCOPE}><HomeInbox inlineRail={inlineRail} variant={'main'} /></EntityLinkHostProvider>@@ -591,7 +617,7 @@ const HomeModeContent = memo<HomeModeContentProps>(({ inlineRail, mode, onSugges// folded-in inbox sections above, exactly like chat mode β row hover pills// overhang by design (see `rowBox`).const taskBlocks = (- <Flexbox gap={32}>+ <Flexbox gap={blockGap}>{!tasksHidden && <TaskContent />}{!scheduledTasksHidden && <ScheduledTaskContent />}</Flexbox>@@ -604,7 +630,7 @@ const HomeModeContent = memo<HomeModeContentProps>(({ inlineRail, mode, onSugges// task list, suggestions after it. Unread and needs-you stay// hidden β task mode never surfaces them, folded or not.return (- <Flexbox gap={32}>+ <Flexbox gap={blockGap}><EntityLinkHostProvider portal={HOME_ENTITY_PORTAL_SCOPE}><HomeInbox hideNeedsYou hideUnread inlineRail variant={'main'} /></EntityLinkHostProvider>diff --git a/src/features/Home/InputArea/EditorInput.tsx b/src/features/Home/InputArea/EditorInput.tsxindex 00093c27b6b..3f7a0975d43 100644--- a/src/features/Home/InputArea/EditorInput.tsx+++ b/src/features/Home/InputArea/EditorInput.tsx@@ -11,15 +11,15 @@ import {import ActionBar from '@/features/ChatInput/ActionBar';import FileUpload from '@/features/ChatInput/ActionBar/Upload';import { useChatStore } from '@/store/chat';+import { useDensity } from '@/styles/density';import type { HomeMode } from '../types';-import { HOME_INPUT_BODY_HEIGHT, HOME_UPLOAD_CONTEXT_KEY } from './constants';+import { HOME_INPUT_METRICS, HOME_UPLOAD_CONTEXT_KEY } from './constants';import ModeSelect from './ModeSelect';const leftActions: ActionKeys[] = ['plus'];const rightActions: ActionKeys[] = ['model'];-const CONTAINER_RADIUS = 20;/** Clearance from the container edge to the round controls sitting in its corners. */const ACTION_BAR_INSET = 8;@@ -49,16 +49,18 @@ const HomeEditorInput = memo<HomeEditorInputProps>(placeholder,send,}) => {+ const { density } = useDensity();+ const { bodyHeight, radius, sendButtonSize } = HOME_INPUT_METRICS[density];const inputContainerProps = useMemo(() => ({- minHeight: HOME_INPUT_BODY_HEIGHT,+ minHeight: bodyHeight,resize: false,style: {- borderRadius: CONTAINER_RADIUS,+ borderRadius: radius,boxShadow: '0 1px 2px rgba(0,0,0,.03), 0 12px 32px rgba(0,0,0,.04)',},}),- [],+ [bodyHeight, radius],);const actionBarStyle = useMemo(@@ -87,6 +89,7 @@ const HomeEditorInput = memo<HomeEditorInputProps>(generating: loading,onStop: () => {},shape: 'round',+ size: sendButtonSize,}}onMarkdownContentChange={onValueChange}onSend={send}diff --git a/src/features/Home/InputArea/InputBanner.tsx b/src/features/Home/InputArea/InputBanner.tsxindex ccb389fec3e..598bc7596df 100644--- a/src/features/Home/InputArea/InputBanner.tsx+++ b/src/features/Home/InputArea/InputBanner.tsx@@ -24,6 +24,13 @@ const styles = createStaticStyles(({ css, cssVar }) => ({border: 1px solid ${cssVar.colorFillSecondary};border-radius: 20px;+ html[data-density='compact'] & {+ margin-block: -36px -6px;+ padding-block: 34px 6px;+ padding-inline: ${densityVars.cardPadding} 8px;+ border-radius: 16px;+ }+background: color-mix(in srgb, ${cssVar.colorFillQuaternary} 50%, ${cssVar.colorBgContainer});&[data-clickable='true'] {diff --git a/src/features/Home/InputArea/InputFallback.tsx b/src/features/Home/InputArea/InputFallback.tsxindex db96de2694e..7f6682a70db 100644--- a/src/features/Home/InputArea/InputFallback.tsx+++ b/src/features/Home/InputArea/InputFallback.tsx@@ -6,22 +6,24 @@ import { useTranslation } from 'react-i18next';import { densityVars } from '@/styles/densityVars';import type { HomeMode } from '../types';-import {- HOME_INPUT_ACTION_BAR_HEIGHT,- HOME_INPUT_BOTTOM_PADDING,- HOME_INPUT_FRAME_HEIGHT,-} from './constants';+import { HOME_INPUT_BOTTOM_PADDING, HOME_INPUT_METRICS } from './constants';import ModeSelect from './ModeSelect';+const { compact, loose } = HOME_INPUT_METRICS;+const styles = createStaticStyles(({ css, cssVar }) => ({actionBar: css`flex: none;box-sizing: border-box;width: 100%;- height: ${HOME_INPUT_ACTION_BAR_HEIGHT}px;+ height: ${loose.actionBarHeight}px;padding-block: 4px;padding-inline: 8px;++ html[data-density='compact'] & {+ height: ${compact.actionBarHeight}px;+ }`,frame: css`overflow: hidden;@@ -30,18 +32,27 @@ const styles = createStaticStyles(({ css, cssVar }) => ({box-sizing: border-box;width: 100%;- height: ${HOME_INPUT_FRAME_HEIGHT}px;+ height: ${loose.frameHeight}px;border: 1px solid ${cssVar.colorFill};- border-radius: 20px;+ border-radius: ${loose.radius}px;background: ${cssVar.colorBgElevated};box-shadow: 0 12px 32px rgb(0 0 0 / 4%);++ html[data-density='compact'] & {+ height: ${compact.frameHeight}px;+ border-radius: ${compact.radius}px;+ }`,root: css`box-sizing: border-box;width: 100%;- height: ${HOME_INPUT_FRAME_HEIGHT + HOME_INPUT_BOTTOM_PADDING}px;+ height: ${loose.reservedHeight}px;padding-block-end: ${HOME_INPUT_BOTTOM_PADDING}px;++ html[data-density='compact'] & {+ height: ${compact.reservedHeight}px;+ }`,textarea: css`resize: none;diff --git a/src/features/Home/InputArea/constants.ts b/src/features/Home/InputArea/constants.tsindex 3a98ff5dc06..be2b9c3e41a 100644--- a/src/features/Home/InputArea/constants.ts+++ b/src/features/Home/InputArea/constants.ts@@ -1,9 +1,44 @@-export const HOME_INPUT_BODY_HEIGHT = 108;-export const HOME_INPUT_ACTION_BAR_HEIGHT = 40;-// The rich ChatInput adds a one-pixel border on both block edges.-export const HOME_INPUT_FRAME_HEIGHT = HOME_INPUT_BODY_HEIGHT + HOME_INPUT_ACTION_BAR_HEIGHT + 2;+import type { InterfaceDensity } from '@lobechat/types';++export interface HomeInputMetrics {+ actionBarHeight: number;+ bodyHeight: number;+ frameHeight: number;+ radius: number;+ reservedHeight: number;+ sendButtonSize?: number;+}+export const HOME_INPUT_BOTTOM_PADDING = 8;-export const HOME_INPUT_RESERVED_HEIGHT = HOME_INPUT_FRAME_HEIGHT + HOME_INPUT_BOTTOM_PADDING;++const createInputMetrics = ({+ actionBarHeight,+ bodyHeight,+ radius,+ sendButtonSize,+}: Pick<HomeInputMetrics, 'actionBarHeight' | 'bodyHeight' | 'radius' | 'sendButtonSize'>) => {+ // The rich ChatInput adds a one-pixel border on both block edges.+ const frameHeight = bodyHeight + actionBarHeight + 2;+ return {+ actionBarHeight,+ bodyHeight,+ frameHeight,+ radius,+ reservedHeight: frameHeight + HOME_INPUT_BOTTOM_PADDING,+ sendButtonSize,+ };+};++export const HOME_INPUT_METRICS: Record<InterfaceDensity, HomeInputMetrics> = {+ // 4px bar padding + the 28px send button + the 8px corner inset.+ compact: createInputMetrics({+ actionBarHeight: 40,+ bodyHeight: 80,+ radius: 16,+ sendButtonSize: 28,+ }),+ loose: createInputMetrics({ actionBarHeight: 40, bodyHeight: 108, radius: 20 }),+};/*** The Home composer's upload list key. Its text survives mode and agentdiff --git a/src/features/Home/InputArea/index.tsx b/src/features/Home/InputArea/index.tsxindex 01a6f957e4b..fddb7ab635f 100644--- a/src/features/Home/InputArea/index.tsx+++ b/src/features/Home/InputArea/index.tsx@@ -9,10 +9,11 @@ import { useAgentStore } from '@/store/agent';import { agentByIdSelectors } from '@/store/agent/selectors';import { useGlobalStore } from '@/store/global';import { systemStatusSelectors } from '@/store/global/selectors';+import { useDensity } from '@/styles/density';import { HOME_NEW_MODELS_BANNER_ID, NewModelShortcuts } from '../NewModelShortcuts';import type { HomeMode } from '../types';-import { HOME_INPUT_RESERVED_HEIGHT, HOME_UPLOAD_CONTEXT_KEY } from './constants';+import { HOME_INPUT_METRICS, HOME_UPLOAD_CONTEXT_KEY } from './constants';import { EditorSlot } from './EditorSlot';import { stripMarkdownLinks } from './hintFormat';import { InputBannerQueue, InputBannerSegment } from './InputBanner';@@ -23,7 +24,11 @@ import { useSend } from './useSend';const styles = createStaticStyles(({ css }) => ({inputSlot: css`width: 100%;- min-height: ${HOME_INPUT_RESERVED_HEIGHT}px;+ min-height: ${HOME_INPUT_METRICS.loose.reservedHeight}px;++ html[data-density='compact'] & {+ min-height: ${HOME_INPUT_METRICS.compact.reservedHeight}px;+ }`,}));@@ -43,6 +48,7 @@ const InputArea = ({showNewModelShortcuts,}: InputAreaProps) => {const { t } = useTranslation('home');+ const { density } = useDensity();const { agentId, contextSelectionKey, loading, send } = useSend(mode);// Mount the config sync so `internal_refreshAgentConfig`'s revalidation has// a listener after toggleFile / toggleKnowledgeBase β otherwise the Library@@ -106,7 +112,7 @@ const InputArea = ({<Flexbox><Flexbox ref={chatInputRef}><InputDragUpload- radius={20}+ radius={HOME_INPUT_METRICS[density].radius}style={{ position: 'relative', zIndex: 1 }}onUploadFiles={handleUploadFiles}>diff --git a/src/features/Home/NewModelShortcuts/index.tsx b/src/features/Home/NewModelShortcuts/index.tsxindex 8cdfce5e5d8..9ed0c0b643b 100644--- a/src/features/Home/NewModelShortcuts/index.tsx+++ b/src/features/Home/NewModelShortcuts/index.tsx@@ -43,6 +43,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({background: transparent;box-shadow: none !important;+ html[data-density='compact'] & {+ font-size: 12px;+ }+&:hover {color: ${cssVar.colorText} !important;background: ${cssVar.colorFillTertiary} !important;diff --git a/src/features/Home/PortraitBubble/index.tsx b/src/features/Home/PortraitBubble/index.tsxindex a26ecec1303..ac8db5c704d 100644--- a/src/features/Home/PortraitBubble/index.tsx+++ b/src/features/Home/PortraitBubble/index.tsx@@ -27,6 +27,11 @@ const styles = createStaticStyles(({ css, cssVar }) => ({color: ${cssVar.colorTextSecondary};background: ${cssVar.colorBgContainer};++ html[data-density='compact'] & {+ padding-block: 4px;+ border-radius: 12px;+ }`,/*** Match the 24px action row when a brief replaces an announcement. Limitdiff --git a/src/features/Home/components/RailCard/index.tsx b/src/features/Home/components/RailCard/index.tsxindex d15078ac64e..26c374a680f 100644--- a/src/features/Home/components/RailCard/index.tsx+++ b/src/features/Home/components/RailCard/index.tsx@@ -19,6 +19,11 @@ const styles = createStaticStyles(({ css, cssVar }) => ({background: color-mix(in srgb, ${cssVar.colorBgContainer} 72%, transparent);backdrop-filter: saturate(150%) blur(12px);++ html[data-density='compact'] & {+ padding-block: 10px;+ border-radius: 12px;+ }`,// The whole heading is the hit target, not just the chevron β a 14px glyph is// a poor thing to ask someone to aim at, and the label is already there.diff --git a/src/features/Home/components/homeType.ts b/src/features/Home/components/homeType.tsindex 68288bf04ef..1aa1f624f72 100644--- a/src/features/Home/components/homeType.ts+++ b/src/features/Home/components/homeType.ts@@ -25,6 +25,11 @@ export const homeType = createStaticStyles(({ css, cssVar }) => ({font-weight: 500;line-height: 22px;color: ${cssVar.colorText};++ html[data-density='compact'] & {+ font-size: 14px;+ line-height: 20px;+ }`,/** An item whose title is a sentence rather than a name (suggestions). */itemTitleProse: css`@@ -32,6 +37,11 @@ export const homeType = createStaticStyles(({ css, cssVar }) => ({font-weight: 400;line-height: 22px;color: ${cssVar.colorText};++ html[data-density='compact'] & {+ font-size: 14px;+ line-height: 20px;+ }`,/** Timestamps, identifiers, refs β glanced at, never read. */meta: css`@@ -39,6 +49,10 @@ export const homeType = createStaticStyles(({ css, cssVar }) => ({font-weight: 400;line-height: 18px;color: ${cssVar.colorTextTertiary};++ html[data-density='compact'] & {+ line-height: 16px;+ }`,/** Group / card headings. */sectionLabel: css`@@ -47,6 +61,10 @@ export const homeType = createStaticStyles(({ css, cssVar }) => ({line-height: 18px;color: ${cssVar.colorTextSecondary};letter-spacing: 0.04em;++ html[data-density='compact'] & {+ line-height: 16px;+ }`,/** The second line of a row β meant to be read, not just scanned. */supporting: css`@@ -54,5 +72,10 @@ export const homeType = createStaticStyles(({ css, cssVar }) => ({font-weight: 400;line-height: 20px;color: ${cssVar.colorTextTertiary};++ html[data-density='compact'] & {+ font-size: 12px;+ line-height: 18px;+ }`,}));diff --git a/src/features/Home/homeDensity.ts b/src/features/Home/homeDensity.tsnew file mode 100644index 00000000000..cd3ea409cbe--- /dev/null+++ b/src/features/Home/homeDensity.ts@@ -0,0 +1,8 @@+import { useDensity } from '@/styles/density';++const HOME_SPACING = {+ compact: { blockGap: 24, mainGap: 16, minimalStackGap: 16 },+ loose: { blockGap: 32, mainGap: 24, minimalStackGap: 24 },+} as const;++export const useHomeSpacing = () => HOME_SPACING[useDensity().density];diff --git a/src/features/Home/index.tsx b/src/features/Home/index.tsxindex 2001a3d53cc..678b8f90c02 100644--- a/src/features/Home/index.tsx+++ b/src/features/Home/index.tsx@@ -25,6 +25,7 @@ import { densityVars } from '@/styles/densityVars';import { HOME_ENTITY_PORTAL_SCOPE, isAcceptancePortalView } from './acceptancePortalView';import { isHomeMinimalLayout } from './CustomizeModal/config';+import { useHomeSpacing } from './homeDensity';import HomeHeader from './HomeHeader';import HomeModeContent from './HomeModeContent';import HomePortrait from './HomePortrait';@@ -92,6 +93,13 @@ const COMPACT_PORTRAIT_HEIGHT = 150;const COMPACT_PORTRAIT_WIDTH =HOME_PORTRAIT_WIDTH * (COMPACT_PORTRAIT_HEIGHT / HOME_PORTRAIT_HEIGHT);const COMPACT_PORTRAIT_OVERLAP = getHomePortraitOverlap(COMPACT_PORTRAIT_HEIGHT);+/**+ * Compact density tightens the hero-to-composer gap and always shows the small+ * portrait; the overlap is recomputed so the card still cuts the artwork at the+ * studio's visible ratio.+ */+const DENSE_ROW_GAP = 16;+const DENSE_PORTRAIT_OVERLAP = getHomePortraitOverlap(COMPACT_PORTRAIT_HEIGHT, DENSE_ROW_GAP);const MINIMAL_STACK_GAP = 24;/*** The minimal header stacks the agent switcher (24px avatar + 2px paddings,@@ -105,6 +113,8 @@ const MINIMAL_SWITCHER_ROW = 28;const MINIMAL_HEADER_GAP = 8;const MINIMAL_HEADER_HEIGHT = MINIMAL_SWITCHER_ROW + MINIMAL_HEADER_GAP + MINIMAL_GREETING_LINE;const MINIMAL_LIFT = MINIMAL_HEADER_HEIGHT + MINIMAL_STACK_GAP;+/** The same stack in compact density: 20px greeting, 20px avatar switcher, 16px gap. */+const DENSE_MINIMAL_LIFT = Math.round(20 * 1.4) + MINIMAL_HEADER_GAP + 24 + 16;const styles = createStaticStyles(({ css }) => ({// Both rows size to their content and the page scrolls around the whole grid@@ -122,6 +132,10 @@ const styles = createStaticStyles(({ css }) => ({width: 100%;+ html[data-density='compact'] & {+ row-gap: ${DENSE_ROW_GAP}px;+ }+@media (width <= 1100px) {grid-template-columns: 1fr;grid-template-rows: auto auto auto;@@ -242,6 +256,20 @@ const styles = createStaticStyles(({ css }) => ({);min-height: 0;}++ html[data-density='compact'] & {+ --home-portrait-overlap: -${DENSE_PORTRAIT_OVERLAP}px;++ min-height: ${COMPACT_PORTRAIT_HEIGHT - DENSE_PORTRAIT_OVERLAP}px;++ @container home (width >= ${SPEECH_INLINE_MIN}px) {+ --home-portrait-width: ${COMPACT_PORTRAIT_WIDTH}px;+ --home-portrait-height: ${COMPACT_PORTRAIT_HEIGHT}px;+ --home-portrait-overlap: -${DENSE_PORTRAIT_OVERLAP}px;++ min-height: 0;+ }+ }`,bubbleSlot: css`width: max-content;@@ -277,6 +305,10 @@ const styles = createStaticStyles(({ css }) => ({max-inline-size: 760px;margin-inline: auto;padding-block-end: ${MINIMAL_LIFT}px;++ html[data-density='compact'] & {+ padding-block-end: ${DENSE_MINIMAL_LIFT}px;+ }`,railSurface: css`transform: translateX(0);@@ -336,6 +368,7 @@ const styles = createStaticStyles(({ css }) => ({const Home = memo(() => {const isLogin = useUserStore(authSelectors.isLogin);+ const { mainGap, minimalStackGap } = useHomeSpacing();const showHomeRail = useGlobalStore(systemStatusSelectors.showHomeRail);const showHomePortrait = useGlobalStore(systemStatusSelectors.showHomePortrait);const hiddenWidgets = useGlobalStore(systemStatusSelectors.hiddenHomeWidgets);@@ -412,7 +445,7 @@ const Home = memo(() => {if (minimal)return (- <Flexbox className={styles.minimal} gap={MINIMAL_STACK_GAP}>+ <Flexbox className={styles.minimal} gap={minimalStackGap}><HomeHeader centered /><div className={styles.inputArea}><InputArea@@ -452,7 +485,7 @@ const Home = memo(() => {className={cx(styles.main, styles.content, styles.contentCollapsed)}data-rail-collapsed={contentCollapsed}data-testid={'home-main'}- gap={24}+ gap={mainGap}><Flexbox className={styles.inputArea} gap={12}><InputAreadiff --git a/src/features/Home/portraitFraming.ts b/src/features/Home/portraitFraming.tsindex 4bace3f2e46..671b7e6aed4 100644--- a/src/features/Home/portraitFraming.ts+++ b/src/features/Home/portraitFraming.ts@@ -20,5 +20,5 @@ export const HOME_PORTRAIT_HEIGHT = 200;export const HOME_PORTRAIT_CARD_GAP = 24;/** Keep the visible fraction consistent with the artwork studio at every size. */-export const getHomePortraitOverlap = (height: number) =>- height * (1 - HOME_PORTRAIT_VISIBLE_RATIO) + HOME_PORTRAIT_CARD_GAP;+export const getHomePortraitOverlap = (height: number, cardGap = HOME_PORTRAIT_CARD_GAP) =>+ height * (1 - HOME_PORTRAIT_VISIBLE_RATIO) + cardGap;diff --git a/src/features/HomeInbox/GoalsRailCard.tsx b/src/features/HomeInbox/GoalsRailCard.tsxindex 20e351f3add..172ee2abce5 100644--- a/src/features/HomeInbox/GoalsRailCard.tsx+++ b/src/features/HomeInbox/GoalsRailCard.tsx@@ -27,6 +27,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({padding-block: 7px;padding-inline: ${BARE_PADDING_INLINE}px;border-radius: ${cssVar.borderRadius};++ html[data-density='compact'] & {+ padding-block: 5px;+ }`,glyph: css`display: flex;@@ -58,6 +62,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({padding-inline: ${ROW_PADDING_INLINE}px;border: 0;+ html[data-density='compact'] & {+ padding-block: 6px;+ }+text-align: start;transition: background ${cssVar.motionDurationFast};diff --git a/src/features/HomeInbox/InboxBriefCard.tsx b/src/features/HomeInbox/InboxBriefCard.tsxindex 3d39421c6e7..efa05ae2435 100644--- a/src/features/HomeInbox/InboxBriefCard.tsx+++ b/src/features/HomeInbox/InboxBriefCard.tsx@@ -20,6 +20,7 @@ import { useSelfReviewBriefView } from '@/features/DailyBrief/useSelfReviewBriefimport { homeType } from '@/features/Home/components/homeType';import Time from '@/features/Home/components/Time';import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';+import { useDensity } from '@/styles/density';import StatusGlyph from './StatusGlyph';@@ -51,6 +52,7 @@ interface InboxBriefCardProps {*/const InboxBriefCard = memo<InboxBriefCardProps>(({ bare, brief }) => {const { t } = useTranslation('common');+ const { compact } = useDensity();const navigate = useWorkspaceAwareNavigate();const agent = brief.agent;@@ -140,7 +142,7 @@ const InboxBriefCard = memo<InboxBriefCardProps>(({ bare, brief }) => {avatar={isInbox ? agent.avatar || DEFAULT_INBOX_AVATAR : agent.avatar}background={agent.backgroundColor || cssVar.colorBgContainer}shape={'circle'}- size={28}+ size={compact ? 24 : 28}style={{ flex: 'none' }}title={agentName}/>diff --git a/src/features/HomeInbox/RunningTasksCard.tsx b/src/features/HomeInbox/RunningTasksCard.tsxindex 2a28cacb681..a782420044d 100644--- a/src/features/HomeInbox/RunningTasksCard.tsx+++ b/src/features/HomeInbox/RunningTasksCard.tsx@@ -52,6 +52,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({padding-inline: 14px;border: 0;+ html[data-density='compact'] & {+ padding-block: 8px;+ }+text-align: start;transition: background ${cssVar.motionDurationFast};diff --git a/src/features/HomeInbox/UnreadTopicList.tsx b/src/features/HomeInbox/UnreadTopicList.tsxindex fdb779ed3eb..634544e58b7 100644--- a/src/features/HomeInbox/UnreadTopicList.tsx+++ b/src/features/HomeInbox/UnreadTopicList.tsx@@ -79,6 +79,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({padding-inline: ${ROW_PADDING_INLINE}px;transition: background ${cssVar.motionDurationFast};+ html[data-density='compact'] & {+ padding-block: 8px;+ }+&:hover {background: ${cssVar.colorFillQuaternary};}diff --git a/src/features/HomeInbox/index.tsx b/src/features/HomeInbox/index.tsxindex aedf26f71cd..ff535d5fd1e 100644--- a/src/features/HomeInbox/index.tsx+++ b/src/features/HomeInbox/index.tsx@@ -13,6 +13,7 @@ import { BriefCardSkeleton } from '@/features/DailyBrief/BriefCardSkeleton';import GroupBlock from '@/features/Home/components/GroupBlock';import { homeType } from '@/features/Home/components/homeType';import RailCard from '@/features/Home/components/RailCard';+import { useHomeSpacing } from '@/features/Home/homeDensity';import Recommendations, { useRecommendationsVisible } from '@/features/Recommendations';// Direct module import, not the feature barrel: home must not pull the whole// acceptance workspace into its chunk for one hook.@@ -25,6 +26,7 @@ import { useGoalStore } from '@/store/goal';import { useUserStore } from '@/store/user';import { labPreferSelectors } from '@/store/user/selectors';import { authSelectors, userProfileSelectors } from '@/store/user/slices/auth/selectors';+import { useDensityTokens } from '@/styles/density';import GoalsRailCard from './GoalsRailCard';import { filterHiddenWidgetSections } from './hiddenWidgets';@@ -137,6 +139,8 @@ const HomeInbox = memo<HomeInboxProps>((props) => {const isMain = variant === 'main';const showRailSections = ownsRailSections({ inlineRail, variant });const { t } = useTranslation('home');+ const { contentGap } = useDensityTokens();+ const { blockGap } = useHomeSpacing();const { t: tCommon } = useTranslation('common');const isLogin = useUserStore(authSelectors.isLogin);const myId = useUserStore(userProfileSelectors.userId);@@ -265,7 +269,7 @@ const HomeInbox = memo<HomeInboxProps>((props) => {// "Needs you" section that may turn out empty). Recommendations keep their own.if (blockState === 'skeleton') {return (- <Flexbox gap={12}>+ <Flexbox gap={contentGap}><BriefCardSkeleton /><BriefCardSkeleton /><Recommendations variant={variant} />@@ -320,7 +324,7 @@ const HomeInbox = memo<HomeInboxProps>((props) => {label: t('inbox.needsYou.title'),loading: briefsRefreshing,node: (- <Flexbox gap={12}>+ <Flexbox gap={contentGap}>{needsYou.map((brief) => (<InboxBriefCard brief={brief} key={brief.id} />))}@@ -375,7 +379,7 @@ const HomeInbox = memo<HomeInboxProps>((props) => {label: t('inbox.needsYou.title'),loading: briefsRefreshing,node: (- <Flexbox gap={12}>+ <Flexbox gap={contentGap}>{needsYou.map((brief) => (<InboxBriefCard brief={brief} key={brief.id} />))}@@ -491,7 +495,7 @@ const HomeInbox = memo<HomeInboxProps>((props) => {if (isRail) {if (recommendationsVisible || usageCard)return (- <Flexbox gap={12}>+ <Flexbox gap={contentGap}>{recommendationsVisible && <Recommendations variant={'rail'} />}{usageCard}</Flexbox>@@ -506,7 +510,7 @@ const HomeInbox = memo<HomeInboxProps>((props) => {if (!railFeedsSettled)return (- <Flexbox gap={12}>+ <Flexbox gap={contentGap}><BriefCardSkeleton /><BriefCardSkeleton /></Flexbox>@@ -531,7 +535,7 @@ const HomeInbox = memo<HomeInboxProps>((props) => {}return (- <Flexbox gap={isRail ? 12 : 32}>+ <Flexbox gap={isRail ? contentGap : blockGap}>{visibleSections.map(({action,diff --git a/src/features/HomeTeamBoard/ActivityPanel.tsx b/src/features/HomeTeamBoard/ActivityPanel.tsxindex 9e98839a699..03e9f68467b 100644--- a/src/features/HomeTeamBoard/ActivityPanel.tsx+++ b/src/features/HomeTeamBoard/ActivityPanel.tsx@@ -11,6 +11,9 @@ import dayjs from 'dayjs';import type { ReactNode } from 'react';import { useTranslation } from 'react-i18next';+import { useDensity } from '@/styles/density';+import { densityTokens } from '@/styles/density.stylex';+import { extendActivityWithFuture } from './layout';import { RUN_STATUS_VISUALS } from './statusVisuals';@@ -24,6 +27,10 @@ const styles = stylex.create({paddingBlock: 20,paddingInline: 20,},+ cardCompact: {+ paddingBlock: densityTokens['--lobe-density-card-padding'],+ paddingInline: densityTokens['--lobe-density-card-padding'],+ },label: { color: cssVar.colorTextSecondary, fontSize: 13 },value: {color: cssVar.colorText,@@ -32,6 +39,7 @@ const styles = stylex.create({fontWeight: 600,lineHeight: 1.2,},+ valueCompact: { fontSize: 20 },});const STATS: { key: keyof AgentRunBoardSummary; status: AgentRunBoardRunStatus }[] = [@@ -50,6 +58,7 @@ interface ActivityPanelProps {/** The numbers double as the chart's legend: each one carries its series' icon and color. */const ActivityPanel = ({ action, activity, summary }: ActivityPanelProps) => {const { t } = useTranslation('home');+ const { compact, tokens } = useDensity();const series = STATS.map((stat) => ({...stat,color: RUN_STATUS_VISUALS[stat.status].color,@@ -62,16 +71,29 @@ const ActivityPanel = ({ action, activity, summary }: ActivityPanelProps) => {}));return (- <Flexbox gap={16} {...stylex.props(styles.card)} data-testid={'team-board-activity'}>- <Flexbox horizontal align={'flex-start'} gap={16} justify={'space-between'} wrap={'wrap'}>- <Flexbox horizontal gap={40} wrap={'wrap'}>+ <Flexbox+ gap={tokens.sectionGap}+ {...stylex.props(styles.card, compact && styles.cardCompact)}+ data-testid={'team-board-activity'}+ >+ <Flexbox+ horizontal+ align={'flex-start'}+ gap={tokens.sectionGap}+ justify={'space-between'}+ wrap={'wrap'}+ >+ <Flexbox horizontal gap={compact ? 28 : 40} wrap={'wrap'}>{series.map(({ color, key, label, status }) => (<Flexbox gap={4} key={key}><Flexbox horizontal align={'center'} gap={6}><Icon color={color} icon={RUN_STATUS_VISUALS[status].icon} size={14} /><span {...stylex.props(styles.label)}>{label}</span></Flexbox>- <span {...stylex.props(styles.value)} data-testid={`team-board-count-${key}`}>+ <span+ {...stylex.props(styles.value, compact && styles.valueCompact)}+ data-testid={`team-board-count-${key}`}+ >{summary[key]}</span></Flexbox>diff --git a/src/features/HomeTeamBoard/DayCalendar.tsx b/src/features/HomeTeamBoard/DayCalendar.tsxindex b5ecd0af247..098468ccc9d 100644--- a/src/features/HomeTeamBoard/DayCalendar.tsx+++ b/src/features/HomeTeamBoard/DayCalendar.tsx@@ -5,6 +5,7 @@ import * as stylex from '@stylexjs/stylex';import dayjs from 'dayjs';import { useTranslation } from 'react-i18next';+import { useDensity } from '@/styles/density';import { densityTokens } from '@/styles/density.stylex';import { sx } from '@/styles/sx';@@ -34,9 +35,11 @@ const styles = stylex.create({paddingBlock: 8,paddingInline: 8,},+ cellCompact: { minHeight: 84, paddingBlock: 6, paddingInline: 6 },current: { outlineColor: cssVar.colorPrimary, outlineStyle: 'solid', outlineWidth: 1 },dot: { borderRadius: 3, flexShrink: 0, height: 6, width: 6 },grid: { display: 'grid', gap: 8, gridTemplateColumns: 'repeat(4, minmax(0, 1fr))' },+ gridCompact: { gap: 6 },hour: {color: cssVar.colorTextTertiary,fontSize: 12,@@ -94,16 +97,24 @@ const CalendarItem = ({ item }: { item: HourCellItem }) => {/** A day reads best as a calendar: 24 hour cells, each listing what started in it. */const DayCalendar = ({ board }: { board: AgentRunBoardData }) => {const { t } = useTranslation('home');+ const { compact } = useDensity();const cells = buildHourCells(board.lanes, board.generatedAt);return (<div {...stylex.props(styles.card)}>- <div {...stylex.props(styles.grid)} data-testid={'team-board-calendar'}>+ <div+ {...stylex.props(styles.grid, compact && styles.gridCompact)}+ data-testid={'team-board-calendar'}+ >{cells.map((cell, index) => (<Flexboxgap={2}key={cell.hour.getTime()}- {...stylex.props(styles.cell, index === cells.length - 1 && styles.current)}+ {...stylex.props(+ styles.cell,+ compact && styles.cellCompact,+ index === cells.length - 1 && styles.current,+ )}data-testid={'team-board-calendar-cell'}><span {...stylex.props(styles.hour)}>{dayjs(cell.hour).format('HH:00')}</span>diff --git a/src/features/HomeTeamBoard/Timeline.tsx b/src/features/HomeTeamBoard/Timeline.tsxindex 6855fc70343..c659497e037 100644--- a/src/features/HomeTeamBoard/Timeline.tsx+++ b/src/features/HomeTeamBoard/Timeline.tsx@@ -115,6 +115,7 @@ const styles = stylex.create({borderBlockStartWidth: 1,paddingBlock: 6,},+ laneCompact: { paddingBlock: 2 },lanes: { position: 'relative' },meta: { color: cssVar.colorTextTertiary, fontSize: 12 },row: { height: 28 },@@ -369,7 +370,10 @@ const Lane = ({const agentTitle = lane.title || meta?.title || t('team.agent.untitled');return (- <div {...stylex.props(styles.lane)} data-testid={'team-board-lane'}>+ <div+ {...stylex.props(styles.lane, compact && styles.laneCompact)}+ data-testid={'team-board-lane'}+ ><buttonaria-expanded={!collapsed}data-testid={'team-board-lane-toggle'}diff --git a/src/features/HomeTeamBoard/index.tsx b/src/features/HomeTeamBoard/index.tsxindex fbf92ac29d2..abc535d16de 100644--- a/src/features/HomeTeamBoard/index.tsx+++ b/src/features/HomeTeamBoard/index.tsx@@ -11,6 +11,7 @@ import { useCacheScope } from '@/libs/swr/useCacheScope';import { agentRunBoardService } from '@/services/agentRunBoard';import { useGlobalStore } from '@/store/global';import { systemStatusSelectors } from '@/store/global/selectors';+import { useDensity } from '@/styles/density';import { densityTokens } from '@/styles/density.stylex';import ActivityPanel from './ActivityPanel';@@ -27,6 +28,7 @@ const WINDOW_OPTIONS: AgentRunBoardWindowHours[] = [1, 6, 24];const styles = stylex.create({// Clears the floating Home tabs above.root: { paddingBlockStart: 24 },+ rootCompact: { paddingBlockStart: 16 },columns: {display: 'grid',gap: densityTokens['--lobe-density-section-gap'],@@ -58,6 +60,7 @@ const styles = stylex.create({const HomeTeamBoard = () => {const { t } = useTranslation('home');+ const { compact, tokens } = useDensity();const cacheScope = useCacheScope();const [windowHours, setWindowHours] = useState<AgentRunBoardWindowHours>(1);const [scope, setScope] = useState<AgentRunBoardScope>('all');@@ -90,11 +93,15 @@ const HomeTeamBoard = () => {const hasAttention = attention.length > 0;return (- <Flexbox data-testid={'team-board'} gap={20} {...stylex.props(styles.root)}>+ <Flexbox+ data-testid={'team-board'}+ gap={compact ? 12 : 20}+ {...stylex.props(styles.root, compact && styles.rootCompact)}+ >{!data ? (<Skeleton height={420} width={'100%'} />) : (- <Flexbox gap={16}>+ <Flexbox gap={tokens.sectionGap}><ActivityPanelactivity={data.activity}summary={data.summary}diff --git a/src/features/RecommendTaskTemplates/style.ts b/src/features/RecommendTaskTemplates/style.tsindex ab74ecd284a..a2c9d56e84f 100644--- a/src/features/RecommendTaskTemplates/style.ts+++ b/src/features/RecommendTaskTemplates/style.ts@@ -38,6 +38,10 @@ export const styles = createStaticStyles(({ css, cssVar }) => ({text-align: start;+ html[data-density='compact'] & {+ padding-block: 4px;+ }+/* compactRow owns the hover highlight; the selector mirrors base-ui'svariantText hover rule so it can outrank its fill */&:hover:not(:disabled, [aria-disabled='true']) {diff --git a/src/features/Recommendations/style.ts b/src/features/Recommendations/style.tsindex a5ea1b7fbf8..7d6aa4e7950 100644--- a/src/features/Recommendations/style.ts+++ b/src/features/Recommendations/style.ts@@ -21,6 +21,10 @@ export const styles = createStaticStyles(({ css, cssVar }) => ({text-align: start;+ html[data-density='compact'] & {+ padding-block: 4px;+ }+transition: background ${cssVar.motionDurationFast};/* the selector mirrors base-ui's variantText hover rule so the row tint