fix(threads-drawer): never lock the drawer on an unresolved entitlement - #7441
Merged
Merged
Conversation
When the runtime's entitlement lookup fails with a retryable error and the single bounded retry also fails, /info reports licenseStatus "unknown". The React, Vue and Angular drawers treated that as a settled negative and showed the locked upgrade view on a fully licensed project (OSS-962). The lookup was observed to self-recover in about 30 seconds, well past the 5 second retry. "unknown" is now treated as unresolved: the drawer fetches the thread list and lets the threads endpoint decide, as the Inspector does since #7094. A working list renders normally and a failing list shows the drawer's retryable error state. The locked view stays reachable only from a settled negative status. Feature-only consumers of checkFeature stay denied. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: CopilotKit/CopilotKit/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
@copilotkit/a2ui-renderer
@copilotkit/agentcore-runner
@copilotkit/angular
@copilotkit/channels
@copilotkit/channels-core
@copilotkit/channels-discord
@copilotkit/channels-intelligence
@copilotkit/channels-slack
@copilotkit/channels-teams
@copilotkit/channels-telegram
@copilotkit/channels-ui
@copilotkit/channels-whatsapp
@copilotkit/core
@copilotkit/intelligence-langgraph
@copilotkit/intelligence-mastra
@copilotkit/mcp-apps-renderer
@copilotkit/react-core
@copilotkit/react-native
@copilotkit/react-textarea
@copilotkit/react-ui
@copilotkit/runtime
@copilotkit/runtime-client-gql
@copilotkit/sdk-js
@copilotkit/shared
@copilotkit/sqlite-runner
@copilotkit/voice
@copilotkit/vue
@copilotkit/web-components
@copilotkit/web-inspector
commit: |
Contributor
|
Size Change: +26 B (0%) Total Size: 1.74 MB 📦 View Changed
ℹ️ View Unchanged
|
BenTaylorDev
marked this pull request as ready for review
September 25, 2026 11:22
BenTaylorDev
requested review from
jpr5,
marthakelly,
mme,
rainerhahnekamp,
ranst91,
tylerslaton and
wolfmanfx
as code owners
September 25, 2026 11:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A fully licensed project can see the threads drawer's locked upgrade view (OSS-962).
When the runtime's entitlement lookup fails with a retryable error, the client retries once after 5 seconds (
RUNTIME_ENTITLEMENT_RETRY_DELAY_MS). The lookup was observed to recover in about 30 seconds, so the retry usually fails too. After that,/inforeportslicenseStatus: "unknown", and the provider treats the failure as final.The React, Vue and Angular drawers treated only
nullas pending and onlyvalid/expiringas present. So"unknown"fell through to the locked view. That is an upsell shown to a project that already pays, at a moment when its threads work.The Inspector had the same symptom. #7094 fixed it there by gating on the Threads list endpoint instead of the license status. That fix does not reach the drawer.
Fix
"unknown"is unresolved, not negative. In all three drawers it now enables the thread fetch, and the threads endpoint decides:none/expired/invalidstatus.checkFeatureconsumers stay denied. Only the drawer's gate changed.The single 5-second retry is unchanged. It now only sets how long the drawer shows its spinner.
Behavior change for reviewers
Three existing tests asserted the old behavior, that
unknownafter the bounded retry locks the drawer:a persistent retryable outage becomes terminal after the bounded retrya failed retry request becomes terminal after the bounded retrya settled non-ready entitlement denies Angular threads without a legacy fallbackI changed them to expect the new behavior. If the locked view on
unknownwas intentional, this PR reverses that decision, so please say so.Testing
unknowndoes not lock).nx run-many -t test -p @copilotkit/react-core @copilotkit/vue @copilotkit/angular --skip-nx-cache):@copilotkit/vue:lintfails with 168 errors, but none are in files this PR changes. They are in chat, A2UI and test-helper files.oxfmt --checkis clean on all changed files.dist/v2/index.cssduring a concurrent rebuild. All 3 files pass alone (Tests 17 passed (17)). The second hook run passed./inforesponses through the realCopilotKitProviderand core retry timer.🤖 Generated with Claude Code