You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User reports of `CodesignError: Request was aborted.` during long generations (e.g. one-shot full PDP / multi-section pages). The error is opaque — users have no idea this is a local timeout fire, not a network/model failure.
Root Cause
Two compounding issues:
1. Abort reason is dropped before reaching the user
`apps/desktop/src/main/generation-ipc.ts:76-78` correctly aborts with a descriptive reason:
```ts
controller.abort(
new Error(`Generation aborted after ${timeoutSec}s (Settings → Advanced → Generation timeout).`)
);
```
But the underlying SDK (Anthropic / OpenAI) wraps the abort and throws its own generic message — `node_modules/@anthropic-ai/sdk/.../error.ts:112`:
```ts
super(undefined, undefined, message || 'Request was aborted.', undefined);
```
The original `controller.signal.reason` is never read by the catch block in main, so the user sees `Request was aborted.` with no context.
2. Settings → Advanced → Generation timeout dropdown is broken
(Tracked internally; surfacing here.)
Default value is `1200s` but the `` options max out at `300s`
UI shows blank-selected on load
Save silently downgrades to a value within range
So a user who wants 30-minute generations cannot pick a value above 5 minutes — they get auto-aborted at `300s` (or whatever the silently-downgraded value is) without warning.
Expected Behavior
Timeout aborts surface with a clear message including the timeout value AND a link/button to Settings → Advanced → Generation timeout
Dropdown supports a usable range (at least 1800s, ideally 3600s+ or unlimited "no timeout")
No silent downgrade — if a stored value isn't in the list, show it as a custom option or surface a warning
Proposed Fix
Detect timeout abort in main/generate catch: read `controller.signal.reason` and rewrap as `CodesignError(GENERATION_TIMEOUT, { meta: { timeoutSec } })`
New error code `GENERATION_TIMEOUT` with i18n message: "Generation timed out after {seconds}s. You can raise the limit in Settings → Advanced → Generation timeout."
Settings dropdown: extend options to {60, 300, 600, 1200, 1800, 3600, 7200} or replace with numeric input; remove silent downgrade
Why This Matters
Users with custom providers, slow models, or one-shot multi-section requests hit this routinely and have no idea why. The current UX makes it look like the gateway / model failed. This compounds with 正常对话时报 403 错误:Error invoking remote method 'codesign:v1:generate' #124 / bug: 第三方中转服务测试连接通过但生成返回 500 not implemented #158 / bug(desktop): generation fails with codesign:v1:generate 404 on Win11 relay setup #130 confusion: every "generation failed" report has to be triaged manually because the error message reveals nothing.
Related
正常对话时报 403 错误:Error invoking remote method 'codesign:v1:generate' #124 / bug: 第三方中转服务测试连接通过但生成返回 500 not implemented #158 / bug(desktop): generation fails with codesign:v1:generate 404 on Win11 relay setup #130 / bug(desktop): macOS generation fails with Instructions are required and no visible output #134 — all part of the broader "generation failures need diagnose() bridge" effort
Internal note: timeout dropdown options upper bound vs default mismatch
Summary
User reports of `CodesignError: Request was aborted.` during long generations (e.g. one-shot full PDP / multi-section pages). The error is opaque — users have no idea this is a local timeout fire, not a network/model failure.
Root Cause
Two compounding issues:
1. Abort reason is dropped before reaching the user
`apps/desktop/src/main/generation-ipc.ts:76-78` correctly aborts with a descriptive reason:
```ts
controller.abort(
new Error(`Generation aborted after ${timeoutSec}s (Settings → Advanced → Generation timeout).`)
);
```
But the underlying SDK (Anthropic / OpenAI) wraps the abort and throws its own generic message — `node_modules/@anthropic-ai/sdk/.../error.ts:112`:
```ts
super(undefined, undefined, message || 'Request was aborted.', undefined);
```
The original `controller.signal.reason` is never read by the catch block in main, so the user sees `Request was aborted.` with no context.
2. Settings → Advanced → Generation timeout dropdown is broken
(Tracked internally; surfacing here.)