diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index d19ecbc7..e665c9a2 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -840,9 +840,6 @@ input:disabled, select:disabled { color: var(--color-ink-tertiary); background: .conversational-composer-footer button, .conversational-confirmation button, .conversational-original-question button { width: 100%; } } -/* Rectification reuses the ordinary session message list and composer. */ -.rectification-chat { display: contents; } - /* Starter workbench */ .welcome { width: min(1040px, 100%); diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 355ebd77..18f7f1fa 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -2841,8 +2841,9 @@ export default function Home() { -
- {!rectificationSurfaceOpen && (!activeSession?.messages.length ? ( + {!rectificationSurfaceOpen && ( +
+ {!activeSession?.messages.length ? (
{!profileComplete ? ( <> @@ -3024,19 +3025,21 @@ export default function Home() { {activeError &&

{activeError}

}
- ))} - {rectificationSurfaceOpen && ( - void selectSessionModel(modelId)} - pendingConsultationQuestion={rectificationPendingQuestion} - continuationPending={rectificationContinuationPending} - onPendingChange={setRectificationMutationPending} - onContinueOriginalQuestion={(continuation) => void continueRectificationOriginalQuestion(continuation)} - /> - )} -
+ )} +
+ )} + + {rectificationSurfaceOpen && ( + void selectSessionModel(modelId)} + pendingConsultationQuestion={rectificationPendingQuestion} + continuationPending={rectificationContinuationPending} + onPendingChange={setRectificationMutationPending} + onContinueOriginalQuestion={(continuation) => void continueRectificationOriginalQuestion(continuation)} + /> + )} {!rectificationSurfaceOpen &&
{activeSuggestions.length > 0 && ( diff --git a/frontend/src/components/rectification-v4-panel.tsx b/frontend/src/components/rectification-v4-panel.tsx index 9b00e1ee..53b64b3b 100644 --- a/frontend/src/components/rectification-v4-panel.tsx +++ b/frontend/src/components/rectification-v4-panel.tsx @@ -186,12 +186,14 @@ export function RectificationV4Panel(props: RectificationV4PanelProps) { } return ( -
-
- {messages.map((message) => )} - {controller.error &&

{controller.error}

} -
-
+ <> +
+
+ {messages.map((message) => )} + {controller.error &&

{controller.error}

} +
+
+
{showControls && (
@@ -247,6 +249,6 @@ export function RectificationV4Panel(props: RectificationV4PanelProps) {
)} -
+ ); } diff --git a/frontend/tests/conversational-rectification-component.test.ts b/frontend/tests/conversational-rectification-component.test.ts index ee55f493..a9a20504 100644 --- a/frontend/tests/conversational-rectification-component.test.ts +++ b/frontend/tests/conversational-rectification-component.test.ts @@ -68,6 +68,10 @@ test("v4 rectification reuses the ordinary session message list, composer, and m const page = readFileSync(new URL("../src/app/page.tsx", import.meta.url), "utf8"); const css = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8"); + assert.match( + component, + /<>\s*
\s*\{showControls && \(\s*
/); - assert.match(page, /rectificationSurfaceOpen \|\| activeSession\?\.messages\.length/); + assert.match(page, /\{!rectificationSurfaceOpen && \(\s*
{