mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-10 01:05:24 +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> |
||
|---|---|---|
| .. | ||
| adapters | ||
| assets/icons | ||
| completions | ||
| components | ||
| config | ||
| constants | ||
| e2e | ||
| extensions | ||
| hooks | ||
| lib | ||
| styles | ||
| test | ||
| utils | ||
| voice | ||
| App.module.css | ||
| App.test.tsx | ||
| App.tsx | ||
| build-artifact.test.ts | ||
| customization.tsx | ||
| i18n.tsx | ||
| index.html | ||
| index.test.tsx | ||
| index.tsx | ||
| interactionBlockContext.ts | ||
| main.tsx | ||
| midTurnDedup.test.ts | ||
| midTurnDedup.ts | ||
| portalRoot.ts | ||
| themeContext.ts | ||
| vite-env.d.ts | ||