Add dockable worktree Git inspection - #3532
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
daslanganddaslang-liverebuilt successfully2257 / 3904positionDependency