feat(ui): polish chat and git workflows with mobile UX and reliability fixes (#569)

* feat: add chat option for user message rendering mode

* feat: add chat option to toggle sticky user header

* feat(ui): overhaul context panel with reusable tabs and embedded session chat

Enable parallel context workflows with persistent tabbed views and isolated session chat while reducing resize and background runtime overhead.

* feat: polish context panel and git sidebar tabs

Refined context panel tab behavior and visuals for smoother switching and resizing
Reused the new tabs component in right sidebar and git sidebar with fit layout
Improved git section spacing, selection controls, and bulk revert confirmation flow

* feat: open diff files in editor at changed lines

Add edit actions in diff views to open files at the first changed line
Support per-file open-in-editor from All Files headers and icon-only action in single-file view
Improve file jump UX with load-aware navigation and reduced visual blink during line targeting

* fix: stabilize pill tabs and prevent git commit pathspec failures

Unified sortable tab variants to match animated styling behavior with responsive spacing and cleaner sidebar chrome
Fixed active tab pill measurement so size/position recalculates correctly when dropdowns reopen
Commit API now filters stale file paths before staging to avoid pathspec errors on deleted files

* fix: align user message action row spacing and hover behavior

* fix: persist user message view preferences in settings

Save plain-text and sticky-header toggles to settings.json when changed
Restore both chat display preferences from settings.json on startup
Validate and accept both preference fields in the settings API

* fix: improve git and sidebar tab layout on mobile

* fix: refine mobile user message action row spacing

Show mobile user-message actions in a consistent external row for sticky and non-sticky modes
Tune button row height and vertical position to match both mobile variants
Reduce sticky-header gradient tail and tighten assistant gap after user messages

* fix: improve chat action hover zones and mobile top shadow logic

Expand desktop trigger area so user action buttons reveal across the full row
Add sticky-header phantom hover row so inline actions appear from the whole button lane
Hide chat top scroll shadow on mobile only when sticky user headers are enabled

* fix: remove commit message input scrollbar flicker

Added optional scrollbar class support to shared textarea wrapper.
Disabled overlay scrollbar for Git commit message input.
Kept auto-resize behavior while preventing one-line empty-state micro-scroll.

* feat: make model provider groups collapsible in selector

Add collapsible provider headers in the chat model dropdown
Persist expanded/collapsed provider state across sessions
Refine provider header UX with inline chevrons and no hover highlight

* feat: arrange chat settings into a compact two-column layout

Places User Message Rendering next to Mermaid Rendering.
Places Diff Layout next to Diff View Mode.
Reduces right-column spacing to better match other settings sections.

* fix: show worktree branch edit controls in draft sessions

Detect worktree mode from current directory when session metadata is not yet bound
Enable immediate branch rename UI in Git sidebar without session switching

* feat: add beta badge to side panel menu action
This commit is contained in:
Bohdan Triapitsyn
2026-03-02 02:11:33 +02:00
committed by GitHub
parent 73e533a315
commit b4cd16f55b
45 changed files with 3551 additions and 975 deletions
@@ -198,13 +198,13 @@ export const BranchIntegrationSection: React.FC<BranchIntegrationSectionProps> =
{operationCompleted ? (
mode === 'dialog' ? (
<DialogFooter>
<Button variant="default" size="sm" onClick={handleClose}>
<Button variant="default" size="sm" className="h-7 px-2 py-0" onClick={handleClose}>
{hasError ? 'Close' : 'Done'}
</Button>
</DialogFooter>
) : (
<div className="flex justify-end">
<Button variant="default" size="sm" onClick={handleClose}>
<Button variant="default" size="sm" className="h-7 px-2 py-0" onClick={handleClose}>
{hasError ? 'Close' : 'Done'}
</Button>
</div>
@@ -214,7 +214,7 @@ export const BranchIntegrationSection: React.FC<BranchIntegrationSectionProps> =
);
const renderForm = () => (
<>
<div className="space-y-4">
{/* Operation Selection */}
<div className="space-y-3">
<p className="typography-meta text-muted-foreground">Operation</p>
@@ -291,15 +291,18 @@ export const BranchIntegrationSection: React.FC<BranchIntegrationSectionProps> =
<RiArrowDownSLine className="size-4 opacity-60 shrink-0" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="start" className="w-[--radix-dropdown-menu-trigger-width] p-0 max-h-[300px]">
<Command>
<DropdownMenuContent
align="start"
className="w-[--radix-dropdown-menu-trigger-width] p-0 max-h-(--radix-dropdown-menu-content-available-height) flex flex-col overflow-hidden"
>
<Command className="h-full min-h-0">
<CommandInput
ref={searchInputRef}
placeholder="Search branches..."
value={branchSearch}
onValueChange={setBranchSearch}
/>
<CommandList>
<CommandList className="h-full min-h-0" disableHorizontal>
<CommandEmpty>No branches found.</CommandEmpty>
{filteredLocal.length > 0 && (
@@ -349,8 +352,8 @@ export const BranchIntegrationSection: React.FC<BranchIntegrationSectionProps> =
) : null}
{mode === 'dialog' ? (
<DialogFooter className="gap-2">
<Button variant="ghost" size="sm" onClick={handleCancel}>
<DialogFooter className="gap-2 pt-1">
<Button variant="ghost" size="sm" className="h-7 px-2 py-0" onClick={handleCancel}>
Cancel
</Button>
<Button
@@ -358,7 +361,7 @@ export const BranchIntegrationSection: React.FC<BranchIntegrationSectionProps> =
size="sm"
onClick={handleConfirm}
disabled={!selectedBranch}
className="gap-1.5"
className="h-7 px-2 py-0 gap-1.5"
>
{operation === 'merge' ? (
<>
@@ -374,33 +377,35 @@ export const BranchIntegrationSection: React.FC<BranchIntegrationSectionProps> =
</Button>
</DialogFooter>
) : (
<div className="flex items-center gap-2">
<Button variant="ghost" size="sm" onClick={handleCancel} disabled={isDisabled}>
<div className="flex items-center gap-2 pt-1">
<Button variant="ghost" size="sm" className="h-7 px-2 py-0" onClick={handleCancel} disabled={isDisabled}>
Reset
</Button>
<div className="flex-1" />
<Button variant="default" size="sm" onClick={handleConfirm} disabled={isDisabled || !selectedBranch}>
<Button variant="default" size="sm" className="h-7 px-2 py-0" onClick={handleConfirm} disabled={isDisabled || !selectedBranch}>
{operation === 'merge' ? 'Merge' : 'Rebase'}
</Button>
</div>
)}
</>
</div>
);
const body = isOperating ? renderOperating() : renderForm();
if (mode === 'inline') {
return (
<div className="space-y-4">
<div className="space-y-1">
<div className="typography-ui-header font-semibold text-foreground">Update branch</div>
<div className="typography-micro text-muted-foreground">
Bring changes from another branch into{' '}
<span className="font-mono text-foreground">{targetBranchLabel}</span>.
<section className="border-0 bg-transparent rounded-none">
<header className="border-b border-border/40 px-0 py-3">
<div className="space-y-1">
<div className="typography-ui-header font-semibold text-foreground">Update branch</div>
<div className="typography-micro text-muted-foreground">
Bring changes from another branch into{' '}
<span className="font-mono text-foreground">{targetBranchLabel}</span>.
</div>
</div>
</div>
{body}
</div>
</header>
<div className="pt-3">{body}</div>
</section>
);
}
@@ -411,7 +416,7 @@ export const BranchIntegrationSection: React.FC<BranchIntegrationSectionProps> =
<Button
variant="outline"
size="sm"
className="h-8 px-2 gap-1.5"
className="h-7 px-2 py-0 gap-1.5"
onClick={handleOpenDialog}
disabled={isDisabled}
>
@@ -49,6 +49,7 @@ interface ChangeRowProps {
onRevert: () => void;
isReverting: boolean;
stats?: { insertions: number; deletions: number };
rowPaddingClassName?: string;
}
export const ChangeRow = React.memo<ChangeRowProps>(function ChangeRow({
@@ -59,6 +60,7 @@ export const ChangeRow = React.memo<ChangeRowProps>(function ChangeRow({
onRevert,
isReverting,
stats,
rowPaddingClassName,
}) {
const descriptor = useMemo(() => describeChange(file), [file]);
const indicatorLabel = descriptor.description;
@@ -98,7 +100,7 @@ export const ChangeRow = React.memo<ChangeRowProps>(function ChangeRow({
return (
<div
className="group flex items-center gap-2 px-3 py-1.5 hover:bg-sidebar/40 cursor-pointer"
className={`group flex items-center gap-2 py-1.5 hover:bg-sidebar/40 cursor-pointer ${rowPaddingClassName ?? 'px-3'}`}
role="button"
tabIndex={0}
onClick={onViewDiff}
@@ -1,6 +1,15 @@
import React from 'react';
import { useVirtualizer } from '@tanstack/react-virtual';
import { RiCheckboxBlankLine, RiCheckboxLine } from '@remixicon/react';
import { Button } from '@/components/ui/button';
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
import { ScrollShadow } from '@/components/ui/ScrollShadow';
import { OverlayScrollbar } from '@/components/ui/OverlayScrollbar';
import { ChangeRow } from './ChangeRow';
@@ -15,8 +24,10 @@ interface ChangesSectionProps {
onToggleFile: (path: string) => void;
onSelectAll: () => void;
onClearSelection: () => void;
onRevertAll?: (paths: string[]) => Promise<void> | void;
onViewDiff: (path: string) => void;
onRevertFile: (path: string) => void;
isRevertingAll?: boolean;
variant?: 'framed' | 'plain';
maxListHeightClassName?: string;
onVisiblePathsChange?: (paths: string[]) => void;
@@ -33,8 +44,10 @@ export const ChangesSection: React.FC<ChangesSectionProps> = ({
onToggleFile,
onSelectAll,
onClearSelection,
onRevertAll,
onViewDiff,
onRevertFile,
isRevertingAll = false,
variant = 'framed',
maxListHeightClassName,
onVisiblePathsChange,
@@ -42,7 +55,11 @@ export const ChangesSection: React.FC<ChangesSectionProps> = ({
const scrollRef = React.useRef<HTMLDivElement | null>(null);
const selectedCount = selectedPaths.size;
const totalCount = changeEntries.length;
const [confirmRevertAllOpen, setConfirmRevertAllOpen] = React.useState(false);
const shouldVirtualize = totalCount >= CHANGE_LIST_VIRTUALIZE_THRESHOLD;
const hasAnySelected = selectedCount > 0;
const areAllSelected = totalCount > 0 && selectedCount === totalCount;
const isPartiallySelected = hasAnySelected && !areAllSelected;
const rowVirtualizer = useVirtualizer({
count: totalCount,
@@ -82,66 +99,115 @@ export const ChangesSection: React.FC<ChangesSectionProps> = ({
const headerClassName =
variant === 'framed'
? 'flex items-center justify-between gap-2 px-3 py-2 border-b border-border/40'
: 'flex items-center justify-between gap-2 px-4 py-3 border-b border-border/40';
: 'flex items-center justify-between gap-2 px-0 py-3 border-b border-border/40';
const scrollOuterClassName =
variant === 'framed'
? 'flex-1 min-h-0 max-h-[30vh]'
: `flex-1 min-h-0 ${maxListHeightClassName ?? ''}`.trim();
: `flex-1 min-h-0 pr-0 ${maxListHeightClassName ?? ''}`.trim();
const rowPaddingClassName = variant === 'plain' ? 'pl-0 pr-2' : 'px-3';
const handleConfirmRevertAll = React.useCallback(async () => {
if (!onRevertAll || isRevertingAll || changeEntries.length === 0) {
return;
}
await onRevertAll(changeEntries.map((entry) => entry.path));
setConfirmRevertAllOpen(false);
}, [changeEntries, isRevertingAll, onRevertAll]);
return (
<section className={containerClassName}>
<header className={headerClassName}>
<h3 className="typography-ui-header font-semibold text-foreground">Changes</h3>
<div className="flex items-center gap-2">
<span className="typography-meta text-muted-foreground">
{selectedCount}/{totalCount}
</span>
{totalCount > 0 && (
<>
<>
<section className={containerClassName}>
<header className={headerClassName}>
<div className="flex min-w-0 items-center gap-2">
<h3 className="typography-ui-header font-semibold text-foreground">Changes</h3>
{totalCount > 0 ? (
<button
type="button"
onClick={areAllSelected ? onClearSelection : onSelectAll}
disabled={isRevertingAll}
aria-checked={isPartiallySelected ? 'mixed' : hasAnySelected}
aria-label={areAllSelected ? 'Clear file selection' : 'Select all files'}
className={cn(
'inline-flex h-6 items-center gap-1 rounded px-1.5 text-muted-foreground',
'hover:bg-interactive-hover/55 hover:text-foreground',
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary',
isRevertingAll && 'cursor-not-allowed opacity-50'
)}
>
{hasAnySelected ? (
<RiCheckboxLine className={cn('size-4', isPartiallySelected ? 'text-primary/50' : 'text-primary')} />
) : (
<RiCheckboxBlankLine className="size-4" />
)}
<span className="typography-meta text-muted-foreground">{selectedCount}/{totalCount}</span>
</button>
) : null}
</div>
<div className={cn('flex items-center gap-2', variant === 'plain' && 'pr-1')}>
{totalCount > 0 && onRevertAll ? (
<Button
variant="ghost"
size="sm"
className="h-6 px-2 text-xs"
onClick={onSelectAll}
className="h-6 px-2 text-xs text-[var(--status-error)] hover:text-[var(--status-error)]"
onClick={() => setConfirmRevertAllOpen(true)}
disabled={isRevertingAll}
>
All
Revert all
</Button>
<Button
variant="ghost"
size="sm"
className="h-6 px-2 text-xs"
onClick={onClearSelection}
disabled={selectedCount === 0}
) : null}
</div>
</header>
<div className={cn('relative flex flex-col min-h-0 w-full overflow-hidden', scrollOuterClassName)}>
<ScrollShadow
ref={scrollRef}
className="overlay-scrollbar-target overlay-scrollbar-container flex-1 min-h-0 w-full overflow-y-auto overflow-x-hidden"
>
{shouldVirtualize ? (
<div
className="relative w-full"
style={{ height: `${rowVirtualizer.getTotalSize()}px` }}
>
None
</Button>
</>
)}
</div>
</header>
<div className={cn('relative flex flex-col min-h-0 w-full overflow-hidden', scrollOuterClassName)}>
<ScrollShadow
ref={scrollRef}
className="overlay-scrollbar-target overlay-scrollbar-container flex-1 min-h-0 w-full overflow-y-auto overflow-x-hidden"
>
{shouldVirtualize ? (
<div
className="relative w-full divide-y divide-border/60"
style={{ height: `${rowVirtualizer.getTotalSize()}px` }}
>
{virtualRows.map((row) => {
const file = changeEntries[row.index];
if (!file) {
return null;
}
{virtualRows.map((row) => {
const file = changeEntries[row.index];
if (!file) {
return null;
}
return (
return (
<div
key={file.path}
ref={rowVirtualizer.measureElement}
data-index={row.index}
className={cn(
'absolute left-0 top-0 w-full',
row.index > 0 && 'before:pointer-events-none before:absolute before:left-0 before:right-2 before:top-0 before:border-t before:border-border/60'
)}
style={{ transform: `translateY(${row.start}px)` }}
>
<ChangeRow
file={file}
checked={selectedPaths.has(file.path)}
stats={diffStats?.[file.path]}
onToggle={() => onToggleFile(file.path)}
onViewDiff={() => onViewDiff(file.path)}
onRevert={() => onRevertFile(file.path)}
isReverting={revertingPaths.has(file.path) || isRevertingAll}
rowPaddingClassName={rowPaddingClassName}
/>
</div>
);
})}
</div>
) : (
<div role="list" aria-label="Changed files">
{changeEntries.map((file, index) => (
<div
key={file.path}
ref={rowVirtualizer.measureElement}
data-index={row.index}
className="absolute left-0 top-0 w-full"
style={{ transform: `translateY(${row.start}px)` }}
className={cn(
'relative',
index > 0 && 'before:pointer-events-none before:absolute before:left-0 before:right-2 before:top-0 before:border-t before:border-border/60'
)}
>
<ChangeRow
file={file}
@@ -150,31 +216,36 @@ export const ChangesSection: React.FC<ChangesSectionProps> = ({
onToggle={() => onToggleFile(file.path)}
onViewDiff={() => onViewDiff(file.path)}
onRevert={() => onRevertFile(file.path)}
isReverting={revertingPaths.has(file.path)}
isReverting={revertingPaths.has(file.path) || isRevertingAll}
rowPaddingClassName={rowPaddingClassName}
/>
</div>
);
})}
</div>
) : (
<div className="divide-y divide-border/60" role="list" aria-label="Changed files">
{changeEntries.map((file) => (
<ChangeRow
key={file.path}
file={file}
checked={selectedPaths.has(file.path)}
stats={diffStats?.[file.path]}
onToggle={() => onToggleFile(file.path)}
onViewDiff={() => onViewDiff(file.path)}
onRevert={() => onRevertFile(file.path)}
isReverting={revertingPaths.has(file.path)}
/>
))}
</div>
)}
</ScrollShadow>
<OverlayScrollbar containerRef={scrollRef} disableHorizontal />
</div>
</section>
))}
</div>
)}
</ScrollShadow>
<OverlayScrollbar containerRef={scrollRef} disableHorizontal />
</div>
</section>
<Dialog open={confirmRevertAllOpen} onOpenChange={(open) => { if (!isRevertingAll) setConfirmRevertAllOpen(open); }}>
<DialogContent className="max-w-md">
<DialogHeader>
<DialogTitle>Revert all changes?</DialogTitle>
<DialogDescription>
This will discard local changes for {totalCount} file{totalCount === 1 ? '' : 's'} in the list.
</DialogDescription>
</DialogHeader>
<DialogFooter>
<Button variant="outline" onClick={() => setConfirmRevertAllOpen(false)} disabled={isRevertingAll}>
Cancel
</Button>
<Button variant="destructive" onClick={() => void handleConfirmRevertAll()} disabled={isRevertingAll}>
{isRevertingAll ? 'Reverting...' : 'Revert all'}
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</>
);
};
@@ -22,15 +22,17 @@ export const CommitInput: React.FC<CommitInputProps> = ({
}) => {
const textareaRef = React.useRef<HTMLTextAreaElement>(null);
// Auto-resize based on content
React.useEffect(() => {
// Auto-resize based on content (layout phase to avoid mount flicker)
React.useLayoutEffect(() => {
const textarea = textareaRef.current;
if (!textarea) return;
// Reset height to measure scrollHeight accurately
textarea.style.height = `${MIN_HEIGHT}px`;
const newHeight = Math.min(Math.max(textarea.scrollHeight, MIN_HEIGHT), MAX_HEIGHT);
const contentHeight = textarea.scrollHeight;
const newHeight = Math.min(Math.max(contentHeight, MIN_HEIGHT), MAX_HEIGHT);
textarea.style.height = `${newHeight}px`;
textarea.style.overflowY = contentHeight > MAX_HEIGHT ? 'auto' : 'hidden';
}, [value]);
return (
@@ -44,8 +46,9 @@ export const CommitInput: React.FC<CommitInputProps> = ({
autoCorrect={hasTouchInput ? 'on' : 'off'}
autoCapitalize={hasTouchInput ? 'sentences' : 'off'}
spellCheck={hasTouchInput ? true : false}
scrollbarClassName="hidden"
className={cn(
'rounded-lg bg-transparent resize-none overflow-y-auto',
'rounded-lg bg-transparent resize-none overflow-y-hidden',
disabled && 'opacity-50'
)}
style={{ minHeight: MIN_HEIGHT, maxHeight: MAX_HEIGHT }}
@@ -64,11 +64,11 @@ export const CommitSection: React.FC<CommitSectionProps> = ({
const headerClassName =
variant === 'framed'
? 'flex w-full items-center justify-between px-3 py-2'
: 'flex w-full items-center justify-between px-4 py-3 border-b border-border/40';
: 'flex w-full items-center justify-between px-0 py-3 border-b border-border/40';
const contentClassName =
variant === 'framed'
? 'flex flex-col gap-3 p-3 pt-0'
: 'flex flex-col gap-3 px-4 py-3';
: 'flex flex-col gap-3 px-0 py-3';
return (
<Collapsible
@@ -168,14 +168,14 @@ export const CommitSection: React.FC<CommitSectionProps> = ({
{isMobile ? (
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="default"
size="sm"
onClick={() => onCommitAndPush()}
disabled={!canCommit || isGeneratingMessage}
className="h-7 w-7 p-0"
aria-label="Commit & Push"
>
<Button
variant="default"
size="sm"
onClick={() => onCommitAndPush()}
disabled={!canCommit || isGeneratingMessage}
className="h-7 w-7 p-0"
aria-label="Push"
>
{commitAction === 'commitAndPush' ? (
<RiLoader4Line className="size-4 animate-spin" />
) : (
@@ -184,7 +184,7 @@ export const CommitSection: React.FC<CommitSectionProps> = ({
</Button>
</TooltipTrigger>
<TooltipContent side="top">
<p>Commit & Push</p>
<p>Push</p>
</TooltipContent>
</Tooltip>
) : (
@@ -193,17 +193,17 @@ export const CommitSection: React.FC<CommitSectionProps> = ({
onClick={() => onCommitAndPush()}
disabled={!canCommit || isGeneratingMessage}
className="commit-actions__btn"
aria-label="Commit & Push"
aria-label="Push"
>
{commitAction === 'commitAndPush' ? (
<>
<RiLoader4Line className="size-4 animate-spin" />
<span className="commit-actions__label commit-actions__label--long">Pushing...</span>
<span className="commit-actions__label">Pushing...</span>
</>
) : (
<>
<RiArrowUpLine className="size-4" />
<span className="commit-actions__label commit-actions__label--long">Commit &amp; Push</span>
<span className="commit-actions__label">Push</span>
</>
)}
</ButtonLarge>
@@ -285,7 +285,7 @@ export const GitHeader: React.FC<GitHeaderProps> = ({
if (useTwoRowHeader) {
return (
<header className={`@container/git-header border-b border-border/40 px-3 py-2 ${isSidebarMode ? 'bg-transparent' : 'bg-background'}`}>
<header className={`@container/git-header px-3 py-2 ${isSidebarMode ? 'bg-transparent' : 'border-b border-border/40 bg-background'}`}>
<div className="flex items-center justify-between gap-2 min-w-0">
<div className="min-w-0 flex-1">
{isWorktreeMode ? (
@@ -320,7 +320,7 @@ export const GitHeader: React.FC<GitHeaderProps> = ({
}
return (
<header className={`@container/git-header flex items-center gap-2 border-b border-border/40 px-3 py-2 ${isSidebarMode ? 'bg-transparent' : 'bg-background'}`}>
<header className={`@container/git-header flex items-center gap-2 px-3 py-2 ${isSidebarMode ? 'bg-transparent' : 'border-b border-border/40 bg-background'}`}>
<div className="flex min-w-0 flex-1 items-center gap-2 overflow-hidden">
{isWorktreeMode ? (
<WorktreeBranchDisplay
@@ -377,7 +377,7 @@ Important:
<DropdownMenu open={branchDropdownOpen} onOpenChange={setBranchDropdownOpen}>
<DropdownMenuTrigger asChild>
<Button variant="outline" size="sm" className="gap-1.5">
<Button variant="outline" size="sm" className="h-7 px-2 py-0 gap-1.5">
Target
<span className="max-w-[160px] truncate font-mono text-xs text-muted-foreground">{targetBranch}</span>
<RiArrowDownSLine className="size-4 opacity-60" />
@@ -416,15 +416,15 @@ Important:
</DropdownMenu>
{ui.kind === 'ready' ? (
<Button size="sm" onClick={() => void handleMove()} disabled={!isEligible || ui.plan.commits.length === 0}>
<Button size="sm" className="h-7 px-2 py-0" onClick={() => void handleMove()} disabled={!isEligible || ui.plan.commits.length === 0}>
Move
</Button>
) : ui.kind === 'loading' ? (
<Button size="sm" variant="outline" disabled>
<Button size="sm" variant="outline" className="h-7 px-2 py-0" disabled>
Checking
</Button>
) : ui.kind === 'running' ? (
<Button size="sm" variant="outline" disabled>
<Button size="sm" variant="outline" className="h-7 px-2 py-0" disabled>
Moving
</Button>
) : null}
@@ -1483,7 +1483,7 @@ export const PullRequestSection: React.FC<{
<Button
variant="outline"
size="sm"
className="w-8 px-0"
className="h-7 w-7 px-0"
onClick={() => {
setIsEditingPr(false);
setEditTitle(pr.title || '');
@@ -1501,7 +1501,7 @@ export const PullRequestSection: React.FC<{
<TooltipTrigger asChild>
<Button
size="sm"
className="w-8 px-0"
className="h-7 w-7 px-0"
onClick={() => updatePr(pr)}
disabled={isUpdating || !editTitle.trim()}
aria-label="Save PR title and description"
@@ -1518,7 +1518,7 @@ export const PullRequestSection: React.FC<{
<Button
variant="outline"
size="sm"
className="w-8 px-0"
className="h-7 w-7 px-0"
onClick={() => setIsEditingPr(true)}
aria-label="Edit PR title and description"
>
@@ -1536,7 +1536,7 @@ export const PullRequestSection: React.FC<{
<Button
variant="outline"
size="sm"
className="w-8 px-0"
className="h-7 w-7 px-0"
onClick={openChecksDialog}
disabled={isLoadingCheckDetails}
aria-label="Open checks details"
@@ -1554,7 +1554,7 @@ export const PullRequestSection: React.FC<{
<Button
variant="outline"
size="sm"
className="w-8 px-0 border-[var(--status-success-border)] bg-[var(--status-success-background)] text-[var(--status-success)]"
className="h-7 w-7 px-0 border-[var(--status-success-border)] bg-[var(--status-success-background)] text-[var(--status-success)]"
onClick={sendFailedChecksToChat}
aria-label="Resolve failed checks with agent"
>
@@ -1570,7 +1570,7 @@ export const PullRequestSection: React.FC<{
<Button
variant="outline"
size="sm"
className="w-8 px-0"
className="h-7 w-7 px-0"
onClick={openCommentsDialog}
aria-label="Open PR comments"
>
@@ -1585,7 +1585,7 @@ export const PullRequestSection: React.FC<{
<Button
variant="outline"
size="sm"
className="w-8 px-0 border-[var(--status-success-border)] bg-[var(--status-success-background)] text-[var(--status-success)]"
className="h-7 w-7 px-0 border-[var(--status-success-border)] bg-[var(--status-success-background)] text-[var(--status-success)]"
onClick={sendCommentsToChat}
aria-label="Share comments with agent"
>
@@ -1601,7 +1601,7 @@ export const PullRequestSection: React.FC<{
<Button
variant="outline"
size="sm"
className="w-8 px-0"
className="h-7 w-7 px-0"
onClick={() => markReady(pr)}
disabled={isMarkingReady || isMerging || isUpdating || isEditingPr}
aria-label="Mark PR ready for review"
@@ -1622,7 +1622,7 @@ export const PullRequestSection: React.FC<{
onValueChange={(value) => setMergeMethod(value as MergeMethod)}
disabled={isMerging || pr.state !== 'open'}
>
<SelectTrigger size="lg" className="h-8 w-auto min-w-0">
<SelectTrigger size="lg" className="h-7 w-auto min-w-0">
<SelectValue />
</SelectTrigger>
<SelectContent>
@@ -1635,7 +1635,7 @@ export const PullRequestSection: React.FC<{
<TooltipTrigger asChild>
<Button
size="sm"
className="w-8 px-0"
className="h-7 w-7 px-0"
onClick={() => mergePr(pr)}
disabled={isMerging || isMarkingReady || pr.state !== 'open' || pr.draft || isUpdating || isEditingPr}
aria-label="Merge pull request"
@@ -1661,7 +1661,7 @@ export const PullRequestSection: React.FC<{
</div>
</div>
{repoUrl ? (
<Button variant="outline" size="sm" asChild>
<Button variant="outline" size="sm" className="h-7 px-2 py-0" asChild>
<a href={repoUrl} target="_blank" rel="noopener noreferrer">
<RiExternalLinkLine className="size-4" />
Repo
@@ -1831,6 +1831,7 @@ export const PullRequestSection: React.FC<{
<Button
variant="outline"
size="sm"
className="h-7 px-2 py-0"
onClick={generateDescription}
disabled={isGenerating || isCreating}
>
@@ -1840,7 +1841,7 @@ export const PullRequestSection: React.FC<{
<div className="flex-1" />
<Button
size="sm"
className="min-w-[7.5rem] justify-center gap-2"
className="h-7 min-w-[7.5rem] justify-center gap-2 px-2 py-0"
onClick={createPr}
disabled={isCreating || !isConnected || !targetBaseBranch.trim() || targetBaseBranch.trim() === branch}
>