Skip to content

release: Awake Modpack Manager 1.3.1 view images on the Files page - #10

Merged
awakenginexe merged 1 commit into
mainfrom
release/1.3.1
Nov 11, 2026
Merged

awakenginexe merged 1 commit into
mainfrom
release/1.3.1

Conversation

@awakenginexe

Copy link
Copy Markdown
Owner

What changed

The Files page opens pictures in a built-in viewer, the same way 1.3.0 opens text files in the editor. Clicking a .png, .jpg, .jpeg, .gif, .webp, .bmp or .ico used to answer "This is not a text file".

  • Host (src-tauri/src/desktop.rs): new workspace_read_image command. It goes through the same checked_path as the editor (six content folders only, no links followed), caps the file at 16 MB, and decides the format from the first bytes, never the name. The picture is returned as a data: URL, which the existing content policy already allows, so the CSP is unchanged. No new crate.
  • Backends: optional readContentImage on ManagerBackend, wired through HostApi, HelperClient, the composite backend and the demo backend.
  • Files page (src/views/FilesView.vue): a viewer panel beside the editor. It shows the size in pixels and on disk, fits large pictures to the panel, enlarges small textures with sharp pixels, and draws transparency over a checkerboard. Image rows get their own icon and say "View". A picture that will not decode shows an error.
  • Version bumped to 1.3.1; release notes in docs/releases/v1.3.1.md.

Testing

  • npm test: 217 passed, 28 skipped (the live/real-helper suites).
  • npm run typecheck: clean.
  • cargo test --manifest-path src-tauri/Cargo.toml --lib: 52 passed, including the new viewer test.
  • The viewer was opened in the demo data in a browser.
  • Not verified: the viewer in the desktop app against a real instance.

Files opens pictures in a built-in viewer, the way 1.3.0 opens text
files in the editor. Clicking a .png, .jpg, .jpeg, .gif, .webp, .bmp or
.ico used to answer "This is not a text file".

The host reads the picture through the same path checks as the editor
and hands it to the page as a data URL, the only form the content
policy lets an <img> load. The first bytes decide whether a file is a
picture, never its name. Pictures over 16 MB are refused.

The viewer shows the size in pixels and on disk, fits large pictures to
the panel, enlarges small textures in whole steps with sharp pixels and
draws transparency over a checkerboard. Nothing is ever written.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 02:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@awakenginexe
awakenginexe merged commit c18b058 into main Nov 11, 2026
1 check passed
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