fix(cli): remove QWEN_OAUTH gate from feedback dialog#4316
Conversation
The feedback dialog (point-up/point-down) was only shown to users authenticated via QWEN_OAUTH. With the QWEN_OAUTH free tier closed on 2026-04-15 (#3203), the active user pool that can produce feedback events has effectively drained, leaving the user_feedback telemetry signal blind. The reported payload only contains session_id, rating, model, approval_mode, and prompt_id — no prompt content or other PII — so there is no privacy reason to scope it to a specific auth provider. Keep the existing usageStatisticsEnabled and enableUserFeedback opt-ins, which already gate all telemetry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📋 Review SummaryThis PR removes the 🔍 General Feedback
🎯 Specific Feedback🔵 Low
✅ Highlights
|
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
| // 7. Not temporarily dismissed | ||
| if ( | ||
| config.getAuthType() !== AuthType.QWEN_OAUTH || | ||
| !config.getUsageStatisticsEnabled() || |
There was a problem hiding this comment.
[Suggestion] The PR description characterizes the two remaining gates (getUsageStatisticsEnabled() and enableUserFeedback) as "opt-in", but both actually default to true — they are opt-out:
config.ts:961:this.usageStatisticsEnabled = params.usageStatisticsEnabled ?? true;settingsSchema.ts:750:enableUserFeedbackhasdefault: true
After removing the OAuth gate, non-OAuth users (BYOK/API key) who have never touched these settings will see the feedback dialog by default. Consider correcting the "opt-in" language in the PR description to "opt-out", or setting enableUserFeedback default to false so the feedback dialog truly requires explicit consent.
— qwen-latest-series-invite-beta-v34 via Qwen Code /review
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — DeepSeek/deepseek-v4-pro via Qwen Code /review
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — DeepSeek/deepseek-v4-pro via Qwen Code /review
Maintainer test report — PR #4316Built and validated locally in a dedicated Environment
Results
Bundle proof — the gate IS removed in the binaryIn
The compiled predicate is: if (!config.getUsageStatisticsEnabled() ||
settings.merged.ui?.enableUserFeedback === false ||
!lastMessageIsAIResponse(history) ||
Math.random() > FEEDBACK_SHOW_PROBABILITY ||
!meetsMinimumSessionRequirements(sessionStats) ||
isFeedbackDismissedTemporarily) { return; }— exactly matches the source diff (no Test-suite stability — failures are pre-existing flakes, NOT regressionsFull
To prove these are NOT caused by PR #4316, I ran two targeted comparisons against the same two files that failed in Run 1:
Both pass in isolation regardless of the PR. The full-suite failures are test-pollution / worker-load flakes that existed before this PR. PR #4316 cannot mechanically cause these failures: the change removes one disjunct from one Risk assessmentLow risk for merge.
Not covered locally
Reproducegit fetch origin pull/4316/head:pr-4316 && git checkout pr-4316
npm install && npm run build
cd packages/cli && npm run typecheck
cd ../.. && npx eslint packages/cli/src/ui/hooks/useFeedbackDialog.ts
# Bundle verification (any node):
node -e "const c = require('fs').readFileSync('dist/cli.js','utf8');
const a = c.indexOf('useFeedbackDialog.ts'), b = c.indexOf('useFeedbackDialog\"');
const s = c.slice(a, b + 200);
console.log('AuthType:', (s.match(/AuthType/g)||[]).length,
'QWEN_OAUTH:', (s.match(/QWEN_OAUTH/g)||[]).length,
'getAuthType:', (s.match(/getAuthType/g)||[]).length);"Recommendation: safe to merge. The full-suite flakes are unrelated test-infrastructure issues that pre-date this PR and reproduce without it; they should be tracked separately. The fix itself is minimal, correctly bundled, and the rationale (drained QWEN_OAUTH addressable pool after the 2026-04-15 free-tier shutdown #3203) is sound. |
Summary
The feedback dialog (point-up / point-down) in
useFeedbackDialog.tswas gated to only show for users authenticated via
AuthType.QWEN_OAUTH.After the Qwen OAuth free tier was closed on 2026-04-15 (#3203), the
addressable user pool drained quickly, and the
qwen-code.user_feedbacktelemetry signal has effectively gone dark.
This PR drops the
QWEN_OAUTHcheck so any user who has opted intousage statistics can be prompted for feedback.
Why this is safe
The payload emitted by
logUserFeedbackEvent(qwen-logger.ts) contains only:session_idrating(1-3)modelapproval_modeprompt_idNo prompt content, conversation, file paths, or other PII. The two
remaining gates (
config.getUsageStatisticsEnabled()andsettings.ui.enableUserFeedback) already provide the opt-in thatauthorizes telemetry, so the
QWEN_OAUTHgate was a redundantnarrowing rather than a privacy boundary.
Changes
config.getAuthType() !== AuthType.QWEN_OAUTH ||from thedialog visibility check.
AuthTypeimport.Validation
dist staleness errors elsewhere are unrelated).
one-line behavioral guard removal.
🤖 Generated with Claude Code