Skip to content

chore: migrate Vue 2 to Vue 3, Electron to v41, and update deps#599

Open
chengcheng84 wants to merge 25 commits intodocmirror:masterfrom
chengcheng84:vue-ant-version
Open

chore: migrate Vue 2 to Vue 3, Electron to v41, and update deps#599
chengcheng84 wants to merge 25 commits intodocmirror:masterfrom
chengcheng84:vue-ant-version

Conversation

@chengcheng84
Copy link
Copy Markdown

@chengcheng84 chengcheng84 commented Apr 18, 2026

@chengcheng84
Copy link
Copy Markdown
Author

@wangliang181230 @cute-omega 有计划更新吗

@cute-omega
Copy link
Copy Markdown
Collaborator

详细描述一下你更新了什么

@chengcheng84
Copy link
Copy Markdown
Author

chengcheng84 commented Apr 18, 2026

@cute-omega UI依赖的版本(ds的有点outdate),还是只是计划保持版本

@chengcheng84 chengcheng84 changed the title WIP: 更新UI chore: migrate Vue 2 to Vue 3, Electron to v40, and update deps Apr 18, 2026
@chengcheng84 chengcheng84 marked this pull request as draft April 18, 2026 14:31
@cute-omega
Copy link
Copy Markdown
Collaborator

请修好测试错误(考虑到只有macos出错,源代码应该没有问题) @chengcheng84

@chengcheng84
Copy link
Copy Markdown
Author

目前在WIP,还有一些问题,只是确认一下有没有必要

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the GUI package from Vue 2 to Vue 3, upgrades Ant Design Vue to 4.x, moves vue-router to v4, and updates Electron + other dependencies to match the new ecosystem.

Changes:

  • Updated Vue entrypoint and app bootstrap, switching from Vue.prototype to app.config.globalProperties.
  • Converted multiple SFCs/components to Vue 3 patterns (defineComponent, v-model API changes, .sync replacements in some places).
  • Bumped core dependencies (Vue 3, vue-router 4, ant-design-vue 4, Electron).

Reviewed changes

Copilot reviewed 21 out of 23 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
packages/gui/upgrade_output.txt Adds migration tool output log (currently appears corrupted/binary).
packages/gui/src/view/status.js Migrates status injection to app.config.globalProperties.
packages/gui/src/view/pages/setting.vue Reworks confirm modal content rendering away from JSX.
packages/gui/src/view/pages/server.vue Wraps component with defineComponent; adjusts select option bindings.
packages/gui/src/view/pages/proxy.vue Wraps component with defineComponent; updates Drawer binding; adjusts select option bindings.
packages/gui/src/view/pages/plugin/pip.vue Wraps component with defineComponent; adjusts radio button bindings.
packages/gui/src/view/pages/plugin/overwall.vue Wraps component with defineComponent; adjusts select option bindings.
packages/gui/src/view/pages/plugin/node.vue Wraps component with defineComponent; adjusts radio button bindings (one broken).
packages/gui/src/view/pages/plugin/git.vue Wraps component with defineComponent.
packages/gui/src/view/pages/index.vue Changes mode switching and CA prompt behavior; updates success modal content rendering.
packages/gui/src/view/pages/help.vue Wraps component with defineComponent.
packages/gui/src/view/mixins/plugin.js Removes Vue 2 $set usage in setConfig.
packages/gui/src/view/index.js Migrates init hook to accept app and use globalProperties.
packages/gui/src/view/components/tree-node.vue Wraps component with defineComponent.
packages/gui/src/view/components/setup-ca.vue Adds emits and migrates to defineComponent.
packages/gui/src/view/components/mock-input.vue Migrates value/input to Vue 3 modelValue/update:modelValue.
packages/gui/src/view/components/container.vue Wraps component with defineComponent.
packages/gui/src/view/App.vue Migrates to defineComponent, removes SearchBar UI, updates AntD locale import.
packages/gui/src/main.js Attempts Vue 3 + vue-router v4 bootstrap and AntD reset CSS.
packages/gui/src/bridge/on-close/front.js Tweaks JSX style bindings to object syntax.
packages/gui/package.json Upgrades Vue/AntD/vue-router/Electron versions.
package.json Updates eslint version.
Comments suppressed due to low confidence (1)

