Skip to content

chore: split oversized files into focused modules#61

Merged
jbj338033 merged 13 commits into
mainfrom
chore/split-large-modules
Jun 16, 2026
Merged

chore: split oversized files into focused modules#61
jbj338033 merged 13 commits into
mainfrom
chore/split-large-modules

Conversation

@jbj338033

Copy link
Copy Markdown
Collaborator

Summary

Break the largest files into cohesive modules so each crate's responsibilities are explicit. Promotes the self-contained git-worktree subsystem to a goat-worktree leaf crate, and splits oversized TUI (picker/config/transcript), protocol, store, command, anthropic-auth, and mcp files into focused submodules. All changes are behavior-preserving pure restructuring; public paths are kept via re-exports.

Verification

  • cargo fmt --all --check — passed
  • cargo clippy --workspace --all-targets -- -D warnings — passed
  • cargo test --workspace — passed

jbj338033 added 13 commits June 16, 2026 11:12
Stop credential loss on a corrupt auth.json: load_file now distinguishes
NotFound from corruption and refuses to overwrite a file it cannot parse.
Map store blocking-task join failures to StoreError instead of panicking,
and replace the browser/computer/command parser production expects and
unreachable with non-panicking paths.

Surface previously swallowed failures: /resume read errors now log and emit
an error Notify instead of silently truncating context, config save failures
log and toast, plan-file IO errors are distinguished from an empty file, and
shell pipe read errors are logged. Make Agent-tool semaphore acquisition
cancellation-aware so interrupts are not delayed by permit contention.
Introduce SessionState to carry the six mutable per-session fields (target,
conversation, tracker, thread_id, mode, plan_path) that were threaded through
handle_turn, run_turn_chain, drain_deferred, run_one_turn, handle_shell,
handle_compact, and handle_resume. This removes seven too_many_arguments
allowances and collapses the verbatim forwarding chains.

Replace the three identical 17-field Ctx literals in the op loop with a single
ctx! macro, and route mode/clear/select/resume through the bundled state.
Behavior is unchanged; all engine tests pass.
…links

Store assistant transcript items as raw markdown text instead of pre-themed
lines, rendering them through the current theme and highlighter at draw time.
Theme switches now restyle past assistant messages instead of leaving them in
the old palette. Simplify commit_text/push_error/complete to take only text.

Fix markdown link styling inside table cells: link bounds and accent coloring
now target the active span buffer (the table cell when inside a table) so
table-cell links get accent color and hidden URLs like normal links. Add
tests for both behaviors.
Cover the previously untested computer action parser (button routing, key
keys/combo fallback, modifier aliases, drag path, defaults, missing-field
errors), the /resume command's arg-to-effect mapping, and the agent
delegation_label/final_text helpers.

Update root AGENTS.md: correct the crate count to 35, add goat-config to the
goat-tui dependency line, and document goat-mcp, goat-sandbox, goat-tool-web,
and goat-command-app. Update goat-agent/AGENTS.md module table with shell,
websearch, plan, conversation, retry, compaction rows and describe
SessionState.
@jbj338033 jbj338033 force-pushed the chore/split-large-modules branch from d40b353 to 76c678d Compare June 16, 2026 02:13
@jbj338033 jbj338033 merged commit c863ef0 into main Jun 16, 2026
5 checks passed
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.

1 participant