Skip to content

Revert #30396: misleading usage-limit Continue flow - #33351

Closed
AmethystLiang wants to merge 1 commit into
mainfrom
fix-false-continue-button
Closed

AmethystLiang wants to merge 1 commit into
mainfrom
fix-false-continue-button

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​70 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1213 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1143
Prod 55 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​262 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1279 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1017

ELI5

The usage-limit warning offered an enabled Continue button even before the reported reset. Clicking it sent a message immediately and could hit the same limit again. Revert #30396 so the recovery flow can be redesigned.

What Changed

  • Revert squash commit 4a33cd8e7308a362be793006f3ae411ab6e3aaaf: remove the usage-limit Continue action, provider failure classification/reset presentation, mobile reset wording, continuation send field/capability, and associated copy/tests.
  • Resolve conflicts with subsequent refactors and dependent OpenCode/mobile/orchestration code. Preserve later skill sending, presentation guards, authentication recovery, lifecycle handling, and generic journal/latest-turn primitives now used elsewhere.
  • Add initial redesign thoughts, covering reset-based availability, unknown limits, clock/sleep/restart behavior, concurrent clients, remote/mixed versions, mobile, and validation. The replacement is not implemented here.

Why

The action's enabled state and position imply immediate recovery, while its tooltip asks the user to wait. A tooltip cannot supply the missing availability rule. This is the requested rollback of the original PR, including its broader limit presentation; ordinary manual messages and restart-interruption Continue remain available.

Linked Issue

Original feedback thread. Original implementation: #30396 (Brennan Benson).

Visual Proof

Before: the screenshot in the linked feedback thread shows the enabled Continue next to a future weekly reset. This rollback removes that usage-limit action and restores ordinary provider-error presentation. Renderer component tests cover the restored behavior; new Electron/CDP screenshots were not captured in this workspace.

Testing

  • ORCA_BACKGROUND_LAUNCH=1 pnpm tc — passed.
  • ORCA_BACKGROUND_LAUNCH=1 pnpm --dir mobile typecheck — passed.
  • Final targeted provider, host-send, orchestration, renderer, and shared tests: 15 files / 363 tests passed.
  • Broader Claude context/journal, Codex journal, latest-request, and composer coverage: 37 files / 431 tests passed (overlaps the targeted run).
  • Mobile message suite: 41 tests passed.
  • Changed-code quality gate, max-lines ratchet, localization catalogs/extraction, RPC params catalog, and diff whitespace checks passed.
  • Automated validation ran on macOS; no visible app windows were launched. Full cross-platform CI/build and rendered Electron validation remain for review/CI.

Agent skill upstream boundary

  • No upstream skill-installer source or assets copied.

Notes

The rollback intentionally removes the structured reset metadata introduced by #30396. Saved rows or newer remote hosts retain readable fallback text; capability negotiation prevents updated clients from requiring the removed continuation field. Later OpenCode failures fall back to ordinary error rows with their provider text. No scheduled or automatic resume is added.

Reverts 4a33cd8. Resolve conflicts against later chat, provider, and localization changes while retaining generic primitives now used by other features and the existing attachment-word extraction required by the line budget.

Record initial redesign guidance and edge cases in docs/native-chat-usage-limit-redesign.md.
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The pull request removes usage-limit tracking and reset-time data from provider journaling and shared failure contracts. It removes the related native-chat continuation controls and send parameters, and deletes associated presentation text and translations. ACP rate-limit failures now produce error statuses with diagnostic text. Mobile line notices display their original text. A new design document describes a possible replacement policy but does not implement it.

Priority: Normal

Merge Risk: Moderate · up to 43c15

