Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4,444 changes: 2,599 additions & 1,845 deletions Cargo.lock

Large diffs are not rendered by default.

34 changes: 13 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,39 @@ targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
[dependencies]
anyhow = "1.0.100"
bytes = "1.10.1"
chrono = { version = "0.4.42", features = ["serde"] }
dify = "0.7.4"
eframe = { version = "0.33.0", features = ["glow", "default", "persistence", "ron"] }
egui_extras = { version = "0.33.0", features = ["image", "file", "http"] }
egui_inbox = { version = "0.10.0", features = ["async", "tokio"] }
ehttp = { version = "0.5.0", features = ["native-async"] }
dify = "0.8.0"
eframe = { version = "0.34.1", features = ["glow", "default", "persistence", "ron"] }
egui_extras = { version = "0.34.1", features = ["image", "file", "http"] }
egui_inbox = { version = "0.11.0", features = ["async", "tokio"] }
env_logger = { version = "0.11.8", default-features = false, features = ["auto-color", "humantime"] }
flate2 = { version = "1.1" }
futures = "0.3.31"
getrandom = { version = "0.3", features = ["wasm_js"] }
graphql_client = "0.14.0"
hello_egui_utils = "0.10.0"
graphql_client = "0.16.0"
hello_egui_utils = "0.11.0"
image = "0.25.8"
log = "0.4.28"
octocrab = { version = "0.47.0", default-features = false, features = ["stream"] }
octocrab = { version = "0.49.7", default-features = false, features = ["stream", "jwt-rust-crypto"] }
octocrab-wasm = { path = "crates/octocrab-wasm" }
re_ui = { git = "https://github.com/rerun-io/rerun", branch = "main" }
reqwest = { version = "0.12.23", default-features = false, features = [
"rustls-tls", "rustls-tls-webpki-roots"
] }
reqwest = { version = "0.13.2", default-features = false, features = [] }
serde = "1.0"
serde_json = "1.0"
serde_urlencoded = "0.7.1"
tar = { version = "0.4.44" }
tempfile = { version = "3.23" }
thiserror = "2.0.17"
web-time = "1.1"
zip = { version = "6.0.0", default-features = false, features = ["deflate"] }
zip = { version = "8.5.1", default-features = false, features = ["deflate"] }

# native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
axum = "0.8.6"
clap = { version = "4.5", features = ["derive"] }
env_logger = "0.11.8"
gix = { version = "0.73", default-features = false, features = ["blocking-network-client", "blob-diff", "merge"] }
gix = { version = "0.81", default-features = false, features = ["blocking-network-client", "blob-diff", "merge", "sha1"] }
ignore = { version = "0.4" }
tokio = { version = "1.47", features = ["full"] }

# web:
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.3", features = ["wasm_js"] }
js-sys = { version = "0.3.81" }
wasm-bindgen = { version = "0.2.104" }
wasm-bindgen-futures = { version = "0.4.54" }
Expand Down Expand Up @@ -146,7 +139,7 @@ doc_include_without_cfg = "warn"
doc_link_with_quotes = "warn"
doc_markdown = "warn"
elidable_lifetime_names = "warn"
empty_enum = "warn"
empty_enums = "warn"
empty_enum_variants_with_brackets = "warn"
empty_line_after_outer_attr = "warn"
enum_glob_use = "warn"
Expand Down Expand Up @@ -258,7 +251,6 @@ string_add = "warn"
string_add_assign = "warn"
string_lit_as_bytes = "warn"
string_lit_chars_any = "warn"
string_to_string = "warn"
suspicious_command_arg_space = "warn"
suspicious_xor_used_as_pow = "warn"
todo = "warn"
Expand All @@ -268,7 +260,7 @@ trailing_empty_array = "warn"
trait_duplication_in_bounds = "warn"
transmute_ptr_to_ptr = "warn"
tuple_array_conversions = "warn"
unchecked_duration_subtraction = "warn"
unchecked_time_subtraction = "warn"
undocumented_unsafe_blocks = "warn"
unimplemented = "warn"
uninhabited_references = "warn"
Expand Down
8 changes: 3 additions & 5 deletions crates/octocrab-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024"

