mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-09 08:45:58 +00:00
* fix(web-shell): show workspace chip tooltip on narrow composer The composer's workspace chip surfaced its full cwd only through a native `title` attribute, unlike the sibling git-branch and model chips which use a styled Radix tooltip. On a narrow (split-screen / mobile) composer the chip ellipsizes or collapses to an icon, so the workspace is discoverable only on hover — and a native `title` is inconsistent and never fires on touch. Give WorkspaceIndicator the same Radix tooltip as GitBranchIndicator (with the full cwd as content), completing the documented "mirrors GitBranchIndicator" intent. Its visually-hidden tooltip mirror also exposes the cwd to screen readers, which the native `title` did not do reliably. * test(web-shell): assert the workspace tooltip renders on hover Address review feedback: the WorkspaceIndicator tests checked the `data-web-shell-workspace-title` hook but never opened the tooltip, so a regression rendering the short name (or nothing) in the Radix `TooltipContent` would have gone unnoticed. Open the tooltip via a `pointermove` (jsdom has no `PointerEvent`; Radix opens on mouse move after `delayDuration`) and assert the portalled `[role="tooltip"]` shows the full cwd — and, in compact mode, assert the `workspaceChipCompact` icon-only class is actually applied. * test(web-shell): guard the compact chip before asserting on it Move the `if (!chip)` null guard above the assertions in the compact-mode test so a failure to render surfaces the descriptive "workspace chip was not rendered" error instead of an opaque `expect(undefined)` throw from the optional-chained access. Matches the first test in the file. --------- Co-authored-by: wenshao <wenshao@example.com> |
||
|---|---|---|
| .. | ||
| acp-bridge | ||
| audio-capture | ||
| channels | ||
| chrome-extension | ||
| cli | ||
| core | ||
| cua-driver | ||
| desktop | ||
| mobile-mcp | ||
| sdk-java | ||
| sdk-python | ||
| sdk-typescript | ||
| vscode-ide-companion | ||
| web-shell | ||
| web-templates | ||
| webui | ||
| zed-extension | ||