Skip to content

Commit 450fa8b

Browse files
committed
fix(web): move project settings below thread actions
1 parent aac7ec4 commit 450fa8b

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎apps/web/src/components/LegacySidebar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2161,11 +2161,11 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
21612161
...(thread.branch
21622162
? [{ id: "new-thread-on-branch", label: `New thread on ${thread.branch}` }]
21632163
: []),
2164-
{ id: "project-settings", label: "Project settings" },
21652164
{ id: "rename", label: "Rename thread" },
21662165
{ id: "mark-unread", label: "Mark unread" },
21672166
{ id: "copy-path", label: "Copy Path" },
21682167
{ id: "copy-thread-id", label: "Copy Thread ID" },
2168+
{ id: "project-settings", label: "Project settings" },
21692169
{ id: "delete", label: "Delete", destructive: true, icon: "trash" },
21702170
],
21712171
position,

‎apps/web/src/components/threadActionMenu.logic.test.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,18 @@ describe("buildThreadActionMenuItems", () => {
3333
...baseState,
3434
supports: { settlement: false, snooze: false, pinning: false, titleRegeneration: false },
3535
}),
36-
).toEqual(["project-settings", "rename", "mark-unread", "copy", "archive", "delete"]);
36+
).toEqual(["rename", "mark-unread", "copy", "project-settings", "archive", "delete"]);
3737
});
3838

39-
it("offers project settings before thread state actions", () => {
40-
expect(buildThreadActionMenuItems(baseState)[0]).toMatchObject({
39+
it("groups project settings with utility actions before archive", () => {
40+
const items = buildThreadActionMenuItems(baseState);
41+
const copyIndex = items.findIndex((item) => item.id === "copy");
42+
expect(items[copyIndex + 1]).toMatchObject({
4143
id: "project-settings",
4244
label: "Project settings",
4345
icon: "settings",
4446
});
47+
expect(items[copyIndex + 2]?.id).toBe("archive");
4548
});
4649

4750
it("includes branch items only for threads with a branch", () => {

‎apps/web/src/components/threadActionMenu.logic.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ export function buildThreadActionMenuItems(
6262
},
6363
]
6464
: []),
65-
{ id: "project-settings", label: "Project settings", icon: "settings" },
6665
...(state.supports.pinning
6766
? [
6867
state.isPinned
@@ -121,6 +120,7 @@ export function buildThreadActionMenuItems(
121120
{ id: "copy-thread-id", label: "Thread ID", icon: "hash" },
122121
],
123122
},
123+
{ id: "project-settings", label: "Project settings", icon: "settings" },
124124
// Archive removes the thread from the sidebar while keeping its
125125
// conversation under Settings > Archived threads — distinct from Settle
126126
// (stays visible in the Settled shelf) and Delete (clears history for

0 commit comments

Comments
 (0)