Commit Graph
116 Commits
Author SHA1 Message Date
fz 09a2e120f3 test(ui): strengthen TeX parser boundaries 2026-08-05 15:11:47 +08:00
fz 7c90422f34 fix(ui): harden TeX delimiter parsing 2026-08-05 15:06:38 +08:00
fz 3b86568577 test(ui): keep TeX delimiters out of code fences 2026-08-05 14:28:16 +08:00
fz d68ee2fb0e test(web): cover TeX math rendering 2026-08-05 14:19:19 +08:00
imccyu e9d76dae64 fix(web): address UI polish review feedback 2026-08-04 16:25:09 +08:00
imccyu b9f4e46462 Merge remote-tracking branch 'origin/master' into mergebot/pr1389
# Conflicts:
#	packages/client/ui-workspace/src/client/WorkspaceBrowser.module.css
2026-08-04 16:06:38 +08:00
Yif 92dd231ce4 polish(web): 打磨 Web 会话界面的布局、自适应与组件一致性
1. 统一会话列宽度轴:新增 --dsh-chat-content-width(748px),输入框、todo、goal、queue、approval、plan review、ask question 等容器的宽度与边距全部由该变量推导,消除各面板之间的像素漂移,窄视口下的边缘留白也保持一致。
2. 输入框自适应与细节:控制行改为容器查询(460px 阈值以下权限选择器只显示图标+下拉,隐藏文字);卡片圆角 20→22、行内边距调整并整体下移 2px(发送按钮除外);permission/model 触发器统一 24px 圆角;Plan 与 Read Only 间距 +8。
3. 修复浮层菜单溢出:slash 菜单与命令弹层钳制到输入卡片宽度,超长行以省略号截断;Tooltip 增加 12px 视口边缘安全距离。
4. 增加与替换图标:Add provider 改用输入框同款加号图标(IconPlusOutline16),统一图标尺寸与字号。
5. 统一 Settings → Models 组件:补齐按钮 hover 态、select 下拉箭头不再贴边、标题区与 provider 卡片间距 +12。
6. 侧边栏交互:add workspace / group by / create session / 收起侧边栏四个图标按钮增加 500ms 延迟 tooltip(前两个向下弹出);展开态的 New Session 不再重复显示 tooltip;侧边栏窄屏自适应收起逻辑微调。
7. 其他:hero 区 workspace 徽章右移对齐;附带 Agent Note(中英双语)记录共享宽度轴与容器查询的设计取舍。
2026-08-04 14:14:12 +08:00
Chinesezjc 1d3a807e49 Merge remote-tracking branch 'origin/master' into fix/web-sources-scroll 2026-08-03 16:48:14 +08:00
Chinesezjc 140fdef85e docs(client-web): sync the web card contracts to the scrolling source list
The READMEs of ui-primitives and ui-conversation still documented the
removed maxSources prop, DEFAULT_WEB_MAX_SOURCES, CHAT_WEB_MAX_SOURCES,
and the head/tail collapse; the 2026-07-30 frontend note described the
same as current behavior. Restate all of them as the fixed-height scroll
container and cross-link the two notes both ways.

Bound the model-visible/card-visible correspondence: spill-policy's
tools/post-execute replaces an oversized result's content while leaving
presentationMeta whole, so the card's contract is the view it receives,
not the model's context.

Narrow the unit test's name and header comment to what jsdom establishes
(one <ol>, no expand control); jsdom does not resolve CSS Modules layout,
so the scroll geometry belongs to an assembled browser case.
2026-08-03 16:35:37 +08:00
Yichen Jiang 61cba0cda2 Merge remote-tracking branch 'origin/master' into worktree/web-remote-markdown-images
# Conflicts:
#	packages/client/ui-primitives/README.i18n.yaml
#	packages/client/ui-primitives/README.md
#	packages/client/ui-primitives/README.zh.md
#	packages/client/ui-primitives/src/markdown/MarkdownText.tsx
#	packages/client/ui-primitives/tests/markdown.spec.tsx
2026-08-03 16:09:51 +08:00
Chinesezjc a2ec6cefc2 fix(client-web): scroll the web_search source card instead of collapsing
Replace the WebBlock search card's head/tail collapse and expand button
with a fixed-height scroll container that lists every source the tool
returned. The model-facing side is unchanged: the seam still caps sources
at searchMaxResults and the truncated indicator stays, so model-visible
and frontend-visible sources remain identical.

