@devries-cameron20 / t3code-1 / commits / 7897a695e3
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): review summary only says optional when it is (#18451)

oliver committed Oct 14, 2026 at 10:49 UTC 7897a695e351b7e8ebaa0d8c693660291af18286
2 files changed +42 -35
apps/mobile/src/features/pull-requests/PullRequestReviewSheet.tsx
+1 -1
@@ -154,7 +154,7 @@ export function PullRequestReviewSheet({
154 />
155 }
156 >
157 - {reviewing && offered.length ? (
157 + {reviewing && offered.length > 1 ? (
158 <SegmentedControl
159 options={offered.map((option) => ({ value: option.value, label: option.title }))}
160 selected={verdict?.value ?? "comment"}
apps/web/src/components/pullRequest/PullRequestReviewForm.tsx
+41 -34
@@ -116,10 +116,17 @@ export function PullRequestReviewForm({
116 };
117
118 // Forgejo requires a summary when requesting changes, even with inline comments.
119 - const canSubmit = (verdict: PullRequestReviewVerdict) =>
119 + const canSubmit = (verdict: PullRequestReviewVerdict, summary: string) =>
120 verdict === "request-changes" && requestChangesSummaryRequired
121 - ? body.trim().length > 0
122 - : verdict === "approve" || body.trim().length > 0 || comments.length > 0;
121 + ? summary.trim().length > 0
122 + : verdict === "approve" || summary.trim().length > 0 || comments.length > 0;
123 + // The placeholder asks for exactly what the submit button is waiting on.
124 + const placeholder =
125 + selectedVerdict === undefined || canSubmit(selectedVerdict.value, "")
126 + ? "Summarize your review (optional)"
127 + : selectedVerdict.value === "request-changes" && requestChangesSummaryRequired
128 + ? "Summarize your review (required to request changes)"
129 + : "Summarize your review or add line comments";
130
131 return (
132 <>
@@ -127,42 +134,42 @@ export function PullRequestReviewForm({
134 ref={textareaRef}
135 rows={3}
136 value={body}
130 - placeholder={
131 - requestChangesSummaryRequired && verdicts.includes("request-changes")
132 - ? "Summarize your review (required to request changes)"
133 - : "Summarize your review (optional)"
134 - }
137 + placeholder={placeholder}
138 aria-label="Review summary"
139 onChange={(event) => setSummary(reviewKey, event.target.value)}
140 />
138 - <div className="mt-2 flex justify-between gap-2">
139 - <Select
140 - value={selectedVerdict?.value ?? null}
141 - disabled={pending}
142 - onValueChange={(value) => {
143 - if (value !== null) setRequestedVerdict(value);
144 - }}
145 - >
146 - <SelectTrigger size="xs" className="w-auto min-w-0" aria-label="Review verdict">
147 - <span className="flex items-center gap-1.5">
148 - {selectedVerdict?.icon}
149 - {selectedVerdict?.label}
150 - </span>
151 - </SelectTrigger>
152 - <SelectPopup side="top" alignItemWithTrigger={false}>
153 - {offered.map((verdict) => (
154 - <SelectItem key={verdict.value} value={verdict.value}>
155 - <span className="flex items-center gap-1.5">
156 - {verdict.icon}
157 - {verdict.label}
158 - </span>
159 - </SelectItem>
160 - ))}
161 - </SelectPopup>
162 - </Select>
141 + <div className="mt-2 flex justify-end gap-2">
142 + {offered.length > 1 ? (
143 + <Select
144 + value={selectedVerdict?.value ?? null}
145 + disabled={pending}
146 + onValueChange={(value) => {
147 + if (value !== null) setRequestedVerdict(value);
148 + }}
149 + >
150 + <SelectTrigger size="xs" className="mr-auto w-auto min-w-0" aria-label="Review verdict">
151 + <span className="flex items-center gap-1.5">
152 + {selectedVerdict?.icon}
153 + {selectedVerdict?.label}
154 + </span>
155 + </SelectTrigger>
156 + <SelectPopup side="top" alignItemWithTrigger={false}>
157 + {offered.map((verdict) => (
158 + <SelectItem key={verdict.value} value={verdict.value}>
159 + <span className="flex items-center gap-1.5">
160 + {verdict.icon}
161 + {verdict.label}
162 + </span>
163 + </SelectItem>
164 + ))}
165 + </SelectPopup>
166 + </Select>
167 + ) : null}
168 <Button
169 size="xs"
165 - disabled={pending || selectedVerdict === undefined || !canSubmit(selectedVerdict.value)}
170 + disabled={
171 + pending || selectedVerdict === undefined || !canSubmit(selectedVerdict.value, body)
172 + }
173 onClick={() => {
174 if (selectedVerdict !== undefined) void submit(selectedVerdict);
175 }}