From a10db0bc6c47dfda8746107edfe10ed5c4d5b4df Mon Sep 17 00:00:00 2001 From: Ammar Date: Thu, 23 Oct 2025 11:10:09 -0500 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20Re-apply=20PR=20#382:=20Move?= =?UTF-8?q?=20Files=20Changed=20to=20top=20and=20remove=20stickiness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The original PR #382 was accidentally lost during the Tailwind v4 migration (commit 7e7d5c71b79). This commit re-applies those changes to the current Tailwind-based codebase. Changes: - Search bar moved outside scrollable area (always visible at top) - Created single scrollable container for file tree + hunks - File tree now at top in all viewports (not side-by-side) - File tree no longer sticky - scrolls away naturally with content Layout: - Search bar: Fixed at top - ScrollableContent: Single overflow-y-auto container - FileTree: First child, sizes to content (flex-[0_0_auto]) - Hunks: Below file tree, sizes to content Fixes: File tree remaining visible when scrolling through hunks --- .../RightSidebar/CodeReview/ReviewPanel.tsx | 147 +++++++++--------- 1 file changed, 75 insertions(+), 72 deletions(-) diff --git a/src/components/RightSidebar/CodeReview/ReviewPanel.tsx b/src/components/RightSidebar/CodeReview/ReviewPanel.tsx index 78203cd30..2b1357130 100644 --- a/src/components/RightSidebar/CodeReview/ReviewPanel.tsx +++ b/src/components/RightSidebar/CodeReview/ReviewPanel.tsx @@ -555,68 +555,85 @@ export const ReviewPanel: React.FC = ({ Loading diff... ) : ( -
-
- {truncationWarning && ( -
- {truncationWarning} -
- )} +
+ {truncationWarning && ( +
+ {truncationWarning} +
+ )} + + {/* Search bar - always visible at top, not sticky */} +
+
+ setSearchState({ ...searchState, input: e.target.value })} + className="text-foreground placeholder:text-dim focus:bg-separator flex h-full flex-1 items-center border-none bg-transparent px-2.5 py-1.5 font-sans text-xs leading-[1.4] outline-none" + /> + + + + {searchState.useRegex ? "Using regex search" : "Using substring search"} + + + + + + {searchState.matchCase + ? "Match case (case-sensitive)" + : "Ignore case (case-insensitive)"} + + +
+
-
-
- setSearchState({ ...searchState, input: e.target.value })} - className="text-foreground placeholder:text-dim focus:bg-separator flex h-full flex-1 items-center border-none bg-transparent px-2.5 py-1.5 font-sans text-xs leading-[1.4] outline-none" + {/* Single scrollable area containing both file tree and hunks */} +
+ {/* FileTree at the top */} + {(fileTree ?? isLoadingTree) && ( +
+ - - - - {searchState.useRegex ? "Using regex search" : "Using substring search"} - - - - - - {searchState.matchCase - ? "Match case (case-sensitive)" - : "Ignore case (case-insensitive)"} - -
-
+ )} -
+ {/* Hunks below the file tree */} +
{hunks.length === 0 ? (
No changes found
@@ -691,20 +708,6 @@ export const ReviewPanel: React.FC = ({ )}
- - {/* FileTree positioning handled by CSS order property */} - {(fileTree ?? isLoadingTree) && ( -
- -
- )}
)}
From 5eef966d8a0bce42dead23b320c30bccce697768 Mon Sep 17 00:00:00 2001 From: Ammar Date: Thu, 23 Oct 2025 11:11:43 -0500 Subject: [PATCH 2/2] docs: Clarify PR reuse policy to prevent unnecessary closures Added explicit instruction to never close PRs without user direction. Agents should always force-push to existing branches instead. --- docs/AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/AGENTS.md b/docs/AGENTS.md index aff8e8e22..a2b084c1d 100644 --- a/docs/AGENTS.md +++ b/docs/AGENTS.md @@ -24,7 +24,7 @@ This ensures transparency about AI-generated contributions. ## PR Management -**Prefer to reuse existing PRs** by force-pushing to the same branch, even if the branch name becomes irrelevant. Avoid closing and recreating PRs unnecessarily - PR spam clutters the repository history. +**Prefer to reuse existing PRs** by force-pushing to the same branch, even if the branch name becomes irrelevant. Avoid closing and recreating PRs unnecessarily - PR spam clutters the repository history. **Never close PRs without explicit user instruction.** Always force-push to the existing branch instead of creating new PRs. After submitting or updating PRs, **always check merge status**: