Commit Graph
23 Commits
Author SHA1 Message Date
Yichen Jiang dc169c71e7 Merge pull request #7482 from deepseek-harness/worktree/forge-review-navigation-checks
fix(forge): deduplicate checks and improve review navigation
2026-10-29 11:47:17 +08:00
Yichen Jiang 4f40200ed8 fix(forge): clarify filter failures and query guarantees 2026-10-29 11:16:34 +08:00
Yichen Jiang f08ad306cc fix(forge): load complete checks on demand per pull request 2026-10-29 11:10:35 +08:00
Yichen Jiang 2d709ab5be fix(forge): address check states and review accessibility 2026-10-28 17:45:32 +08:00
Yichen Jiang 2b9511548b fix(forge): honor session permissions for Git inspection 2026-10-28 16:54:20 +08:00
Yichen Jiang 2cb769b430 fix(forge): deduplicate checks and improve review navigation 2026-10-28 16:38:40 +08:00
Yichen Jiang cf29844580 feat(forge): navigate diff files with horizontal arrow keys 2026-10-28 14:03:33 +08:00
Yichen Jiang 1db4d6a96d fix(forge): preserve requested bases and accessible branch details 2026-10-28 13:43:16 +08:00
Yichen Jiang aab3033c37 Merge master into worktree/forge-ui-polish 2026-10-28 13:16:42 +08:00
Yichen Jiang 3ac8daef66 fix(forge): clarify worktree controls and align change panels 2026-10-28 12:34:58 +08:00
Yichen Jiang bd1c30cd81 feat(forge): add file tree and inline review comments 2026-10-28 11:42:45 +08:00
Yichen Jiang 17b9e1536d fix(forge): release inactive diff subscriptions and menus 2026-10-27 10:46:40 +08:00
Yichen Jiang f92fadd30c Merge remote-tracking branch 'origin/master' into worktree/forge-diff-review-state
# Conflicts:
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/README.md
#	packages/experimental/client-ui-forge/README.zh.md
2026-10-26 22:38:20 +08:00
Yichen Jiang 57716b544f fix(forge): preserve diff review state and copy header paths 2026-10-26 21:44:38 +08:00
Yichen Jiang a36d02a596 Merge master into worktree/forge-session-list 2026-10-26 21:17:53 +08:00
Yichen Jiang 04db213ad9 fix(forge-panel): pin merge confirmation to the reviewed head 2026-10-26 17:57:09 +08:00
Yichen Jiang df4f3fd0c1 fix(forge-session): bind numeric PR references with explicit repositories 2026-10-26 16:10:51 +08:00
Yichen Jiang 4916ce9bff feat(forge): show worktree and change request state in the Session list
The branch label left the Session header, and finding which Sessions
work in their own worktrees, or which of their change requests need
attention, meant opening each Session's tab.

- A Session row shows a branch glyph while the Session works in the
  worktree the panel created for it, and the state glyph of its most
  urgent change request with a dot for its checks. The row's hover card
  names the worktree branch and its base, then up to three change
  requests with their state and checks.
- The forgeWorktree projection follows the Session's working directory;
  its client view is the created worktree while the Session works in
  it. The forgeChangeRequests projection gains a client view with the
  bindings, so the Session summary carries both without loading a
  Session.
- The forgePanel.changeRequestStates stream serves the states of the
  change requests every listed Session binds from one Host run. It
  polls each until it is merged or closed and stores every change in
  the forge_panel_change_requests storage domain, so a restart shows
  the last known states before the next poll.
- A new Agent Note records the decision; the READMEs, the forge
  subsystem page, and the catalogs follow.
2026-10-22 15:10:29 +08:00
Yichen Jiang d0fc1f6458 feat(forge): show the changes of a Session and of its change requests
The forge panel opens a changes view in the right sidebar for the
checkout's local changes and for the diff of each change request.

- ForgePanelController reads local diffs in the branch, uncommitted,
  unstaged, and staged scopes through Git in the Session's read-only
  sandbox, change request diffs through the forge provider, and the text
  of a changed file to expand unchanged lines. Change request patches stay
  cached by head commit and base branch within maxCachedDiffBytes. A local
  diff over maxDiffBytes fails as forgePanel/diff-too-large, and a provider
  read over its output limit fails as too-large, which the view explains
  with a link to the code host; a gh timeout fails as unavailable.
