qwen-code/packages/web-shell/client/components
Shaojin Wen ff350a16a7
feat(web-shell): add git commit history browser (#7204)
* feat(web-shell): add git commit history browser

Add a read-only Git Log dialog to the Web Shell, accessible via /log
command or the History tab in the Changes dialog.

Full-stack implementation across core, daemon, SDK, and web-shell:
- core: fetchGitLog (paginated commit list) and fetchGitCommitDetail
  (message body + per-file numstat) with 12 integration tests
- daemon: GET /workspace/git/log and /workspace/git/log/commit routes
  with bound + qualified dual registration
- SDK: DaemonGitLog/DaemonGitCommitDetail types and client methods
- web-shell: GitLogDialog with commit list, expandable details,
  SHA copy icon, Load more pagination, and Changes/History tab
  switching in both dialogs

* fix(web-shell): address review feedback on git log browser

- Critical: use first-parent diff for merge commits (diff-tree without
  -c or explicit parent outputs nothing for merges)
- Remove dead embedded prop from GitDiffDialog and GitLogDialog
- Replace span role=button with aria-hidden for copy icon (a11y)
- Add loadMore error feedback instead of silent catch
- Refresh relative timestamps every 60s (useState + interval)
- Remove dead branch param from subtitle i18n call

* fix(web-shell): address R2 review feedback on git log browser

- Use bounded split in parseLogFields (first 7 separators) to prevent
  subject containing literal \x1f from shifting the parents field
- Add SHA hex format validation at daemon route layer (400 for invalid)
- Add rendering branch for detail.available === false (error message
  instead of empty content)

* fix(web-shell): count renamed files in commit detail + test git-log route & dialog

Follows the R2 review-feedback commit (which fixed the bounded parse, the
non-hex SHA 400, and the unavailable-detail render). Remaining items:

- Commit detail counts renamed files. diff-tree is plumbing and does not
  honour diff.renames, so a `git mv` split into a delete + add pair (or an
  empty-path entry) instead of one file — understating filesCount /
  linesAdded / linesRemoved. Run diff-tree with -M and give the inline
  numstat parser the same pending-rename state machine as parseGitNumstat,
  so a rename is one file keyed by its new path. Covered by a real-repo
  rename test, plus a merge-commit test that locks the first-parent diff.
- Tests for the two previously-untested modules: the workspace-git-log
  route (list shape, pagination clamping, sha-required + non-hex 400, trust
  gating) and GitLogDialog (all five list state paths, load-more offset +
  error, detail expand + both failure branches incl. available:false, and
  the relative-time render).

* fix(web-shell): address R3 review feedback on git log browser

- Fix timeAgo '0y ago' for commits ~360-364 days old (Math.max(1, ...))
- Add .catch() to clipboard writeText to prevent unhandled rejection
- Reset loadMoreError on initial re-fetch (daemon reconnect)
- Preserve prev.available in loadMore merge instead of overwriting
- Add ARIA tab semantics (role=tablist/tab, aria-selected) to both
  Changes and History tab bars

* fix(web-shell): address R4 review feedback on git log browser

- Fix vacuous limit-clamp test: seed 3 commits, verify limit=2 returns
  2 + hasMore, limit=0 clamps to 1
- Add CSS var fallbacks for --subtle-bg and --success-bg (dialog
  portals outside App.module.css scope)
- Extract GIT_DIALOG_SWITCH_DELAY_MS constant with doc comment
- Make copy-SHA control keyboard accessible (tabIndex, onKeyDown,
  aria-label instead of aria-hidden)

* fix(web-shell): escape apostrophe in worktree welcome string

* fix(web-shell): address git history review feedback

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test(web-shell): mock git diff content in app tests

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(core): harden git log metadata parsing

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

---------

Co-authored-by: wenshao <wenshao@example.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-07-20 15:02:48 +00:00
..
artifacts feat(web-shell): add artifact right panel (#6591) 2026-07-11 00:13:49 +00:00
dialogs feat(web-shell): add git commit history browser (#7204) 2026-07-20 15:02:48 +00:00
extensions feat(serve): add workspace MCP management (#6954) 2026-07-16 02:24:07 +00:00
mcp feat(serve): add workspace MCP management (#6954) 2026-07-16 02:24:07 +00:00
messages fix(test): stabilize 3 flaky tests (serve startup, usage-stats TTL, TasksStatusMessage keypress) (#7319) 2026-07-20 09:19:49 +00:00
panels feat(web-shell): add bottom status items (#6613) 2026-07-09 14:58:39 +00:00
plugins feat(web-shell): add skill management pages (#7018) 2026-07-17 06:42:46 +00:00
sidebar feat(daemon): worktree-isolated sessions for parallel tasks (#7221) 2026-07-19 23:47:03 +00:00
skills feat(web-shell): add skill management pages (#7018) 2026-07-17 06:42:46 +00:00
ui feat(web-shell): git status chip, visual working-tree diff, and sidebar git status (#7054) 2026-07-18 10:06:07 +00:00
AtMentionPanel.test.tsx feat(web-shell): add context mention customization (#6578) 2026-07-10 08:46:43 +00:00
AtMentionPanel.tsx feat(web-shell): add shadcn UI foundation (#6760) 2026-07-12 13:51:52 +00:00
ChatEditor.module.css feat(daemon): worktree-isolated sessions for parallel tasks (#7221) 2026-07-19 23:47:03 +00:00
ChatEditor.test.tsx fix(web-shell): render built-in tag icons (#7024) 2026-07-17 15:33:34 +00:00
ChatEditor.tsx feat(daemon): worktree-isolated sessions for parallel tasks (#7221) 2026-07-19 23:47:03 +00:00
ChatPane.module.css feat(web-shell): color-code each split pane by workspace (#6971) 2026-07-16 02:38:58 +00:00
ChatPane.test.tsx feat(web-shell): support custom slash command actions (#7267) 2026-07-20 11:23:55 +00:00
ChatPane.tsx feat(web-shell): support custom slash command actions (#7267) 2026-07-20 11:23:55 +00:00
Editor.keymap.test.ts feat(web-shell): add Option+Enter and Cmd+Enter newline shortcuts (#5005) 2026-06-12 13:07:56 +08:00
Editor.module.css fix(web-shell): use theme color for @ group titles (#6294) 2026-07-04 03:16:01 +00:00
ErrorBoundary.test.tsx feat(web-shell): add error boundaries so a render crash can't white-screen the embed (#5943) 2026-06-28 01:12:42 +00:00
ErrorBoundary.tsx feat(web-shell): add error boundaries so a render crash can't white-screen the embed (#5943) 2026-06-28 01:12:42 +00:00
GitBranchIndicator.test.tsx feat(web-shell): git status chip, visual working-tree diff, and sidebar git status (#7054) 2026-07-18 10:06:07 +00:00
GitBranchIndicator.tsx feat(daemon): worktree-isolated sessions for parallel tasks (#7221) 2026-07-19 23:47:03 +00:00
InsightProgress.module.css fix(web-shell): fix InsightProgress layout and clean up UI elements (#6115) 2026-07-01 09:00:57 +00:00
InsightProgress.tsx feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
InsightReady.tsx feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
MessageItem.dom.test.tsx feat(daemon): add stateless generation SSE (#6947) 2026-07-16 00:00:08 +00:00
MessageItem.tsx feat(daemon): add stateless generation SSE (#6947) 2026-07-16 00:00:08 +00:00
MessageList.dom.test.tsx feat(web-shell): paginate restored session history (#7064) 2026-07-17 22:09:19 +00:00
MessageList.module.css feat(web-shell): paginate restored session history (#7064) 2026-07-17 22:09:19 +00:00
MessageList.test.ts feat(web-shell): add artifact right panel (#6591) 2026-07-11 00:13:49 +00:00
MessageList.tsx feat(web-shell): paginate restored session history (#7064) 2026-07-17 22:09:19 +00:00
MessageLocateFlash.module.css fix(web-shell): polish scheduled task timeline UI (#6386) 2026-07-07 04:04:28 +00:00
MessageTimestamp.module.css feat(web-shell): polish chat UI and table rendering (#6099) 2026-07-01 16:20:19 +08:00
MessageTimestamp.test.tsx feat(web-shell): show message time on hover (#5079) 2026-06-13 15:30:44 +08:00
MessageTimestamp.tsx feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
ModeIcon.module.css feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
ModeIcon.tsx feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
PromptChevron.tsx feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
QueuedPromptDisplay.test.tsx feat(web-shell): queue prompts while turns are running (#6005) 2026-06-30 14:51:28 +00:00
QueuedPromptDisplay.tsx feat(web-shell): render composer references in user messages (#6537) 2026-07-11 17:44:47 +00:00
RootErrorFallback.test.tsx feat(web-shell): add error boundaries so a render crash can't white-screen the embed (#5943) 2026-06-28 01:12:42 +00:00
RootErrorFallback.tsx feat(web-shell): add error boundaries so a render crash can't white-screen the embed (#5943) 2026-06-28 01:12:42 +00:00
SessionOverviewPanel.module.css feat(web-shell): color-code each split pane by workspace (#6971) 2026-07-16 02:38:58 +00:00
SessionOverviewPanel.test.tsx refactor(web-shell): drop redundant primary-workspace label (#7035) 2026-07-17 00:30:51 +00:00
SessionOverviewPanel.tsx refactor(web-shell): drop redundant primary-workspace label (#7035) 2026-07-17 00:30:51 +00:00
SplitView.module.css feat(web-shell): maximize a single split pane (#6951) 2026-07-15 12:10:29 +00:00
SplitView.test.tsx feat(web-shell): support custom slash command actions (#7267) 2026-07-20 11:23:55 +00:00
SplitView.tsx feat(web-shell): support custom slash command actions (#7267) 2026-07-20 11:23:55 +00:00
StatusBar.module.css feat(web-shell): add a workspace Goals page, and stop losing /goal on daemon resume (#6561) 2026-07-18 08:52:07 +00:00
StatusBar.test.tsx feat(web-shell): add a workspace Goals page, and stop losing /goal on daemon resume (#6561) 2026-07-18 08:52:07 +00:00
StatusBar.tsx feat(web-shell): add a workspace Goals page, and stop losing /goal on daemon resume (#6561) 2026-07-18 08:52:07 +00:00
StreamingStatus.module.css feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
StreamingStatus.test.tsx fix(cli): align memory dialog with managed memory (#6434) 2026-07-09 01:04:56 +00:00
StreamingStatus.tsx fix(web-shell): hide rotating loading phrase in split-view pane status (#6447) 2026-07-07 11:32:59 +00:00
Tips.module.css feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
Tips.tsx feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
ToastHost.module.css fix(web-shell): improve disconnected composer handling (#6166) 2026-07-02 07:05:55 +00:00
ToastHost.tsx Add harness infrastructure for web-shell package (#6517) 2026-07-09 08:11:58 +00:00
toolbarDropdown.test.ts feat(web-shell): use popovers for composer controls (#6877) 2026-07-15 04:54:47 +00:00
toolbarDropdown.ts feat(web-shell): use popovers for composer controls (#6877) 2026-07-15 04:54:47 +00:00
TurnCollapseRow.module.css feat(web-shell): polish chat UI and table rendering (#6099) 2026-07-01 16:20:19 +08:00
WebShellTranscript.dom.test.tsx feat(webshell): replay ChatRecord history in readonly WebShell (#6999) 2026-07-19 00:09:44 +00:00
WebShellTranscript.test.tsx feat(webshell): replay ChatRecord history in readonly WebShell (#6999) 2026-07-19 00:09:44 +00:00
WebShellTranscript.tsx feat(webshell): replay ChatRecord history in readonly WebShell (#6999) 2026-07-19 00:09:44 +00:00
WelcomeHeader.module.css feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
WelcomeHeader.tsx feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
WorkspaceAccent.module.css feat(web-shell): color-code each split pane by workspace (#6971) 2026-07-16 02:38:58 +00:00
WorkspaceIndicator.test.tsx feat(web-shell): color-code each split pane by workspace (#6971) 2026-07-16 02:38:58 +00:00
WorkspaceIndicator.tsx feat(web-shell): color-code each split pane by workspace (#6971) 2026-07-16 02:38:58 +00:00
WorkspaceSessionProvider.tsx feat(web-shell): paginate restored session history (#7064) 2026-07-17 22:09:19 +00:00
WorkspaceUnavailableState.tsx feat(web-shell): modernize multi-workspace sidebar (#6804) 2026-07-13 11:45:20 +00:00