Skip to content

Commit 38cfeb6

Browse files
fix(web): reconcile main's round-5 features after the rebase
- PullRequestDetailPanel takes main's #6039 rework wholesale (reactions, update-branch, auto-merge, in-place editing); the thread-details action hooks stay in usePullRequestActions with label maps extended for the new action variants - CommandPalette #6330 provider subtitles adapted to the v2 shell (session -> runtime for provider instance and display name) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 80fbe24 commit 38cfeb6

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎apps/web/src/components/CommandPalette.logic.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export type BuildThreadActionItemsThread = Pick<
239239
| "id"
240240
| "modelSelection"
241241
| "projectId"
242-
| "session"
242+
| "runtime"
243243
| "title"
244244
| "worktreePath"
245245
> & {

‎apps/web/src/components/CommandPalette.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ function OpenCommandPaletteDialog(props: {
11211121
renderTrailingContent: (thread) => <ThreadRowTrailingStatus thread={thread} />,
11221122
renderDescription: (thread, { projectTitle }) => {
11231123
const modelInstanceId =
1124-
thread.session?.providerInstanceId ?? thread.modelSelection.instanceId;
1124+
thread.runtime?.providerInstanceId ?? thread.modelSelection.instanceId;
11251125
const providerEntry =
11261126
providerEntryByEnvironmentAndInstanceId.get(
11271127
`${thread.environmentId}:${modelInstanceId}`,
@@ -1137,7 +1137,7 @@ function OpenCommandPaletteDialog(props: {
11371137
isCurrent={thread.id === activeThreadId}
11381138
driverKind={providerEntry?.driverKind ?? null}
11391139
providerDisplayName={
1140-
thread.session?.providerName ?? providerEntry?.displayName ?? modelInstanceId
1140+
thread.runtime?.providerName ?? providerEntry?.displayName ?? modelInstanceId
11411141
}
11421142
/>
11431143
);

‎apps/web/src/components/pullRequest/usePullRequestActions.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ const ACTION_SUCCESS_LABELS: Record<PullRequestAction, string> = {
3131
draft: "Converted to draft",
3232
close: "Pull request closed",
3333
reopen: "Pull request reopened",
34+
"update-branch": "Branch updated with the base branch",
35+
"enable-auto-merge": "Auto-merge enabled",
36+
"disable-auto-merge": "Auto-merge disabled",
3437
};
3538

3639
/** Said as the thing that did not happen, rather than as the operation that returned an error. */
@@ -40,6 +43,9 @@ const ACTION_FAILURE_LABELS: Record<PullRequestAction, string> = {
4043
draft: "Could not convert this to a draft",
4144
close: "Could not close this pull request",
4245
reopen: "Could not reopen this pull request",
46+
"update-branch": "Could not update this branch",
47+
"enable-auto-merge": "Could not enable auto-merge",
48+
"disable-auto-merge": "Could not disable auto-merge",
4349
};
4450

4551
/** What to try, for the times the host says only that it refused. */
@@ -51,6 +57,11 @@ const ACTION_FAILURE_HINTS: Record<PullRequestAction, string> = {
5157
close: "The host refused it. Check that you have write access, or that you opened it.",
5258
reopen:
5359
"The host refused it. Check that you have write access, and that the branch still exists.",
60+
"update-branch":
61+
"The host refused it. Check that you have write access, and that the base branch has not diverged in a way the host cannot merge.",
62+
"enable-auto-merge":
63+
"The host refused it. Check that auto-merge is enabled for this repository and that you have write access.",
64+
"disable-auto-merge": "The host refused it. Check that you have write access to this repository.",
5465
};
5566

5667
/**

0 commit comments

Comments
 (0)