Existing saved limit notices may become harder to find, and the replacement-flow guidance needs clearer retry safeguards. Resolve the visibility regression before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 38.46% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 26 functions across 33 files. (8 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: reverting the misleading usage-limit Continue flow. It is concise and specific.
Description check Passed The description explains the user impact, scope, rationale, implementation details, redesign document, and testing. However, it does not provide an actual linked issue, complete the required visual pr…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the user impact, scope, rationale, implementation details, redesign document, and testing. However, it does not provide an actual linked issue, complete the required visual proof for this UI behavior change, or complete the Review and Checklist sections.

Full details: Docstring Coverage

Explanation

Docstring coverage is 38.46% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 26 functions across 33 files. (8 skipped: 8 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 09c15d57-71eb-447b-a7fb-fe5b27233dd5
Commits

Reviewing files that changed from the base of the PR and between f92d828 and 43c150d.

Files selected for processing: 68
  • docs/native-chat-usage-limit-redesign.md
  • mobile/src/session/MobileNativeChatMessage.test.ts
  • mobile/src/session/MobileNativeChatNoticeRow.tsx
  • src/main/acp/acp-dialects/acp-dialect.ts
  • src/main/acp/acp-dialects/grok-dialect.ts
  • src/main/acp/acp-dialects/opencode-dialect.ts
  • src/main/acp/acp-timeline-opencode-dialect.test.ts
  • src/main/acp/acp-timeline-translator.ts
  • src/main/acp/acp-timeline-turn-failures.test.ts
  • src/main/acp/acp-turn-failures.ts
  • src/main/claude/claude-context-usage-test-support.ts
  • src/main/claude/claude-message-journaling.ts
  • src/main/claude/claude-open-turn.ts
  • src/main/claude/claude-result-journaling.ts
  • src/main/claude/claude-structured-journal-translation.ts
  • src/main/claude/claude-structured-provider-fallback.ts
  • src/main/claude/claude-terminal-failure.ts
  • src/main/claude/claude-thread-goal-journaling.test.ts
  • src/main/claude/claude-usage-limits.test.ts
  • src/main/claude/claude-usage-limits.ts
  • src/main/codex/codex-structured-journal-generic-frames.ts
  • src/main/codex/codex-usage-limits.test.ts
  • src/main/codex/codex-usage-limits.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-mutations.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-queued-action-receipts.test.ts
  • src/main/runtime/orchestration/chat-worker-request-failures.test.ts
  • src/renderer/src/components/native-chat/NativeChatInterruptedContinue.test.tsx
  • src/renderer/src/components/native-chat/NativeChatInterruptedContinue.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.turn-status.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/NativeChatTranscriptChrome.tsx
  • src/renderer/src/components/native-chat/agent-session-failure-words-text.ts
  • src/renderer/src/components/native-chat/agent-session-usage-limit-words-text.ts
  • src/renderer/src/components/native-chat/agent-session-write-notice-text.ts
  • src/renderer/src/components/native-chat/native-chat-orca-stop-context.ts
  • src/renderer/src/components/native-chat/native-chat-structured-user-action.ts
  • src/renderer/src/components/native-chat/structured-agent-session-message-sender.test.ts
  • src/renderer/src/components/native-chat/structured-agent-session-pending-sends.ts
  • src/renderer/src/components/native-chat/structured-agent-session-send-attempt.ts
  • src/renderer/src/components/native-chat/structured-agent-session-send-slot.ts
  • src/renderer/src/components/native-chat/use-native-chat-structured-composer-send.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session-sends.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/agent-session-create-capabilities.ts
  • src/shared/agent-session-failure-copy.ts
  • src/shared/agent-session-failure-words.ts
  • src/shared/agent-session-failure.ts
  • src/shared/agent-session-refusal-details.ts
  • src/shared/agent-session-refusal-reason-words.ts
  • src/shared/agent-session-usage-limit-words.ts
  • src/shared/agent-session-usage-limit.ts
  • src/shared/agent-session-write-notice-copy.ts
  • src/shared/native-chat-turn-fold.ts
  • src/shared/native-chat-types.ts
  • src/shared/native-chat/native-chat-usage-limit-cut.ts
  • src/shared/rpc-contract/structured-agent-session-params.ts
  • src/shared/structured-agent-session-send-mutation.spec.ts
  • src/shared/structured-agent-session-send-mutation.ts
  • src/shared/structured-agent-session-status-block.ts
Files with no reviewable changes: 27
  • src/renderer/src/components/native-chat/agent-session-write-notice-text.ts
  • mobile/src/session/MobileNativeChatMessage.test.ts
  • src/renderer/src/components/native-chat/agent-session-usage-limit-words-text.ts
  • src/shared/agent-session-failure-copy.ts
  • src/main/claude/claude-usage-limits.test.ts
  • src/renderer/src/components/native-chat/structured-agent-session-pending-sends.ts
  • src/shared/structured-agent-session-send-mutation.spec.ts
  • src/shared/agent-session-write-notice-copy.ts
  • src/renderer/src/components/native-chat/agent-session-failure-words-text.ts
  • src/shared/agent-session-refusal-reason-words.ts
  • src/shared/structured-agent-session-status-block.ts
  • src/shared/native-chat/native-chat-usage-limit-cut.ts
  • src/shared/agent-session-refusal-details.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/components/native-chat/use-structured-agent-session-sends.ts
  • src/renderer/src/components/native-chat/native-chat-structured-user-action.ts
  • src/main/codex/codex-usage-limits.test.ts
  • src/shared/native-chat-types.ts
  • src/shared/rpc-contract/structured-agent-session-params.ts
  • src/main/claude/claude-usage-limits.ts
  • src/shared/agent-session-failure-words.ts
  • src/main/claude/claude-terminal-failure.ts
  • src/shared/agent-session-create-capabilities.ts
  • src/main/codex/codex-usage-limits.ts
  • src/shared/agent-session-usage-limit.ts
  • src/shared/agent-session-usage-limit-words.ts
  • src/shared/agent-session-failure.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment on lines +58 to +63
latest relevant turn is a usage-limit failure
AND reset timestamp is usable
AND fresh current time >= reset timestamp
AND session can accept a new message
AND no send, queued request, or resume supersedes this action
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Include all blocking windows in conceptual eligibility.

The eligibility block requires one usable reset timestamp. Lines 77-78 require all blocking resets to be usable and the effective deadline to be the latest reset. Define reset timestamp as that aggregate result, or add the all-windows and unknown-reset conditions here. Otherwise, a literal implementation can expose Try again while another blocking window remains active.

| Send refused | Show a recoverable error, keep the draft, and derive any subsequent action from current state. |
| Delivery uncertain after disconnect | Warn that receipt could not be confirmed. Never automatically resend or claim the message was not delivered. |
| Provider rejects again after the reported reset | Use the new failure evidence, explain the continued limit, and avoid automatic retry loops. The provider remains the authority. |
| Older paired server, desktop, phone, or saved history | Missing optional metadata means unknown. Preserve readable fallback text and capability-gated fields. Older hosts lack the stronger turn-bound race check; do not promise identical concurrency guarantees. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Data Integrity & Integration · Quick win

🔎 Supported by static analysis

Script executed:

test -f docs/native-chat-usage-limit-redesign.md || { echo "missing file"; exit 1; }
awk 'NR>=45 && NR<=95 { printf "%d: %s\n", NR, $0 }' docs/native-chat-usage-limit-redesign.md
rg -n -F -e 'source-turn' -e 'Try again' -e 'capabilit' -- docs/native-chat-usage-limit-redesign.md || test "$?" -eq 1

Repository: stablyai/orca

Length of output: 13343


Gate Try again on source-turn validation for older hosts.

The guidance requires host-side source-turn validation on supported hosts. It does not say whether the Try again action is hidden on hosts that lack that validation. Older hosts can then receive a stale recovery request that the host does not check. Another device can advance the session, and the older host can accept the stale request.

Show Try again only when the host advertises source-turn validation. Alternatively, define an equivalent atomic check before implementation.

📝 Suggested doc change
--- "a/docs/native-chat-usage-limit-redesign.md"
+++ "b/docs/native-chat-usage-limit-redesign.md"
@@ -87,7 +87,7 @@
 | Send refused                                                                                     | Show a recoverable error, keep the draft, and derive any subsequent action from current state.                                                                                                                                                    |
 | Delivery uncertain after disconnect                                                              | Warn that receipt could not be confirmed. Never automatically resend or claim the message was not delivered.                                                                                                                                      |
 | Provider rejects again after the reported reset                                                  | Use the new failure evidence, explain the continued limit, and avoid automatic retry loops. The provider remains the authority.                                                                                                                   |
-| Older paired server, desktop, phone, or saved history                                            | Missing optional metadata means unknown. Preserve readable fallback text and capability-gated fields. Older hosts lack the stronger turn-bound race check; do not promise identical concurrency guarantees.                                       |
+| Older paired server, desktop, phone, or saved history | Missing optional metadata means unknown. Preserve readable fallback text and capability-gated fields. Hide Try again unless the host advertises source-turn validation. Older hosts lack the stronger turn-bound race check; do not promise identical concurrency guarantees. |
 | Partial history, reconnect, or delayed hydration                                                 | Do not offer recovery from an incompletely established latest turn. Reconcile once authoritative state arrives.                                                                                                                                   |
 | Mobile and collapsed transcript                                                                  | Keep warning copy consistent across clients. Where a retry shortcut exists, use the same policy. Keep a relevant warning discoverable when work is collapsed without exposing actions on historical warnings.                                     |
 | Git worktree versus folder workspace; macOS/Linux/Windows; local versus remote                   | This policy must not depend on git identity, OS-specific paths, focus APIs, or a local execution host.                                                                                                                                            |
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| Older paired server, desktop, phone, or saved history | Missing optional metadata means unknown. Preserve readable fallback text and capability-gated fields. Older hosts lack the stronger turn-bound race check; do not promise identical concurrency guarantees. |
| Older paired server, desktop, phone, or saved history | Missing optional metadata means unknown. Preserve readable fallback text and capability-gated fields. Hide Try again unless the host advertises source-turn validation. Older hosts lack the stronger turn-bound race check; do not promise identical concurrency guarantees. |

(block) =>
block.type === 'text' &&
(block.tone === 'error' || block.failure?.kind === 'usageLimitReached') &&
block.tone === 'error' &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

🔎 Supported by static analysis

Script executed:

#!/bin/bash
# Find existing fold tests and any remaining readers of legacy failure kinds.
rg -n -C3 'reportsFailure|nativeChatTurnFold\(' --glob '*.test.ts' --glob '*.test.tsx' src/shared src/renderer
rg -n -C2 'usageLimitReached' src

Repository: stablyai/orca

Length of output: 9222


Script executed:

echo "== current fold source =="
sed -n '1,200p' src/shared/native-chat-turn-fold.ts

echo "== squash commit availability =="
if git cat-file -e 4a33cd8e7308a362be793006f3ae411ab6e3aaaf^{commit} 2>/dev/null; then
  echo "available"
  echo "== removed writer and tone (squash commit) =="
  git grep -n -C4 'usageLimitReached' 4a33cd8e7308a362be793006f3ae411ab6e3aaaf -- src | head -n 200
  echo "== removed fold-file diff (squash commit) =="
  git show 4a33cd8e7308a362be793006f3ae411ab6e3aaaf -- src/shared/native-chat-turn-fold.ts | head -n 200
else
  echo "squash commit unavailable"
fi

echo "== history of usageLimitReached in src =="
git log -S'usageLimitReached' --oneline --all -- src | head -n 10

Repository: stablyai/orca

Length of output: 16866


Keep saved usage-limit rows visible after the fold change.

Saved usage-limit rows use tone: 'warning'. reportsFailure now requires block.tone === 'error', so these rows no longer qualify as a settled turn's answer. The fold then treats them as foldable, and they can sit behind the disclosure. Before this change, the removed usageLimitReached alternative let such a row report failure. In a turn with no assistant prose, the whole turn folds, so the row that explains why the turn ended is hidden.

Restoring visibility requires recognizing the saved rows. Matching their stored usageLimitReached failure kind reintroduces the classification this revert removes. Choose that approach deliberately, and confirm that saved rows still carry the failure kind.

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