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
14731473 );
14741474
14751475 const removeProject = useCallback(
1476 async (member: SidebarProjectGroupMember, options: { force?: boolean } = {}) => {
1476 async (member: SidebarProjectGroupMember) => {
14771477 const memberProjectRef = scopeProjectRef(member.environmentId, member.id);
14781478 const result = await deleteProject({
14791479 environmentId: member.environmentId,
14801480 input: {
14811481 projectId: member.id,
1482 ...(options.force === true ? { force: true } : {}),
1482 force: true,
14831483 },
14841484 });
14851485 if (result._tag === "Failure") {
......@@ -1547,7 +1547,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
15471547 ...(member.environmentLabel
15481548 ? [`Environment: ${member.environmentLabel}`]
15491549 : []),
1550 "This permanently clears conversation history for those threads.",
1550 "This permanently clears conversation history for those threads and any archived threads.",
15511551 "This removes only this project entry.",
15521552 "This action cannot be undone.",
15531553 ].join("\n")
......@@ -1557,6 +1557,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
15571557 ...(member.environmentLabel
15581558 ? [`Environment: ${member.environmentLabel}`]
15591559 : []),
1560 "This permanently clears any archived conversation history.",
15601561 "This removes only this project entry.",
15611562 ].join("\n"),
15621563 { variant: "destructive" },
......@@ -1565,7 +1566,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
15651566 return;
15661567 }
15671568
1568 const result = await removeProject(member, { force: true });
1569 const result = await removeProject(member);
15691570 if (result._tag === "Failure" && !isAtomCommandInterrupted(result)) {
15701571 const error = squashAtomCommandFailure(result);
15711572 toastManager.add(
......@@ -1606,6 +1607,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
16061607 `Remove project "${member.title}"?`,
16071608 `Path: ${member.workspaceRoot}`,
16081609 ...(member.environmentLabel ? [`Environment: ${member.environmentLabel}`] : []),
1610 "This permanently clears any archived conversation history.",
16091611 "This removes only this project entry.",
16101612 ].join("\n");
16111613 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 }) {
715715 ]
716716 : [`This removes ${members.length} grouped project entries.`]),
717717 ...(projectThreads.length > 0
718 ? ["This permanently clears conversation history for those threads."]
719 : []),
718 ? [
719 "This permanently clears conversation history for those threads and any archived threads.",
720 ]
721 : ["This permanently clears any archived conversation history."]),
720722 isWholeGroup
721723 ? "This removes only the project entries, not the files on disk."
722724 : "Other entries in this grouped project are unaffected.",
......@@ -738,7 +740,7 @@ function ProjectDetail({ group }: { group: SidebarProjectSnapshot }) {
738740 environmentId: member.environmentId,
739741 input: {
740742 projectId: member.id,
741 ...(memberThreads.length > 0 ? { force: true } : {}),
743 force: true,
742744 },
743745 }),
744746 () => undefined,