fix(webui): remove @qwen-code/qwen-code-core dependency#2902
Conversation
Remove core dependency from webui by inlining followup controller logic. This fixes nightly release CI failure where npm version couldn't resolve the core peer dependency for prerelease versions. - Move FollowupState type and INITIAL_FOLLOWUP_STATE to src/types/followup.ts - Inline createFollowupController into src/hooks/useFollowupSuggestions.ts - Remove separate @qwen-code/webui/followup subpath and vite config - Export useFollowupSuggestions from main entry Fixes #2900 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
📋 Review SummaryThis PR successfully removes the 🔍 General Feedback
🎯 Specific Feedback🟡 High
🟢 Medium
🔵 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. |
yiliang114
left a comment
There was a problem hiding this comment.
The dependency cleanup looks like a reasonable fix for the release CI issue. LGTM.
Remove core dependency from webui by inlining followup controller logic. This fixes nightly release CI failure where npm version couldn't resolve the core peer dependency for prerelease versions. - Move FollowupState type and INITIAL_FOLLOWUP_STATE to src/types/followup.ts - Inline createFollowupController into src/hooks/useFollowupSuggestions.ts - Remove separate @qwen-code/webui/followup subpath and vite config - Export useFollowupSuggestions from main entry Fixes #2900 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
TLDR
Remove
@qwen-code/qwen-code-coredependency from the webui package by inlining the followup controller logic. This fixes the nightly release CI failure (#2900) wherenpm versioncouldn't resolve the core peer dependency for prerelease versions.Also consolidates the separate
@qwen-code/webui/followupsubpath entry back into the main entry, removing the extra vite config and build step that were only justified by the core dependency.Screenshots / Video Demo
N/A — no user-facing change. Internal dependency cleanup and build simplification.
Dive Deeper
The nightly release workflow fails at the "Update package versions" step because:
@qwen-code/qwen-code-coreas an optional peer dependency of@qwen-code/webuiwith range>=0.13.10.14.1-nightly.xxx>=0.13.1, so npm fails withETARGETThe core dependency was only needed for
FollowupState,INITIAL_FOLLOWUP_STATE, andcreateFollowupController— all self-contained with no imports from core internals. Rather than patching the semver range, we remove the dependency entirely:FollowupStatetype andINITIAL_FOLLOWUP_STATEconstant moved tosrc/types/followup.tscreateFollowupControllerinlined intosrc/hooks/useFollowupSuggestions.ts@qwen-code/webui/followupsubpath,vite.config.followup.ts, andsrc/followup.tsare removed — the followup hook is now exported from the main entryReviewer Test Plan
cd packages/webui && npm run build— should produce a single build pass (no followup config)dist/has no references to@qwen-code/qwen-code-core:grep -r 'qwen-code-core' packages/webui/dist/cd packages/core && npx vitest run src/followup/— 35 tests should pass (core untouched)npm run typecheckfrom root — should passnpm version 0.14.1-nightly.test --workspace @qwen-code/qwen-code-core --no-git-tag-version --allow-same-version— should no longer fail on webui peer dep resolutionTesting Matrix
Linked issues / bugs
Fixes #2900
🤖 Generated with Qwen Code