qwen-code/docs/design
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
..
adaptive-output-token-escalation fix(core): stop repeated truncated write_file/edit retries from looping (#5934) 2026-06-27 12:17:12 +00:00
auth refactor(cli): provider-first auth registry with unified install pipeline (#3864) 2026-05-08 12:19:28 +08:00
auto-memory fix(core): prevent OOM in auto-memory extraction during /quit (#5147) (#5181) 2026-06-19 08:17:45 +08:00
channels docs(serve): Close multi-workspace hardening gaps (#7019) 2026-07-16 17:33:53 +00:00
compact-mode feat: optimize compact mode UX — shortcuts, settings sync, and safety (#3100) 2026-04-16 09:29:24 +08:00
compaction-image-stripping feat(core): strip inline media before chat compaction summary (#4101) 2026-05-14 10:20:11 +08:00
ctrl-o-detail-expand feat(serve): add workspace persisted transcript reader (#6740) 2026-07-12 10:39:05 +00:00
customize-banner-area feat(cli): customize banner area (logo, title, hide) (#3710) 2026-05-07 10:17:53 +08:00
daemon-acp-http docs(serve): Close multi-workspace hardening gaps (#7019) 2026-07-16 17:33:53 +00:00
daemon-session-artifacts feat(serve): add workspace persisted transcript reader (#6740) 2026-07-12 10:39:05 +00:00
daemon-sidechannel-coordination docs(design): daemon side-channel coordination (A1/A2/A4/A5) (#4511) 2026-07-05 09:43:46 +00:00
daemon-transport-abstraction feat(serve): add daemon idle detection to GET /health?deep=true (#4934) 2026-06-18 06:55:03 +00:00
fork-subagent feat(core): implement fork subagent for context sharing (#2936) 2026-04-14 14:27:38 +08:00
hot-reload Feat: LSP Server support hot reload (#5953) 2026-07-05 13:50:00 +00:00
performance perf(cli): defer startup prefetch tasks (#6303) 2026-07-07 15:31:55 +00:00
prompt-cache feat(core): stabilize tool schema declaration order (#6339) 2026-07-05 12:24:59 +00:00
prompt-suggestion fix(followup): prevent tool call UI leak and Enter accept buffer race (#2872) 2026-04-09 00:07:03 +08:00
rt-optimization feat(telemetry): foundation for skill-based RT optimization (P0+P1) (#4565) 2026-05-29 02:17:40 +08:00
session-crash-recovery feat(core): add unified session recovery planning (#6731) 2026-07-11 11:15:40 +00:00
session-idle-reaper feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
session-recap feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
session-title fix: Make chat recording failures durable and visible (#6743) 2026-07-12 10:52:26 +00:00
skill-nudge feat(memory): add autoSkill background project skill extraction (#3673) 2026-05-09 14:25:02 +08:00
slash-command feat(cli): improve slash command discovery (#3736) 2026-05-09 14:25:44 +08:00
standalone-clipboard-native-addon/assets fix(packaging): bundle clipboard addon in standalone builds (#6708) 2026-07-11 15:18:24 +00:00
structured-output docs: user + design docs for --json-schema structured output (#4051) 2026-05-17 23:10:34 +08:00
tool-use-summary feat(tui): partition tool display by type — collapse read/search, show mutation tools individually (#5661) 2026-06-25 12:44:50 +00:00
usage-only-stream-memory/assets fix: bound usage-only streams and abort on quit (#7038) 2026-07-16 18:11:53 +00:00
virtual-viewport feat(cli): virtual viewport for long conversations on ink 7 (#4146) 2026-06-02 13:57:17 +08:00
vp-mouse-selection feat(cli): mouse text selection and copy in VP mode (#6937) 2026-07-17 08:04:07 +00:00
2026-05-15-async-memory-recall-design.md fix(core): decouple auto-memory recall from main-agent request path (#4172) 2026-05-19 13:58:58 +08:00
2026-05-21-memory-pressure-monitor-design.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-05-26-daemon-logger-design.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-05-27-daemon-workspace-service-design.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-06-12-session-shell-permission-policy.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-06-13-file-history-snapshot-persistence.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-06-15-simulated-sed-file-history.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-06-23-fix-conflicts-command.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-06-24-daemon-clientid-self-heal-design.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-06-24-stream-inactivity-timeout-design.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-06-30-unified-reasoning-effort-cli.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-07-01-channel-lifecycle-status-adapters.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-07-01-channel-lifecycle-status-umbrella.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-07-01-channel-p0-identity-task-lifecycle-design.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-07-05-large-frame-handling-measurement.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
2026-07-06-session-start-profiler.md feat(daemon): Trace cold first-session startup (#6907) 2026-07-16 16:53:56 +00:00
2026-07-07-bounded-replay-snapshot-window.md feat(serve): Add cursor-paged transcript replay endpoint (#6525) 2026-07-10 16:34:43 +00:00
2026-07-09-webshell-user-message-input-annotations.md feat(web-shell): render composer references in user messages (#6537) 2026-07-11 17:44:47 +00:00
2026-07-11-daemon-persistent-workspace-registration.md feat(serve): persist dynamic workspace registrations (#6716) 2026-07-11 16:49:40 +00:00
2026-07-11-daemon-workspace-runtime-removal.md feat(serve): support runtime workspace removal (#6745) 2026-07-13 15:43:38 +00:00
2026-07-11-managed-memory-microcompaction.md fix(core): preserve managed memory during microcompaction (#6714) 2026-07-11 15:58:54 +00:00
2026-07-11-tool-call-preparing-events.md feat(acp): expose tool-call preparation lifecycle (#6819) 2026-07-15 00:40:02 +00:00
2026-07-13-cold-first-session-support.md feat(daemon): Trace cold first-session startup (#6907) 2026-07-16 16:53:56 +00:00
2026-07-13-pdf-vision-bridge-fallback.md feat(core): add PDF vision bridge fallback (#6846) 2026-07-15 03:42:14 +00:00
2026-07-13-workspace-skills-installed-path.md feat(serve): expose skill installation paths (#6811) 2026-07-13 09:29:09 +00:00
2026-07-14-chat-record-daemon-transcript-block-projection.md feat(webshell): replay ChatRecord history in readonly WebShell (#6999) 2026-07-19 00:09:44 +00:00
2026-07-14-dingtalk-webhook-direct-message.md feat(channels): support DingTalk webhook delivery to direct messages (#6891) 2026-07-15 03:07:30 +00:00
2026-07-14-silent-command-heartbeat.md feat(core): emit liveness heartbeats for silent foreground shell commands (#6876) 2026-07-15 00:07:26 +00:00
2026-07-14-web-shell-readonly-daemon-transcript.md feat(webshell): replay ChatRecord history in readonly WebShell (#6999) 2026-07-19 00:09:44 +00:00
2026-07-15-daemon-log-stable-rotation.md feat(cli): Add bounded daemon log rotation (#6969) 2026-07-18 16:18:58 +00:00
2026-07-15-daemon-session-source-metadata.md feat(channels): stamp daemon sourceId with channel instance name on created sessions (#7078) 2026-07-17 14:57:27 +00:00
2026-07-16-default-background-subagents.md feat(core): improve subagent delegation defaults and guardrails (#7048) 2026-07-18 08:52:48 +00:00
2026-07-16-subagent-prompt-guardrails.md feat(core): improve subagent delegation defaults and guardrails (#7048) 2026-07-18 08:52:48 +00:00
2026-07-16-webshell-git-status-diff.md feat(web-shell): git status chip, visual working-tree diff, and sidebar git status (#7054) 2026-07-18 10:06:07 +00:00
2026-07-16-webshell-transcript-batched-dispatch.md fix(web-shell): batch transcript dispatch to avoid tab-return freeze (#7012) 2026-07-17 00:58:27 +00:00
2026-07-17-adaptive-tool-call-cap.md fix(core): make the per-turn tool-call cap adaptive (#7052) 2026-07-17 16:42:41 +00:00
2026-07-17-observed-channel-delivery-targets.md feat(channels): observe group names from inbound messages (#7155) 2026-07-18 09:26:12 +00:00
2026-07-17-plan-mode-shell-routing.md feat(core): Route Plan-mode shell commands by safety (#7172) 2026-07-19 16:00:22 +00:00
2026-07-17-workspace-session-info.md feat(serve): add GET /workspace/:id/session-info for session totals (#7077) 2026-07-17 06:18:49 +00:00
2026-07-18-observed-channel-group-names.md feat(channels): observe group names from inbound messages (#7155) 2026-07-18 09:26:12 +00:00
2026-07-19-webshell-git-log.md feat(web-shell): add git commit history browser (#7204) 2026-07-20 15:02:48 +00:00
2026-07-19-webshell-worktree-sessions.md feat(daemon): worktree-isolated sessions for parallel tasks (#7221) 2026-07-19 23:47:03 +00:00
2026-07-20-plan-mode-mid-turn-guidance.md fix(core): Enforce Plan mode entry boundary (#7248) 2026-07-20 04:35:22 +00:00
acp-channel-initialize-profiling.md perf(cli): Defer TUI runtime from ACP startup (#7182) 2026-07-19 00:10:15 +00:00
acp-model-route-identity.md fix(acp): disambiguate model routes (#7028) 2026-07-16 18:24:41 +00:00
acp-preheat-contract.md feat(daemon): Advertise ACP preheat readiness (#7200) 2026-07-19 13:00:32 +00:00
auto-compaction-threshold-redesign.md feat(core)!: redesign auto-compaction thresholds with three-tier ladder (#4345) 2026-05-25 21:11:08 +08:00
channel-worker-startup-failures.md fix(cli): Preserve channel startup failure details (#6950) 2026-07-16 01:17:19 +00:00
chat-recording-failure-observability.md fix: Make chat recording failures durable and visible (#6743) 2026-07-12 10:52:26 +00:00
conversation-branch-inspection.md feat(core): inspect persisted conversation branches (#7185) 2026-07-19 15:46:13 +00:00
cua-driver-mcp-reliability.md fix(cua-driver): harden MCP tool reliability (#6968) 2026-07-15 15:40:31 +00:00
custom-api-key-auth-wizard-prd.md docs(auth): add custom API key wizard PRD (#3583) 2026-05-13 14:04:41 +08:00
daemon-archived-session-export.md feat(cli): Add archived session export (#6911) 2026-07-15 12:21:07 +00:00
daemon-channel-runtime-control.md feat(cli): Add runtime daemon channel control (#6741) 2026-07-13 02:53:27 +00:00
daemon-extension-at-mention.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
daemon-extension-install-interactions.md feat(web-shell): add extension management page (#6815) 2026-07-14 08:31:13 +00:00
daemon-generation-sse.md feat(daemon): add stateless generation SSE (#6947) 2026-07-16 00:00:08 +00:00
daemon-global-deep-health.md feat(daemon): Aggregate deep health across workspaces (#6961) 2026-07-16 01:30:55 +00:00
daemon-idle-detection-api.md feat(loop): wire prompt-only /loop to self-paced wakeups (#5197) 2026-06-18 18:36:24 +08:00
daemon-legacy-session-workspace-telemetry.md feat(serve): Complete legacy session workspace telemetry (#7003) 2026-07-17 15:25:15 +00:00
daemon-multi-workspace-hardening.md docs(serve): Close multi-workspace hardening gaps (#7019) 2026-07-16 17:33:53 +00:00
daemon-multi-workspace-phase1-registry.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
daemon-multi-workspace-phase2a-sessions.md docs(serve): Close multi-workspace hardening gaps (#7019) 2026-07-16 17:33:53 +00:00
daemon-multi-workspace-phase4-acp.md feat(cli): workspace-qualified ACP transport (daemon multi-workspace phase 4) (#6621) 2026-07-11 00:24:01 +00:00
daemon-multi-workspace-phase4b-channel-workers.md feat(cli): group daemon channel workers by workspace (phase 4b) (#6635) 2026-07-11 13:08:02 +00:00
daemon-multi-workspace-phase4b-voice.md feat(serve): Add workspace-qualified Voice (#6839) 2026-07-14 03:42:58 +00:00
daemon-multi-workspace-session-export.md feat(serve): Add workspace-qualified session export (#6844) 2026-07-14 03:50:06 +00:00
daemon-multi-workspace-session-file-ops.md feat(serve): support multi-workspace rewind and shell (#6826) 2026-07-13 15:32:44 +00:00
daemon-multi-workspace-session-organization-mutations.md fix(cli): Scope session organization mutations by workspace (#6724) 2026-07-11 12:25:16 +00:00
daemon-session-runtime-status.md feat(daemon): expose session runtime status (#6645) 2026-07-10 10:15:12 +00:00
daemon-skill-toggle.md feat(daemon): add workspace skill toggle API (#6816) 2026-07-14 02:59:13 +00:00
daemon-todo-stop-guard.md feat(cli): add daemon Todo stop guard (#6945) 2026-07-18 01:48:20 +00:00
daemon-untrusted-workspace-session-catalog.md feat(serve): Expose read-only untrusted session catalogs (#6717) 2026-07-11 15:28:41 +00:00
daemon-workspace-remember.md fix(memory): allow forget to remove user managed memory (#6432) 2026-07-08 09:51:36 +00:00
declarative-agents-port.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
explicit-plan-exit-approval.md fix(core): Require explicit approval to exit Plan mode (#6967) 2026-07-17 02:51:11 +00:00
extension-file-reload.md feat: extension file reload — watch for plugin changes and hot-reload runtime (#6347) 2026-07-08 11:16:21 +00:00
extension-management-v2.md feat(serve): add extension management v2 (#6825) 2026-07-14 03:30:47 +00:00
f2-mcp-transport-pool.md docs(serve): Close multi-workspace hardening gaps (#7019) 2026-07-16 17:33:53 +00:00
full-turn-multimodal-routing.md feat: support full-turn multimodal routing for image prompts (#7045) 2026-07-17 23:22:46 +00:00
goal-loop-input-control.md fix(cli): allow goal controls during active loops (#7202) 2026-07-19 11:29:52 +00:00
issue-4479-token-usage-stats-coordination.md feat(stats): expose token usage for cost visibility (#4564) 2026-06-19 07:14:07 +08:00
markdown-syntax-extension.md feat(cli): expand TUI markdown rendering (#3680) 2026-05-07 16:24:13 +08:00
mcp-management-runtime-model.md feat(serve): add workspace MCP management (#6954) 2026-07-16 02:24:07 +00:00
mcp-tool-name-provider-compatibility.md fix(mcp): normalize tool names for strict providers (#6976) 2026-07-19 00:19:53 +00:00
openrouter-auth-and-models.md refactor(cli): remove legacy qwen auth CLI subcommand, redirect to /auth TUI dialog (#3959) 2026-05-11 16:44:09 +08:00
prompt-queue-backpressure.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
serve-server-final-split.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
serve-server-split.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
session-group-custom-hex-colors.md feat(web-shell): support custom Hex session group colors (#6752) 2026-07-12 10:41:17 +00:00
shell-safety-classification.md refactor(core): Classify shell safety as read-only, write, or unknown (#7053) 2026-07-18 14:01:33 +00:00
shell-timeout-error-semantics.md fix(core): Classify shell timeouts as tool errors (#6864) 2026-07-15 05:34:39 +00:00
skill-required-capabilities.md docs(web-shell): document chart renderer integration (#6353) 2026-07-06 04:55:26 +00:00
standalone-clipboard-native-addon.md fix(packaging): bundle clipboard addon in standalone builds (#6708) 2026-07-11 15:18:24 +00:00
telemetry-llm-request-timing-design.md feat(telemetry): Phase 4b — retry visibility for qwen-code.llm_request (#3731) (#4432) 2026-06-05 13:45:47 +08:00
telemetry-outbound-propagation-design.md feat(telemetry): client-side HTTP span + opt-in W3C traceparent propagation (#4384) (#4390) 2026-05-25 22:16:54 +08:00
telemetry-resource-attributes-design.md feat(telemetry): support custom resource attributes and add metric cardinality controls (#4367) 2026-05-21 13:54:37 +08:00
telemetry-subagent-spans-design.md feat(telemetry): Phase 3 — qwen-code.subagent span with concurrent isolation (#3731) (#4410) 2026-06-05 17:12:34 +08:00
tui-spacing-density-pr1.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
tui-user-message-half-line-pr2.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
untrusted-persisted-transcript.md feat(serve): Bound persisted transcript pages (#6769) 2026-07-13 03:18:11 +00:00
usage-only-stream-memory.md fix: bound usage-only streams and abort on quit (#7038) 2026-07-16 18:11:53 +00:00
vscode-output-channel-logging.md feat(vscode): route logs to the Qwen Code Companion output channel (#7121) 2026-07-18 06:58:14 +00:00
web-shell-custom-slash-command-actions.md feat(web-shell): support custom slash command actions (#7267) 2026-07-20 11:23:55 +00:00
web-shell-history-pagination.md feat(web-shell): paginate restored session history (#7064) 2026-07-17 22:09:19 +00:00
web-shell-non-primary-session-archive-hardening.md fix(web-shell): harden non-primary archive actions (#6912) 2026-07-15 04:57:07 +00:00
web-shell-session-created-callback.md feat(web-shell): add session created callback (#6703) 2026-07-13 07:04:42 +00:00
web-shell-session-source-filter.md fix(web-shell): filter sessions by source (#6995) 2026-07-16 04:56:50 +00:00
web-shell-skill-manager-page.md feat(web-shell): add skill management pages (#7018) 2026-07-17 06:42:46 +00:00
web-shell-table-selection-statistics.md feat(web-shell): add selection statistics to markdown tables (#6838) 2026-07-14 03:54:33 +00:00
webshell-composer-placeholders.md feat(web-shell): support custom composer placeholders (#6765) 2026-07-12 12:44:59 +00:00
webshell-mention-icon-chips.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00
workflow-tracing-gaps.md feat(telemetry): unify span creation paths for hierarchical trace tree (#4126) 2026-05-16 22:29:55 +08:00
worktree.md feat(worktree): Phase D — startup --worktree flag + symlinkDirectories + PR refs (#4381) 2026-05-27 17:04:51 +08:00
yaml-parser-replacement.md docs: consolidate design docs and plans under docs/ (#6417) 2026-07-07 06:05:05 +00:00