You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "liugddx (via GitHub)" <gi...@apache.org> on 2026/09/12 04:32:56 UTC
[PR] fix(desktop): offer Finder fallback for unreadable HTML artifacts [maka]
liugddx opened a new pull request, #5216:
URL: https://github.com/apache/maka/pull/5216
## Problem
When an HTML Artifact cannot be read, the Desktop preview shows an error banner but provides no direct recovery action. In the reported workflow this leaves users to copy paths or fall back to shell commands manually.
## Change
Pass the existing Artifact Pane Finder action into the HTML preview failure state and render a secondary `在 Finder 中打开` action when the HTML read fails. The action still goes through `openArtifactPath(sessionId, artifactId)`, so path validation and materialization remain in the main process.
## Scope
- Maka Desktop Artifact UI only.
- No changes to Browser admission, localhost networking, background task state, or the `file://` security policy.
- Existing successful HTML preview and sandbox behavior are unchanged.
Closes #5215
Related: #4267
## Validation
- `git diff --check` passes.
- Typecheck was attempted but cannot run in this checkout because dependencies (`tsc`) are not installed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): make HTML artifacts directly openable [maka]
Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #5216:
URL: https://github.com/apache/maka/pull/5216#issuecomment-5649722501
Updated the HTML external action label to explicitly say Open in Default App (localized equivalents in Chinese and Traditional Chinese). The current Artifact detail screen remains the in-Maka preview entry; the menu now clearly distinguishes in-app viewing from external default-app opening and Finder reveal. Desktop typecheck and Biome pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): make HTML artifacts directly openable [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #5216:
URL: https://github.com/apache/maka/pull/5216#discussion_r3996681445
##########
apps/desktop/src/renderer/features/workbar/tools/artifacts/artifact-pane.tsx:
##########
@@ -282,6 +283,30 @@ export function ArtifactPane(props: {
}
}
+ async function showInFinder(artifactId: string) {
Review Comment:
[P3] The separate Open and Show in Finder actions are correct, but this function duplicates the session-activity guard, result handling and catch/toast logic in `openArtifact` immediately above. A small local helper that accepts the selected service operation could keep that policy in one place and remove most of this duplication, while preserving the explicit menu/CTA actions and their separate IPC operations. No new service class or generic facade is needed. This is non-blocking.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): make HTML artifacts directly openable [maka]
Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #5216:
URL: https://github.com/apache/maka/pull/5216#issuecomment-5646419818
Addressed Astro-Han's P2/P3 review findings in 86eec55ee.
- HTML artifacts keep the default-app `Open` action via `shell.openPath`.
- HTML artifacts now also expose an explicit `Show in Finder` action and failure-card CTA via a dedicated `app:showArtifactInFolder` IPC path using `shell.showItemInFolder`.
- Finder reveal and default-app open both materialize the validated artifact path first; neither opener is invoked after materialization failure.
- Added focused coverage for Finder reveal, opener return-error/rejection, materialization failure, and the renderer HTML failure CTA callback.
- Updated bridge/renderer ports, fakes, stories, and adapter coverage.
Verification:
- `npm run typecheck --workspace apps/desktop`
- `npm run build:test --workspace apps/desktop`
- `node --test apps/desktop/dist/main/__tests__/runtime-host-artifacts-ipc-main.test.js apps/desktop/dist/main/__tests__/workbar-services-adapter.test.js apps/desktop/dist/main/__tests__/artifact-preview.test.js` (20 passed)
- Biome check on the changed files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): make HTML artifacts directly openable [maka]
Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx merged PR #5216:
URL: https://github.com/apache/maka/pull/5216
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): make HTML artifacts directly openable [maka]
Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #5216:
URL: https://github.com/apache/maka/pull/5216#issuecomment-5646528823
Follow-up: the renderer regression is now kept inside the existing `workbar-services-adapter.test.ts` entry so the repository's renderer-architecture and Knip checks remain satisfied. Latest head: `c64a564ef`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): make HTML artifacts directly openable [maka]
Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #5216:
URL: https://github.com/apache/maka/pull/5216#issuecomment-5649858765
<img width="980" height="928" alt="image" src="https://github.com/user-attachments/assets/057df55b-7cc2-43e1-8afa-fdeafa7307a6" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org