Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix aipanel border and top-left conditional rounding
  • Loading branch information
sawka committed Mar 13, 2026
commit 8b80a20e60d3bdf943e09f471f6c7d94282540e8
15 changes: 12 additions & 3 deletions frontend/app/aipanel/aipanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,11 @@ const ConfigChangeModeFixer = memo(() => {

ConfigChangeModeFixer.displayName = "ConfigChangeModeFixer";

const AIPanelComponentInner = memo(() => {
type AIPanelComponentInnerProps = {
roundTopLeft: boolean;
};

const AIPanelComponentInner = memo(({ roundTopLeft }: AIPanelComponentInnerProps) => {
const [isDragOver, setIsDragOver] = useState(false);
const [isReactDndDragOver, setIsReactDndDragOver] = useState(false);
const [initialLoadDone, setInitialLoadDone] = useState(false);
Expand Down Expand Up @@ -554,6 +558,7 @@ const AIPanelComponentInner = memo(() => {
isFocused ? "border-2 border-accent" : "border-2 border-transparent"
)}
style={{
borderTopLeftRadius: roundTopLeft ? 10 : 0,
borderTopRightRadius: model.inBuilder ? 0 : 10,
borderBottomRightRadius: model.inBuilder ? 0 : 10,
borderBottomLeftRadius: 10,
Expand Down Expand Up @@ -607,10 +612,14 @@ const AIPanelComponentInner = memo(() => {

AIPanelComponentInner.displayName = "AIPanelInner";

const AIPanelComponent = () => {
type AIPanelComponentProps = {
roundTopLeft: boolean;
};

const AIPanelComponent = ({ roundTopLeft }: AIPanelComponentProps) => {
return (
<ErrorBoundary>
<AIPanelComponentInner />
<AIPanelComponentInner roundTopLeft={roundTopLeft} />
</ErrorBoundary>
);
};
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/workspace/workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ const WorkspaceElem = memo(() => {
order={1}
className="overflow-hidden"
>
<div ref={aiPanelWrapperRef} className="w-full h-full">
{tabId !== "" && <AIPanel />}
<div ref={aiPanelWrapperRef} className="w-full h-full pr-0.5">
{tabId !== "" && <AIPanel roundTopLeft={showLeftTabBar} />}
</div>
</Panel>
<PanelResizeHandle className="w-0.5 bg-transparent hover:bg-zinc-500/20 transition-colors" />
Expand Down
2 changes: 1 addition & 1 deletion frontend/builder/builder-workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const BuilderWorkspace = memo(() => {
<div className="flex-1 overflow-hidden">
<PanelGroup direction="horizontal" onLayout={handleHorizontalLayout}>
<Panel defaultSize={layout.chat} minSize={20}>
<AIPanel />
<AIPanel roundTopLeft={false} />
</Panel>
<PanelResizeHandle className="w-0.5 bg-transparent hover:bg-gray-500/20 transition-colors" />
<Panel defaultSize={100 - layout.chat} minSize={20}>
Expand Down