diff --git a/src/renderer/src/components/PullRequestPage.tsx b/src/renderer/src/components/PullRequestPage.tsx index 1df423f64..b8e75098b 100644 --- a/src/renderer/src/components/PullRequestPage.tsx +++ b/src/renderer/src/components/PullRequestPage.tsx @@ -4476,7 +4476,7 @@ function ChecksTab({ title={translate('auto.components.PullRequestPage.a053bdd082', 'Fix Broken Checks With AI')} description={translate( 'auto.components.PullRequestPage.ddfd42f460', - 'Choose the agent and edit the full command input before launch.' + 'Review the prompt before starting an agent.' )} baseCommandInput={fixChecksComposerPrompt ?? ''} connectionId={repo?.connectionId ?? null} diff --git a/src/renderer/src/components/right-sidebar/ChecksPanel.tsx b/src/renderer/src/components/right-sidebar/ChecksPanel.tsx index 016976c41..d58d3a428 100644 --- a/src/renderer/src/components/right-sidebar/ChecksPanel.tsx +++ b/src/renderer/src/components/right-sidebar/ChecksPanel.tsx @@ -165,7 +165,11 @@ export function ChecksPanelReviewHeader({ )} {(canCreate || canPushCreate) && ( @@ -2480,8 +2540,16 @@ export default function ChecksPanel(): React.JSX.Element { }} > {canPushCreate - ? translate("auto.components.right.sidebar.ChecksPanel.98f4c37b33", "Push & Create {{value0}}", { value0: emptyReviewShortLabel }) - : translate("auto.components.right.sidebar.ChecksPanel.889cdfba04", "Create {{value0}}", { value0: emptyReviewShortLabel })} + ? translate( + 'auto.components.right.sidebar.ChecksPanel.98f4c37b33', + 'Push & Create {{value0}}', + { value0: emptyReviewShortLabel } + ) + : translate( + 'auto.components.right.sidebar.ChecksPanel.889cdfba04', + 'Create {{value0}}', + { value0: emptyReviewShortLabel } + )} )} )} @@ -2540,7 +2610,7 @@ export default function ChecksPanel(): React.JSX.Element { /> ))} {hostedReview && ( @@ -3734,7 +3815,7 @@ function SourceControlInner(): React.JSX.Element { )} - {scope === "all" && shouldShowCompareSummary(branchSummary) && ( + {scope === 'all' && shouldShowCompareSummary(branchSummary) && (
setDiffCommentsExpanded((prev) => !prev)} aria-expanded={diffCommentsExpanded} - title={diffCommentsExpanded ? translate("auto.components.right.sidebar.SourceControl.d13edef890", "Collapse notes") : translate("auto.components.right.sidebar.SourceControl.72f2bea3f4", "Expand notes")} + title={ + diffCommentsExpanded + ? translate( + 'auto.components.right.sidebar.SourceControl.d13edef890', + 'Collapse notes' + ) + : translate( + 'auto.components.right.sidebar.SourceControl.72f2bea3f4', + 'Expand notes' + ) + } > - {translate("auto.components.right.sidebar.SourceControl.cc474e0b8c", "Notes")} + + {translate('auto.components.right.sidebar.SourceControl.cc474e0b8c', 'Notes')} + {diffCommentCount > 0 && ( {diffCommentCount} @@ -3791,7 +3884,10 @@ function SourceControlInner(): React.JSX.Element { type="button" className="inline-flex size-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground" onClick={() => void handleCopyDiffComments()} - aria-label={translate("auto.components.right.sidebar.SourceControl.3baf6c77b4", "Copy all notes to clipboard")} + aria-label={translate( + 'auto.components.right.sidebar.SourceControl.3baf6c77b4', + 'Copy all notes to clipboard' + )} > {diffCommentsCopied ? ( @@ -3801,7 +3897,11 @@ function SourceControlInner(): React.JSX.Element { - {translate("auto.components.right.sidebar.SourceControl.eae2d051af", "Copy all notes")} + {translate( + 'auto.components.right.sidebar.SourceControl.eae2d051af', + 'Copy all notes' + )} + )} @@ -3813,14 +3913,21 @@ function SourceControlInner(): React.JSX.Element { - {translate("auto.components.right.sidebar.SourceControl.2fe2a67580", "More note actions")} + {translate( + 'auto.components.right.sidebar.SourceControl.2fe2a67580', + 'More note actions' + )} + @@ -3835,7 +3942,11 @@ function SourceControlInner(): React.JSX.Element { }} > - {translate("auto.components.right.sidebar.SourceControl.1406954883", "Clear all notes...")} + {translate( + 'auto.components.right.sidebar.SourceControl.1406954883', + 'Clear all notes...' + )} +
@@ -3865,7 +3976,10 @@ function SourceControlInner(): React.JSX.Element { type="text" value={filterQuery} onChange={(e) => setFilterQuery(e.target.value)} - placeholder={translate("auto.components.right.sidebar.SourceControl.c35baf2f1e", "Filter files…")} + placeholder={translate( + 'auto.components.right.sidebar.SourceControl.c35baf2f1e', + 'Filter files…' + )} className="flex-1 min-w-0 bg-transparent text-xs text-foreground placeholder:text-muted-foreground/60 outline-none" /> {filterQuery && ( @@ -3915,7 +4029,7 @@ function SourceControlInner(): React.JSX.Element { but there are no unresolved conflicts (e.g. between rebase steps, or after resolving all conflicts before running --continue). The ConflictSummaryCard handles the "has conflicts" case above. */} - {unresolvedConflictReviewEntries.length === 0 && conflictOperation !== "unknown" && ( + {unresolvedConflictReviewEntries.length === 0 && conflictOperation !== 'unknown' && (
)} - {scope === "all" && showGenericEmptyState && !normalizedFilter ? ( + {scope === 'all' && showGenericEmptyState && !normalizedFilter ? ( ) : null} - {scope === "uncommitted" && !hasUncommittedEntries && !normalizedFilter && ( + {scope === 'uncommitted' && !hasUncommittedEntries && !normalizedFilter && (
) : null} {shouldRenderCommitArea(scope, unresolvedConflicts.length, conflictOperation) && - (primaryAction.kind === "create_pr" ? ( + (primaryAction.kind === 'create_pr' ? ( ))} - {(scope === "all" || scope === "uncommitted") && hasFilteredUncommittedEntries && ( + {(scope === 'all' || scope === 'uncommitted') && hasFilteredUncommittedEntries && ( <> {SECTION_ORDER.map((area) => { const items = filteredGrouped[area] @@ -4104,7 +4226,15 @@ function SourceControlInner(): React.JSX.Element { // A generic "Discard all" label hides that severity — // label explicitly for the destructive variant. title={ - area === "untracked" ? translate("auto.components.right.sidebar.SourceControl.2f609a2e7c", "Delete all untracked") : translate("auto.components.right.sidebar.SourceControl.ce41708855", "Discard all") + area === 'untracked' + ? translate( + 'auto.components.right.sidebar.SourceControl.2f609a2e7c', + 'Delete all untracked' + ) + : translate( + 'auto.components.right.sidebar.SourceControl.ce41708855', + 'Discard all' + ) } onClick={(event) => { event.stopPropagation() @@ -4116,7 +4246,10 @@ function SourceControlInner(): React.JSX.Element { {canStageAll && ( { event.stopPropagation() if (area === 'unstaged' || area === 'untracked') { @@ -4129,7 +4262,10 @@ function SourceControlInner(): React.JSX.Element { {canUnstageAll && ( { event.stopPropagation() void handleUnstageAll() @@ -4151,7 +4287,11 @@ function SourceControlInner(): React.JSX.Element { } }} > - {translate("auto.components.right.sidebar.SourceControl.48db37cca9", "View all")} + {translate( + 'auto.components.right.sidebar.SourceControl.48db37cca9', + 'View all' + )} + ) : ( + {translate( + 'auto.components.right.sidebar.SourceControl.48db37cca9', + 'View all' + )} + )} } /> {!isCollapsed && - (sourceControlViewMode === "tree" + (sourceControlViewMode === 'tree' ? visibleTreeRowsByArea[area].map((node) => { if (node.type === 'directory') { return ( @@ -4243,10 +4387,10 @@ function SourceControlInner(): React.JSX.Element { )} - {scope === "all" && + {scope === 'all' && branchSummary && - branchSummary.status !== "ready" && - branchSummary.status !== "loading" ? ( + branchSummary.status !== 'ready' && + branchSummary.status !== 'loading' ? ( setBaseRefDialogOpen(true)} @@ -4254,10 +4398,13 @@ function SourceControlInner(): React.JSX.Element { /> ) : null} - {scope === "all" && branchSummary?.status === "ready" && hasFilteredBranchEntries && ( + {scope === 'all' && branchSummary?.status === 'ready' && hasFilteredBranchEntries && (
toggleSection('branch')} @@ -4274,11 +4421,15 @@ function SourceControlInner(): React.JSX.Element { } }} > - {translate("auto.components.right.sidebar.SourceControl.48db37cca9", "View all")} + {translate( + 'auto.components.right.sidebar.SourceControl.48db37cca9', + 'View all' + )} + } /> {!collapsedSections.has('branch') && - (sourceControlViewMode === "tree" + (sourceControlViewMode === 'tree' ? visibleBranchTreeRows.map((node) => { if (node.type === 'directory') { return ( @@ -4357,7 +4508,9 @@ function SourceControlInner(): React.JSX.Element { > - {translate("auto.components.right.sidebar.SourceControl.574d2f4413", "Clear Notes")} + + {translate('auto.components.right.sidebar.SourceControl.574d2f4413', 'Clear Notes')} + {pendingDiffCommentsClearDescription} @@ -4369,7 +4522,8 @@ function SourceControlInner(): React.JSX.Element { onClick={() => setPendingDiffCommentsClear(null)} disabled={isClearingDiffComments} > - {translate("auto.components.right.sidebar.SourceControl.05bb8f4a48", "Cancel")} + {translate('auto.components.right.sidebar.SourceControl.05bb8f4a48', 'Cancel')} + + {translate('auto.components.right.sidebar.SourceControl.574d2f4413', 'Clear Notes')} + @@ -4391,9 +4546,18 @@ function SourceControlInner(): React.JSX.Element { - {translate("auto.components.right.sidebar.SourceControl.476b77745b", "Change Base Ref")} + + {translate( + 'auto.components.right.sidebar.SourceControl.476b77745b', + 'Change Base Ref' + )} + - {translate("auto.components.right.sidebar.SourceControl.c9ad22888e", "Pick the branch compare target for this repository.")} + {translate( + 'auto.components.right.sidebar.SourceControl.c9ad22888e', + 'Pick the branch compare target for this repository.' + )} + toast.success(translate("auto.components.right.sidebar.SourceControl.e48caaf0dd", "Started an AI agent for the conflicts."))} + onLaunched={() => + toast.success( + translate( + 'auto.components.right.sidebar.SourceControl.e48caaf0dd', + 'Started an AI agent for the conflicts.' + ) + ) + } />
{aiGenerationEnabled ? ( generating ? ( @@ -4577,11 +4769,23 @@ function PullRequestComposer({ type="button" onClick={() => onCancelGenerate()} className="inline-flex h-6 shrink-0 items-center gap-1 rounded-md border border-border bg-background px-2 text-[11px] text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive" - title={translate("auto.components.right.sidebar.SourceControl.527e130b6f", "Stop generating")} - aria-label={translate("auto.components.right.sidebar.SourceControl.527e130b6f", "Stop generating {{value0}} details", { value0: copy.reviewLabel })} + title={translate( + 'auto.components.right.sidebar.SourceControl.527e130b6f', + 'Stop generating' + )} + aria-label={translate( + 'auto.components.right.sidebar.SourceControl.527e130b6f', + 'Stop generating {{value0}} details', + { value0: copy.reviewLabel } + )} > - {translate("auto.components.right.sidebar.SourceControl.e868cec4e1", "Generating…")} + + {translate( + 'auto.components.right.sidebar.SourceControl.e868cec4e1', + 'Generating…' + )} + ) : ( @@ -4590,11 +4794,23 @@ function PullRequestComposer({ disabled={generateDisabled} onClick={() => onGenerate()} className="inline-flex h-6 shrink-0 items-center gap-1 rounded-md border border-border bg-background px-2 text-[11px] font-medium text-foreground transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-background" - title={generateDisabledReason ?? translate("auto.components.right.sidebar.SourceControl.02d8c04339", "Generate {{value0}} details with AI", { value0: copy.reviewLabel })} - aria-label={translate("auto.components.right.sidebar.SourceControl.02d8c04339", "Generate {{value0}} details with AI", { value0: copy.reviewLabel })} + title={ + generateDisabledReason ?? + translate( + 'auto.components.right.sidebar.SourceControl.02d8c04339', + 'Generate {{value0}} details with AI', + { value0: copy.reviewLabel } + ) + } + aria-label={translate( + 'auto.components.right.sidebar.SourceControl.02d8c04339', + 'Generate {{value0}} details with AI', + { value0: copy.reviewLabel } + )} > - {translate("auto.components.right.sidebar.SourceControl.02d8c04339", "Generate")} + {translate('auto.components.right.sidebar.SourceControl.02d8c04339', 'Generate')} + ) ) : null}
@@ -4611,29 +4827,47 @@ function PullRequestComposer({ 'truncate font-mono', baseSameAsBranch ? 'text-destructive' : 'text-foreground' )} - title={normalizedBase || translate("auto.components.right.sidebar.SourceControl.7a09d7f9d2", "base")} + title={ + normalizedBase || + translate('auto.components.right.sidebar.SourceControl.7a09d7f9d2', 'base') + } > - {normalizedBase || translate("auto.components.right.sidebar.SourceControl.7a09d7f9d2", "base")} + {normalizedBase || + translate('auto.components.right.sidebar.SourceControl.7a09d7f9d2', 'base')}
setTitle(event.target.value)} - placeholder={translate("auto.components.right.sidebar.SourceControl.7d6a8f0082", "Title")} + placeholder={translate( + 'auto.components.right.sidebar.SourceControl.7d6a8f0082', + 'Title' + )} className="h-8 w-full min-w-0 rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground outline-none placeholder:text-muted-foreground/70 focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60" />