mirror of
https://github.com/Gitlawb/openclaude.git
synced 2026-08-24 10:14:19 -05:00
* feat(ux): honest feedback pass — visible retries, statusline truncation marker, hint grace period
Three fixes with one principle: never look frozen, never silently hide state.
- SystemAPIErrorMessage: retries were fully hidden until attempt 4, so
transient rate limits / overloads were indistinguishable from a hang.
Attempts 1-3 now render a compact dim line ("Rate limited — retrying
in 4s… (attempt 2/10)") with a live countdown; the full error block
is unchanged at attempt >= 4. The transcript already keeps only the
last api_error message and hides it on the next non-error message,
so early visibility adds no stacking. New briefAPIErrorReason()
classifies 429/529/5xx/connection failures, including the
OpenAI-compat shim's plain-text transport errors that carry no cause
chain. Component rewritten from react-compiler output to plain React.
- BuiltinStatusLine: fitSegments dropped rate-limit -> cost -> context
silently on narrow terminals. Segments now degrade to short forms
first (ctx 37% -> 37%, $1.23 -> $1), and anything still dropped is
marked with a trailing dim "…" so hidden data is visible as hidden.
The marker is best-effort: at extreme widths the bare model name
beats showing nothing.
- PromptInputFooter: "? for shortcuts" was suppressed whenever a status
line rendered — the default state since the builtin statusline
shipped, killing the hint's discoverability path entirely. New users
(numStartups <= 10) keep the hint alongside the status line;
established users get the quieter footer.
- docs: BASH_MAX_OUTPUT_LENGTH env var documented on the website env
reference (default 30000, cap 150000).
Verified live in the TUI (tmux + mock OpenAI endpoint): compact retry
line from attempt 1 against a dead endpoint, full block at attempt 4,
Esc interrupts cleanly; statusline at 100/32/24 cols shows full /
degraded / "test-model · 2% · …"; hint present at numStartups=2,
suppressed at 50.
Co-Authored-By: OpenClaude <openclaude@gitlawb.com>
* fix(review): address CodeRabbit feedback — custom statusline yields immediately, timeout test, docs wording
- shouldSuppressShortcutsHint: a custom status line is explicit user
configuration, so it now always wins over the discoverability grace
period; only the builtin status line grants new users the hint.
Test added to lock the semantics.
- Test the ETIMEDOUT -> "Request timed out" branch. Note: CodeRabbit's
suggested test shape (plain object with a cause) would not exercise
the branch — extractConnectionErrorDetails only walks Error
instances — so the error itself carries the code.
- Docs: soften "full output saved" to reflect the persisted-file cap.
Co-Authored-By: OpenClaude <openclaude@gitlawb.com>
---------
Co-authored-by: OpenClaude <openclaude@gitlawb.com>