Skip to content

Desktop: Register file type on Linux and Windows#4125

Draft
timon-schelling wants to merge 2 commits intodesktop-socket-mvpfrom
desktop-register-file-type-on-linux-and-win
Draft

Desktop: Register file type on Linux and Windows#4125
timon-schelling wants to merge 2 commits intodesktop-socket-mvpfrom
desktop-register-file-type-on-linux-and-win

Conversation

@timon-schelling
Copy link
Copy Markdown
Member

@timon-schelling timon-schelling commented May 7, 2026

depends on #4123

doing this on win feels horrible

@timon-schelling timon-schelling changed the title Desktop register file type on linux and win Desktop: Register file type on Linux and Windows May 7, 2026
@timon-schelling timon-schelling marked this pull request as draft May 7, 2026 18:13
Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

No issues found across 7 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@timon-schelling
Copy link
Copy Markdown
Member Author

timon-schelling commented May 7, 2026

!build desktop (Run ID 25513940875)

Copy link
Copy Markdown
Contributor

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

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 implements file associations for Graphite on both Linux and Windows platforms. On Linux, it updates the desktop entry and adds a MIME type definition. For Windows, it introduces a registry registration mechanism to associate .graphite and several image formats with the application. Feedback was provided regarding an inconsistency between the supported file extensions on Windows and the MIME types declared for Linux, suggesting an expansion of the Windows list for better platform parity.

const DOCUMENT_FRIENDLY_NAME: &str = "Graphite Document";
const MIME_TYPE: &str = "application/graphite+json";
const FILE_EXTENSION: &str = ".graphite";
const SUPPORTED_EXTENSIONS: &[&str] = &[FILE_EXTENSION, ".svg", ".png", ".jpg", ".jpeg"];
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.

medium

The list of supported extensions for Windows is inconsistent with the MIME types declared for Linux in desktop/assets/art.graphite.Graphite.desktop. To ensure feature parity across platforms, consider adding the missing supported file extensions.

The Linux desktop file includes support for GIF, BMP, TIFF, WebP, PNM (PPM, PGM, PBM), and ICO formats.

Suggested change
const SUPPORTED_EXTENSIONS: &[&str] = &[FILE_EXTENSION, ".svg", ".png", ".jpg", ".jpeg"];
const SUPPORTED_EXTENSIONS: &[&str] = &[FILE_EXTENSION, ".svg", ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tif", ".tiff", ".webp", ".ppm", ".pgm", ".pbm", ".ico"];

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

📦 Mac Build Complete for 6dd6e84
Download binary

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

📦 Linux Build Complete for 6dd6e84
Download binary
Download Flatpak

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

📦 Windows Build Complete for 6dd6e84
Download binary

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.

1 participant