Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
efc5c93
Initial git graph crate setup
Anthony-Eid Dec 8, 2025
ed6165f
Have opus generate the init graph building code based off of gitamine
Anthony-Eid Dec 8, 2025
84b787f
Take base git graph UI from PR: 44405
Anthony-Eid Dec 8, 2025
e8807aa
WIP
Anthony-Eid Dec 9, 2025
700d3ca
Hook up different backend to git graph ui
Anthony-Eid Dec 11, 2025
a686fc1
Fix wrong commits being filtered out
Anthony-Eid Dec 11, 2025
f86476a
Remove more unused code
Anthony-Eid Dec 11, 2025
3bb908c
Reset files to match original PR
Anthony-Eid Dec 11, 2025
62bcaf4
Fix bug where initial commit wouldn't be drawned correctly
Anthony-Eid Dec 11, 2025
8e78337
Remove warnings
Anthony-Eid Dec 11, 2025
ce0f525
Remove some tests
Anthony-Eid Dec 11, 2025
d74612c
UI code clean up
Anthony-Eid Dec 11, 2025
8e6f2f5
Start the mega shred mhahahahah
Anthony-Eid Dec 11, 2025
7479942
More shreddddd
Anthony-Eid Dec 11, 2025
92affa2
More shreding
Anthony-Eid Dec 11, 2025
5080697
Make git graph a serializable item
Anthony-Eid Dec 11, 2025
74df6d7
More shreding
Anthony-Eid Dec 11, 2025
ee4cd4d
More shredding
Anthony-Eid Dec 11, 2025
94526ad
Use accent colors for git graph
Anthony-Eid Dec 11, 2025
ed1dd89
WIP get git graph to be drawn with one canvas draw
Anthony-Eid Dec 11, 2025
4303e8e
WIP
Anthony-Eid Dec 11, 2025
38bb2ba
Limit max count of commits
Anthony-Eid Dec 11, 2025
391f6f1
Start work on fetching commit chunks instead of all at once
Anthony-Eid Dec 11, 2025
80956e2
Fix loading delay
Anthony-Eid Dec 12, 2025
99e7aef
Fix bug where git graph would load from wrong starting point
Anthony-Eid Dec 12, 2025
1143de1
More shredding
Anthony-Eid Dec 12, 2025
a3a1db6
Start some clean up
Anthony-Eid Jan 6, 2026
23d3e07
More shred
Anthony-Eid Jan 6, 2026
3303eb2
Render graph clean up
Anthony-Eid Jan 6, 2026
4c62a8c
Checkpoint with agent
Anthony-Eid Jan 6, 2026
d610793
Only draw commit circles
Anthony-Eid Jan 6, 2026
75cc4a5
Start graph renderer refactor
Anthony-Eid Jan 7, 2026
ecd5f20
More wip
Anthony-Eid Jan 7, 2026
6ed5b3f
More wip
Anthony-Eid Jan 7, 2026
cd3ee72
Curved gooo brrr
Anthony-Eid Jan 7, 2026
f467721
Add last edges
Anthony-Eid Jan 7, 2026
3165434
checkpoint
Anthony-Eid Jan 7, 2026
93d8880
Yet another checkpoint
Anthony-Eid Jan 7, 2026
b8e05d9
Checkpoint again
Anthony-Eid Jan 7, 2026
52945e8
Fix graph bug
Anthony-Eid Jan 7, 2026
32d1369
Clean up yayyy
Anthony-Eid Jan 8, 2026
0a0225f
Make graph vertically scrollable
Anthony-Eid Jan 8, 2026
4094727
Check point
Anthony-Eid Jan 8, 2026
6bb9fd9
Some code clean up
Anthony-Eid Jan 8, 2026
68e7993
Merge with main
Anthony-Eid Jan 8, 2026
c21f2c8
table sizing fixed
Anthony-Eid Jan 8, 2026
3f54484
Use table headers
Anthony-Eid Jan 8, 2026
ecf50d4
Start work on moving git graph loading to repo side
Anthony-Eid Jan 9, 2026
cc52790
Use repo backend to get commit count when data is loaded
Anthony-Eid Jan 9, 2026
50cabfb
Switch to repo backend when loading commits
Anthony-Eid Jan 9, 2026
fb08ec2
lazy commit loading
Anthony-Eid Jan 9, 2026
ccaa23b
WIP
Anthony-Eid Jan 9, 2026
acaeb4a
Initial cat-file work
Anthony-Eid Jan 12, 2026
29f1682
initial layer (ai generated)
Anthony-Eid Jan 12, 2026
d62d1ea
checkpoint
Anthony-Eid Jan 13, 2026
bb48e8b
Yet another checkpoint
Anthony-Eid Jan 13, 2026
24c6758
Show timestamps correctly
Anthony-Eid Jan 13, 2026
fc5697f
Batch cat-file ops
Anthony-Eid Jan 13, 2026
ea9c869
Get tags
Anthony-Eid Jan 13, 2026
c587884
Don't block the main thread with send
Anthony-Eid Jan 13, 2026
3cb5854
Add commit detail panel
Anthony-Eid Jan 13, 2026
8988697
add badge support
Anthony-Eid Jan 13, 2026
dd21b28
Add badge support to commit detail panel
Anthony-Eid Jan 13, 2026
a95629b
checkpoint with errors
Anthony-Eid Jan 16, 2026
05a15e1
Yet another checkpoint with errors
Anthony-Eid Jan 16, 2026
657c4fe
Stream git log chunks
Anthony-Eid Jan 16, 2026
8d551d5
Check point again
Anthony-Eid Jan 16, 2026
d743f80
truncate subject instead of ref names
Anthony-Eid Jan 16, 2026
7499143
Remove dbg!s
Anthony-Eid Jan 16, 2026
dffc553
Start adding graph horizontal scroll bar for canvas
Anthony-Eid Jan 16, 2026
81068f2
Add horizontal scroll to graph-canvas
Anthony-Eid Jan 16, 2026
bc9b86e
Fix git graph lines overlapping creating fuzzy textures
Anthony-Eid Jan 16, 2026
43258eb
fix bug where graph had extra entry
Anthony-Eid Jan 16, 2026
da06bb5
speed up add_commits function
Anthony-Eid Jan 16, 2026
748a912
pre allocate in add_commits
Anthony-Eid Jan 16, 2026
08b37d7
Some clean up
Anthony-Eid Jan 16, 2026
bf3c113
Revert "Fix git graph lines overlapping creating fuzzy textures"
Anthony-Eid Jan 16, 2026
99585a2
Fix color overlap again
Anthony-Eid Jan 16, 2026
5ec2531
Naming stuff
Anthony-Eid Jan 21, 2026
f26014d
move more code into git graph file
Anthony-Eid Jan 21, 2026
92effb2
Add agent plan for randomize graph canvas testing
Anthony-Eid Jan 21, 2026
bccc4b0
Step 1 and 2
Anthony-Eid Jan 21, 2026
548f7b6
Step 3
Anthony-Eid Jan 21, 2026
1f423fc
Step 4
Anthony-Eid Jan 21, 2026
db639f0
Step 6
Anthony-Eid Jan 21, 2026
3d9a31a
Add graph verification functions
Anthony-Eid Jan 21, 2026
857f925
Implement test
Anthony-Eid Jan 21, 2026
bcf5926
Revert graph add commits speed up due to bugs
Anthony-Eid Jan 21, 2026
505bab0
Get graph test passing
Anthony-Eid Jan 21, 2026
03d7243
Add a full integration test
Anthony-Eid Jan 21, 2026
85fabbd
Improve test coverage
Anthony-Eid Jan 21, 2026
5cc0e7d
Use anyhow for graph tests result type
Anthony-Eid Jan 21, 2026
962afb5
better testing
Anthony-Eid Jan 21, 2026
e1d96d4
Get all test passing
Anthony-Eid Jan 21, 2026
a21e309
Add more testing
Anthony-Eid Jan 21, 2026
0825b1b
Add back hashmap speed up to add_commits state
Anthony-Eid Jan 21, 2026
2a1691f
Clean up for merge!
Anthony-Eid Jan 22, 2026
5c8e318
More cleanup for merge
Anthony-Eid Jan 22, 2026
0da1882
More todo removes
Anthony-Eid Jan 22, 2026
15c37cc
Calculate row height whenever font size changes
Anthony-Eid Jan 22, 2026
ae99857
Clean up git store subscriptions
Anthony-Eid Jan 22, 2026
54b3167
Clean up workspace subscription
Anthony-Eid Jan 22, 2026
47f5049
Clean up badge
Anthony-Eid Jan 22, 2026
be587f2
Clean up warnings
Anthony-Eid Jan 22, 2026
db7d370
Get clippy passing
Anthony-Eid Jan 22, 2026
b1eb53d
Merge all git graph structs into git_graph.rs file
Anthony-Eid Jan 22, 2026
23159ce
Make things less public
Anthony-Eid Jan 22, 2026
5ace175
Merge remote-tracking branch 'origin' into git-graph
Anthony-Eid Jan 22, 2026
458e0d0
Fix clippy
Anthony-Eid Jan 23, 2026
9eadcf9
Autofix
zed-zippy[bot] Jan 23, 2026
a034f2d
fmt
Anthony-Eid Jan 23, 2026
2df8fe1
Clean up and fix failing tests
Anthony-Eid Jan 23, 2026
7d3973f
Remove unused error
Anthony-Eid Jan 23, 2026
6fee079
Hopefully final clean up
Anthony-Eid Jan 23, 2026
4e818f3
Cargo fmt againnnn ahhhhhhh
Anthony-Eid Jan 23, 2026
c8c88e9
Remove comments
Anthony-Eid Jan 23, 2026
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
25 changes: 25 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ members = [
"crates/fsevent",
"crates/fuzzy",
"crates/git",
"crates/git_graph",
"crates/git_hosting_providers",
"crates/git_ui",
"crates/go_to_line",
Expand Down Expand Up @@ -312,6 +313,7 @@ fs = { path = "crates/fs" }
fsevent = { path = "crates/fsevent" }
fuzzy = { path = "crates/fuzzy" }
git = { path = "crates/git" }
git_graph = { path = "crates/git_graph" }
git_hosting_providers = { path = "crates/git_hosting_providers" }
git_ui = { path = "crates/git_ui" }
go_to_line = { path = "crates/go_to_line" }
Expand Down
33 changes: 30 additions & 3 deletions crates/fs/src/fake_git_repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ use git::{
Oid, RunHook,
blame::Blame,
repository::{
AskPassDelegate, Branch, CommitDetails, CommitOptions, FetchOptions, GitRepository,
GitRepositoryCheckpoint, PushOptions, Remote, RepoPath, ResetMode, Worktree,
AskPassDelegate, Branch, CommitDataReader, CommitDetails, CommitOptions, FetchOptions,
GRAPH_CHUNK_SIZE, GitRepository, GitRepositoryCheckpoint, InitialGraphCommitData, LogOrder,
LogSource, PushOptions, Remote, RepoPath, ResetMode, Worktree,
},
status::{
DiffTreeType, FileStatus, GitStatus, StatusCode, TrackedStatus, TreeDiff, TreeDiffStatus,
Expand All @@ -18,7 +19,7 @@ use gpui::{AsyncApp, BackgroundExecutor, SharedString, Task};
use ignore::gitignore::GitignoreBuilder;
use parking_lot::Mutex;
use rope::Rope;
use smol::future::FutureExt as _;
use smol::{channel::Sender, future::FutureExt as _};
use std::{path::PathBuf, sync::Arc};
use text::LineEnding;
use util::{paths::PathStyle, rel_path::RelPath};
Expand Down Expand Up @@ -49,6 +50,7 @@ pub struct FakeGitRepositoryState {
pub remotes: HashMap<String, String>,
pub simulated_index_write_error_message: Option<String>,
pub refs: HashMap<String, String>,
pub graph_commits: Vec<Arc<InitialGraphCommitData>>,
}

impl FakeGitRepositoryState {
Expand All @@ -66,6 +68,7 @@ impl FakeGitRepositoryState {
merge_base_contents: Default::default(),
oids: Default::default(),
remotes: HashMap::default(),
graph_commits: Vec::new(),
}
}
}
Expand Down Expand Up @@ -737,4 +740,28 @@ impl GitRepository for FakeGitRepository {
Ok(())
})
}

