fix(web): polish interface spacing (#5252)
This commit is contained in:
1 parent
69dfb7f09a
commit
30c9622806
8 files changed
+16
-11
No files matched your search
@@ -304,7 +304,7 @@ export const BranchToolbar = memo(function BranchToolbar({
|
||||
if (!hasActiveThread || !activeProject) return null;
|
||||
|
||||
return (
|
||||
<div className="chat-composer-context-strip -mt-4 mx-auto flex w-[calc(100%-2.75rem)] max-w-[calc(48rem-2.75rem)] items-center gap-2 px-1 pt-5 pb-1">
|
||||
<div className="chat-composer-context-strip -mt-4 mx-auto flex w-[calc(100%-2.75rem)] max-w-[calc(48rem-2.75rem)] items-center gap-2 ps-1 pe-2 pt-5 pb-1">
|
||||
{isMobile ? (
|
||||
<MobileRunContextSelector
|
||||
envLocked={envLocked}
|
||||
|
||||
@@ -5643,7 +5643,7 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
/>
|
||||
);
|
||||
const panelLayoutControls = (
|
||||
<div className="workspace-titlebar-controls z-50 gap-1 [-webkit-app-region:no-drag]">
|
||||
<div className="workspace-titlebar-controls z-50 mr-px gap-1 [-webkit-app-region:no-drag]">
|
||||
{rightPanelOpen && !shouldUsePlanSidebarSheet ? (
|
||||
<RightPanelMaximizeControl
|
||||
maximized={rightPanelMaximized}
|
||||
|
||||
@@ -1693,7 +1693,7 @@ export default function GitActionsControl({
|
||||
render={
|
||||
<Button
|
||||
aria-disabled="true"
|
||||
className="cursor-not-allowed rounded-e-none border-e-0 opacity-64 before:rounded-e-none"
|
||||
className="cursor-not-allowed rounded-e-none border-e-0 ps-[8.5px] opacity-64 before:rounded-e-none"
|
||||
size="xs"
|
||||
variant="outline"
|
||||
/>
|
||||
@@ -1715,6 +1715,7 @@ export default function GitActionsControl({
|
||||
<Button
|
||||
variant="outline"
|
||||
size="xs"
|
||||
className="ps-[8.5px]"
|
||||
disabled={isGitActionRunning || quickAction.disabled}
|
||||
onClick={runQuickAction}
|
||||
>
|
||||
|
||||
@@ -2674,7 +2674,7 @@ export default function SidebarV2() {
|
||||
render={
|
||||
<SidebarMenuButton
|
||||
aria-label="Filter threads by project"
|
||||
className="min-w-0 flex-1 focus-visible:ring-offset-2 focus-visible:ring-offset-sidebar"
|
||||
className="min-w-0 flex-1 ps-[calc(var(--sidebar-row-content-inset)-1px)] focus-visible:ring-offset-2 focus-visible:ring-offset-sidebar"
|
||||
/>
|
||||
}
|
||||
>
|
||||
@@ -2765,7 +2765,7 @@ export default function SidebarV2() {
|
||||
</SidebarGroup>
|
||||
}
|
||||
>
|
||||
<SidebarGroup className="px-[var(--sidebar-content-inset)] pb-1 pt-0">
|
||||
<SidebarGroup className="ps-[calc(var(--sidebar-content-inset)+1px)] pe-[var(--sidebar-content-inset)] pb-1 pt-0">
|
||||
{isSearchingThreads ? (
|
||||
threadSearchResults.length > 0 ? (
|
||||
<TooltipProvider
|
||||
|
||||
@@ -3104,7 +3104,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
|
||||
|
||||
{/* Bottom toolbar */}
|
||||
{isComposerCollapsedMobile ? null : activePendingApproval ? (
|
||||
<div className="flex items-center justify-end gap-2 px-2.5 pb-2.5 sm:px-3 sm:pb-3">
|
||||
<div className="flex items-center justify-end gap-2 px-3 pb-3 sm:px-4 sm:pb-4">
|
||||
<ComposerPendingApprovalActions
|
||||
requestId={activePendingApproval.requestId}
|
||||
isResponding={respondingRequestIds.includes(activePendingApproval.requestId)}
|
||||
@@ -3116,7 +3116,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
|
||||
data-chat-composer-footer="true"
|
||||
data-chat-composer-footer-compact={isComposerFooterCompact ? "true" : "false"}
|
||||
className={cn(
|
||||
"flex min-w-0 flex-nowrap items-center justify-between gap-2 overflow-visible px-2.5 pb-2.5 sm:px-3 sm:pb-3",
|
||||
"flex min-w-0 flex-nowrap items-center justify-between gap-2 overflow-visible px-3 pb-3 sm:px-4 sm:pb-4",
|
||||
pendingUserInputs.length > 0 && "pt-2",
|
||||
isComposerFooterCompact ? "gap-1.5" : "gap-2 sm:gap-0",
|
||||
showMobilePendingAnswerActions && "hidden sm:flex",
|
||||
@@ -3145,6 +3145,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
|
||||
instanceEntries={providerInstanceEntries}
|
||||
keybindings={keybindings}
|
||||
modelOptionsByInstance={modelOptionsByInstance}
|
||||
triggerClassName="-ms-px ps-0"
|
||||
terminalOpen={terminalOpen}
|
||||
open={isComposerModelPickerOpen}
|
||||
{...(composerProviderState.modelPickerIconClassName
|
||||
|
||||
@@ -21,7 +21,7 @@ export function ContextWindowMeter(props: {
|
||||
const normalizedPercentage = Math.max(0, Math.min(100, usage.usedPercentage ?? 0));
|
||||
const radius = 9.75;
|
||||
const circumference = 2 * Math.PI * radius;
|
||||
const dashOffset = circumference - (normalizedPercentage / 100) * circumference;
|
||||
const dashOffset = circumference * (1 - normalizedPercentage / 100);
|
||||
const totalProcessedTokens = usage.totalProcessedTokens ?? null;
|
||||
const showTotalProcessed = totalProcessedTokens !== null && totalProcessedTokens > 0;
|
||||
const isOverloaded = normalizedPercentage > 90;
|
||||
@@ -73,7 +73,7 @@ export function ContextWindowMeter(props: {
|
||||
strokeLinecap="round"
|
||||
strokeDasharray={circumference}
|
||||
strokeDashoffset={dashOffset}
|
||||
className="transition-[stroke-dashoffset] duration-500 ease-out motion-reduce:transition-none"
|
||||
className="transition-[stroke-dashoffset,stroke] duration-500 ease-out motion-reduce:transition-none"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
@@ -84,9 +84,10 @@ export function ContextWindowMeter(props: {
|
||||
tooltipStyle
|
||||
side="top"
|
||||
align="end"
|
||||
className="dropdown-glass w-64 max-w-none border-0! bg-secondary! p-0 shadow-none! before:hidden"
|
||||
viewportClassName="p-0"
|
||||
className="w-64 max-w-none text-left whitespace-normal"
|
||||
>
|
||||
<div className="flex flex-col gap-2 p-3">
|
||||
<div className="flex flex-col gap-2 p-[var(--floating-content-inset)]">
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<div className="font-medium text-muted-foreground text-xs">Context Window</div>
|
||||
{usage.maxTokens !== null && usedPercentage ? (
|
||||
|
||||
@@ -260,6 +260,7 @@ export const OpenInPicker = memo(function OpenInPicker({
|
||||
<Group aria-label="Open in editor">
|
||||
<Button
|
||||
aria-label={compact ? "Open file in preferred editor" : undefined}
|
||||
className="ps-[8.5px]"
|
||||
size="xs"
|
||||
variant="outline"
|
||||
disabled={!preferredEditor || !openInCwd}
|
||||
|
||||
@@ -248,6 +248,7 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {
|
||||
</p>
|
||||
) : null}
|
||||
<SidebarMenu
|
||||
className="ps-px"
|
||||
id={isSearching && hasResults ? "settings-search-results" : undefined}
|
||||
role={isSearching && hasResults ? "listbox" : undefined}
|
||||
aria-label={isSearching && hasResults ? "Settings search results" : undefined}
|
||||
|
||||
Reference in new issue
Block a user