Skip to content

refactor: extract sessions state - #88

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

refactor: extract sessions state#88
zatevakhin merged 1 commit into
refactor/componentsfrom
refactor/sessions-state

Conversation

@zatevakhin

Copy link
Copy Markdown
Collaborator

what changed

  • add one private SessionsState owner with exactly 23 browser, discovery, viewport, identity/mode, new-session, activity, and remembered remote-location fields
  • replace the 23 flat App fields with one pub(crate) sessions: SessionsState, reducing direct App fields from 89 to 67
  • move session item/completion types, constants, matching, pagination, child merge, collapse, cursor/filter, mode, completion, activity, and remote-location behavior into the owner
  • retain command construction, ACP lifecycle coordination, profile binding, filesystem/path normalization, connectivity, routing, rendering, mesh attach, and reconnect behavior at existing boundaries
  • keep launch_cwd and delegate_popup_visible_rows flat; preserve the focused reset_active_session_view lifecycle boundary

scope and metrics

  • exact base: 3a7a599ff0fb04def35f2ba1591d3623dc5e9ba0
  • source commit: dcc88cbc2be93550c394f8e8bd6dab2ec910c2be
  • exact 13-file allowlist: src/session_state.rs, src/lib.rs, src/app.rs, src/session.rs, src/acp_state.rs, src/handlers.rs, src/mesh.rs, src/runtime/mod.rs, src/runtime/event_loop.rs, src/ui/start.rs, src/ui/popups.rs, src/ui/chat.rs, src/ui/mod.rs
  • diff: 13 files, 2,228 insertions, 1,709 deletions
  • resulting source: 51 Rust files, 44,505 physical LOC, 67 direct App fields, five App impl files, 23 SessionsState fields, 848 test declarations

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 (848 passed, 0 failed/ignored)
  • focused owner tests (14 passed) and session-focused tests (202 passed)
  • git diff --check

boundary proof

  • exactly one private mod session_state;, one App::sessions, and 23 owner fields
  • zero old flat declarations/direct accesses and zero old crate::app::{StartPageItem, PopupItem, PathCompletionState} paths
  • no forbidden owner imports beyond the explicitly allowed FileIndexEntryLite dependency
  • launch_cwd and delegate_popup_visible_rows are each declared once on App and absent from the owner
  • exactly four existing phase 11 compatibility forward tags remain
  • no source outside the approved 13-file allowlist changed

residuals

  • no manual TUI smoke claim
  • phase 4, broad roadmap acceptance, connection/chat/composer/delegates/render extraction, and phase 11 cleanup remain pending
  • integration is not claimed until a separately approved merge and equivalence verification

@zatevakhin
zatevakhin merged commit b8237b6 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