Skip to content

feat: loop errors in the web UI and per-provider auto retry - #15

Merged
Asutorufa merged 3 commits into
feat/web-design-refreshfrom
feat/loop-errors
Nov 28, 2026
Merged

Asutorufa merged 3 commits into
feat/web-design-refreshfrom
feat/loop-errors

Conversation

@Asutorufa

@Asutorufa Asutorufa commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Stacked on the design refresh PR.

Provider errors such as HTTP 429 RESOURCE_EXHAUSTED … Please retry in 13s used to appear only in the server log; the session stayed "running" and every reconnect retried silently.

Server

  • Keeps the last loop error per session: last_error { message, at, retry_at, attempt, max_attempts } in the session detail, failed in the session list. A failed session waits for a retry or new input instead of resuming on reconnect.
  • POST /api/sessions/:id/retry; /cancel also stops a scheduled automatic retry.
  • Per-provider auto_retry { enabled, max_attempts }, off by default (migration 0006). Transient errors (408/429/5xx/network, via oort_llm::Error::is_retryable) retry after the provider's hint + 1s or an exponential backoff (5s → 2 min max). Auth and other client errors never retry.
  • Mock model: !error <status> [once] <message> simulates provider failures for tests and demos.

Web

  • Error card at the end of the turn: plain Japanese explanation, HTTP status, quota summary (上限 16,000 / 分 · モデル gemma-4-31b), countdown, raw details, 再試行 / 今すぐ再試行 / 自動再試行をやめる.
  • Header and sidebar show the error state; the composer is no longer stuck in busy mode.
  • モデル設定: 自動再試行 toggle and max attempts.
  • Markdown renders LaTeX with KaTeX (remark-math + rehype-katex): $…$, $$…$$, \(…\), \[…\]; prices like $5 and $10 and code stay as text.

Verified: cargo test --workspace (143), clippy clean, tsc/npm run build clean, headless Chrome check of the error card, auto retry and provider setting.

🤖 Generated with Claude Code

Asutorufa and others added 3 commits November 28, 2026 19:54
…to retry

- server keeps the last loop error per session (detail.last_error, summary.failed);
  a failed session is no longer resumed by every SSE reconnect
- POST /api/sessions/:id/retry; cancel also stops a scheduled automatic retry
- providers.auto_retry {enabled, max_attempts} (off by default, migration 0006):
  transient errors (408/429/5xx/network) retry after the provider's hint or backoff
- web: error card in the turn (plain explanation, quota, countdown, details, retry),
  header/sidebar error state, auto-retry setting in モデル設定
- markdown: inline LaTeX symbols like $\rightarrow$ render as Unicode
- mock model: '!error <status> [once] <message>' simulates provider failures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- remark-math + rehype-katex (errors render as text, never throw)
- \(…\) / \[…\] delimiters are converted to $…$ / $$ blocks; prices like $5 and $10
  stay text; code spans and fences are untouched
- replaces the Unicode-symbol fallback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…otion, i18n (en/ja/ko) (#16)

* feat(server,llm): provider generation defaults, thinking level, model lists

- oort-agent: ReasoningEffort (default/off/low/medium/high) and ProviderDefaults
  (reasoning effort, temperature, max output tokens, context window, timeout)
- adapters: OpenAI/compatible send reasoning_effort and drop temperature/top_p with it;
  Anthropic maps effort to a thinking budget (4k/10k/24k), drops temperature/top_k and keeps
  max_tokens above the budget; Gemini uses thinkingBudget for 2.x and thinkingLevel later
  (pro models cannot switch thinking off)
- migration 0007: provider default columns, presets/sessions reasoning_effort
- sessions: thinking level from session -> preset -> provider; PATCH reasoning_effort
  changes the next request through a live handle (history, system, tools untouched);
  detail exposes effective_reasoning_effort
- per-provider read timeout; context window default for new sessions
- POST /api/providers/:id/models and /api/providers/models

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(web): custom UI primitives, motion system, provider workbench, composer pills

- components/ui: Popover (portal, auto flip), Select (listbox, keyboard, descriptions),
  SegmentedControl (layoutId pill), Switch (spring knob), Checkbox (drawn check),
  Collapse, Combobox; no native <select> or checkbox left in the app
- lib/motion presets; MotionConfig reducedMotion=user; animated palette, plan dropdown,
  collapsibles, inspector drawer, toasts, message and card entrances, sidebar highlight
- providers: kind tiles, section cards, API key eye toggle + env chip, model list fetch with
  combobox, thinking level, temperature slider, token presets, advanced section (timeout,
  auto retry, headers), sticky action bar with result banner
- composer: thinking level, approval policy and model as pill triggers; send/stop swap
- presets: thinking level; MCP, skills, debug panel and widget forms use the new controls

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(web): type-safe i18n (en/ja/ko) and language switcher

- web/src/i18n: lightweight provider + useI18n(); en is the key source, ja/ko are typed
  as Dict so a missing, extra or misspelled key fails tsc; {{var}} interpolation and
  Intl.PluralRules plural forms; Intl number/date/relative/duration formatting
- locale from navigator.languages (fallback en), stored as oort.locale, sets <html lang>;
  per-language CJK font stacks
- sidebar language menu (EN/JA/KO with native names), switches without reload
- every screen uses the dictionaries: chat, composer, reasoning/approval options,
  subagent rows, approval and error cards, plan, inspector, providers, MCP and playground,
  skills, memories, presets, widgets, toasts; server command texts and approval reasons
  are mapped from codes to keys
- strings sent to the model (decline reason, default prompts) stay language-independent
- README: provider defaults and thinking level, model list API, UI languages

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): header layout and opaque floating panels

