You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "M4n5ter (via GitHub)" <gi...@apache.org> on 2026/08/21 13:09:25 UTC
[PR] feat(desktop): copy diagnostics on demand [maka]
M4n5ter opened a new pull request, #3427:
URL: https://github.com/apache/maka/pull/3427
Fixes #3425
<details open>
<summary>English</summary>
## Summary
- Upgrade the existing environment-summary actions in About and the command palette to copy a complete diagnostic report on demand.
- Reuse the bounded, redacted Desktop and Runtime Host diagnostic pipeline already used by error surfaces.
- Keep Desktop diagnostics available when the active Runtime Host or About metadata is unavailable; reports remain clipboard-only and are never uploaded automatically.
## Verification
- npm run lint
- npm run format:check
- npm --workspace @maka/desktop run typecheck
- npm --workspace @maka/desktop run test:dist — 1026 passed
- node --test apps/desktop/dist/main/__tests__/main-process-diagnostics.test.js — 9 passed
## AI use
Select exactly one:
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: Codex assisted with implementation, tests, and pull request drafting; the human contributor remains responsible for the change.
## Checklist
- [x] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [x] Yes — described under Summary above
- [ ] No
</details>
<details>
<summary>中文</summary>
## 概要
- 将“关于”页和命令面板中原有的环境信息复制入口升级为可随时主动复制完整诊断报告。
- 复用错误界面已经使用的有界、脱敏 Desktop 与 Runtime Host 诊断链路。
- 即使当前 Runtime Host 或“关于”信息不可用,也仍可复制 Desktop 侧诊断;报告只写入剪贴板,不会自动上传。
## 验证
- npm run lint
- npm run format:check
- npm --workspace @maka/desktop run typecheck
- npm --workspace @maka/desktop run test:dist — 1026 项通过
- node --test apps/desktop/dist/main/__tests__/main-process-diagnostics.test.js — 9 项通过
## AI 使用
Codex 辅助了实现、测试和 PR 文案;贡献者本人仍对该变更负责。AI 使用选项已在英文部分勾选。
## 检查清单
- 测试覆盖该变更,并会在缺少实现时失败。
- lint、format、typecheck 与受影响测试均已在本地通过。
- 本 PR 包含用户可见的行为变更,已在概要中说明。
</details>
--
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] feat(desktop): make diagnostics context-aware and available on demand [maka]
Posted by "M4n5ter (via GitHub)" <gi...@apache.org>.
M4n5ter commented on PR #3427:
URL: https://github.com/apache/maka/pull/3427#issuecomment-5378208238
Tracked both non-blocking P2 review findings, together with the remaining deliberately out-of-scope diagnostics blind spots, in #3463. They do not change #3427's merge bar, so no further changes are needed in this PR.
--
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] feat(desktop): make diagnostics context-aware and available on demand [maka]
Posted by "M4n5ter (via GitHub)" <gi...@apache.org>.
M4n5ter merged PR #3427:
URL: https://github.com/apache/maka/pull/3427
--
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] feat(desktop): make diagnostics context-aware and available on demand [maka]
Posted by "M4n5ter (via GitHub)" <gi...@apache.org>.
M4n5ter commented on PR #3427:
URL: https://github.com/apache/maka/pull/3427#issuecomment-5377898896
Follow-up: hard Renderer/process crashes, inline-only Renderer failures, and Runtime Host crashes that discard the in-memory log tail still need separate treatment beyond this clipboard-only, no-storage scope.
--
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] feat(desktop): make diagnostics context-aware and available on demand [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #3427:
URL: https://github.com/apache/maka/pull/3427#discussion_r3835244994
##########
apps/desktop/src/renderer/app-shell-skill-actions.ts:
##########
@@ -55,52 +83,49 @@ export function createAppShellSkillActions(deps: {
async function refreshSkills(options: { shouldShowError?: () => boolean } = {}) {
try {
- const next = await window.maka.skills.list();
- setSkills(next);
+ const next = await runOnDefaultRuntimeHost((host) => window.maka.skills.list(host));
+ setSkills(next.value);
Review Comment:
**[P2] Discard refresh results from a Host that is no longer the default**
Thanks for binding each request and its diagnostic target to the same captured Host. One presentation race remains: if a refresh for default Host A is still pending when the user switches to B, B can return first and display its data, after which A returns and unconditionally overwrites the current Skills state here. The sibling managed-source, bundled-catalog, and scheduled-task refreshes have the same completion behavior.
The existing project refresh already demonstrates the clean fix: capture `{ profileId, hostId }`, then compare it with the current default immediately before committing the result. A shared generation or identity guard for these default-bound projections would avoid duplicating that check. Cancellation alone would not be sufficient because an already-dispatched IPC request may still settle.
##########
apps/desktop/src/renderer/error-boundary.tsx:
##########
@@ -82,14 +82,11 @@ export class ErrorBoundary extends Component<{ children: ReactNode; locale: UiLo
try {
const diagnostics = window.maka?.diagnostics;
if (diagnostics) {
- const result = await diagnostics.copyErrorReport({
+ await diagnostics.copyReport({
surface: 'renderer_crash',
title: `${error.name}: ${error.message}`,
details: formatRendererErrorDetails(error, errorInfo),
- rendererUserAgent: navigator.userAgent,
- rendererLocale: navigator.language,
});
- if (!result.ok) throw new Error('Desktop diagnostic clipboard write failed');
} else {
await navigator.clipboard.writeText(formatRendererErrorReport(error, errorInfo));
Review Comment:
**[P2] Bound the browser-only fallback report before writing it**
Thanks for keeping diagnostics available when the renderer is running without the Electron bridge. The Electron path bounds renderer details in main, but this fallback directly concatenates the error, stack, component stack, user agent, and full location before writing to the clipboard. A very large error or `data:` URL can therefore create an unbounded write while the renderer is already on its recovery screen.
Could the browser path reuse a bounded renderer-report formatter, with explicit UTF-8 budgets for the details, location, and final report? One focused test with an oversized error and URL should cover the contract without adding another diagnostics authority.
--
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