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 <[email protected]>
This commit is contained in:
1 parent
4511210a45
commit
c3c01cba3d
3 files changed
+14
-3
No files matched your search
@@ -175,7 +175,7 @@ export type BuildThreadActionItemsThread = Pick<
|
||||
| "id"
|
||||
| "modelSelection"
|
||||
| "projectId"
|
||||
| "session"
|
||||
| "runtime"
|
||||
| "title"
|
||||
| "worktreePath"
|
||||
> & {
|
||||
|
||||
@@ -1047,7 +1047,7 @@ function OpenCommandPaletteDialog(props: {
|
||||
renderTrailingContent: (thread) => <ThreadRowTrailingStatus thread={thread} />,
|
||||
renderDescription: (thread, { projectTitle }) => {
|
||||
const modelInstanceId =
|
||||
thread.session?.providerInstanceId ?? thread.modelSelection.instanceId;
|
||||
thread.runtime?.providerInstanceId ?? thread.modelSelection.instanceId;
|
||||
const providerEntry =
|
||||
providerEntryByEnvironmentAndInstanceId.get(
|
||||
`${thread.environmentId}:${modelInstanceId}`,
|
||||
@@ -1063,7 +1063,7 @@ function OpenCommandPaletteDialog(props: {
|
||||
isCurrent={thread.id === activeThreadId}
|
||||
driverKind={providerEntry?.driverKind ?? null}
|
||||
providerDisplayName={
|
||||
thread.session?.providerName ?? providerEntry?.displayName ?? modelInstanceId
|
||||
thread.runtime?.providerName ?? providerEntry?.displayName ?? modelInstanceId
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -31,6 +31,9 @@ const ACTION_SUCCESS_LABELS: Record<PullRequestAction, string> = {
|
||||
draft: "Converted to draft",
|
||||
close: "Pull request closed",
|
||||
reopen: "Pull request reopened",
|
||||
"update-branch": "Branch updated with the base branch",
|
||||
"enable-auto-merge": "Auto-merge enabled",
|
||||
"disable-auto-merge": "Auto-merge disabled",
|
||||
};
|
||||
|
||||
/** 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> = {
|
||||
draft: "Could not convert this to a draft",
|
||||
close: "Could not close this pull request",
|
||||
reopen: "Could not reopen this pull request",
|
||||
"update-branch": "Could not update this branch",
|
||||
"enable-auto-merge": "Could not enable auto-merge",
|
||||
"disable-auto-merge": "Could not disable auto-merge",
|
||||
};
|
||||
|
||||
/** What to try, for the times the host says only that it refused. */
|
||||
@@ -51,6 +57,11 @@ const ACTION_FAILURE_HINTS: Record<PullRequestAction, string> = {
|
||||
close: "The host refused it. Check that you have write access, or that you opened it.",
|
||||
reopen:
|
||||
"The host refused it. Check that you have write access, and that the branch still exists.",
|
||||
"update-branch":
|
||||
"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.",
|
||||
"enable-auto-merge":
|
||||
"The host refused it. Check that auto-merge is enabled for this repository and that you have write access.",
|
||||
"disable-auto-merge": "The host refused it. Check that you have write access to this repository.",
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user