- chat header: left group (title, status) shrinks and truncates, right group (plan pill,
  inspector) never shrinks; status badges and header buttons never wrap
- plan pill capped at 220/280px with a truncated current step; the plan dropdown renders in
  a portal aligned to the pill's right edge, 340/400px wide, steps wrap, list scrolls at 60vh
- popovers keep 16px from the viewport edges (scrollbar excluded) and skip no-op updates
- every floating panel (popover, select, combobox, menus, slash palette, plan, model picker,
  modal) is fully opaque: solid --bg-elevated (dark #1E1E24), 1px border, real shadow, no
  backdrop blur; solid hover/active rows (--bg-menu-hover / --bg-menu-active)
- conversation menu moved to a portal so the scrolling list can't clip it
- badges and chips never shrink in flex rows; provider footer is solid
- collapsed sidebar: theme, language and mode as a centered column of icon buttons
- model combobox also opens on click

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(llm): keep Gemini thought signatures on their function calls

Gemini 3 attaches thoughtSignature to the first functionCall of a step and rejects a
replayed history without it (HTTP 400 "Function call is missing a thought_signature").
Signatures were concatenated into one thinking signature and sent back on a thought part.

- ToolCall.signature (optional, omitted when empty); StreamEvent::ToolCallSignature
- Gemini: a signature on a functionCall part stays with that call (stream and non-stream);
  other signatures are kept whole, never concatenated
- encoding puts the call's signature back on its functionCall part; on Gemini 3+ a model turn
  without one (older history, another model's turns) gets the documented
  skip_thought_signature_validator placeholder, so existing chats continue

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: switch a chat's model mid-conversation

- PATCH /api/sessions/:id {model}: stored in sessions.model (the frozen config keeps the
  original); validated; subagent sessions keep theirs
- running loops read the model from a live handle (RequestParams.live_model), so the next
  request uses it; history, system prompt and tools are untouched
- session config, detail and new loops use the current model; SSE session_updated carries it
- web: the composer's model label is a picker filled from the provider's model list (cached
  per provider), with a toast on switch and a note when the list can't be loaded

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@Asutorufa
Asutorufa merged commit 582de65 into feat/web-design-refresh Nov 28, 2026
Asutorufa added a commit that referenced this pull request Nov 28, 2026
* style(web): neutral design refresh — hairline surfaces, single-avatar turns, header plan pill, compact subagent rows

- tokens: 90% neutral palette (canvas/sidebar/surface/user bubble, hairline borders);
  themes differ only in accent, used for send button, active dots and progress fills
- new monochrome orbit mark and one line-icon set; sidebar theme/mode utility row
- one brand mark per assistant turn; approvals and live output join the current turn
- plan moves from a floating card to a header pill with a dropdown
- subagent/skill runs as 44px expandable row cards with trace button
- approval cards: plain command block, Japanese subtitles, 却下 / 承認して実行 footer
- short untagged tool output renders as a result line (no code bar)
- Japanese copy for slash commands, command toasts and trace status

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: loop errors in the web UI and per-provider auto retry (#15)

* feat: show loop errors in the web UI, retry endpoint, per-provider auto retry

- server keeps the last loop error per session (detail.last_error, summary.failed);
  a failed session is no longer resumed by every SSE reconnect
- POST /api/sessions/:id/retry; cancel also stops a scheduled automatic retry
- providers.auto_retry {enabled, max_attempts} (off by default, migration 0006):
  transient errors (408/429/5xx/network) retry after the provider's hint or backoff
- web: error card in the turn (plain explanation, quota, countdown, details, retry),
  header/sidebar error state, auto-retry setting in モデル設定
- markdown: inline LaTeX symbols like $\rightarrow$ render as Unicode
- mock model: '!error <status> [once] <message>' simulates provider failures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(web): render LaTeX math with KaTeX

- remark-math + rehype-katex (errors render as text, never throw)
- \(…\) / \[…\] delimiters are converted to $…$ / $$ blocks; prices like $5 and $10
  stay text; code spans and fences are untouched
- replaces the Unicode-symbol fallback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: provider defaults & thinking level, custom UI primitives with motion, i18n (en/ja/ko) (#16)

* feat(server,llm): provider generation defaults, thinking level, model lists

- oort-agent: ReasoningEffort (default/off/low/medium/high) and ProviderDefaults
  (reasoning effort, temperature, max output tokens, context window, timeout)
- adapters: OpenAI/compatible send reasoning_effort and drop temperature/top_p with it;
  Anthropic maps effort to a thinking budget (4k/10k/24k), drops temperature/top_k and keeps
  max_tokens above the budget; Gemini uses thinkingBudget for 2.x and thinkingLevel later
  (pro models cannot switch thinking off)
- migration 0007: provider default columns, presets/sessions reasoning_effort
- sessions: thinking level from session -> preset -> provider; PATCH reasoning_effort
  changes the next request through a live handle (history, system, tools untouched);
  detail exposes effective_reasoning_effort
- per-provider read timeout; context window default for new sessions
- POST /api/providers/:id/models and /api/providers/models

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(web): custom UI primitives, motion system, provider workbench, composer pills

- components/ui: Popover (portal, auto flip), Select (listbox, keyboard, descriptions),
  SegmentedControl (layoutId pill), Switch (spring knob), Checkbox (drawn check),
  Collapse, Combobox; no native <select> or checkbox left in the app
- lib/motion presets; MotionConfig reducedMotion=user; animated palette, plan dropdown,
  collapsibles, inspector drawer, toasts, message and card entrances, sidebar highlight
- providers: kind tiles, section cards, API key eye toggle + env chip, model list fetch with
  combobox, thinking level, temperature slider, token presets, advanced section (timeout,
  auto retry, headers), sticky action bar with result banner
- composer: thinking level, approval policy and model as pill triggers; send/stop swap
- presets: thinking level; MCP, skills, debug panel and widget forms use the new controls

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(web): type-safe i18n (en/ja/ko) and language switcher

- web/src/i18n: lightweight provider + useI18n(); en is the key source, ja/ko are typed
  as Dict so a missing, extra or misspelled key fails tsc; {{var}} interpolation and
  Intl.PluralRules plural forms; Intl number/date/relative/duration formatting
- locale from navigator.languages (fallback en), stored as oort.locale, sets <html lang>;
  per-language CJK font stacks
- sidebar language menu (EN/JA/KO with native names), switches without reload
- every screen uses the dictionaries: chat, composer, reasoning/approval options,
  subagent rows, approval and error cards, plan, inspector, providers, MCP and playground,
  skills, memories, presets, widgets, toasts; server command texts and approval reasons
  are mapped from codes to keys
- strings sent to the model (decline reason, default prompts) stay language-independent
- README: provider defaults and thinking level, model list API, UI languages

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): header layout and opaque floating panels

- chat header: left group (title, status) shrinks and truncates, right group (plan pill,
  inspector) never shrinks; status badges and header buttons never wrap
- plan pill capped at 220/280px with a truncated current step; the plan dropdown renders in
  a portal aligned to the pill's right edge, 340/400px wide, steps wrap, list scrolls at 60vh
- popovers keep 16px from the viewport edges (scrollbar excluded) and skip no-op updates
- every floating panel (popover, select, combobox, menus, slash palette, plan, model picker,
  modal) is fully opaque: solid --bg-elevated (dark #1E1E24), 1px border, real shadow, no
  backdrop blur; solid hover/active rows (--bg-menu-hover / --bg-menu-active)
- conversation menu moved to a portal so the scrolling list can't clip it
- badges and chips never shrink in flex rows; provider footer is solid
- collapsed sidebar: theme, language and mode as a centered column of icon buttons
- model combobox also opens on click

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(llm): keep Gemini thought signatures on their function calls

Gemini 3 attaches thoughtSignature to the first functionCall of a step and rejects a
replayed history without it (HTTP 400 "Function call is missing a thought_signature").
Signatures were concatenated into one thinking signature and sent back on a thought part.

- ToolCall.signature (optional, omitted when empty); StreamEvent::ToolCallSignature
- Gemini: a signature on a functionCall part stays with that call (stream and non-stream);
  other signatures are kept whole, never concatenated
- encoding puts the call's signature back on its functionCall part; on Gemini 3+ a model turn
  without one (older history, another model's turns) gets the documented
  skip_thought_signature_validator placeholder, so existing chats continue

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: switch a chat's model mid-conversation

- PATCH /api/sessions/:id {model}: stored in sessions.model (the frozen config keeps the
  original); validated; subagent sessions keep theirs
- running loops read the model from a live handle (RequestParams.live_model), so the next
  request uses it; history, system prompt and tools are untouched
- session config, detail and new loops use the current model; SSE session_updated carries it
- web: the composer's model label is a picker filled from the provider's model list (cached
  per provider), with a toast on switch and a note when the list can't be loaded

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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