Skip to content

Move branding and package install into cargo-run#4266

Open
timon-schelling wants to merge 3 commits into
masterfrom
replace-branding-installer
Open

Move branding and package install into cargo-run#4266
timon-schelling wants to merge 3 commits into
masterfrom
replace-branding-installer

Conversation

@timon-schelling

Copy link
Copy Markdown
Member

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the Node.js-based branding installer with a Rust-based implementation in tools/cargo-run, allowing the removal of the tar dependency from the frontend. The Rust runner now automatically downloads and verifies branding assets for non-CLI tasks. Feedback points out the use of unstable let_chains in the new Rust code, which requires a nightly compiler, and suggests refactoring it with map_or to ensure compatibility with stable Rust.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tools/cargo-run/src/branding.rs
@timon-schelling timon-schelling changed the title Move branding asset fetch into cargo-run Move branding and package install into cargo-run Jun 21, 2026
@timon-schelling

timon-schelling commented Jun 21, 2026

Copy link
Copy Markdown
Member Author

!build (Run ID 27920534150)

@timon-schelling

timon-schelling commented Jun 21, 2026

Copy link
Copy Markdown
Member Author

!build desktop (Run ID 27920540132)

@github-actions

Copy link
Copy Markdown
📦 Web Build Complete for 4af9625
https://33fc7a5c.graphite.pages.dev

Wasm: 23.16 MB — JS: 0.44 MB — CSS: 0.09 MB — Fonts: 0.30 MB — Images: 0.09 MB — All Assets: 24.08 MB

@github-actions

Copy link
Copy Markdown
📦 Mac Build Complete for 4af9625
Download binary

@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
📦 Linux Build Complete for 4af9625
Download binary
Download Flatpak

@github-actions

Copy link
Copy Markdown
📦 Windows Build Complete for 4af9625
Download binary

@timon-schelling timon-schelling marked this pull request as ready for review June 22, 2026 11:04
@timon-schelling timon-schelling requested a review from Keavon June 22, 2026 11:04

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 10 files

Confidence score: 3/5

  • In tools/cargo-run/src/branding.rs, branding assets are deleted before the replacement download/extract succeeds, so any fetch or unpack failure can leave the workspace in a broken partial state and disrupt subsequent runs—switch to a staged/atomic replace flow (or rollback on failure) before merging.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tools/cargo-run/src/branding.rs">

<violation number="1" location="tools/cargo-run/src/branding.rs:32">
P2: Existing branding assets are deleted before replacement is confirmed. Download/extract failure leaves the workspace in a broken partial state.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

eprintln!("Downloading branding assets from <{url}>...");

if dir_path.exists() {
std::fs::remove_dir_all(&dir_path).map_err(|e| Error::Io(e, format!("removing '{}'", dir_path.display())))?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Existing branding assets are deleted before replacement is confirmed. Download/extract failure leaves the workspace in a broken partial state.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/cargo-run/src/branding.rs, line 32:

<comment>Existing branding assets are deleted before replacement is confirmed. Download/extract failure leaves the workspace in a broken partial state.</comment>

<file context>
@@ -0,0 +1,40 @@
+	eprintln!("Downloading branding assets from <{url}>...");
+
+	if dir_path.exists() {
+		std::fs::remove_dir_all(&dir_path).map_err(|e| Error::Io(e, format!("removing '{}'", dir_path.display())))?;
+	}
+
</file context>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants