mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-07 16:35:48 +01:00
Address workspace diff Greptile feedback
This commit is contained in:
1 parent
3e451ff694
commit
3d13029336
2 files changed
+7
-8
No files matched your search
@@ -576,10 +576,6 @@ export function ChangesTab({ context }: PluginDetailTabProps) {
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
fileSidebarWidthRef.current = fileSidebarWidth;
|
||||
}, [fileSidebarWidth]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!fileSidebarResizing || typeof document === "undefined") return;
|
||||
|
||||
@@ -644,7 +640,7 @@ export function ChangesTab({ context }: PluginDetailTabProps) {
|
||||
<button
|
||||
key="working-tree"
|
||||
type="button"
|
||||
className={buttonClass(view === "working-tree")}
|
||||
className={buttonClass(effectiveView === "working-tree")}
|
||||
onClick={() => {
|
||||
viewTouchedRef.current = true;
|
||||
setView("working-tree");
|
||||
@@ -655,7 +651,7 @@ export function ChangesTab({ context }: PluginDetailTabProps) {
|
||||
<button
|
||||
key="head"
|
||||
type="button"
|
||||
className={buttonClass(view === "head")}
|
||||
className={buttonClass(effectiveView === "head")}
|
||||
onClick={() => {
|
||||
viewTouchedRef.current = true;
|
||||
setView("head");
|
||||
|
||||
@@ -681,8 +681,11 @@ async function resolveInferredDefaultBaseRef(cwd: string) {
|
||||
const upstream = await resolveGitUpstreamRef(cwd);
|
||||
if (upstream) return upstream;
|
||||
|
||||
for (const candidate of ["origin/master", "origin/main", "master", "main"]) {
|
||||
const resolved = await resolveVerifiedGitRef(cwd, candidate);
|
||||
const candidates = ["origin/master", "origin/main", "master", "main"];
|
||||
const resolvedCandidates = await Promise.all(
|
||||
candidates.map((candidate) => resolveVerifiedGitRef(cwd, candidate)),
|
||||
);
|
||||
for (const resolved of resolvedCandidates) {
|
||||
if (resolved) return resolved;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user