+
diff --git a/apps/web/components/task/task-reset-env-confirm-dialog.test.tsx b/apps/web/components/task/task-reset-env-confirm-dialog.test.tsx
new file mode 100644
index 0000000000..6bec62a45d
--- /dev/null
+++ b/apps/web/components/task/task-reset-env-confirm-dialog.test.tsx
@@ -0,0 +1,70 @@
+import { cleanup, fireEvent, render, screen } from "@testing-library/react";
+import { afterEach, describe, expect, it, vi } from "vitest";
+
+import { TaskResetEnvConfirmDialog } from "./task-reset-env-confirm-dialog";
+
+afterEach(cleanup);
+
+describe("TaskResetEnvConfirmDialog", () => {
+ it("renders structured warning copy through one left-aligned description", () => {
+ render(
+
,
+ );
+
+ const dialog = screen.getByRole("alertdialog", { name: "Reset environment?" });
+ const description = dialog.querySelector('[data-slot="alert-dialog-description"]');
+ expect(description).not.toBeNull();
+ expect(description?.id).toBe(dialog.getAttribute("aria-describedby"));
+ expect(description?.classList.contains("min-w-0")).toBe(true);
+ expect(description?.classList.contains("text-left")).toBe(true);
+ expect(description?.querySelectorAll("p")).toHaveLength(2);
+ expect(description?.textContent).toContain("Any uncommitted or unpushed changes");
+ });
+
+ it("requires acknowledgment and passes the push-branch choice to confirmation", () => {
+ const onConfirm = vi.fn();
+ render(
+
,
+ );
+
+ const confirm = screen.getByTestId("reset-env-confirm") as HTMLButtonElement;
+ expect(confirm.disabled).toBe(true);
+
+ fireEvent.click(
+ screen.getByRole("checkbox", {
+ name: /push the current branch to its remote before resetting/i,
+ }),
+ );
+ fireEvent.click(
+ screen.getByRole("checkbox", {
+ name: /I understand any uncommitted changes will be lost/i,
+ }),
+ );
+
+ expect(confirm.disabled).toBe(false);
+ fireEvent.click(confirm);
+ expect(onConfirm).toHaveBeenCalledWith({ pushBranch: true });
+ });
+
+ it("locks both choices and confirmation while resetting", () => {
+ render(
+
,
+ );
+
+ for (const checkbox of screen.getAllByRole("checkbox")) {
+ expect((checkbox as HTMLButtonElement).disabled).toBe(true);
+ }
+ expect((screen.getByTestId("reset-env-confirm") as HTMLButtonElement).disabled).toBe(true);
+ });
+});
diff --git a/apps/web/components/task/task-reset-env-confirm-dialog.tsx b/apps/web/components/task/task-reset-env-confirm-dialog.tsx
index 6635e8e72d..28771ac35b 100644
--- a/apps/web/components/task/task-reset-env-confirm-dialog.tsx
+++ b/apps/web/components/task/task-reset-env-confirm-dialog.tsx
@@ -49,7 +49,7 @@ export function TaskResetEnvConfirmDialog({
{t("task:resetEnvironment")}
-
+
{t("task:thisTearsDownTheCurrentContainer")}
{t("task:anyUncommittedOrUnpushedChangesIn")}
diff --git a/docs/plans/surface-text-hierarchy/plan.md b/docs/plans/surface-text-hierarchy/plan.md
index b4d9f53342..3bf81c2b43 100644
--- a/docs/plans/surface-text-hierarchy/plan.md
+++ b/docs/plans/surface-text-hierarchy/plan.md
@@ -106,7 +106,7 @@ the final composition.
- [x] [Task 01: Standardize surface typography primitives](task-01-standardize-surface-typography-primitives.md) (completed)
- [x] [Task 02: Normalize structured app confirmations](task-02-normalize-structured-app-confirmations.md) (completed)
- [x] [Task 03: Refine task cleanup confirmations](task-03-refine-task-cleanup-confirmations.md) (completed)
-- [ ] [Task 04: Normalize structured task confirmations](task-04-normalize-structured-task-confirmations.md)
+- [x] [Task 04: Normalize structured task confirmations](task-04-normalize-structured-task-confirmations.md) (completed)
- [ ] [Task 05: Add responsive text hierarchy E2E](task-05-add-responsive-text-hierarchy-e2e.md)
## Risks
diff --git a/docs/plans/surface-text-hierarchy/task-04-normalize-structured-task-confirmations.md b/docs/plans/surface-text-hierarchy/task-04-normalize-structured-task-confirmations.md
index 766ba76699..6b46c2f846 100644
--- a/docs/plans/surface-text-hierarchy/task-04-normalize-structured-task-confirmations.md
+++ b/docs/plans/surface-text-hierarchy/task-04-normalize-structured-task-confirmations.md
@@ -1,7 +1,7 @@
---
id: "04-normalize-structured-task-confirmations"
title: "Normalize structured task confirmations"
-status: pending
+status: completed
wave: 2
depends_on:
- "01-standardize-surface-typography-primitives"
@@ -93,4 +93,18 @@ pnpm run i18n:check
## Results
-Pending implementation.
+- RED: Focused assertions failed against the pre-change wrapperless fragments
+ and spans because the three dialogs lacked the required semantic paragraph
+ structure, left alignment, containment, and single description boundary.
+- GREEN: Session deletion, task detachment, and environment reset now render
+ structured paragraphs inside one `min-w-0 text-left` AlertDialog description;
+ compact popover and inline descriptions remain unchanged.
+- Added a shared session-delete description renderer plus focused coverage for
+ all three surfaces, including a 180-character dynamic task title.
+- Focused verification passed with 3 test files and 11 tests. Web typecheck,
+ focused ESLint with `--max-warnings 0`, `pnpm run i18n:check`, targeted
+ Prettier, and `git diff --check` also passed on the integrated stack.
+- Exact-head E2E integration exposed that the archive-only wide popover had
+ lost its specified pretty prose wrapping. The wide size contract now applies
+ `text-pretty` to its description while the default popover remains unchanged;
+ the shared popover and archive confirmation suites pass 20 tests.