koishijs / koishijs/webui

Bug: plugin-config 停用分组后 操作分组内的插件 会报错

Open
#280 2 comments 0 reactions 0 assignees View on GitHub
bug plugin: config
Dominant language
Vue
Stars
40
Forks
22
PR merge metrics
No merged PRs in 30d

Description

复现方式
1. 新建分组
2. 分组内添加插件
3. 停用分组
4. 启用或停用分组内的插件

错误日志
```
loader TypeError: Cannot read properties of undefined (reading 'ctx')
at Proxy.unload (/home/project/TSWorkSpace/koishi/development/koishi-dev/node_modules/@koishijs/plugin-config/src/shared/writer.ts:153:30)
at _Client.ctx.console.addListener.authority (/home/project/TSWorkSpace/koishi/development/koishi-dev/node_modules/@koishijs/plugin-config/src/shared/writer.ts:59:27)
at WebSocket.receive (/home/project/TSWorkSpace/koishi/development/koishi-dev/node_modules/@koishijs/plugin-console/node_modules/@koishijs/console/src/client.ts:35:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
```

分组停用后 应该禁止操作分组内的插件 只允许修改配置

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading @koishijs/plugin-config/src/shared/writer.ts, especially the unload path around lines 153 and 59 shown in the stack trace. Reproduce the sequence of creating a group, adding a plugin, disabling the group, and toggling the plugin. Done means plugin operations are blocked while the group is disabled, while configuration changes remain allowed.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.