fn initial_graph_data(
&self,
_log_source: LogSource,
_log_order: LogOrder,
request_tx: Sender<Vec<Arc<InitialGraphCommitData>>>,
) -> BoxFuture<'_, Result<()>> {
let fs = self.fs.clone();
let dot_git_path = self.dot_git_path.clone();
async move {
let graph_commits =
fs.with_git_state(&dot_git_path, false, |state| state.graph_commits.clone())?;

for chunk in graph_commits.chunks(GRAPH_CHUNK_SIZE) {
request_tx.send(chunk.to_vec()).await.ok();
}
Ok(())
}
.boxed()
}

fn commit_data_reader(&self) -> Result<CommitDataReader> {
anyhow::bail!("commit_data_reader not supported for FakeGitRepository")
}
}
9 changes: 8 additions & 1 deletion crates/fs/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ use collections::{BTreeMap, btree_map};
use fake_git_repo::FakeGitRepositoryState;
#[cfg(feature = "test-support")]
use git::{
repository::{RepoPath, repo_path},
repository::{InitialGraphCommitData, RepoPath, repo_path},
status::{FileStatus, StatusCode, TrackedStatus, UnmergedStatus},
};

Expand Down Expand Up @@ -2001,6 +2001,13 @@ impl FakeFs {
.unwrap();
}

pub fn set_graph_commits(&self, dot_git: &Path, commits: Vec<Arc<InitialGraphCommitData>>) {
self.with_git_state(dot_git, true, |state| {
state.graph_commits = commits;
})
.unwrap();
}

/// Put the given git repository into a state with the given status,
/// by mutating the head, index, and unmerged state.
pub fn set_status_for_repo(&self, dot_git: &Path, statuses: &[(&str, FileStatus)]) {
Expand Down
1 change: 1 addition & 0 deletions crates/git/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ rand = { workspace = true, optional = true }
rope.workspace = true
schemars.workspace = true
serde.workspace = true
smallvec.workspace = true
smol.workspace = true
sum_tree.workspace = true
text.workspace = true
Expand Down
Loading