From e95fa97c77cad776a994bbca2bda6e418bcac296 Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Tue, 22 Sep 2026 00:49:13 -0700 Subject: [PATCH] refactor(web): every textarea caps its growth; the diff comment box is a Textarea Two review forms capped the auto-growing field at 16rem through a slot selector; every auto-growing textarea should stop somewhere, so the cap is in the base. The diff comment box rendered an unstyled Textarea and rebuilt its whole look through nine slot-piercing utilities; it is now a plain size="sm" Textarea. Visible effect: the inline diff comment box gets the standard input border, background and 14px text instead of a faint 50% border at 12px; long comment fields everywhere stop growing at 16rem. Lowers the no-restyle ceiling from 674 to 660. 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 d430e3837148..6feb102c87cc 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 6633a593067e..adbe5b20cefc 100644 --- a/apps/web/src/components/diffs/DiffCommentAnnotation.tsx +++ b/apps/web/src/components/diffs/DiffCommentAnnotation.tsx @@ -91,8 +91,6 @@ export function DiffCommentAnnotation({