packages/gui/src/view/pages/index.vue:119

  • doCheckRootCa no longer respects the existing “already setuped / noTip” guard (previously it returned early). This will show the CA install confirm every startup even if the user has already installed or opted out; please reintroduce the conditional early return based on setting.rootCa.setuped/noTip.
    async doCheckRootCa () {
      const setting = await this.$api.setting.load()
      console.log('setting', setting)
      this.setting = setting || {}
      this.$confirm({
        title: '第一次使用,请先安装CA根证书',
        content: '本应用正常使用,必须安装和信任CA根证书',
        cancelText: '下次安装',
        okText: '去安装',
        onOk: () => {
          this.openSetupCa()
        },
        onCancel: () => {
          this.setting.rootCa = this.setting.rootCa || {}
          // const rootCa = this.setting.rootCa
          // rootCa.noTip = true
          // this.$api.setting.save(this.setting)
        },
      })

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/gui/src/view/pages/index.vue
Comment thread packages/gui/src/view/pages/setting.vue Outdated
Comment thread packages/gui/src/main.js
Comment thread packages/gui/src/view/pages/proxy.vue Outdated
Comment thread packages/gui/src/view/pages/plugin/overwall.vue Outdated
Comment thread packages/gui/src/view/pages/server.vue Outdated
Comment thread packages/gui/src/view/pages/server.vue Outdated
Comment thread packages/gui/src/view/pages/plugin/pip.vue Outdated
Comment thread packages/gui/src/main.js Outdated
Comment thread packages/gui/src/view/App.vue Outdated
@cute-omega
Copy link
Copy Markdown
Collaborator

目前在WIP,还有一些问题,只是确认一下有没有必要

弄好了再叫我。这份升级对ds十分必要(每次编译看到vue2的弃用警告都很烦)

@chengcheng84 chengcheng84 marked this pull request as ready for review April 24, 2026 15:28
@chengcheng84
Copy link
Copy Markdown
Author

@cute-omega 有空可以帮忙review一下, Thanks

@chengcheng84
Copy link
Copy Markdown
Author

之后考虑迁移组合式 API吗

@cute-omega
Copy link
Copy Markdown
Collaborator

之后考虑迁移组合式 API吗

这个慎重考虑。全面改写工作量大,风险大而且必要性不足

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 27 out of 28 changed files in this pull request and generated 13 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/gui/src/view/pages/setting.vue Outdated
Comment thread packages/gui/src/view/pages/index.vue
Comment thread packages/gui/src/view/components/setup-ca.vue Outdated
Comment thread packages/gui/src/view/pages/help.vue
Comment thread packages/gui/src/view/pages/setting.vue
Comment thread packages/gui/src/bridge/on-close/front.js Outdated
Comment thread packages/gui/src/view/pages/index.vue
Comment thread packages/gui/src/view/pages/index.vue Outdated
Comment thread packages/gui/package.json
Comment thread packages/gui/src/view/components/setup-ca.vue Outdated
@chengcheng84
Copy link
Copy Markdown
Author

@cute-omega all fixed,等待review

@cute-omega
Copy link
Copy Markdown
Collaborator

cute-omega commented Apr 25, 2026

@cute-omega all fixed,等待review

并非all fixed

Comment thread .github/workflows/build-and-release.yml
@cute-omega cute-omega self-requested a review April 30, 2026 15:14
@cute-omega cute-omega requested review from Copilot and removed request for cute-omega April 30, 2026 15:14
@cute-omega
Copy link
Copy Markdown
Collaborator

我把自己从assignee里摘出去了,tmd神人github,每个commit都得通知我可太烦人了

有事再叫我

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 44 out of 46 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/gui/src/background.js
Comment thread packages/gui/src/bridge/api/backend.js Outdated
Comment thread packages/gui/src/bridge/on-close/front.js
Comment thread packages/gui/src/view/components/container.vue Outdated
Comment thread packages/gui/src/bridge/api/open-enable-loopback.js
Comment thread packages/gui/vue.config.cjs Outdated
Comment thread packages/gui/src/view/pages/index.vue
@chengcheng84
Copy link
Copy Markdown
Author

chengcheng84 commented Apr 30, 2026

@cute-omega 大概可能fix完成

@cute-omega cute-omega linked an issue Apr 30, 2026 that may be closed by this pull request
Comment thread packages/gui/package.json Outdated
@cute-omega
Copy link
Copy Markdown
Collaborator

看上去不赖,审完diff之后把test编译的安装包分发测试看看实际功能有没有破坏(顺序不能乱
今天就看到这里

@chengcheng84 chengcheng84 requested a review from cute-omega May 1, 2026 14:35
@chengcheng84 chengcheng84 changed the title chore: migrate Vue 2 to Vue 3, Electron to v40, and update deps chore: migrate Vue 2 to Vue 3, Electron to v41, and update deps May 1, 2026
@chengcheng84
Copy link
Copy Markdown
Author

1] [2026-05-04T18:00:27.977] [ERROR] server - 直连失败: api.github.com:443, cost: 0 ms, errorMsg: Invalid IP address: undefined
[1]  TypeError [ERR_INVALID_IP_ADDRESS]: Invalid IP address: undefined
[1]     at emitLookup (node:net:1554:17)
[1]     at C:\Users\hello\Documents\dev-sidecar\packages\mitmproxy\src\lib\proxy\mitmproxy\dnsLookup.js:44:11
[1]     at emitLookup (node:net:1505:5)
[1]     at defaultTriggerAsyncIdScope (node:internal/async_hooks:472:18)
[1]     at lookupAndConnectMultiple (node:net:1504:3)
[1]     at node:net:1450:7
[1]     at defaultTriggerAsyncIdScope (node:internal/async_hooks:472:18)
[1]     at lookupAndConnect (node:net:1449:5)
[1]     at Socket.connect (node:net:1344:5)
[1]     at Object.connect (node:net:249:17) {
[1]   code: 'ERR_INVALID_IP_ADDRESS'
[1] }

@cute-omega 发现一个问题但是不知道怎么fix

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.

依赖升级与构建工具迁移

3 participants