From da89e102f80b7ef6c8166d41cc202035f6ad75a4 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 22 Sep 2026 12:22:17 -0700 Subject: [PATCH] refactor(web): every textarea caps its growth; the diff comment box is a Textarea (#13036) Co-authored-by: Claude Fable 5 --- .../web/src/components/diffs/DiffCommentAnnotation.test.tsx | 6 ++---- apps/web/src/components/diffs/DiffCommentAnnotation.tsx | 2 -- .../src/components/pullRequest/PullRequestCommentForm.tsx | 1 - .../src/components/pullRequest/PullRequestReviewForm.tsx | 1 - apps/web/src/components/ui/textarea.tsx | 3 ++- scripts/lint-restyle-ceiling.ts | 2 +- 6 files changed, 5 insertions(+), 10 deletions(-) diff --git a/apps/web/src/components/diffs/DiffCommentAnnotation.test.tsx b/apps/web/src/components/diffs/DiffCommentAnnotation.test.tsx index d430e38371480214022b3ca08362dfea8ab9be9a..6feb102c87ccc1d66b83fb22a4c9b09dbc000496 100644 --- a/apps/web/src/components/diffs/DiffCommentAnnotation.test.tsx +++ b/apps/web/src/components/diffs/DiffCommentAnnotation.test.tsx @@ -25,10 +25,8 @@ describe("DiffCommentAnnotation", () => { expect(markup).toContain("Add a comment…"); expect(markup).toContain(">Comment"); expect(markup).toContain("autofocus"); - const textareaControl = markup.match(/]*data-slot="textarea-control"[^>]*>/)?.[0]; - expect(textareaControl).toBeDefined(); - expect(textareaControl).not.toContain("ring-ring"); - expect(markup).toContain("cursor-text"); + // The comment box is the standard small Textarea, not a bespoke surface. + expect(markup).toMatch(/]*data-size="sm"[^>]*data-slot="textarea-control"/); }); it("lets a pull-request diff configure actions without replacing the composer", () => { diff --git a/apps/web/src/components/diffs/DiffCommentAnnotation.tsx b/apps/web/src/components/diffs/DiffCommentAnnotation.tsx index 6633a593067efff72091946c482cda9fe9bbe8d1..adbe5b20cefcab1e2b77bca74c54a6ad2c6821a9 100644 --- a/apps/web/src/components/diffs/DiffCommentAnnotation.tsx +++ b/apps/web/src/components/diffs/DiffCommentAnnotation.tsx @@ -91,8 +91,6 @@ export function DiffCommentAnnotation({