Remove CHAT_WEB_MAX_SOURCES and DEFAULT_WEB_MAX_SOURCES: with scroll, the
chat row and details panel show the same full list.
2026-08-03 15:38:26 +08:00
_Kerman 94dabcb7ed feat(ui-primitives): support delayed multiline tooltips 2026-08-03 13:47:37 +08:00
creatixchu 3f34a72b66 review(ui-primitives): stop the size doc from enumerating native sizes
The parenthetical listed 14/16 and this branch added 20, but the set never
held to it: IconRightUpOutline14 defaults to 8, IconTreeCorner8x10 to 10,
and IconWarningOutline16 to 14. Drop the list rather than maintain one that
drifts, and retitle the icons test that carried the same generalization.
2026-08-03 10:42:34 +08:00
creatixchu b85c0a1851 fix(ui-workspace): draw Archive session with the archive-box glyph
The session row menu's Archive action carried ic_ds_download_outline_16, a
download tray that reads as "save to disk" rather than "put away". Swap it
for the design's archive glyph — a lidded box with a label slot — added to
the ic_ds_* set as IconArchiveOutline20.

The glyph is native 20, the first of that size in the set, so the menu's
16px icon slot asks for it explicitly. The figma export's 0.11px stroke ring
around the box contour is dropped: it restates the same contour in the same
ink, which currentColor already carries.
2026-08-03 10:30:32 +08:00
ZiyaZhang 8ce4f07f92 fix(web): defer math rendering while streaming 2026-08-01 00:58:50 -07:00
ZiyaZhang 1e334fa955 feat(web): render TeX math in Markdown 2026-08-01 00:05:23 -07:00
creatixchu e25683b26d Merge remote-tracking branch 'origin/master' into worktree-session-hover-menu-fix
# Conflicts:
#	packages/client/ui-primitives/README.i18n.yaml
2026-07-31 17:09:44 +08:00
creatixchu 0afa3af1d5 Merge remote-tracking branch 'origin/master' into worktree-session-hover-menu-fix 2026-07-31 16:51:10 +08:00
Chinesezjc 20b9cd6b36 Merge remote-tracking branch 'origin/master' into feat/web-search-card
# Conflicts:
#	packages/client/connection/src/client/fixture.ts
#	packages/client/ui-conversation/src/client/apply.ts
#	packages/client/ui-conversation/src/client/chat/GenericToolCard.tsx
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.module.css
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
#	packages/client/ui-conversation/tests/chat-apply.spec.tsx
#	packages/client/ui-primitives/src/index.ts
2026-07-31 16:49:20 +08:00
creatixchu 0936200e0e fix(web): expose copied status outside button 2026-07-31 16:29:39 +08:00
creatixchu 8997afb3e5 fix(web): preserve hover-card selection and feedback 2026-07-31 16:13:12 +08:00
Chinesezjc a7139b651c Merge remote-tracking branch 'origin/master' into feat/web-search-card
# Conflicts:
#	packages/client/connection/src/client/fixture.ts
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/src/client/apply.ts
#	packages/client/ui-conversation/src/client/chat/GenericToolCard.tsx
#	packages/client/ui-conversation/src/client/chat/ToolRow.module.css
#	packages/client/ui-conversation/src/client/chat/ToolRow.tsx
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.module.css
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
#	packages/client/ui-conversation/tests/chat-apply.spec.tsx
#	packages/client/ui-primitives/README.i18n.yaml
#	packages/client/ui-primitives/README.md
#	packages/client/ui-primitives/README.zh.md
#	packages/client/ui-primitives/src/index.ts
2026-07-31 15:55:40 +08:00
creatixchu 8714952c85 feat(web): copy values from hover cards 2026-07-31 15:38:22 +08:00
creatixchu 6ca3b78e55 Merge remote-tracking branch 'origin/master' into worktree-session-hover-menu-fix
# Conflicts:
#	apps/web/tests/workspace-management.e2e.ts
2026-07-31 15:14:05 +08:00
creatixchu 51fd1d2b41 fix(web): only anchor presses dismiss the hover card
The card is a React child of the wrapper, so capture-phase presses on it
reached the wrapper's dismissal handler: the first pointerdown of a text
selection closed the card, contradicting its JSDoc contract. Restrict the
immediate close to presses outside the card, keeping it mounted under a
held press (and the browser click with it), and align onPointerLeave's
grace arming with Menu (only while open).

