diff --git a/apps/web/src/components/thread-annotation/ThreadAnnotation.tsx b/apps/web/src/components/thread-annotation/ThreadAnnotation.tsx index 10ab22cba32f..4da6a96127bc 100644 --- a/apps/web/src/components/thread-annotation/ThreadAnnotation.tsx +++ b/apps/web/src/components/thread-annotation/ThreadAnnotation.tsx @@ -233,25 +233,31 @@ export function ThreadAnnotationPostIt(props: { }) { const bodyChangePending = useThreadAnnotationBodyPending(props.threadRef); return ( -
- -
- +
+ undefined} - onResolve={props.onResolve} - pending={props.pending || bodyChangePending} + className="max-h-48 overflow-y-auto" + cwd={props.cwd} + onBodyChange={props.onBodyChange} + threadRef={props.threadRef} /> - +
+ undefined} + onResolve={props.onResolve} + pending={props.pending || bodyChangePending} + /> + +
); diff --git a/apps/web/src/components/thread-annotation/ThreadAnnotationPostIt.test.tsx b/apps/web/src/components/thread-annotation/ThreadAnnotationPostIt.test.tsx new file mode 100644 index 000000000000..331c8a0514cf --- /dev/null +++ b/apps/web/src/components/thread-annotation/ThreadAnnotationPostIt.test.tsx @@ -0,0 +1,36 @@ +import { EnvironmentId, MessageId, ThreadId } from "@t3tools/contracts"; +import { renderToStaticMarkup } from "react-dom/server"; +import { describe, expect, it, vi } from "vite-plus/test"; + +import { ThreadAnnotationPostIt } from "./ThreadAnnotation"; + +describe("ThreadAnnotationPostIt", () => { + it("layers the warning tint over the shared readable overlay surface", () => { + const markup = renderToStaticMarkup( + true} + onDismiss={vi.fn()} + onEdit={vi.fn()} + onResolve={vi.fn()} + threadRef={{ + environmentId: EnvironmentId.make("annotation-environment"), + threadId: ThreadId.make("annotation-thread"), + }} + />, + ); + + const outerClasses = markup.match(/^