Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

feat(issues): show status, assignee and quick actions in the header when the sidebar is closed (#11345)

kevin8fc2c62cc350
diff --git a/apps/docs/content/docs/quick-actions.fr.mdx b/apps/docs/content/docs/quick-actions.fr.mdx
index 0135b25406..12d472e4f7 100644
--- a/apps/docs/content/docs/quick-actions.fr.mdx
+++ b/apps/docs/content/docs/quick-actions.fr.mdx
@@ -23,6 +23,8 @@ Dans l’application web ou de bureau, vous avez deux possibilités :
| **Actions rapides** dans la barre latérale de la tâche | Un clic publie immédiatement la demande enregistrée. Si un agent ou un squad est choisi, vous lui demandez de travailler sur cette tâche. |
| Saisir `/` dans le champ de commentaire | Choisissez une action pour insérer sa demande dans un brouillon. Adaptez-la à cette tâche, puis envoyez-la. La sélection seule ne publie rien. |
+Lorsque la barre latérale de la tâche est fermée, l'en-tête de la tâche affiche son statut, son responsable et un menu **Actions rapides**, pour utiliser une action sans rouvrir la barre latérale.
+
<QuickActionDemo />
Utiliser une action rapide ne change ni le responsable ni le statut de la tâche. Suivez les réponses dans la discussion et la progression de l’agent dans le [journal d’exécution](/tasks).
diff --git a/apps/docs/content/docs/quick-actions.ja.mdx b/apps/docs/content/docs/quick-actions.ja.mdx
index 4e27cdc3d6..57533b18d2 100644
--- a/apps/docs/content/docs/quick-actions.ja.mdx
+++ b/apps/docs/content/docs/quick-actions.ja.mdx
@@ -23,6 +23,8 @@ Web またはデスクトップアプリでは、2 通りの使い方があり
| タスクのサイドバーの**クイックアクション** | クリックすると保存した依頼をすぐに投稿します。エージェントやスクワッドを設定していれば、その相手に作業を依頼します。 |
| コメント欄で `/` を入力 | アクションを選ぶと、依頼が下書きに入ります。今回の内容に合わせて編集し、準備ができたら送信します。選ぶだけでは投稿されません。 |
+タスクのサイドバーを閉じている間は、タスクのヘッダーにステータス、担当者、**クイックアクション**メニューが表示され、サイドバーを開き直さずにアクションを使えます。
+
<QuickActionDemo />
クイックアクションを使うこと自体では、担当者やステータスは変わりません。返信はタスクの議論で、エージェントの進み具合は[実行ログ](/tasks)で確認できます。
diff --git a/apps/docs/content/docs/quick-actions.ko.mdx b/apps/docs/content/docs/quick-actions.ko.mdx
index 683678997e..c885790a3d 100644
--- a/apps/docs/content/docs/quick-actions.ko.mdx
+++ b/apps/docs/content/docs/quick-actions.ko.mdx
@@ -23,6 +23,8 @@ import { QuickActionDemo } from "@/components/demos/quick-action-demo";
| 태스크 사이드바의 **퀵 액션** | 클릭하면 저장한 요청을 바로 게시합니다. 에이전트나 스쿼드가 지정되어 있으면 해당 태스크의 작업을 요청합니다. |
| 댓글 입력창에서 `/` 입력 | 액션을 선택하면 요청이 초안에 들어갑니다. 이번 태스크에 맞게 고친 뒤 준비되면 전송합니다. 선택만 해서는 게시되지 않습니다. |
+태스크 사이드바를 닫으면 태스크 헤더에 상태, 담당자, **퀵 액션** 메뉴가 표시되어 사이드바를 다시 열지 않고도 액션을 사용할 수 있습니다.
+
<QuickActionDemo />
퀵 액션을 사용하는 것 자체로는 담당자나 상태가 바뀌지 않습니다. 답변은 태스크 논의에서, 에이전트의 진행 상황은 [실행 로그](/tasks)에서 확인합니다.
diff --git a/apps/docs/content/docs/quick-actions.mdx b/apps/docs/content/docs/quick-actions.mdx
index be0f0a424f..acf3377c56 100644
--- a/apps/docs/content/docs/quick-actions.mdx
+++ b/apps/docs/content/docs/quick-actions.mdx
@@ -23,6 +23,8 @@ In the web or desktop app, there are two ways to use an action:
| **Quick Actions** in the issue sidebar | Click an action to post its saved request immediately. If it has an agent or squad, it asks them to work on this issue. |
| Type `/` in the comment box | Choose an action to insert its request as a draft. Edit it for this issue, then send when ready. Nothing is posted just by choosing it. |
+When the issue sidebar is closed, the issue's header shows its status, assignee and a **Quick Actions** menu, so you can use an action without reopening the sidebar.
+
<QuickActionDemo />
Using a quick action does not change the issue's assignee or status. Follow the reply in the issue's discussion and check the [execution log](/tasks) for the agent's progress.
diff --git a/apps/docs/content/docs/quick-actions.zh-Hant.mdx b/apps/docs/content/docs/quick-actions.zh-Hant.mdx
index 86c8542e5b..16f7e4b167 100644
--- a/apps/docs/content/docs/quick-actions.zh-Hant.mdx
+++ b/apps/docs/content/docs/quick-actions.zh-Hant.mdx
@@ -23,6 +23,8 @@ AI 代理本來就能看到任務上下文,不需要把任務描述再複製
| 任務側欄的**快捷操作** | 點選後立即釋出儲存好的請求。如果設定了 AI 代理或小隊,就會請它處理這條任務。 |
| 在評論框輸入 `/` | 選擇操作,把請求放進草稿。可以按這次的需要修改,確認後再傳送;僅選擇操作不會發布。 |
+收起任務側欄後,任務頂欄會顯示狀態、負責人和**快捷操作**選單,不用重新開啟側欄也能使用快捷操作。
+
<QuickActionDemo />
使用快捷操作不會改變任務的負責人或狀態。在任務討論中檢視回復,在[執行日誌](/tasks)中檢視 AI 代理的進展。
diff --git a/apps/docs/content/docs/quick-actions.zh.mdx b/apps/docs/content/docs/quick-actions.zh.mdx
index 47b6bc810c..5a405df9d2 100644
--- a/apps/docs/content/docs/quick-actions.zh.mdx
+++ b/apps/docs/content/docs/quick-actions.zh.mdx
@@ -23,6 +23,8 @@ import { QuickActionDemo } from "@/components/demos/quick-action-demo";
| 任务侧栏的**快捷操作** | 点击后立即发布保存好的请求。如果设置了智能体或小队,就会请它处理这条任务。 |
| 在评论框输入 `/` | 选择操作,把请求放进草稿。可以按这次的需要修改,确认后再发送;仅选择操作不会发布。 |
+收起任务侧栏后,任务顶栏会显示状态、负责人和**快捷操作**菜单,不用重新打开侧栏也能使用快捷操作。
+
<QuickActionDemo />
使用快捷操作不会改变任务的负责人或状态。在任务讨论中查看回复,在[执行日志](/tasks)中查看智能体的进展。
diff --git a/packages/views/issues/components/inbox-issue-actions.tsx b/packages/views/issues/components/inbox-issue-actions.tsx
index 6d95eb0db8..402fde7c32 100644
--- a/packages/views/issues/components/inbox-issue-actions.tsx
+++ b/packages/views/issues/components/inbox-issue-actions.tsx
@@ -2,11 +2,12 @@
import { UserRound } from "@multica/ui/icons";
import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
import { useWorkspaceId } from "@multica/core/hooks";
import { noteInboxBarAction, takeInboxBarAction } from "@multica/core/inbox/auto-archive";
import { useIssueStatuses } from "@multica/core/issue-statuses/hooks";
import { useActorName } from "@multica/core/workspace/hooks";
-import type { Issue, UpdateIssueRequest } from "@multica/core/types";
+import type { Issue, QuickAction, UpdateIssueRequest } from "@multica/core/types";
import { ActorAvatar } from "../../common/actor-avatar";
import { useT } from "../../i18n";
import { useStatusLabel } from "../utils/status-label";
@@ -14,53 +15,55 @@ import { AssigneePicker } from "./pickers/assignee-picker";
import { StatusPicker } from "./pickers/status-picker";
import { QuickActionsMenu } from "./quick-actions-section";
import { StatusIcon } from "./status-icon";
+import { ISSUE_BAR_HIDE_LABEL, type IssueBarContainer } from "./issue-bar-container";
+
+type IssueBarActionsProps = {
+ issue: Issue;
+ onUpdate: (updates: Partial<UpdateIssueRequest>) => void;
+ onMarkDuplicate?: () => void;
+ isDuplicate?: boolean;
+};
/**
- * The issue's own actions in the Inbox's floating group, the ones that resolve most
- * notifications: its status and assignee, set as the Properties panel sets
- * them, and its quick actions. Each shows its current value, unlike the
- * notification's actions beside it.
+ * The issue's own actions as a row of chips: its status and assignee, set as
+ * the Properties panel sets them, and its quick actions. Each shows its current
+ * value. Used by the Inbox's floating group above the composer, whose menus
+ * open upward, and by the issue page header while the properties sidebar is
+ * closed, whose menus open downward.
*/
-export function InboxIssueActions({
+export function IssueBarActions({
issue,
onUpdate,
onMarkDuplicate,
isDuplicate,
-}: {
- issue: Issue;
- onUpdate: (updates: Partial<UpdateIssueRequest>) => void;
- onMarkDuplicate?: () => void;
- isDuplicate?: boolean;
+ container,
+ side,
+ onQuickActionRun,
+}: IssueBarActionsProps & {
+ container: IssueBarContainer;
+ side: "top" | "bottom";
+ onQuickActionRun?: (action: QuickAction, ran: Promise<boolean>) => void;
}) {
const { t } = useT("issues");
const wsId = useWorkspaceId();
const { categoryOf, colorOf, iconOf } = useIssueStatuses(wsId);
const statusLabelOf = useStatusLabel(wsId);
const { getActorName } = useActorName();
+ const hideLabel = ISSUE_BAR_HIDE_LABEL[container];
const chip = <Button variant="ghost" size="sm" className="min-w-0 max-w-48 shrink-0" />;
const assigned = issue.assignee_type && issue.assignee_id ? { type: issue.assignee_type, id: issue.assignee_id } : null;
- // Each of these archives the notification, and the settled bar names it.
- const update = (updates: Partial<UpdateIssueRequest>) => {
- if (updates.status) {
- noteInboxBarAction(issue.id, { type: "status", status: updates.status });
- } else if ("assignee_id" in updates) {
- const assignee = updates.assignee_type && updates.assignee_id ? { type: updates.assignee_type, id: updates.assignee_id } : null;
- noteInboxBarAction(issue.id, { type: "assignee", assignee });
- }
- onUpdate(updates);
- };
return (
<>
<StatusPicker
status={issue.status}
- onUpdate={update}
+ onUpdate={onUpdate}
projectId={issue.project_id}
issue={issue}
onMarkDuplicate={onMarkDuplicate}
isDuplicate={isDuplicate}
align="start"
- side="top"
+ side={side}
tooltip={t(($) => $.detail.prop_status)}
triggerRender={chip}
trigger={
@@ -72,41 +75,66 @@ export function InboxIssueActions({
icon={iconOf(issue.status)}
className="size-3.5 shrink-0"
/>
- <span className="truncate @max-[40rem]/inbox-bar:hidden">{statusLabelOf(issue.status)}</span>
+ <span className={cn("truncate", hideLabel)}>{statusLabelOf(issue.status)}</span>
</>
}
/>
<AssigneePicker
assigneeType={issue.assignee_type}
assigneeId={issue.assignee_id}
- onUpdate={update}
+ onUpdate={onUpdate}
align="start"
- side="top"
+ side={side}
tooltip={t(($) => $.detail.prop_assignee)}
triggerRender={chip}
trigger={
assigned ? (
<>
<ActorAvatar actorType={assigned.type} actorId={assigned.id} size="xs" showStatusDot />
- <span className="truncate @max-[40rem]/inbox-bar:hidden">{getActorName(assigned.type, assigned.id)}</span>
+ <span className={cn("truncate", hideLabel)}>{getActorName(assigned.type, assigned.id)}</span>
</>
) : (
<>
<UserRound className="size-3.5 shrink-0 text-muted-foreground" />
- <span className="truncate text-muted-foreground @max-[40rem]/inbox-bar:hidden">
+ <span className={cn("truncate text-muted-foreground", hideLabel)}>
{t(($) => $.pickers.assignee.trigger_unassigned)}
</span>
</>
)
}
/>
- <QuickActionsMenu
- issueId={issue.id}
- onRun={(action, ran) => {
- noteInboxBarAction(issue.id, { type: "quick_action", name: action.name });
- void ran.then((posted) => posted || takeInboxBarAction(issue.id));
- }}
- />
+ <QuickActionsMenu issueId={issue.id} side={side} onRun={onQuickActionRun} />
</>
);
}
+
+/**
+ * The issue's actions in the Inbox's floating group, the ones that resolve most
+ * notifications. Each of them archives the notification, so each is recorded
+ * for the settled bar to name.
+ */
+export function InboxIssueActions({ issue, onUpdate, ...props }: IssueBarActionsProps) {
+ const update = (updates: Partial<UpdateIssueRequest>) => {
+ if (updates.status) {
+ noteInboxBarAction(issue.id, { type: "status", status: updates.status });
+ } else if ("assignee_id" in updates) {
+ const assignee = updates.assignee_type && updates.assignee_id ? { type: updates.assignee_type, id: updates.assignee_id } : null;
+ noteInboxBarAction(issue.id, { type: "assignee", assignee });
+ }
+ onUpdate(updates);
+ };
+
+ return (
+ <IssueBarActions
+ {...props}
+ issue={issue}
+ onUpdate={update}
+ container="inbox-bar"
+ side="top"
+ onQuickActionRun={(action, ran) => {
+ noteInboxBarAction(issue.id, { type: "quick_action", name: action.name });
+ void ran.then((posted) => posted || takeInboxBarAction(issue.id));
+ }}
+ />
+ );
+}
diff --git a/packages/views/issues/components/issue-bar-container.ts b/packages/views/issues/components/issue-bar-container.ts
new file mode 100644
index 0000000000..2dd8a91c7a
--- /dev/null
+++ b/packages/views/issues/components/issue-bar-container.ts
@@ -0,0 +1,16 @@
+/**
+ * The bars that show an issue's status, assignee and quick actions as chips:
+ * the Inbox's floating group above the composer, and the issue page header
+ * while the properties sidebar is closed. Each is a named size container, and
+ * its chips drop their labels as it narrows.
+ *
+ * The class names are spelled out in full so Tailwind can find them.
+ */
+export type IssueBarContainer = "inbox-bar" | "issue-header";
+
+export const ISSUE_BAR_HIDE_LABEL: Record<IssueBarContainer, string> = {
+ "inbox-bar": "@max-[40rem]/inbox-bar:hidden",
+ // The header also holds the breadcrumb and the issue title, so it needs more
+ // room than the Inbox bar before the chips can afford their labels.
+ "issue-header": "@max-[60rem]/issue-header:hidden",
+};
diff --git a/packages/views/issues/components/issue-detail.test.tsx b/packages/views/issues/components/issue-detail.test.tsx
index 2a310eba25..42de294ca7 100644
--- a/packages/views/issues/components/issue-detail.test.tsx
+++ b/packages/views/issues/components/issue-detail.test.tsx
@@ -1629,6 +1629,22 @@ describe("IssueDetail (shared)", () => {
expect(screen.queryByRole("button", { name: enInbox.context_menu.archive })).not.toBeInTheDocument();
});
+ it("moves status and assignee into the page header while the properties sidebar is closed", async () => {
+ const { container } = renderIssueDetail();
+
+ const toggle = await screen.findByRole("button", { name: enIssues.detail.sidebar_tooltip });
+ expect(container.querySelector('[data-testid="issue-header-actions"]')).toBeNull();
+
+ fireEvent.click(toggle);
+ const headerActions = await waitFor(() => {
+ const el = container.querySelector<HTMLElement>('[data-testid="issue-header-actions"]');
+ expect(el).not.toBeNull();
+ return el!;
+ });
+ expect(headerActions.closest("header")).not.toBeNull();
+ expect(within(headerActions).getByText(enIssues.status.in_progress)).toBeInTheDocument();
+ });
+
it("floats the notification's actions above the composer, after the issue's own", async () => {
const { container } = renderWithArchive();
diff --git a/packages/views/issues/components/issue-detail.tsx b/packages/views/issues/components/issue-detail.tsx
index 85ea932a58..4b00bd5021 100644
--- a/packages/views/issues/components/issue-detail.tsx
+++ b/packages/views/issues/components/issue-detail.tsx
@@ -79,7 +79,7 @@ import { AvatarGroup, AvatarGroupCount } from "@multica/ui/components/ui/avatar"
import { ActorAvatar } from "../../common/actor-avatar";
import { ActionShortcutKeycaps } from "../../common/shortcut-keycaps";
import { COMPOSER_DOCK_GAP, ComposerDock, JumpToLatestButton } from "./composer-dock";
-import { InboxIssueActions } from "./inbox-issue-actions";
+import { InboxIssueActions, IssueBarActions } from "./inbox-issue-actions";
import { useInboxSelectionStore, type InboxTransitionDirection } from "@multica/core/inbox/selection-store";
import { useReducedMotion } from "@multica/core/appearance";
import { PropRow } from "../../common/prop-row";
@@ -3775,6 +3775,8 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
/>
) : null;
+ const showHeaderIssueActions = !guest && !inbox && !isPeek && !isMobile && !sidebarOpen;
+
const detailContent = (
<CurrentIssueRenderContextProvider value={currentIssueRenderContext}>
<div
@@ -3840,6 +3842,26 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
<IssueAgentHeaderChip issueId={id} onJumpToRun={jumpToRun} handoffRound={handoffRound} />
</div>
)}
+ {/* With the properties sidebar closed, its most used controls
+ move into the header so status, assignee and quick actions
+ stay one click away. The Inbox's floating group already
+ carries them, and the peek shows them as pills under the
+ title. */}
+ {showHeaderIssueActions && (
+ <div
+ data-testid="issue-header-actions"
+ className="flex min-w-0 items-center gap-0.5 after:ml-1 after:h-4 after:w-px after:bg-border"
+ >
+ <IssueBarActions
+ issue={issue}
+ onUpdate={handleUpdateField}
+ onMarkDuplicate={actions.openMarkDuplicate}
+ isDuplicate={isDuplicateIssue(issue)}
+ container="issue-header"
+ side="bottom"
+ />
+ </div>
+ )}
{inbox && (
<IconButton
label={t(($) => $.detail.open_issue_page)}
diff --git a/packages/views/issues/components/quick-actions-section.test.tsx b/packages/views/issues/components/quick-actions-section.test.tsx
index 81dbc85024..2faffd7722 100644
--- a/packages/views/issues/components/quick-actions-section.test.tsx
+++ b/packages/views/issues/components/quick-actions-section.test.tsx
@@ -273,13 +273,13 @@ describe("QuickActionsMenu", () => {
it("renders nothing before the workspace has any actions", () => {
listData = [];
- renderWithI18n(<QuickActionsMenu issueId="i-1" />);
+ renderWithI18n(<QuickActionsMenu issueId="i-1" side="top" />);
expect(screen.queryByRole("button", { name: "Quick actions" })).not.toBeInTheDocument();
});
it("lists the active actions and runs one, saying what came of it", async () => {
runMock.mockResolvedValue(outcome("queued"));
- renderWithI18n(<QuickActionsMenu issueId="i-1" />);
+ renderWithI18n(<QuickActionsMenu issueId="i-1" side="top" />);
fireEvent.click(screen.getByRole("button", { name: "Quick actions" }));
expect(screen.queryByRole("menuitem", { name: /Old one/ })).not.toBeInTheDocument();
@@ -292,7 +292,7 @@ describe("QuickActionsMenu", () => {
it("explains a refusal in a dialog, as the sidebar does", async () => {
reasonCode = "invocation_not_allowed";
runMock.mockRejectedValue(new Error("forbidden"));
- renderWithI18n(<QuickActionsMenu issueId="i-1" />);
+ renderWithI18n(<QuickActionsMenu issueId="i-1" side="top" />);
fireEvent.click(screen.getByRole("button", { name: "Quick actions" }));
fireEvent.click(await screen.findByRole("menuitem", { name: /Code Review/ }));
diff --git a/packages/views/issues/components/quick-actions-section.tsx b/packages/views/issues/components/quick-actions-section.tsx
index df575de463..e1ef4f8a1c 100644
--- a/packages/views/issues/components/quick-actions-section.tsx
+++ b/packages/views/issues/components/quick-actions-section.tsx
@@ -262,16 +262,19 @@ function QuickActionRow({
}
/**
- * The quick actions behind one icon button, for the Inbox's floating group.
- * Nothing configured renders nothing.
+ * The quick actions behind one icon button, for the Inbox's floating group and
+ * the issue page header. Nothing configured renders nothing.
*/
export function QuickActionsMenu({
issueId,
onRun,
+ side,
}: {
issueId: string;
/** Called as an action starts, with whether its comment was posted. */
onRun?: (action: QuickAction, ran: Promise<boolean>) => void;
+ /** Where the menu and its tooltip open: up from the Inbox's floating group, down from the header. */
+ side: "top" | "bottom";
}) {
const { t } = useT("issues");
const wsId = useCurrentWorkspace()?.id ?? "";
@@ -288,14 +291,14 @@ export function QuickActionsMenu({
return (
<>
<DropdownMenu>
- <TooltipHint label={label} side="top">
+ <TooltipHint label={label} side={side}>
<DropdownMenuTrigger
render={<Button variant="ghost" size="icon-sm" aria-label={label} className="shrink-0" disabled={running} />}
>
{running ? <Loader2 className="animate-spin text-muted-foreground" /> : <Zap className="text-muted-foreground" />}
</DropdownMenuTrigger>
</TooltipHint>
- <DropdownMenuContent side="top" align="start" className="w-auto min-w-56 max-w-80">
+ <DropdownMenuContent side={side} align="start" className="w-auto min-w-56 max-w-80">
{actions.map((action) => (
<DropdownMenuItem
key={action.id}