Restore the two gating rules the redesign dropped, and put the dot back in its corner
A1 — hiding the assistant from the dot. The old build kept a chevron button beside the dot wired to _hide_to_edge; the redesign moved that action into the panel's ⋯ menu, so hiding went from one click to open-panel → ⋯ → Ẩn. The drawing has no button there (26px, no text, no chevron), so the reach comes back as a right-click on the dot, with the tooltip saying so. A2 — per-part cost. Folding Input/Output/Cache into the total tile's sub-line carried their token counts but not their prices, which live only on those three cards, so the cost breakdown left the screen entirely. The wireframe asks for the tiles anyway — "$0.31 Tổng chi phí · 57 lượt / 395.4K Tổng token / 292.8K Input / 102.7K Output / 108.9K Cache" — so they are back as tiles, each with its price, and the turn count rides on the cost tile's label as drawn. The dot on Cowork. _update_dock_guard lifted it whenever a composer existed, testing only the vertical axis. On a wide window the composer ends at the chat column's right edge — x=1688 against a dot at x=1892 — so the dot rose 156px to clear something that was never under it, and Cowork became the one screen where it was not in the corner. It now lifts only when the two actually overlap: 18px from the bottom at 1936px wide, still lifted at 1200 and 900 where the composer does reach under it. Also: open_tooltip and show_tooltip still said "App Assistant" after the rename. check_dock_corner covers the corner rule at three widths and fails if the lift comes back unconditionally. 18/18 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
16406f863f
commit
a0cef768c9
+20
-2
@@ -223,7 +223,8 @@ class HelpAgentWidget(QWidget):
|
||||
self.launcher.setObjectName("helpLauncher")
|
||||
self.launcher.setIcon(icon("sparkle", size=_DOT_ICON, color=_SPARK_GOLD))
|
||||
self.launcher.setCursor(Qt.PointingHandCursor)
|
||||
self.launcher.setToolTip(tr("help_agent.open_tooltip"))
|
||||
self.launcher.setToolTip(
|
||||
f'{tr("help_agent.open_tooltip")} · {tr("help_agent.dot_hint")}')
|
||||
self.launcher.clicked.connect(self._expand)
|
||||
|
||||
def _build_panel(self) -> None:
|
||||
@@ -267,6 +268,12 @@ class HelpAgentWidget(QWidget):
|
||||
self.act_collapse.triggered.connect(self._collapse)
|
||||
self.act_hide = menu.addAction(tr("help_agent.hide_tooltip"))
|
||||
self.act_hide.triggered.connect(self._hide_to_edge)
|
||||
# The old build put a chevron button beside the dot that hid the
|
||||
# assistant in one click. The drawing has no such button — the dot is
|
||||
# 26px, no text, no chevron — so the same reach comes back as a right-
|
||||
# click on the dot rather than as pixels next to it.
|
||||
self.launcher.setContextMenuPolicy(Qt.CustomContextMenu)
|
||||
self.launcher.customContextMenuRequested.connect(self._dot_menu)
|
||||
self.more_btn.setMenu(menu)
|
||||
hb.addWidget(self.more_btn)
|
||||
v.addWidget(header)
|
||||
@@ -309,6 +316,16 @@ class HelpAgentWidget(QWidget):
|
||||
self._state = _LAUNCHER_ST
|
||||
self._apply_state()
|
||||
|
||||
def _dot_menu(self, pos) -> None:
|
||||
"""Right-click on the dot: hide to the edge, the one action that means
|
||||
anything while the panel is shut ("collapse to dot" already happened)."""
|
||||
from PySide6.QtWidgets import QMenu
|
||||
|
||||
menu = QMenu(self.launcher)
|
||||
act = menu.addAction(tr("help_agent.hide_tooltip"))
|
||||
act.triggered.connect(self._hide_to_edge)
|
||||
menu.exec(self.launcher.mapToGlobal(pos))
|
||||
|
||||
def _hide_to_edge(self) -> None:
|
||||
self._state = _HIDDEN
|
||||
self._apply_state()
|
||||
@@ -460,7 +477,8 @@ class HelpAgentWidget(QWidget):
|
||||
self._render()
|
||||
self.title.setText(tr("help_agent.title"))
|
||||
self.input.setPlaceholderText(tr("help_agent.placeholder"))
|
||||
self.launcher.setToolTip(tr("help_agent.open_tooltip"))
|
||||
self.launcher.setToolTip(
|
||||
f'{tr("help_agent.open_tooltip")} · {tr("help_agent.dot_hint")}')
|
||||
if self.launcher.open:
|
||||
self.launcher.setText(f" {tr('help_agent.badge')}")
|
||||
self._layout_launcher()
|
||||
|
||||
Reference in New Issue
Block a user