- forge adds the diff, fileText, and fileUrl provider methods and the
  too-large failure code, and forge-github implements them with gh.
- The panel shows a local changes card that opens the view and asks the
  Agent for a change request. The view collapses files past a line
  budget, draws lines side by side or in one column with optional
  wrapping, expands unchanged lines on request, and collapses or expands
  every file from its toolbar; file headers use a bare chevron.
- The checkout row copies the worktree or project directory path, the
  refresh glyph turns while a refresh runs, change request cards keep
  their actions while collapsed, and the header entry uses the shared
  compact button.
- client-ui-forge classifies changeRequestKey and FsError as
  peer-required Host imports, which keeps forge and dsh-fs as its peers.
2026-10-20 13:34:27 +08:00
Yichen Jiang 80254034c7 feat(forge): mark change requests ready and merge them from the panel
An expanded card now marks a draft ready for review and merges a change
request that the host would merge now:

- The forge seam gains provider actions `markReady` and `merge`, which
  return a typed `ForgeActionFailure`; the registry polls a watched change
  request at once after either settles. Snapshots carry `mergeReady` and
  the `mergeMethods` the repository allows, the user's usual one first.
- GitHub marks ready with `gh pr ready` and merges through the REST merge
  endpoint with the head SHA the card showed, so new commits refuse the
  merge; it never enables auto-merge, joins a merge queue, or deletes the
  head branch.
- The panel Remote acts only on visible bindings of the Session, and the
  card offers 标记为可评审 for drafts and a 合并 menu with the allowed
  methods and a confirmation, reporting each outcome in a toast.
- The forge panel e2e replaces the worktree branch before the ARIA
  capture normalizes durations, so a random suffix no longer breaks it.
2026-10-20 11:50:10 +08:00
Yichen Jiang 06d1616224 feat(forge): redesign the change request panel
Call every bound item a change request, whatever its code host calls it,
and rebuild the panel around the redesign:

- State glyphs for open, needs attention, draft, merged, closed, and
  unknown change requests; an open one with failed checks, requested
  changes, or conflicts needs attention, as the header dot does.
- A card whose title opens the change request, with a plain number line,
  a collapsed status summary, and expanded checks, review, merge, and diff
  rows; the checks row opens a list with failed checks first.
- The only open change request of a Session starts expanded.
- The checkout row names the branch or detached commit and the kind of
  checkout, with Restore for a removed worktree; the Host home shortens
  paths.
- Checkout inspection reports linked worktrees and the HEAD commit.
2026-10-20 11:50:10 +08:00
Yichen Jiang accd5b77c4 feat(worktree): name generated worktrees after their Session
Generated worktree names now join the dsh- prefix, the first eight
hexadecimal digits of the UUID in the Session id, and four random
hexadecimal digits, such as dsh-6b1f02c4-9a3e. A Session id without a
UUID gets eight random hexadecimal digits after the prefix. The worktree
runtime exports generatedWorktreeName, uses it for omitted
create_worktree names, and defaults namePrefix to dsh-. The forge panel
names its Session worktrees with the same function and defaults
worktreePrefix to dsh-, so checkouts no longer nest under a dsh/
directory.

The create_worktree name parameter asks for a few lowercase words joined
by hyphens that describe the task, and the tool description drops the
defaults that its parameters already state.
2026-10-20 11:49:51 +08:00
Yichen Jiang fc43a2d507 feat(forge): add the pull request panel and worktree Sessions
The forge panel shows the pull requests a Session created or pushed in a
right-sidebar tab, with a Session header button and branch label, and lets
a new Session start in its own Git worktree from the New Session options
row. The forge bundle ships the panel with the forge registry, the GitHub
provider, the Session bindings, and an isolated worktree service.

The panel listens to the agent-controller/admission stage. It holds the
first message of a Session with a worktree request while it creates and
enters the worktree as Agent maintenance, and refuses messages while the
worktree the Session works in is gone. A failed or stopped creation
returns the message to the composer: the card above the composer shows the
failure, sending again retries with a new branch name, and Continue
without a worktree withdraws the request. A removed worktree can be
checked out again or left for the source checkout. A message that enters
without admission still gets its worktree at the first step proposal.
2026-10-20 11:49:51 +08:00