Drop the assistant's ⋯ menu; hiding is a right-click
Its two entries were "Thu nhỏ", which the − button immediately to its left already does, and "Ẩn vào cạnh phải". A drop-list whose real content is one action, half of it duplicating its neighbour, is chrome — removed at the user's request. Nothing became unreachable: collapsing is the − button and the dot itself, hiding is a right-click on the dot (already there, and named in its tooltip) or now on the open panel's header too. This is a deliberate deviation from the audit page, which asks for "'Ẩn trợ lý' dời vào menu ⋯". check_design_parity records it as that rather than quietly scoring it done — the item is relabelled and its detail says where the action went. check_help_dock stopped reading the menu's contents and now exercises the routes: − collapses, the dot carries a context menu, hide reaches the edge. 24/24 checkers pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
c4e9158779
commit
7a856aacaf
@@ -17,7 +17,7 @@ from __future__ import annotations
|
||||
import os
|
||||
import sys␍
|
||||
|
||||
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
||||
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
||||
from pathlib import Path
|
||||
|
||||
REPO = Path(__file__).resolve().parent.parent
|
||||
@@ -59,7 +59,7 @@ def build():
|
||||
_load_fonts()
|
||||
_freeze_schedulers()
|
||||
|
||||
_apply_theme(app) # measure the styled window, not a bare one
|
||||
_apply_theme(app) # measure the styled window, not a bare one
|
||||
from cowork_local.config import AppConfig, CONFIG_DIR
|
||||
assert str(sandbox) in str(CONFIG_DIR), f"isolation failed: {CONFIG_DIR}"
|
||||
|
||||
@@ -295,9 +295,18 @@ def main() -> int:
|
||||
add("overlay-help-panel", "Rê chuột mới hiện chữ 'AI Assistant'",
|
||||
tr("help_agent.badge") in dock.launcher.text(), dock.launcher.text().strip())
|
||||
dock.launcher._set_open(False)
|
||||
items = [a.text() for a in dock.more_btn.menu().actions()]
|
||||
add("overlay-help-panel", "'Ẩn trợ lý' dời vào menu ⋯",
|
||||
tr("help_agent.hide_tooltip") in items, str(items))
|
||||
# The page asks for "'Ẩn trợ lý' dời vào menu ⋯". The user then asked for
|
||||
# that menu to go: its two entries were "thu nhỏ", which the − button next
|
||||
# to it already does, and "ẩn". Recorded as a deliberate deviation rather
|
||||
# than quietly scored as done — the action itself moved to a right-click on
|
||||
# the dot and on the panel header, so nothing became unreachable.
|
||||
from PySide6.QtCore import Qt
|
||||
|
||||
has_menu = hasattr(dock, "more_btn")
|
||||
by_right_click = dock.launcher.contextMenuPolicy() == Qt.CustomContextMenu
|
||||
add("overlay-help-panel", "'Ẩn trợ lý' — menu ⋯ bỏ theo yêu cầu, nay chuột phải",
|
||||
(not has_menu) and by_right_click,
|
||||
"menu ⋯ đã bỏ theo yêu cầu — 'Ẩn' nay là chuột phải trên chấm/tiêu đề")
|
||||
add("overlay-help-panel", "2 trạng thái thường ngày", True, "đóng ↔ mở, ẩn hẳn là tuỳ chọn")
|
||||
dock._hide_to_edge()
|
||||
app.processEvents()
|
||||
|
||||
Reference in New Issue
Block a user