Repository navigation
feat(worlds/bilibili): 浏览器确认登录、视频排队组件、半透明黑默认面板 - #295
Merged
Merged
Conversation
- 背景 #0000001f、无边框,排在内置样式首位:缺省设计的两个组件、编辑器新建组件的兜底、 渲染器找不到样式时都取首项 - 自定义样式缺字段时的背景、边框也按首项补 - 已保存的设计都带 styleId 与完整样式字段,不受影响 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
视频队列状态文件沿用同一写法。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 新组件类型 video-queue:显示 BV 号列表,默认纵向堆叠、可改横向,可选序号、空队列占位或隐藏 - 队列与上限属于 World:worlds.bilibili.overlay.maxQueuedVideos(默认 10,热改), 状态原子保存到 data/bilibili-overlay/video-queue.json,修改走独立 SSE 事件 video-queue - Bot 一个工具管 add/remove/move/clear,回执列出整队(snapshot 标签,交接只留最后一次); BV 号可写在视频链接里,排满时 add 被拒绝 - ENV_PROMPT 加 bilibili.videoQueue / videoQueueLimit 占位符,前缀重建时同步 - 测试覆盖:排满拒绝且不写坏文件、位置从 1 数起与越界、重复 BV 号、工具→ENV→SSE 同步 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 根因:.overlay-component 的 display:flex 压过了浏览器对 hidden 属性的 display:none, Agent 公告「无公告时隐藏组件」只清空了文字,面板底色和边框仍留在画面上 - 视频排队「队列为空时隐藏组件」走同一路径 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- login.ts 向 B 站要网页扫码登录的确认页链接,面板在新标签打开;浏览器已登录 B 站时页面显示账号 与确认按钮,点确认即完成。World 每 2 秒轮询,取登录响应 Set-Cookie 里的 SESSDATA 原样写回配置 - 写回成功后只重建直播间长连,Overlay、归并缓冲与开播基线不动;写回失败记为登录失败、沿用旧凭证 - 不读浏览器的 cookie 库:SESSDATA 是 HttpOnly,Chrome 的 cookie 加密绑定在浏览器自身 - 测试用本机假 passport 覆盖:原样写回(含 %2C 与 *)、写回失败、链接作废停止轮询、取消后不写回 - 登录换上的凭证同样按「已配置却仍匿名」检查并记 error Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 60 字没有来源,也推不出:Overlay 里备注单行显示,放不下以省略号截断 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 原句说画面上有排队列表,但缺省设计没有视频排队组件;队列属于 World, 只有 Overlay 放了排队组件时观众才看得到 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| flex-direction: column; | ||
| } | ||
|
|
||
| .overlay-component[hidden] { |
There was a problem hiding this comment.
这条 fix 没有修复前会失败的测试。PR 描述已写明偏离理由,这是维护者决定。
CONTRIBUTING.md「What is accepted」要求:Bug fixes in the runtime, the WebUI, the extension loader and the bundled Worlds and providers, with a test that fails before the fix。
PR 描述:「这条没有单测:仓库测试里只有 jsdom,它的 getComputedStyle 对 [hidden] 不按层叠算(修复前后都返回 none),写不出修复前会失败的用例;在 Chromium 里核对过同一组规则修复前 flex、修复后 none,真 World 的 OBS 页上空公告与空队列都是 display: none」
— Cortico PR Gate via Cursor Cloud Agent
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.


Set-Cookie里的 SESSDATA 原样写回worlds.bilibili.sessdata,随后只重建直播间长连,Overlay 不断。不读浏览器 cookie 库(SESSDATA 是 HttpOnly,Chrome 的 cookie 加密绑定在浏览器自身)worlds.bilibili.overlay.maxQueuedVideos(默认 10,热改;操作员要求列表有上限,属于显示容量,不是防故障的保护);新工具bilibili_update_video_queue(add/remove/move/clear,BV 号可写在链接里,回执列整队);状态存data/bilibili-overlay/video-queue.json;ENV_PROMPT 加队列占位符#0000001f、无边框)并排第一,作为新组件、缺省设计与找不到样式时的默认面板;已保存的设计不变hidden组件仍显示面板底色。.overlay-component的display:flex压过了hidden,Agent 公告「无公告时隐藏组件」只清空了文字。这条没有单测:仓库测试里只有 jsdom,它的 getComputedStyle 对[hidden]不按层叠算(修复前后都返回none),写不出修复前会失败的用例;在 Chromium 里核对过同一组规则修复前flex、修复后none,真 World 的 OBS 页上空公告与空队列都是display: none验证:
pnpm test(5015 通过)、typecheck、typecheck:web全绿;新测试覆盖排队上限与位置、工具→ENV→SSE 同步、登录原样写回(含%2C/*)、写回失败、链接作废、取消后不写回、登录凭证的匿名检查。dev:webui里看过登录面板三种状态、编辑器新建排队组件与 Mock、配置项;用真 World 匿名接入直播间,经控制口调工具,OBS 页实时增删调序、空队列与空公告隐藏,假 passport 登录后写回并重连。真实 B 站账号的确认登录没有走过(会产生真登录)。🤖 Generated with Claude Code