Pin both new behaviors in hover-card.spec and update the bilingual Agent
Note.
2026-07-31 15:06:27 +08:00
Chinesezjc b155051d48 Merge remote-tracking branch 'origin/master' into feat/web-read-card
# Conflicts:
#	packages/client/ui-conversation/src/client/apply.ts
#	packages/client/ui-conversation/src/client/chat/GenericToolCard.tsx
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
#	packages/client/ui-conversation/tests/chat-apply.spec.tsx
#	packages/client/ui-primitives/src/index.ts
2026-07-31 14:46:41 +08:00
Chinesezjc c77932b267 Merge remote-tracking branch 'origin/feat/search-presenter' into feat/web-search-card
# Conflicts:
#	packages/client/connection/src/client/fixture.ts
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/src/client/apply.ts
#	packages/client/ui-conversation/src/client/chat/GenericToolCard.tsx
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.module.css
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
#	packages/client/ui-conversation/tests/chat-apply.spec.tsx
#	packages/client/ui-primitives/README.i18n.yaml
#	packages/client/ui-primitives/README.md
#	packages/client/ui-primitives/README.zh.md
#	packages/client/ui-primitives/src/index.ts
2026-07-31 13:32:49 +08:00
Chinesezjc 944fff6273 Merge remote-tracking branch 'origin/feat/read-presenter' into feat/web-read-card
# Conflicts:
#	packages/client/connection/src/client/fixture.ts
#	packages/client/ui-conversation/src/client/apply.ts
#	packages/client/ui-conversation/src/client/chat/GenericToolCard.module.css
#	packages/client/ui-conversation/src/client/chat/GenericToolCard.tsx
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.module.css
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
#	packages/client/ui-conversation/tests/chat-apply.spec.tsx
#	packages/client/ui-primitives/src/index.ts
2026-07-31 13:23:39 +08:00
Chinesezjc 64c855737d Merge remote-tracking branch 'origin/master' into feat/web-diff-card
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/README.md
#	packages/client/ui-conversation/README.zh.md
2026-07-31 12:50:58 +08:00
Chinesezjc eebcbbbe4e Merge remote-tracking branch 'origin/feat/search-presenter' into feat/web-search-card
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/src/client/chat/GenericToolCard.tsx
#	packages/client/ui-conversation/src/client/chat/ToolRow.module.css
#	packages/client/ui-conversation/src/client/chat/ToolRow.tsx
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
#	packages/client/ui-primitives/README.i18n.yaml
#	packages/client/ui-primitives/src/index.ts
2026-07-31 12:27:30 +08:00
Chinesezjc 18b8a1506a Merge remote-tracking branch 'origin/feat/read-presenter' into feat/web-read-card
# Conflicts:
#	apps/web/tests/snapshots/code-mode-round/ui.expected.md
#	packages/client/ui-conversation/src/client/chat/GenericToolCard.tsx
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
#	packages/client/ui-primitives/src/index.ts
2026-07-31 12:03:11 +08:00
Chinesezjc 4bcec15edd Merge remote-tracking branch 'origin/master' into feat/web-diff-card
# Conflicts:
#	apps/web/tests/built-boot.snapshot.ts
#	packages/client/connection/src/client/fixture.ts
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/src/client/apply.ts
#	packages/client/ui-conversation/src/client/chat/GenericToolCard.tsx
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
#	packages/client/ui-conversation/tests/chat-apply.spec.tsx
#	packages/client/ui-primitives/README.i18n.yaml
#	packages/client/ui-primitives/README.md
#	packages/client/ui-primitives/README.zh.md
#	packages/client/ui-primitives/src/index.ts
2026-07-31 11:56:28 +08:00
Ziya ade8358e67 Merge branch 'master' into feat/gui-full-access-confirmation 2026-07-30 23:45:31 -04:00
Chinesezjc 83f3ed8b91 Merge remote-tracking branch 'origin/master' into feat/web-web-card
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/src/client/chat/GenericToolCard.tsx
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
#	packages/client/ui-primitives/README.i18n.yaml
#	packages/client/ui-primitives/README.md
#	packages/client/ui-primitives/README.zh.md
#	packages/client/ui-primitives/src/index.ts
2026-07-31 10:51:09 +08:00
ZiyaZhang a189597830 Merge remote-tracking branch 'upstream/master' into feat/gui-full-access-confirmation
# Conflicts:
#	packages/client/ui-primitives/src/Modal.tsx
#	packages/client/ui-primitives/tests/atoms.spec.tsx
2026-07-30 19:30:41 -07:00
Chinesezjc 22d8fa788b Merge remote-tracking branch 'origin/master' into feat/web-diff-card
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/src/client/chat/GenericToolCard.tsx
#	packages/client/ui-conversation/src/client/chat/ToolRow.tsx
#	packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
#	packages/client/ui-primitives/README.i18n.yaml
#	packages/client/ui-primitives/src/index.ts
2026-07-31 04:22:57 +08:00
Chinesezjc e830ed7939 fix(web-search-card): surface truncation recovery, widen cardless fallback, validate wire shape, fix tail-cap
Address the ds-review-bot findings on the search card:

