shenanigans

This commit is contained in:
2026-06-04 23:21:39 +01:00
parent 395da19f0f
commit 74be11bf42
5 changed files with 186 additions and 176 deletions

View File

@@ -477,7 +477,7 @@ impl query::QueryFn for FetchPullRequestFileTree {
let data = {
let gql =
PullRequestFileTreeQuery::build_query(pull_request_file_tree_query::Variables {
id: self.id.clone().into(),
id: self.id.to_string(),
first: self.first,
});
@@ -513,9 +513,7 @@ impl query::QueryFn for FetchPullRequestFileTree {
edge.node.map(|node| ChangedFile {
cursor,
change_type: match node.change_type {
| pull_request_file_tree_query::PatchStatus::ADDED => {
ChangeType::Added
}
| pull_request_file_tree_query::PatchStatus::ADDED => ChangeType::Added,
| pull_request_file_tree_query::PatchStatus::MODIFIED => {
ChangeType::Modified
}
@@ -849,9 +847,9 @@ impl query::QueryFn for FetchPullRequestTimeline {
let data = {
let gql =
PullRequestTimelineQuery::build_query(pull_request_timeline_query::Variables {
id: self.id.clone().into(),
id: self.id.to_string(),
first: self.first,
after: self.after.clone(),
after: self.after.as_ref().map(|it| it.to_string()),
});
let res = c.github_graphql_request(&gql)?.send().await?;

View File

@@ -128,8 +128,6 @@ fn resume_application_state(cx: &mut gpui::App) -> Start {
let setup_status = setup_wizard::read_setup_status();
println!("[main] setup status: {:?}", setup_status);
match setup_status {
| setup_wizard::SetupStatus::NotStarted => Start::FromScratch,
| setup_wizard::SetupStatus::InProgress(state) => Start::FromSetup(state),

View File

@@ -107,7 +107,6 @@ impl gpui::Render for PullRequestChangeView {
.bg(theme.colors.surface_chrome)
.border_r_1()
.border_color(theme.colors.border_muted)
.p_1()
.child(
file_tree(self.file_tree_state.clone(), move |i, _, cx| {
weak.read(cx).file_tree_items[i].clone()

View File

@@ -15,6 +15,13 @@ use crate::{
util::diff::{ContentDiff, DiffLine, Op, diff_content},
};
const PR_KWDONOVEM85_API_REPO_BASE: &str = include_str!(
"../../fixtures/github/repo.file_content/kennethnym/novem/5e8745bfcc0c90c226d3c6af84226d6d4a5ec2d1/src/api/repo.rs"
);
const PR_KWDONOVEM85_API_REPO_HEAD: &str = include_str!(
"../../fixtures/github/repo.file_content/kennethnym/novem/13af7d0b48a6ce0b22d48c9b6c1c78dfcd94e6a0/src/api/repo.rs"
);
pub(crate) fn is_enabled() -> bool {
match std::env::var("NOVEM_DIFFOPS_PLAYGROUND") {
| Ok(value) => matches!(value.as_str(), "1" | "true" | "TRUE" | "yes" | "on"),
@@ -361,6 +368,12 @@ fn fetch() {
}
"#,
),
DiffCase::new(
"PR_kwDONovem85 src/api/repo.rs",
"Fixture diff for feat(repo): add cached repository query for titlebar picker. Base 5e8745bfcc0c90c226d3c6af84226d6d4a5ec2d1 to head 13af7d0b48a6ce0b22d48c9b6c1c78dfcd94e6a0.",
PR_KWDONOVEM85_API_REPO_BASE,
PR_KWDONOVEM85_API_REPO_HEAD,
),
]
}

View File

@@ -67,7 +67,9 @@ pub(crate) async fn load_auth_tokens(
.await
.ok()?
.and_then(|(_, password)| String::from_utf8(password).ok())
.map(|access_token| api::AuthTokens { access_token })
.map(|access_token| api::AuthTokens {
access_token: access_token.into(),
})
}
}