authorgravatar for n.anisimov.23@gmail.comNick Anisimov <n.anisimov.23@gmail.com> 2026-09-02 11:45:18+04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-02 00:45:18-07:00
log6ff537f03c4df500da7283c0566fe6f8feca709b
treea54cc5a8bbc051b95a0b047cd10e86b8b3bca358
parenta81a52afbb4e03ba82b2743801772151ed8c7d70
signature Signed by PGP key B5690EEEBB952194

fix(web): remove projects with archived threads (#8798)


2 files changed, 11 insertions(+), 7 deletions(-)

apps/web/src/components/LegacySidebar.tsx+6-4
...@@ -1473,13 +1473,13 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec...@@ -1473,13 +1473,13 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
1473 );1473 );
14741474
1475 const removeProject = useCallback(1475 const removeProject = useCallback(
1476 async (member: SidebarProjectGroupMember, options: { force?: boolean } = {}) => {1476 async (member: SidebarProjectGroupMember) => {
1477 const memberProjectRef = scopeProjectRef(member.environmentId, member.id);1477 const memberProjectRef = scopeProjectRef(member.environmentId, member.id);
1478 const result = await deleteProject({1478 const result = await deleteProject({
1479 environmentId: member.environmentId,1479 environmentId: member.environmentId,
1480 input: {1480 input: {
1481 projectId: member.id,1481 projectId: member.id,
1482 ...(options.force === true ? { force: true } : {}),1482 force: true,
1483 },1483 },
1484 });1484 });
1485 if (result._tag === "Failure") {1485 if (result._tag === "Failure") {
...@@ -1547,7 +1547,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec...@@ -1547,7 +1547,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
1547 ...(member.environmentLabel1547 ...(member.environmentLabel
1548 ? [`Environment: ${member.environmentLabel}`]1548 ? [`Environment: ${member.environmentLabel}`]
1549 : []),1549 : []),
1550 "This permanently clears conversation history for those threads.",1550 "This permanently clears conversation history for those threads and any archived threads.",
1551 "This removes only this project entry.",1551 "This removes only this project entry.",
1552 "This action cannot be undone.",1552 "This action cannot be undone.",
1553 ].join("\n")1553 ].join("\n")
...@@ -1557,6 +1557,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec...@@ -1557,6 +1557,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
1557 ...(member.environmentLabel1557 ...(member.environmentLabel
1558 ? [`Environment: ${member.environmentLabel}`]1558 ? [`Environment: ${member.environmentLabel}`]
1559 : []),1559 : []),
1560 "This permanently clears any archived conversation history.",
1560 "This removes only this project entry.",1561 "This removes only this project entry.",
1561 ].join("\n"),1562 ].join("\n"),
1562 { variant: "destructive" },1563 { variant: "destructive" },
...@@ -1565,7 +1566,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec...@@ -1565,7 +1566,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
1565 return;1566 return;
1566 }1567 }
15671568
1568 const result = await removeProject(member, { force: true });1569 const result = await removeProject(member);
1569 if (result._tag === "Failure" && !isAtomCommandInterrupted(result)) {1570 if (result._tag === "Failure" && !isAtomCommandInterrupted(result)) {
1570 const error = squashAtomCommandFailure(result);1571 const error = squashAtomCommandFailure(result);
1571 toastManager.add(1572 toastManager.add(
...@@ -1606,6 +1607,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec...@@ -1606,6 +1607,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
1606 `Remove project "${member.title}"?`,1607 `Remove project "${member.title}"?`,
1607 `Path: ${member.workspaceRoot}`,1608 `Path: ${member.workspaceRoot}`,
1608 ...(member.environmentLabel ? [`Environment: ${member.environmentLabel}`] : []),1609 ...(member.environmentLabel ? [`Environment: ${member.environmentLabel}`] : []),
1610 "This permanently clears any archived conversation history.",
1609 "This removes only this project entry.",1611 "This removes only this project entry.",
1610 ].join("\n");1612 ].join("\n");
1611 const confirmed = await api.dialogs.confirm(message, { variant: "destructive" });1613 const confirmed = await api.dialogs.confirm(message, { variant: "destructive" });
apps/web/src/components/settings/ProjectSettingsPanel.tsx+5-3
...@@ -715,8 +715,10 @@ function ProjectDetail({ group }: { group: SidebarProjectSnapshot }) {...@@ -715,8 +715,10 @@ function ProjectDetail({ group }: { group: SidebarProjectSnapshot }) {
715 ]715 ]
716 : [`This removes ${members.length} grouped project entries.`]),716 : [`This removes ${members.length} grouped project entries.`]),
717 ...(projectThreads.length > 0717 ...(projectThreads.length > 0
718 ? ["This permanently clears conversation history for those threads."]718 ? [
719 : []),719 "This permanently clears conversation history for those threads and any archived threads.",
720 ]
721 : ["This permanently clears any archived conversation history."]),
720 isWholeGroup722 isWholeGroup
721 ? "This removes only the project entries, not the files on disk."723 ? "This removes only the project entries, not the files on disk."
722 : "Other entries in this grouped project are unaffected.",724 : "Other entries in this grouped project are unaffected.",
...@@ -738,7 +740,7 @@ function ProjectDetail({ group }: { group: SidebarProjectSnapshot }) {...@@ -738,7 +740,7 @@ function ProjectDetail({ group }: { group: SidebarProjectSnapshot }) {
738 environmentId: member.environmentId,740 environmentId: member.environmentId,
739 input: {741 input: {
740 projectId: member.id,742 projectId: member.id,
741 ...(memberThreads.length > 0 ? { force: true } : {}),743 force: true,
742 },744 },
743 }),745 }),
744 () => undefined,746 () => undefined,