Skip to content

fix(desktop): offer Finder fallback when HTML artifact preview cannot be read #5215

Description

@liugddx

Problem

Maka already supports sandboxed HTML Artifact previews, but a generated HTML file that cannot be read is currently rendered as a failure message without a direct recovery action. In the reported workflow this leaves the user with a path or browser error and requires manual shell/Finder steps.

Expected behavior

When an HTML Artifact preview cannot be read, the failure state should include the existing safe "在 Finder 中打开" action. The action must use the artifact IPC path resolver; the renderer must not construct absolute paths or weaken the file:// navigation guard.

Scope

Maka Desktop Artifact UI only. This issue does not change Browser admission, localhost networking, background process state, or the file:// security policy.

Acceptance criteria

  1. HTML read failures show a clear error and a Finder fallback action.
  2. The action uses openArtifactPath(sessionId, artifactId) and preserves path validation/materialization in the main process.
  3. Successful preview behavior and sandbox restrictions remain unchanged.
  4. Add only the focused regression coverage needed for the new failure action.

Related: #4267

Activity

  1. Dante-dan commented on Sep 12, 2026

    @Dante-dan
    Contributor

    take

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions