Skip to content

refactor: extract delegates state - #91

Merged
zatevakhin merged 1 commit into
refactor/componentsfrom
refactor/delegates-state
Aug 21, 2026
Merged

refactor: extract delegates state#91
zatevakhin merged 1 commit into
refactor/componentsfrom
refactor/delegates-state

Conversation

@zatevakhin

Copy link
Copy Markdown
Collaborator

scope

  • extract private DelegatesState from exact integrated ComposerState base e1f984aa26ffa1dca3eebef7041324e41a659873
  • move exactly 14 delegate-owned fields and defaults behind the single App::delegates owner
  • move popup filtering/selection/navigation, lifecycle reconciliation, child state/stat/message accumulation, pending tool-call linkage, and root clearing into the owner
  • keep ACP parsing/event matching, commands, session/profile/model coordination, status updates, and render-cache invalidation at existing adapter/coordinator boundaries
  • preserve root/child reset asymmetry, stale cursor/filter/visible-row behavior, unordered map behavior, sibling parent staging, pending elicitation restoration, and duplicate child assistant suppression

boundary proof

  • private module declarations: 1
  • App delegate-owner fields: 1
  • DelegatesState fields: 14
  • direct App fields: 53 -> 40
  • old delegate flat fields on App: 0
  • delegate_model_preferences references in owner: 0
  • forbidden owner dependencies (App/Command/ACP/protocol/UI/runtime/config/channels/persistence): 0
  • public export, alias, getter facade, or Deref: 0
  • phase 11 compatibility-forward tags: 4
  • changed files: exactly the closed 10-file allowlist
  • protected AGENTS.md, CLAUDE.md, ignored REFACTOR.md, and stuff/history/: unchanged/uncommitted

metrics

  • diff: 10 files, +996/-394
  • Rust files: 53 -> 54
  • physical Rust LOC: 45,097 -> 45,699
  • test declarations: 860 -> 872
  • App implementation files: 4

validation

  • cargo fmt --all -- --check
  • cargo check --all-targets --all-features
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --all-targets --all-features
  • cargo test --all-targets --all-features (872 passed, 0 failed, 0 ignored)
  • git diff --check

pending

Integration and manual TUI smoke are intentionally not claimed. ChatState, RenderState, and Phase 5 remain pending and are not part of this slice. This PR must not be merged as part of this handoff.

@zatevakhin
zatevakhin merged commit 81e231e into refactor/components Aug 21, 2026
3 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