Skip to content

fix(gui): friendly error messages, failure bubble persistence, and default UX tweaks - #52

Merged
huichen merged 2 commits into
mainfrom
fix/gui-friendly-errors-and-persistence
Jul 27, 2026
Merged

huichen merged 2 commits into
mainfrom
fix/gui-friendly-errors-and-persistence

Conversation

@huichen

@huichen huichen commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

1. User-friendly error messages

  • New classifyAgentError() maps raw agent/API error blobs to actionable i18n copy
  • Covers: insufficient credit (with recharge URL), auth failure, rate limiting, server unavailable, context limit, network error
  • Auto-extracts the provider's message field from embedded JSON, strips the noise like "Request: N messages, N KB."
  • Also applied to the RunEmbed detail card

2. Failure bubbles survive thread switches / reload

  • New recoverFailedRuns() rebuilds failure bubbles from the runs table for turns that left no trace in the agent session JSONL (e.g. the first LLM call was rejected with HTTP 402)
  • Orphan-run detection via timestamp window matching prevents positional misalignment that would stamp a failed run onto the wrong turn
  • Rebuilt bubbles carry runId, status, and modelId — Retry works
  • Viability guard: falls back to main's behavior for legacy sessions with missing timestamps

3. Copy polish — no technical jargon

  • failure.connect: removed FUTURE_AGENT_GRPC_ADDR / 127.0.0.1:50051, now says to quit and reopen FutureOS
  • Same treatment for notice.agentUnavailable, connectionError, etc.
  • "Future Agent" → "FutureOS background service"
  • "API Key" → "key" (in user-facing failure messages)
  • Dropped trailing ellipsis from "选择聊天…" / "Select chats…"

4. Default UX tweaks

  • showThinking defaults to false (reasoning content hidden by default)
  • deepseek-v4-pro thinking level lowered from xhigh to high

chenhui and others added 2 commits July 27, 2026 17:41
- Map raw agent/API errors to user-friendly i18n copy (credit, auth,
  rate-limit, server, context, network) via classifyAgentError()
- Restore failure bubbles on reload for runs that failed before the
  agent saved any assistant entry (e.g. HTTP 402 on first LLM call)
- Orphan-run detection via timestamp window matching to prevent
  misalignment of run → turn pairing in applyRunMetadata
- Default showThinking to false; deepseek-v4-pro thinking level to high
- Remove technical jargon from user-facing copy (FUTURE_AGENT_GRPC_ADDR,
  Future Agent, API Key) and polish for non-technical audience
- Include recharge URL in insufficient-credit error message
- Drop trailing ellipsis from "选择聊天" / "Select chats"
@huichen
huichen merged commit 7b957d5 into main Jul 27, 2026
16 checks passed
@huichen
huichen deleted the fix/gui-friendly-errors-and-persistence branch July 27, 2026 09:45
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.

1 participant