Skip to content

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

Go

fix(views): move Create sub-issue below Rename issue in issue actions menu (#9661)

Jiayuan Zhangb2e58d0bf8a8
diff --git a/packages/views/issues/actions/__tests__/issue-actions-menu.test.tsx b/packages/views/issues/actions/__tests__/issue-actions-menu.test.tsx
index e7f416d937..932f9b8af2 100644
--- a/packages/views/issues/actions/__tests__/issue-actions-menu.test.tsx
+++ b/packages/views/issues/actions/__tests__/issue-actions-menu.test.tsx
@@ -222,6 +222,25 @@ describe("IssueActionsDropdown", () => {
expect(screen.queryByText("Add sub-issue...")).not.toBeInTheDocument();
});
+ it("lists Create sub-issue directly below Rename issue", async () => {
+ render(
+ wrap(
+ <IssueActionsDropdown
+ issue={mockIssue}
+ trigger={<button data-testid="trigger">Menu</button>}
+ />,
+ ),
+ );
+
+ fireEvent.click(screen.getByTestId("trigger"));
+ await screen.findByText("Rename issue");
+
+ const labels = screen
+ .getAllByRole("menuitem")
+ .map((item) => item.textContent?.trim());
+ expect(labels.slice(0, 3)).toEqual(["Rename issue", "Create sub-issue", "Status"]);
+ });
+
it("clicking the Assignee item opens the shared AssigneePicker popover", async () => {
render(
wrap(
diff --git a/packages/views/issues/actions/issue-actions-menu-items.tsx b/packages/views/issues/actions/issue-actions-menu-items.tsx
index 0df52c359c..2fbbd32652 100644
--- a/packages/views/issues/actions/issue-actions-menu-items.tsx
+++ b/packages/views/issues/actions/issue-actions-menu-items.tsx
@@ -195,6 +195,13 @@ export function IssueActionsMenuItems({
<Pencil className="h-3.5 w-3.5" />
{t(($) => $.actions.rename_issue)}
</P.Item>
+ {/* Top level rather than under Relations: on a long issue the
+ sub-issues section's own "+" is scrolled far out of reach, and this
+ menu is pinned in the header. */}
+ <P.Item onClick={openCreateSubIssue}>
+ <Plus className="h-3.5 w-3.5" />
+ {t(($) => $.actions.create_sub_issue)}
+ </P.Item>
<P.Separator />
@@ -352,14 +359,6 @@ export function IssueActionsMenuItems({
<P.Separator />
- {/* Top level rather than under Relations: on a long issue the
- sub-issues section's own "+" is scrolled far out of reach, and this
- menu is pinned in the header. */}
- <P.Item onClick={openCreateSubIssue}>
- <Plus className="h-3.5 w-3.5" />
- {t(($) => $.actions.create_sub_issue)}
- </P.Item>
-
{/* Relationship actions live under "Relations" — a semantically explicit
label (unlike the old "More") so the first level tells you what the
submenu does. Holds parent/sub-issue links today, and will grow