Skip to content

Add dockable worktree Git inspection - #3532

Merged
borisbat merged 35 commits into
masterfrom
codex/herder-dockable-worktrees
Jul 21, 2026
Merged

Add dockable worktree Git inspection#3532
borisbat merged 35 commits into
masterfrom
codex/herder-dockable-worktrees

Conversation

@borisbat

Copy link
Copy Markdown
Collaborator

Summary

  • add the dockable dasHerd worktree/status/file-inspector vertical slice on top of the detachable watcher primitive
  • prepare diffs asynchronously with compact, expanded, and full-file contexts; synchronized side-by-side scrolling; syntax highlighting; Markdown view; and bundled image previews
  • make watcher Git observation robust and inspectable, including Unicode Windows paths and live pane geometry
  • extend the terminal host seam needed by watcher-owned structured Git tasks

Validation

  • 43 focused watcher, inspection-worker, repository, lifecycle, and UTF-8 file-I/O assertions pass
  • Release daslang and daslang-live rebuilt successfully
  • live Unicode fixture opens with valid UTF-8 content
  • native scrollbar drag verified both panes at the same 2257 / 3904 position
  • Ctrl+wheel inspector zoom verified at a 5% step

Dependency

Copilot AI review requested due to automatic review settings July 21, 2026 09:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new “rich” dasHerd watcher client vertical slice for Git worktree/status and file inspection, including a dockable ImGui layout, asynchronous diff/view preparation, and structured Git task execution through watcher-owned terminals. It also extends the terminal host seam (structured argv launching) and strengthens Windows UTF-8 path handling in fio.

Changes:

  • Added repository/worktree registration + asynchronous Git observation, exposed via HTTP/WebSocket APIs and consumed by a dockable rich client.
  • Implemented file inspection (diff + view) with off-thread parsing/syntax prep and optional binary image previews (base64 transport + stb_image decode).
  • Extended the terminal subsystem to support structured argv launches (Windows ConPTY command line building) and improved terminal memory ownership/snapshot disposal.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
utils/dasHerd/WORKTREES_AND_TASK_TERMINALS.md Updates design notes for repository/worktree identity, observation, and dockspace-based UI.
utils/dasHerd/watcher/watcher_server.das Adds repository APIs, file inspection flow, and repository snapshot push over WebSocket.
utils/dasHerd/watcher/watcher_core.das Adds structured argv launches, machine-output helpers, session compaction/pruning, and snapshot disposal fixes.
utils/dasHerd/watcher/tests/test_watcher_core.das Adds tests for stripping ConPTY wrapper controls and structured argv behavior.
utils/dasHerd/watcher/tests/test_repository_core.das New tests for parsing Git porcelain inventory/status and diff argv contracts.
utils/dasHerd/watcher/tests/test_inspection_worker.das New tests for off-thread syntax prep and binary preview decoding contracts.
utils/dasHerd/watcher/tests/test_file_inspection.das New tests for syntax resolution, unified patch parsing, and load-state behavior.
utils/dasHerd/watcher/rich_client.das Implements dockable rich client UI, repository/worktree selection, Git status, and file inspector (diff/view).
utils/dasHerd/watcher/repository_core.das New repository model/config + Git worktree/status observation and diff argv construction.
utils/dasHerd/watcher/README.md Updates watcher usage/docs for dockable UI, repository config, and file inspection.
utils/dasHerd/watcher/main.das Adds repository initialization/shutdown and --config support.
utils/dasHerd/watcher/inspection_worker.das New worker for diff parsing, syntax prep, and optional image decode off-thread.
utils/dasHerd/watcher/image_preview_gl.das New main-thread GL upload/release bridge for decoded preview pixels.
utils/dasHerd/watcher/file_inspection.das New unified diff parsing + inspector load-state model + language resolution helpers.
utils/dasHerd/chunk0/git_terminal_window.das Fixes snapshot disposal and cleans up font sources on shutdown.
tests/fio/fio_utils.das Adds test asserting UTF-8 Windows paths round-trip through fio ops.
src/builtin/module_builtin_fio.cpp Implements UTF-8→wide path handling for Windows fopen/stat/remove/rename.
modules/dasTerminal/tests/ownership_semantics.das New terminal ownership regression test for scrollback/screen row replacement + disposal.
modules/dasTerminal/src/pty.h Adds argv vector to PTY process options.
modules/dasTerminal/src/pty.cpp Implements Windows argv→command-line escaping/building for ConPTY.
modules/dasTerminal/src/dasTerminal.cpp Exposes _pty_launch_argv extern for structured argv launches.
modules/dasTerminal/src/aot_builtin_terminal.h Declares builtin_pty_launch_argv for AOT.
modules/dasTerminal/daslib/terminal.das Fixes terminal row ownership/leaks, adds terminal_launch_argv, and adds snapshot dispose helpers.
modules/dasTerminal/CMakeLists.txt Registers new terminal ownership semantics test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread utils/dasHerd/watcher/watcher_core.das
Comment thread utils/dasHerd/watcher/watcher_server.das
Comment thread utils/dasHerd/watcher/repository_core.das
Comment thread utils/dasHerd/watcher/repository_core.das Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 10:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.

Comment thread utils/dasHerd/watcher/watcher_server.das Outdated
Comment thread utils/dasHerd/watcher/repository_core.das Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 10:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.

Comment thread utils/dasHerd/watcher/repository_core.das
Comment thread utils/dasHerd/watcher/repository_core.das Outdated
Comment thread utils/dasHerd/watcher/repository_core.das Outdated
Comment thread utils/dasHerd/watcher/watcher_core.das Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.

Comment thread utils/dasHerd/watcher/watcher_core.das
Comment thread utils/dasHerd/watcher/inspection_worker.das
Comment thread utils/dasHerd/watcher/rich_client.das Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 10:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Comment thread utils/dasHerd/watcher/rich_client.das Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 10:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.

Comment thread utils/dasHerd/watcher/watcher_core.das Outdated
Comment thread utils/dasHerd/watcher/repository_core.das Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 14:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 21, 2026 14:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.

Comment thread utils/dasHerd/watcher/watcher_server.das
Comment thread utils/dasHerd/watcher/README.md Outdated
Comment thread utils/dasHerd/WORKTREES_AND_TASK_TERMINALS.md Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 14:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Comment thread utils/dasHerd/watcher/repository_core.das
Copilot AI review requested due to automatic review settings July 21, 2026 15:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.

Comment thread utils/dasHerd/watcher/watcher_core.das Outdated
Comment thread utils/dasHerd/watcher/repository_core.das Outdated
Comment thread utils/dasHerd/watcher/repository_core.das Outdated
Comment thread utils/dasHerd/watcher/repository_core.das Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 15:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 21, 2026 15:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Comment thread utils/dasHerd/watcher/inspection_worker.das
Copilot AI review requested due to automatic review settings July 21, 2026 15:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated no new comments.

@borisbat
borisbat merged commit 33b63e1 into master Jul 21, 2026
37 checks passed
@borisbat
borisbat deleted the codex/herder-dockable-worktrees branch July 21, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants