You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "YayoiNanoka (via GitHub)" <gi...@apache.org> on 2026/10/13 08:02:04 UTC

[PR] fix(ui): clear session menu highlights on dismissal [maka]

YayoiNanoka opened a new pull request, #6088:
URL: https://github.com/apache/maka/pull/6088

   ## Summary
   
   **Problem:** Right-clicking a session, or opening its `⋯` menu, adds that row to the persistent selection. Clicking elsewhere closes the menu but leaves the row highlighted, even though it is not the active session.
   
   **Solution:** Keep menu targets out of the persistent selection. Opening a menu outside the picked set clears the previous picks, while opening one inside the set preserves the existing batch actions. Derive the temporary row highlight from the existing `data-menu-open` state in normal and forced-color themes. Single-row actions continue to use their own session ID.
   
   **Result:** The menu target is highlighted while the menu is open and returns to its normal appearance on dismissal. The active session and intentional multi-selection keep their highlights. Right-click and `⋯` behave consistently, without adding state or dismissal listeners.
   
   ## Verification
   
   - `npm run build`, `npm run typecheck`, `npm run lint`, and `npm run format:check` passed.
   - Knip passed for `apps/desktop` and `packages/ui`; Storybook typecheck and build passed.
   - Shared UI suite: **776 passed**. Session selection, external navigation, and sweep-race suites: **21 passed**.
   - Regression check: the updated menu suite passes **24/24**; restoring the original implementation makes the **four new cases fail** with “opening a menu must not create a lasting pick.”
   - Focused Chrome checks on the production rail story passed in light, dark, and forced-color modes: real right-click/outside-click dismissal, `⋯`/Escape dismissal, active-row preservation, and existing multi-selection preservation. The original implementation reproduces the persistent highlight in all three modes.
   
   Full repository tests and Electron E2E were not run; this change is confined to renderer selection and styling.
   
   ## AI use
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   Tool(s) and scope: OpenAI Codex assisted with diagnosis, implementation, regression tests, browser verification, and this PR description. The commit includes a `Generated-by: OpenAI Codex` trailer.
   
   ## Checklist
   
   - [x] Tests cover the change and fail without it
   - [x] Lint, format, typecheck and the affected suites pass locally
   
   Does this PR entail a change in behavior?
   
   - [x] Yes — described under Summary above
   - [ ] No
   
   <details>
   <summary>点击展开中文</summary>
   
   ## 概述
   
   **问题:** 右键点击 session 或打开行尾的 `⋯` 菜单,会将该行加入持久选中集合。点击其他地方虽然关闭了菜单,该行仍然高亮,即使它并不是当前打开的 session。
   
   **解决方式:** 菜单目标不再加入持久选中集合。对集合外的行打开菜单时清空旧选择;对集合内的行打开菜单时保留已有多选和批量操作。普通及高对比度主题中的临时高亮直接使用已有的 `data-menu-open` 状态,单行操作仍然使用该行自己的 session ID。
   
   **修复效果:** 菜单打开时目标行高亮,关闭后恢复正常;当前 session 和用户主动建立的多选继续保持高亮。右键与 `⋯` 行为一致,无需增加状态或菜单关闭监听器。
   
   ## 验证
   
   - 全量构建、类型检查、lint 和格式检查通过。
   - Desktop 与共享 UI 的 Knip 检查通过;Storybook 类型检查和构建通过。
   - 共享 UI 测试 **776 项通过**;会话选择、外部导航与批量操作竞态测试 **21 项通过**。
   - 更新后的菜单测试 **24/24 通过**;恢复原实现后,**四个新增用例均因错误创建持久选中状态而失败**。
   - 使用生产侧边栏组件,在真实 Chrome 的亮色、暗色和高对比度模式下验证了右键后点击外部关闭、`⋯` 后 Esc 关闭、当前行高亮和已有多选保留。原实现在三种模式下均能复现高亮残留。
   
   未运行全仓测试和 Electron E2E;本次修改仅涉及渲染层的选择行为与样式。
   
   ## AI 使用情况
   
   OpenAI Codex 实质参与了问题诊断、实现、回归测试、浏览器验证及 PR 描述。提交已包含 `Generated-by: OpenAI Codex` 标记。
   
   ## 检查清单
   
   - [x] 测试覆盖修改,并能在没有修复时失败
   - [x] lint、格式、类型检查及相关测试在本地通过
   - [x] 行为变化已在概述中说明
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(ui): improve sidebar menus, project task actions, and execution location display [maka]

Posted by "YayoiNanoka (via GitHub)" <gi...@apache.org>.
YayoiNanoka commented on code in PR #6088:
URL: https://github.com/apache/maka/pull/6088#discussion_r4261385090


##########
packages/runtime-host/src/protocol/index.ts:
##########
@@ -106,7 +106,9 @@ export const RUNTIME_HOST_REGISTRATION_SCHEMA_VERSION = 1 as const;
 export const RUNTIME_HOST_PROTOCOL_VERSION = 0 as const;
 // Increment when the same protocol version no longer guarantees safe Client-Host
 // interoperability. Mismatches are rejected before domain commands are admitted.
-export const RUNTIME_HOST_COMPATIBILITY_EPOCH = 220 as const;
+export const RUNTIME_HOST_COMPATIBILITY_EPOCH = 221 as const;

Review Comment:
   Thanks for pointing this out. Before merging, we will rebase onto the latest `main` and update the compatibility epoch as needed based on the actual merge order, using the next unused value rather than reusing an epoch assigned to a different protocol change.
   
   The manual read/unread feature has also been removed from this PR as suggested. The current diff now contains only the original four sidebar changes, with no metadata protocol extension or epoch bump.
   
   _Posted by OpenAI Codex on the author's behalf._
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(ui): improve sidebar menus, project task actions, and execution location display [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #6088:
URL: https://github.com/apache/maka/pull/6088


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(ui): improve sidebar menus, read-state actions, and project controls [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #6088:
URL: https://github.com/apache/maka/pull/6088#discussion_r4260850284


##########
packages/runtime-host/src/protocol/index.ts:
##########
@@ -106,7 +106,9 @@ export const RUNTIME_HOST_REGISTRATION_SCHEMA_VERSION = 1 as const;
 export const RUNTIME_HOST_PROTOCOL_VERSION = 0 as const;
 // Increment when the same protocol version no longer guarantees safe Client-Host
 // interoperability. Mismatches are rejected before domain commands are admitted.
-export const RUNTIME_HOST_COMPATIBILITY_EPOCH = 220 as const;
+export const RUNTIME_HOST_COMPATIBILITY_EPOCH = 221 as const;

Review Comment:
   [P3] Resolve the competing epoch-221 changes after rebasing
   
   Current main is epoch 220, but this PR, #5969 and #6090 independently advertise 221 for different strict protocol extensions. A peer built from one of these branches is not necessarily compatible with another simply because the epoch matches. The #6088/#6090 merge also conflicts at this declaration. Please rebase after the first relevant change lands and choose the next unused epoch (222 after a single 221 merge), preserving the descriptions of all protocol extensions in the combined result. This is a merge-order compatibility concern, not a failure of this head's 220→221 epoch guard.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(ui): improve sidebar menus, project task actions, and execution location display [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on PR #6088:
URL: https://github.com/apache/maka/pull/6088#issuecomment-6208094007

   Thanks @YayoiNanoka for the contribution, and for working through the review feedback. Merging now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org