Skip to content

fix: 稳定 Bennett UI 额度控件侧栏定位#44

Open
JHees wants to merge 2 commits into
BigPizzaV3:mainfrom
JHees:codex/fix-bennett-usage-slot-position
Open

fix: 稳定 Bennett UI 额度控件侧栏定位#44
JHees wants to merge 2 commits into
BigPizzaV3:mainfrom
JHees:codex/fix-bennett-usage-slot-position

Conversation

@JHees

@JHees JHees commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Restrict Bennett UI usage widget mounting to the bottom sidebar control area.
  • Avoid treating project or conversation titles containing 连接/设备 as the mobile/device button.
  • Bump bennett-ui-improvements to 1.0.7-bigpizza.1 and update the market hash.

Attribution

This script is a BigPizzaV3 Codex++ migration of the Bennett UI Improvements project originally from b-nnett. This PR only migrates and maintains compatibility fixes; it is not original UI work by JHees.

Tests

  • node --check scripts/bennett-ui-improvements.js
  • node --check generated script from tools/build-migrated-script.ps1
  • git diff --check

- 限定额度控件只挂载到侧栏底部控制区
- 避免项目或对话标题中的连接、设备文字被误判为手机按钮
- 更新脚本版本与市场索引 hash

Tests: node --check;git diff --check
Copilot AI review requested due to automatic review settings July 7, 2026 07:44

Copilot AI left a comment

Copy link
Copy Markdown

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 tightens the mounting logic for the Bennett UI “usage” widget so it only attaches to the intended bottom control area of the main sidebar, and reduces false positives when identifying the “mobile/device” control. It also bumps the script/package version and updates the published hash in the script market index.

Changes:

  • Bumped Bennett UI Improvements version to 1.0.7-bigpizza.1 in both the script and the market index.
  • Refined sidebar slot discovery/mounting to target only controls near the bottom of the sidebar and to clean up misplaced existing slots.
  • Improved “device button” detection by preferring aria-label/title matches and constraining text-content matching to short labels to avoid misclassifying project/conversation titles.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scripts/bennett-ui-improvements.js Narrows usage-slot mounting to bottom sidebar controls; improves device/settings/compact-control heuristics.
index.json Updates script version and SHA256 for the Bennett UI Improvements entry.

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

- 校验已有 usage slot 是否位于底部行最右侧控件之后
- 过滤额度控件自身,避免重启后复用错误挂载点
- 更新脚本版本与市场索引 hash

Tests: node --check;生成器输出 node --check;git diff --check
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.

2 participants