- searchCardModel dropped the result view's `content`, so a capped search's
  `Full … stored at: <locator>` recovery footer vanished from the UI (the card
  replaces the raw text). Thread it through as `SearchCardModel.recovery` and
  render it below the card at all three sites, only when truncated.
- SearchRow's fallback body was gated on `state === 'error'`, so a settled
  non-error call with no card (a successful nested run_code sub-dispatch, a
  legacy generic result) showed only its summary with content lost. Widen it to
  any settled call with `search === null`.
- searchCardModel trusted the `files`/`paths` shape the host wire schema only
  string-checks; a malformed known-kind frame would crash SearchBlock. Validate
  the full shape and fall to the generic path on mismatch.
- SearchBlock's restored tail file header added a row without consuming a tail
  slot, exceeding maxLines by one and overstating the hidden count. Make it
  consume a slot so the visible count holds at maxLines and `hidden` stays exact.

Correct the fixture JSDoc (now genuinely exceeds the row cap) and the Agent Note
recovery-text claim, sync the ui-conversation bilingual README with the search
row, and add an assembled keyless snapshot (apps/web/tests/search-card.snapshot.ts)
that pins the grep card's shape from the built bundles.
2026-07-30 22:40:07 +08:00
Chinesezjc c1d88ffb7b fix(client-web): pin keyed WebRow in boot smoke, show empty-search feedback
- built-boot smoke asserts [data-variant=web][data-tool=web_search/fetch]
  (the keyed WebRow) instead of [data-web] (which WebBlock draws even on the
  GenericToolCard fallback, so a silent keyed-registration failure passed).
- WebBlock renders an explicit empty-state note when a search returns no
  answer and no sources, instead of a blank <ol>; the chat row does not
  surface the raw result content, so the backend's 'No results found.' was
  otherwise invisible.
- README (ui-conversation, ui-primitives) and the frontend Agent Note record
  the unknown-web-kind null arm, the details-panel flattened body, and the
  empty-search copy; pairings re-recorded.
