qwen-code/packages
Shaojin Wen 38429bc100
fix(web-shell): show workspace chip tooltip on narrow composer (#6958)
* 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>
2026-07-15 12:32:17 +00:00
..
acp-bridge feat(cli): Add archived session export (#6911) 2026-07-15 12:21:07 +00:00
audio-capture chore(release): v0.19.10 (#6855) 2026-07-14 05:12:22 +00:00
channels feat(channels): support DingTalk webhook delivery to direct messages (#6891) 2026-07-15 03:07:30 +00:00
chrome-extension chore(release): v0.19.10 (#6855) 2026-07-14 05:12:22 +00:00
cli feat(cli): Add archived session export (#6911) 2026-07-15 12:21:07 +00:00
core feat(cli): Add archived session export (#6911) 2026-07-15 12:21:07 +00:00
cua-driver chore(cua-driver): update version refs to 0.7.1 + add fix doc (#6616) 2026-07-09 14:43:58 +00:00
desktop feat(core): emit liveness heartbeats for silent foreground shell commands (#6876) 2026-07-15 00:07:26 +00:00
mobile-mcp chore(release): v0.19.10 (#6855) 2026-07-14 05:12:22 +00:00
sdk-java fix(core): Align MCP OAuth guidance and docs (#5589) 2026-06-24 07:09:53 +08:00
sdk-python fix(config): reject fractional session and tool-call limits (#6920) 2026-07-15 04:56:52 +00:00
sdk-typescript feat(cli): Add archived session export (#6911) 2026-07-15 12:21:07 +00:00
vscode-ide-companion feat(cli): add /learn command for user-initiated skill creation (#6440) 2026-07-15 05:30:38 +00:00
web-shell fix(web-shell): show workspace chip tooltip on narrow composer (#6958) 2026-07-15 12:32:17 +00:00
web-templates chore(release): v0.19.10 (#6855) 2026-07-14 05:12:22 +00:00
webui fix(webui): route useLocalStorage functional updates through prev state (#6905) 2026-07-15 05:03:04 +00:00
zed-extension chore(deps): upgrade ink 6.2.3 → 7.0.2 + bump Node engine to 22 (#3860) 2026-05-11 17:29:50 +08:00