Skip to content

🤯 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.

💄 style(inbox): keep goal review button on the brief action row (#21990)

Arvin Xu64d6fcb09202
diff --git a/src/features/DailyBrief/BriefCardActions.tsx b/src/features/DailyBrief/BriefCardActions.tsx
index b4d3670b28e..053a1572c4a 100644
--- a/src/features/DailyBrief/BriefCardActions.tsx
+++ b/src/features/DailyBrief/BriefCardActions.tsx
@@ -1,7 +1,7 @@
import { type BriefAction, DEFAULT_BRIEF_ACTIONS, type TaskStatus } from '@lobechat/types';
import { Button, cssVar, Flexbox, Icon, Text, toast, Tooltip } from '@lobehub/ui';
import { Check, SquarePen, Target, Workflow } from 'lucide-react';
-import { lazy, memo, Suspense, useCallback, useState } from 'react';
+import { lazy, memo, type ReactNode, Suspense, useCallback, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { shallow } from 'zustand/shallow';
@@ -45,6 +45,11 @@ export interface BriefCardActionsProps {
topicId?: string | null;
/** Drawer header title until the run's activity metadata loads. */
topicTitle?: string | null;
+ /**
+ * A host-owned action drawn last in the answer group (e.g. a goal gate's
+ * "Open review"), so it shares the row instead of stacking above it.
+ */
+ trailingAction?: ReactNode;
}
type CommentMode = { type: 'feedback' } | { key: string; type: 'comment' };
@@ -72,6 +77,7 @@ const BriefCardActions = memo<BriefCardActionsProps>(
taskStatus,
topicId,
topicTitle,
+ trailingAction,
}) => {
const { t } = useTranslation('home');
const [commentMode, setCommentMode] = useState<CommentMode | null>(null);
@@ -415,6 +421,7 @@ const BriefCardActions = memo<BriefCardActionsProps>(
{getActionLabel(primaryActions)}
</Button>
))}
+ {trailingAction}
</Flexbox>
</Flexbox>
);
diff --git a/src/features/HomeInbox/InboxBriefCard.tsx b/src/features/HomeInbox/InboxBriefCard.tsx
index c9156ce4403..3d39421c6e7 100644
--- a/src/features/HomeInbox/InboxBriefCard.tsx
+++ b/src/features/HomeInbox/InboxBriefCard.tsx
@@ -171,18 +171,6 @@ const InboxBriefCard = memo<InboxBriefCardProps>(({ bare, brief }) => {
</Flexbox>
</Flexbox>
- {/* A held batch release is decided in its report, opened right here. */}
- {goal?.reviewAcceptanceId && !brief.resolvedAction && (
- <Flexbox horizontal justify={'flex-end'}>
- <Button
- size={'small'}
- type={'primary'}
- onClick={() => openGateReportModal({ acceptanceId: goal.reviewAcceptanceId! })}
- >
- {t('goalProcess.gate.openReview', { ns: 'chat' })}
- </Button>
- </Flexbox>
- )}
<BriefCardActions
actions={brief.actions}
agentId={brief.agentId ?? brief.agent?.id}
@@ -196,6 +184,17 @@ const InboxBriefCard = memo<InboxBriefCardProps>(({ bare, brief }) => {
taskStatus={brief.taskStatus}
topicId={brief.topicId}
topicTitle={brief.taskName}
+ trailingAction={
+ // A held batch release is decided in its report, opened right here.
+ goal?.reviewAcceptanceId && (
+ <Button
+ type={'primary'}
+ onClick={() => openGateReportModal({ acceptanceId: goal.reviewAcceptanceId! })}
+ >
+ {t('goalProcess.gate.openReview', { ns: 'chat' })}
+ </Button>
+ )
+ }
/>
</>
);