qwen-code/packages/web-shell/client
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
..
adapters feat(web-shell): render composer references in user messages (#6537) 2026-07-11 17:44:47 +00:00
assets/icons feat(web-shell): add MCP mentions and iconized @ references (#6279) 2026-07-04 02:13:42 +00:00
completions feat(web-shell): add custom at mention panel (#6242) 2026-07-05 01:17:35 +00:00
components fix(web-shell): show workspace chip tooltip on narrow composer (#6958) 2026-07-15 12:32:17 +00:00
config feat(browser-ext): revive Chrome extension via daemon-direct architecture (#5777) 2026-06-28 15:57:31 +00:00
constants fix(web-shell): stabilize slash command i18n in split-view panes (#6546) 2026-07-08 14:57:12 +00:00
e2e feat(web-shell): auto-post visual previews (screenshots + flow GIFs) on PRs (#6880) 2026-07-15 06:48:52 +00:00
extensions Add harness infrastructure for web-shell package (#6517) 2026-07-09 08:11:58 +00:00
hooks fix(web-shell): prevent composer tag update loop (#6859) 2026-07-14 07:59:41 +00:00
lib feat(web-shell): add shadcn UI foundation (#6760) 2026-07-12 13:51:52 +00:00
styles feat(web-shell): refresh settings page with shadcn (#6817) 2026-07-13 11:50:46 +00:00
test feat(cli): improve subagent observability — untruncated live commands, transcript path, approval context (#6580) 2026-07-11 11:21:23 +00:00
utils feat(web-shell): add session created callback (#6703) 2026-07-13 07:04:42 +00:00
voice Add harness infrastructure for web-shell package (#6517) 2026-07-09 08:11:58 +00:00
App.module.css feat(web-shell): expose session controls to hosts (#6906) 2026-07-15 02:31:59 +00:00
App.test.tsx feat(web-shell): expose session controls to hosts (#6906) 2026-07-15 02:31:59 +00:00
App.tsx feat(web-shell): expose session controls to hosts (#6906) 2026-07-15 02:31:59 +00:00
build-artifact.test.ts fix(web-shell): restore packaged dialog styles on React 18 (#6827) 2026-07-13 15:57:23 +00:00
customization.tsx feat(web-shell): render composer references in user messages (#6537) 2026-07-11 17:44:47 +00:00
i18n.tsx feat(web-shell): maximize a single split pane (#6951) 2026-07-15 12:10:29 +00:00
index.html Add harness infrastructure for web-shell package (#6517) 2026-07-09 08:11:58 +00:00
index.test.tsx feat(web-shell): add workspace path lock (#6853) 2026-07-14 06:24:52 +00:00
index.tsx feat(web-shell): add workspace path lock (#6853) 2026-07-14 06:24:52 +00:00
interactionBlockContext.ts feat(web-shell): add cell value dialog on double-click in markdown tables (#6530) 2026-07-11 15:21:34 +00:00
main.tsx feat(web-shell): add selection statistics to markdown tables (#6838) 2026-07-14 03:54:33 +00:00
midTurnDedup.test.ts feat(daemon): deliver web-shell mid-turn messages into the running turn (#5175) 2026-06-16 16:16:47 +08:00
midTurnDedup.ts feat(daemon): deliver web-shell mid-turn messages into the running turn (#5175) 2026-06-16 16:16:47 +08:00
portalRoot.ts feat(web-shell): add shadcn UI foundation (#6760) 2026-07-12 13:51:52 +00:00
themeContext.ts feat(web-shell): daemon web-shell improvements — token usage, settings, retry, streaming metrics, hidden commands (#5066) 2026-06-13 02:58:08 +00:00
vite-env.d.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00