Show workspace commits clearly in Changes (#2350)
* feat(commits): distinguish workspace history from base commits Keep every workspace commit visible while bounding base history to ten context commits, and make push and base state readable in the commit rail. * fix(commits): preserve history when base refs disappear Fall back to recent HEAD history for stale saved bases, and reject truncated git output instead of presenting an incomplete commit list. * fix(commits): classify history against the current base Use the furthest-ahead local or remote base for classification, and re-infer base history when saved worktree metadata points to a deleted branch.
This commit is contained in:
@@ -67,8 +67,15 @@ function CommitsSectionContent({
|
||||
}
|
||||
return (
|
||||
<View style={styles.list}>
|
||||
{query.data.commits.map((commit) => (
|
||||
<CommitRow key={commit.sha} commit={commit} now={now} onCommitPress={onCommitPress} />
|
||||
{query.data.commits.map((commit, index) => (
|
||||
<CommitRow
|
||||
key={commit.sha}
|
||||
commit={commit}
|
||||
isFirst={index === 0}
|
||||
isLast={index === query.data.commits.length - 1}
|
||||
now={now}
|
||||
onCommitPress={onCommitPress}
|
||||
/>
|
||||
))}
|
||||
</View>
|
||||
);
|
||||
@@ -110,7 +117,10 @@ export function CommitsSection({ serverId, cwd, onCommitPress }: CommitsSectionP
|
||||
if (query.status === "unsupported") {
|
||||
return null;
|
||||
}
|
||||
const commitCount = query.status === "loaded" ? query.data.commits.length : null;
|
||||
const commitCount =
|
||||
query.status === "loaded"
|
||||
? query.data.commits.filter((commit) => !commit.isOnBase).length
|
||||
: null;
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
|
||||
Reference in New Issue
Block a user