Repository navigation
Revert #30396: misleading usage-limit Continue flow - #33351
AmethystLiang wants to merge 1 commit into
Conversation
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.
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
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
Files selected for processing: 68-
docs/native-chat-usage-limit-redesign.mdmobile/src/session/MobileNativeChatMessage.test.tsmobile/src/session/MobileNativeChatNoticeRow.tsxsrc/main/acp/acp-dialects/acp-dialect.tssrc/main/acp/acp-dialects/grok-dialect.tssrc/main/acp/acp-dialects/opencode-dialect.tssrc/main/acp/acp-timeline-opencode-dialect.test.tssrc/main/acp/acp-timeline-translator.tssrc/main/acp/acp-timeline-turn-failures.test.tssrc/main/acp/acp-turn-failures.tssrc/main/claude/claude-context-usage-test-support.tssrc/main/claude/claude-message-journaling.tssrc/main/claude/claude-open-turn.tssrc/main/claude/claude-result-journaling.tssrc/main/claude/claude-structured-journal-translation.tssrc/main/claude/claude-structured-provider-fallback.tssrc/main/claude/claude-terminal-failure.tssrc/main/claude/claude-thread-goal-journaling.test.tssrc/main/claude/claude-usage-limits.test.tssrc/main/claude/claude-usage-limits.tssrc/main/codex/codex-structured-journal-generic-frames.tssrc/main/codex/codex-usage-limits.test.tssrc/main/codex/codex-usage-limits.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-mutations.tssrc/main/native-chat/agent-session-wire/structured-agent-session-queued-action-receipts.test.tssrc/main/runtime/orchestration/chat-worker-request-failures.test.tssrc/renderer/src/components/native-chat/NativeChatInterruptedContinue.test.tsxsrc/renderer/src/components/native-chat/NativeChatInterruptedContinue.tsxsrc/renderer/src/components/native-chat/NativeChatMessageList.turn-status.test.tsxsrc/renderer/src/components/native-chat/NativeChatNoticeRow.test.tsxsrc/renderer/src/components/native-chat/NativeChatNoticeRow.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/components/native-chat/NativeChatTranscriptChrome.tsxsrc/renderer/src/components/native-chat/agent-session-failure-words-text.tssrc/renderer/src/components/native-chat/agent-session-usage-limit-words-text.tssrc/renderer/src/components/native-chat/agent-session-write-notice-text.tssrc/renderer/src/components/native-chat/native-chat-orca-stop-context.tssrc/renderer/src/components/native-chat/native-chat-structured-user-action.tssrc/renderer/src/components/native-chat/structured-agent-session-message-sender.test.tssrc/renderer/src/components/native-chat/structured-agent-session-pending-sends.tssrc/renderer/src/components/native-chat/structured-agent-session-send-attempt.tssrc/renderer/src/components/native-chat/structured-agent-session-send-slot.tssrc/renderer/src/components/native-chat/use-native-chat-structured-composer-send.tssrc/renderer/src/components/native-chat/use-structured-agent-session-sends.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/agent-session-create-capabilities.tssrc/shared/agent-session-failure-copy.tssrc/shared/agent-session-failure-words.tssrc/shared/agent-session-failure.tssrc/shared/agent-session-refusal-details.tssrc/shared/agent-session-refusal-reason-words.tssrc/shared/agent-session-usage-limit-words.tssrc/shared/agent-session-usage-limit.tssrc/shared/agent-session-write-notice-copy.tssrc/shared/native-chat-turn-fold.tssrc/shared/native-chat-types.tssrc/shared/native-chat/native-chat-usage-limit-cut.tssrc/shared/rpc-contract/structured-agent-session-params.tssrc/shared/structured-agent-session-send-mutation.spec.tssrc/shared/structured-agent-session-send-mutation.tssrc/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.
-
| 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 | ||
| ``` |
There was a problem hiding this comment.
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. | |
There was a problem hiding this comment.
🔎 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' && |
There was a problem hiding this comment.
🔎 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.
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
4a33cd8e7308a362be793006f3ae411ab6e3aaaf: remove the usage-limit Continue action, provider failure classification/reset presentation, mobile reset wording, continuation send field/capability, and associated copy/tests.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.Agent skill upstream boundary
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.