Skip to content

Commit 8ab427c

Browse files
authored
fix(web): settings say custom instructions cover pull request descriptions (pingdotgg#33113)
1 parent e85e009 commit 8ab427c

4 files changed

Lines changed: 24 additions & 21 deletions

File tree

‎apps/web/src/components/settings/SourceControlWritingSettings.browser.test.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ describe("mixed source control instructions", () => {
102102
await userEvent.click(page.getByRole("button", { name: "Advanced" }));
103103
// Mid-open, Playwright scrolls the clipped panel to reach the button, then the growing panel
104104
// shifts it between press and release and the click misses. Wait until the panel shows it.
105-
await expect.element(resetButton("change request templates")).toBeInViewport({ ratio: 1 });
106-
await userEvent.click(resetButton("change request templates"));
105+
await expect.element(resetButton("pull request templates")).toBeInViewport({ ratio: 1 });
106+
await userEvent.click(resetButton("pull request templates"));
107107

108108
expect(state.updateSettings).toHaveBeenCalledTimes(1);
109109
expect(state.styles.map((style) => style.followChangeRequestTemplates)).toEqual([

‎apps/web/src/components/settings/SourceControlWritingSettings.tsx‎

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,17 @@ const MODE_OPTIONS: Record<SourceControlWritingStyleMode, { label: string; descr
4949
{
5050
repo_conventions: {
5151
label: "Repository conventions",
52-
description: "In each project, matches recent change descriptions and change request titles.",
52+
description:
53+
"Commit messages and pull request titles and descriptions match each project's history.",
5354
},
5455
conventional_commits: {
5556
label: "Conventional Commits",
56-
description: "Use Conventional Commit prefixes and keep change request text concise.",
57+
description: "Conventional Commit prefixes, with short pull request titles and descriptions.",
5758
},
5859
custom: {
5960
label: "Custom instructions",
6061
description:
61-
"Use your instructions for change descriptions and change requests in every project.",
62+
"Your instructions shape commit messages and pull request titles and descriptions.",
6263
},
6364
};
6465

@@ -193,7 +194,7 @@ export function SourceControlWritingSettingsSection() {
193194
);
194195

195196
return (
196-
<SettingsSection id="source-control-text-generation" title="Writing & review">
197+
<SettingsSection id="source-control-text-generation" title="Commits & pull requests">
197198
<SettingsRow
198199
serverScoped
199200
settingKeys={["sourceControlWritingStyle"]}
@@ -203,7 +204,7 @@ export function SourceControlWritingSettingsSection() {
203204
resetAction={
204205
isSourceControlWritingStyleDirty ? (
205206
<SettingResetButton
206-
label="source control writing style"
207+
label="commit and pull request writing"
207208
onClick={() =>
208209
updateSettings({
209210
sourceControlWritingStyle: {
@@ -231,7 +232,7 @@ export function SourceControlWritingSettingsSection() {
231232
<SelectTrigger
232233
size="sm"
233234
className="w-full sm:w-56"
234-
aria-label="Source control writing style"
235+
aria-label="Commit and pull request writing"
235236
>
236237
<SelectValue>
237238
{(value: SourceControlWritingStyleMode | null) =>
@@ -257,7 +258,7 @@ export function SourceControlWritingSettingsSection() {
257258
value={allInstructions ?? ""}
258259
onChange={(event) => setAllInstructions(event.target.value)}
259260
rows={4}
260-
aria-label="Custom source control instructions for all selected environments"
261+
aria-label="Custom commit and pull request instructions for all selected environments"
261262
placeholder="Write the instructions each selected environment should use."
262263
/>
263264
<Button
@@ -304,8 +305,8 @@ export function SourceControlWritingSettingsSection() {
304305
}
305306
}}
306307
rows={4}
307-
placeholder="Keep titles concise. Use short bullet points in descriptions."
308-
aria-label="Custom source control writing instructions"
308+
placeholder="Keep commit subjects under 60 characters. Keep pull request descriptions short and plain."
309+
aria-label="Custom commit and pull request instructions"
309310
/>
310311
</div>
311312
) : null}
@@ -481,12 +482,12 @@ export function SourceControlWritingSettingsSection() {
481482
settingKeys={["sourceControlWritingStyle"]}
482483
mixed={templatesMixed}
483484
{...searchableSetting("follow-change-request-templates")}
484-
description="Use the repository's template for change request descriptions when available."
485+
description="Use the repository's pull request template when it has one."
485486
resetAction={
486487
templatesMixed ||
487488
style.followChangeRequestTemplates !== defaults.followChangeRequestTemplates ? (
488489
<SettingResetButton
489-
label="change request templates"
490+
label="pull request templates"
490491
onClick={() =>
491492
updateSettings({
492493
sourceControlWritingStyle: {
@@ -508,7 +509,7 @@ export function SourceControlWritingSettingsSection() {
508509
},
509510
})
510511
}
511-
aria-label="Follow change request templates"
512+
aria-label="Follow pull request templates"
512513
/>
513514
}
514515
/>
@@ -517,7 +518,7 @@ export function SourceControlWritingSettingsSection() {
517518
serverScoped
518519
settingKeys={["sourceControlWriterModelSelection"]}
519520
{...searchableSetting("source-control-writer-model")}
520-
description="Model for source control text and branch or bookmark names. When disabled, use the text generation model configured for this environment."
521+
description="Model for commit messages, pull request text, and branch or bookmark names. When disabled, use the text generation model configured for this environment."
521522
control={
522523
!hasServerTargets ? (
523524
<span className="text-sm text-muted-foreground">

‎apps/web/src/components/settings/settingsSearch.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,18 +1133,18 @@ export const SETTINGS_SEARCH_ITEMS = [
11331133
...sourceControlHostSearchItems(sourceControlClients.definitions),
11341134
{
11351135
id: "source-control-writing-style",
1136-
title: "Source control writing style",
1136+
title: "Commit and pull request writing",
11371137
to: "/settings/source-control",
11381138
searchTerms: [
1139-
"repository conventions conventional commits custom instructions change descriptions request titles",
1139+
"repository conventions conventional commits custom instructions commit messages change pr pull request merge request titles descriptions body style prompt write my own",
11401140
],
11411141
environmentOnly: true,
11421142
},
11431143
{
11441144
id: "follow-change-request-templates",
1145-
title: "Follow change request templates",
1145+
title: "Follow pull request templates",
11461146
to: "/settings/source-control",
1147-
searchTerms: ["repository pr pull request description structure"],
1147+
searchTerms: ["repository pr pull request merge request change request description structure"],
11481148
environmentOnly: true,
11491149
},
11501150
{

‎docs/user/source-control.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,10 @@ An existing fork PR can appear beside the branch even if you pushed without sett
181181
If its badge is missing because several remotes hold that branch, set the branch's upstream to
182182
the intended remote with `git branch --set-upstream-to=<remote>/<branch>`.
183183

184-
Choose the writing style and model in **Settings → Source control**. **Repository conventions**
185-
uses the project's instructions and recent commit subjects.
184+
Choose how commit messages and pull request titles and descriptions are written in
185+
**Settings → Source control → Commits & pull requests**. **Repository conventions** uses the
186+
project's instructions and recent commit subjects. **Custom instructions** applies your own
187+
instructions to commits and pull requests.
186188

187189
## Review and merge
188190

0 commit comments

Comments
 (0)