2026-07-30 22:24:57 +08:00
Chinesezjc e98f458852 perf(web-read-card): lazy-load read grammars and guard empty-window copy
Only TypeScript, shell, and JSON grammars load at Web boot; the read card's
wider langFromPath extension set loads through dynamic imports on first use,
so a session that never opens a read card in one of those languages avoids
~1.6 MB of grammar modules and their synchronous init. ReadBlock/CodeBlock
re-render on grammar-load via useSyncExternalStore, picking up highlighting
once the grammar registers. ReadBlock hides the copy control on an empty
window (a successful read of an empty file settles to lines: [] with
card:'read'), matching TerminalBlock so it cannot wipe the clipboard.
2026-07-30 21:28:38 +08:00
Yichen Jiang b6130b178d Merge remote-tracking branch 'origin/worktree-llm-web-config' into worktree/onboarding-deepseek-config
# Conflicts:
#	packages/client/ui-models/README.i18n.yaml
#	packages/client/ui-models/README.md
#	packages/client/ui-models/README.zh.md
#	packages/client/ui-models/src/client/store.ts
#	packages/client/ui-models/tests/components.spec.tsx
2026-07-30 20:55:12 +08:00
ZiyaZhang 6d416b06c5 fix(client): gate every full access picker 2026-07-30 05:48:33 -07:00
Chinesezjc b832f46eff fix(web-search-card): finish search bot-review round (import, docs)
Complete the stalled review pass: drop the unused useMemo import (rows flatten
inline), add SearchBlock to the ui-primitives README (both languages) with a
Search results section, and re-record the doc pairings. Search card behavior
and tests unchanged (313 pass).
2026-07-30 20:42:25 +08:00
Yichen Jiang e55a904e1d feat(web): render remote Markdown images 2026-07-30 20:26:33 +08:00
creatixchu 2cac565383 fix(web): let the pointer reach hover cards and row menus
The workspace browser's two hover-raised popups both died on the way to
them. HoverCard closed on the first pointerleave and rendered its card
pointer-events:none, but the card sits 8px off the anchor, so every path
to it crossed ground belonging to neither. The row action menus put
closeOnPointerLeave's handler on the portaled list, so aiming back at the
... trigger that opened it, or overshooting a list edge, closed it with no
window to come back.

usePointerGrace owns one cancelable delayed close (200ms) shared by both
atoms: leaving arms it, returning cancels it. The hover card becomes
hit-testable so resting on it holds it open, and Menu moves pointer-leave
dismissal to the wrapper span, where React's enter/leave traversal makes
trigger and portaled list one region.

Both gestures are pinned in the real browser lane; each fails without the
corresponding fix.
2026-07-30 20:25:02 +08:00
ZiyaZhang 9eb0ef4c3e feat(client): confirm before enabling full access 2026-07-30 04:50:27 -07:00
Chinesezjc 17ee269f11 fix(web): address web card review — panel body, ol numbering, safe links, docs
- DetailsPanel: render the flattened result content below the web card, so a
  web_fetch's fetched body (and a search's answer/source markdown) stays
  visible on the panel's single-call reading surface — the card is a summary.
- WebBlock: the collapsed source tail keeps each source's original citation
  number via <li value>, and the expand control is a marker-less <li> so the
  <ol> is valid HTML; an empty-hostname URL (file:/data:) falls back to the raw
  URL so a label is never blank.
- web-row / GenericToolCard: both spread WebBlock uniformly with maxSources
  (fetch ignores it, like TerminalBlock's maxLines), dropping the duplicated
  per-kind conditional.
- Docs: WebBlock added to the ui-primitives README (both languages) with a Web
  retrieval section; the ui-conversation README's "inline licensed for this
  intent alone" claim de-absolutized and a web-card paragraph added; the Agent
  Note's safe-link description corrected to the http(s) subset of MarkdownText's
  allowlist (mailto excluded). Fixture source comment aligned with its data.
- Tests: ol numbering + marker-less expander, empty-hostname label fallback,
  the fetched body visible in the panel.
2026-07-30 19:36:17 +08:00
Chinesezjc 2646d67faa Merge remote-tracking branch 'origin/feat/web-presenter' into feat/web-web-card
# Conflicts:
#	packages/client/ui-conversation/tests/chat-apply.spec.tsx
2026-07-30 19:13:53 +08:00
Chinesezjc 3dbf83e918 Merge remote-tracking branch 'origin/feat/search-presenter' into feat/web-search-card
# Conflicts:
#	packages/client/ui-conversation/src/client/chat/ToolRow.tsx
#	packages/client/ui-conversation/tests/chat-apply.spec.tsx
2026-07-30 19:12:01 +08:00
Chinesezjc d34211d781 Merge remote-tracking branch 'origin/feat/read-presenter' into feat/web-read-card
# Conflicts:
#	packages/client/ui-conversation/tests/chat-apply.spec.tsx
2026-07-30 19:09:40 +08:00
Chinesezjc ce05304fcc Merge remote-tracking branch 'origin/master' into feat/web-diff-card
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/src/client/chat/ToolRow.tsx
#	packages/client/ui-conversation/tests/chat-apply.spec.tsx
2026-07-30 19:04:33 +08:00