[dependencies]
octocrab = { version = "0.47.0", default-features = false }
octocrab = { version = "0.49.7", default-features = false, features = ["jwt-rust-crypto"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
http-body = "1.0.1"
Expand All @@ -14,10 +14,8 @@ http-body-util = "0.1.3"
bytes = "1.10"
wasm-bindgen-futures = "0.4.54"
futures = "0.3.31"
reqwest = { version = "0.12.23", default-features = false, features = [
"rustls-tls",
] }
reqwest = { version = "0.13.2", default-features = false, features = [] }
thiserror = "2.0"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
octocrab = { version = "0.47.0", features = ["default-client"] }
octocrab = { version = "0.49.7", features = ["default-client"] }
21 changes: 11 additions & 10 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::settings::Settings;
use crate::state::{AppState, AppStateRef, PageRef, SystemCommand, ViewerSystemCommand};
use crate::{DiffSource, bar, home, viewer};
use crate::{config::Config, state::View};
use eframe::egui::{Context, Modifiers};
use eframe::egui::{Context, Modifiers, Ui};
use eframe::{Frame, Storage, egui};
use egui_extras::install_image_loaders;
use egui_inbox::UiInbox;
Expand Down Expand Up @@ -52,29 +52,30 @@ impl eframe::App for App {
eframe::set_value(storage, eframe::APP_KEY, &self.state.persist());
}

fn update(&mut self, ctx: &Context, _frame: &mut Frame) {
self.state.update(ctx);
self.inbox.read(ctx).for_each(|cmd| {
self.state.handle(ctx, cmd);
fn ui(&mut self, ui: &mut Ui, _frame: &mut Frame) {
let ctx = ui.ctx().clone();
self.state.update(&ctx);
self.inbox.read(&ctx).for_each(|cmd| {
self.state.handle(&ctx, cmd);
});

{
let state_ref = self
.state
.reference(ctx, &self.diff_loader, self.inbox.sender());
.reference(&ctx, &self.diff_loader, self.inbox.sender());

bar::bar(ctx, &state_ref);
bar::bar(ui, &state_ref);

match &state_ref.page {
PageRef::Home => {
home::home_view(ctx, &state_ref);
home::home_view(ui, &state_ref);
}
PageRef::DiffViewer(diff) => {
viewer::viewer_ui(ctx, &diff.with_app(&state_ref));
viewer::viewer_ui(ui, &diff.with_app(&state_ref));
}
}

Self::end_frame(ctx, &state_ref);
Self::end_frame(&ctx, &state_ref);
}

// for file in &ctx.input(|i| i.raw.dropped_files.clone()) {
Expand Down
8 changes: 4 additions & 4 deletions src/bar.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use crate::github::auth::GithubAuthCommand;
use crate::state::AppStateRef;
use eframe::egui;
use eframe::egui::{Context, Popup, Ui};
use eframe::egui::{Popup, Ui};

pub fn bar(ctx: &Context, state: &AppStateRef<'_>) {
egui::TopBottomPanel::top("top bar")
pub fn bar(ui: &mut Ui, state: &AppStateRef<'_>) {
egui::Panel::top("top bar")
.resizable(false)
.show(ctx, |ui| {
.show_inside(ui, |ui| {
egui::Sides::new().show(
ui,
|_ui| {},
Expand Down
6 changes: 3 additions & 3 deletions src/home.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::DiffSource;
use crate::state::{AppStateRef, SystemCommand};
use eframe::egui;
use eframe::egui::{CentralPanel, Context, Id, TextEdit};
use eframe::egui::{CentralPanel, Id, TextEdit, Ui};

pub fn home_view(ctx: &Context, app: &AppStateRef<'_>) {
CentralPanel::default().show(ctx, |ui| {
pub fn home_view(ui: &mut Ui, app: &AppStateRef<'_>) {
CentralPanel::default().show_inside(ui, |ui| {
ui.heading("Kitdiff");

ui.horizontal(|ui| {
Expand Down
2 changes: 1 addition & 1 deletion src/native_loaders/git_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fn run_git_discovery(sender: &Sender, base_path: &Path) -> anyhow::Result<()> {
}
}
}
Ok(gix::object::tree::diff::Action::Continue)
Ok(gix::object::tree::diff::Action::Continue(()))
},
)?;

Expand Down
11 changes: 5 additions & 6 deletions src/viewer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ mod viewer_options;

use crate::state::ViewerAppStateRef;
use eframe::egui;
use eframe::egui::Context;
use eframe::egui::panel::Side;
use eframe::egui::Ui;

pub fn viewer_ui(ctx: &Context, state: &ViewerAppStateRef<'_>) {
egui::SidePanel::new(Side::Left, "files").show(ctx, |ui| {
pub fn viewer_ui(ui: &mut Ui, state: &ViewerAppStateRef<'_>) {
egui::Panel::left("files").show_inside(ui, |ui| {
file_tree::file_tree(ui, state);
});

egui::SidePanel::right("options").show(ctx, |ui| {
egui::Panel::right("options").show_inside(ui, |ui| {
ui.set_width(ui.available_width());

viewer_options::viewer_options(ui, state);
Expand Down Expand Up @@ -152,7 +151,7 @@ pub fn viewer_ui(ctx: &Context, state: &ViewerAppStateRef<'_>) {
// });
});

egui::CentralPanel::default().show(ctx, |ui| {
egui::CentralPanel::default().show_inside(ui, |ui| {
diff_view::diff_view(ui, state);
});
}
Loading