fix: 稳定 Bennett UI 额度控件侧栏定位#44
Open
JHees wants to merge 2 commits into
Open
Conversation
- 限定额度控件只挂载到侧栏底部控制区 - 避免项目或对话标题中的连接、设备文字被误判为手机按钮 - 更新脚本版本与市场索引 hash Tests: node --check;git diff --check
There was a problem hiding this comment.
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.1in 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/titlematches 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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