Skip to content

armgit / pibot

Public Imported from GitHub
0

Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.

fix(changes): the changes panel scrolls when the Git install card is tall

leen.zhouc83c57cf594f
diff --git a/packages/workspaces/src/ui/changes/ChangesPane.tsx b/packages/workspaces/src/ui/changes/ChangesPane.tsx
index 4fd4fc3..909d424 100644
--- a/packages/workspaces/src/ui/changes/ChangesPane.tsx
+++ b/packages/workspaces/src/ui/changes/ChangesPane.tsx
@@ -347,43 +347,47 @@ export function ChangesPane({
) : undefined
}
/>
- {model.reviews.historyOpen && model.reviews.history.length > 0 && (
- <section
- className={styles.reviewHistory}
- aria-label={model.t("agentReview.historicalFindings")}
- >
- <p>{model.t("agentReview.historyExplanation")}</p>
- {model.reviews.history.map((finding) => (
- <article key={finding.id}>
- <strong>
- {finding.path}
- {finding.line ? `:${finding.line}` : ""}
- </strong>
- <p>{finding.message}</p>
- </article>
- ))}
- </section>
- )}
- {/* A single open file gets the height; the notices describe the list. */}
- {(wide || view !== "diff" || !file) && <Notices model={model} />}
- <div className={styles.body} data-wide={wide || undefined}>
- {scope === "history" && !model.commit ? (
- <History
- peer={options.peer}
- target={model.target}
- revision={`${model.historyRevision}:${model.git?.state === "repo" ? model.git.head : ""}`}
- open={model.setCommit}
- />
- ) : wide ? (
- <>
- <div className={styles.listColumn}>{list}</div>
- <div className={styles.diffColumn}>
- {diff || <p className={styles.listEmpty}>{t("changes.diff.pick")}</p>}
- </div>
- </>
- ) : (
- diff || <div className={styles.listColumn}>{list}</div>
+ {/* Notices such as the Git install card can be taller than a short window: this middle
+ region scrolls so their buttons stay reachable while the bars above and below stay put. */}
+ <div className={styles.scroller}>
+ {model.reviews.historyOpen && model.reviews.history.length > 0 && (
+ <section
+ className={styles.reviewHistory}
+ aria-label={model.t("agentReview.historicalFindings")}
+ >
+ <p>{model.t("agentReview.historyExplanation")}</p>
+ {model.reviews.history.map((finding) => (
+ <article key={finding.id}>
+ <strong>
+ {finding.path}
+ {finding.line ? `:${finding.line}` : ""}
+ </strong>
+ <p>{finding.message}</p>
+ </article>
+ ))}
+ </section>
)}
+ {/* A single open file gets the height; the notices describe the list. */}
+ {(wide || view !== "diff" || !file) && <Notices model={model} />}
+ <div className={styles.body} data-wide={wide || undefined}>
+ {scope === "history" && !model.commit ? (
+ <History
+ peer={options.peer}
+ target={model.target}
+ revision={`${model.historyRevision}:${model.git?.state === "repo" ? model.git.head : ""}`}
+ open={model.setCommit}
+ />
+ ) : wide ? (
+ <>
+ <div className={styles.listColumn}>{list}</div>
+ <div className={styles.diffColumn}>
+ {diff || <p className={styles.listEmpty}>{t("changes.diff.pick")}</p>}
+ </div>
+ </>
+ ) : (
+ diff || <div className={styles.listColumn}>{list}</div>
+ )}
+ </div>
</div>
<Footer model={model} />
{execution?.conversationId && execution.topics.length > 0 && (
diff --git a/packages/workspaces/src/ui/changes/changes.module.css b/packages/workspaces/src/ui/changes/changes.module.css
index c00e5a9..5ce9ecc 100644
--- a/packages/workspaces/src/ui/changes/changes.module.css
+++ b/packages/workspaces/src/ui/changes/changes.module.css
@@ -390,9 +390,19 @@
}
/* body */
+.scroller {
+ flex: 1 1 0;
+ min-height: 96px;
+ overflow-x: hidden;
+ overflow-y: auto;
+ overscroll-behavior: contain;
+ display: flex;
+ flex-direction: column;
+}
.body {
flex: 1;
- min-height: 0;
+ /* Enough room for the file list once tall notices push it down; the scroller takes the rest. */
+ min-height: 240px;
display: flex;
}
.listColumn {
@@ -1095,7 +1105,12 @@
/* footer */
.footer {
- flex: none;
+ /* A failed commit can add the Git install card here: the footer then shrinks and scrolls
+ instead of pushing its buttons past the bottom of the pane. */
+ flex: 0 1 auto;
+ min-height: 0;
+ overflow-y: auto;
+ overscroll-behavior: contain;
display: flex;
flex-direction: column;
gap: 8px;
@@ -1103,6 +1118,9 @@
border-top: 1px solid var(--b1);
background: var(--bg);
}
+.footer > * {
+ flex-shrink: 0;
+}
.commentsBar {
display: flex;
align-items: center;