Skip to content

refactor: rename *Manager types to domain-role names (#520)#623

Open
Wirasm wants to merge 4 commits intomainfrom
refactor/issue-520-rename-manager-types
Open

refactor: rename *Manager types to domain-role names (#520)#623
Wirasm wants to merge 4 commits intomainfrom
refactor/issue-520-rename-manager-types

Conversation

@Wirasm
Copy link
Owner

@Wirasm Wirasm commented Mar 3, 2026

Summary

Four types used the vague Manager suffix, violating the Code Naming Contract which requires types to reflect domain role. Renamed all four to descriptive domain-role names:

Old New Crate
SessionManager DaemonSessionStore kild-daemon
PtyManager PtyStore kild-daemon
ProjectManager ProjectRegistry kild-core
TeamManager TeamStore kild-ui

Also renamed the pty_manager field → pty_store in DaemonSessionStore and updated all doc comments + CLAUDE.md/AGENTS.md references.

Pure rename — no behavior changes.

Testing

  • cargo fmt --check — 0 violations
  • cargo clippy --all -- -D warnings — 0 warnings
  • cargo test --all — all pass
  • Post-rename grep confirms zero straggler references in Rust or markdown

Validation

cargo fmt --check && cargo clippy --all -- -D warnings && cargo test --all

Issue

Fixes #520

Wirasm added 3 commits March 3, 2026 17:18
Four types used the vague Manager suffix, violating the Code Naming
Contract. Renamed to reflect their domain roles:

- SessionManager → DaemonSessionStore (kild-daemon)
- PtyManager → PtyStore (kild-daemon)
- ProjectManager → ProjectRegistry (kild-core)
- TeamManager → TeamStore (kild-ui)

Also renamed the pty_manager field to pty_store in DaemonSessionStore
for consistency, and updated all doc comments and documentation.

Fixes #520
@Wirasm
Copy link
Owner Author

Wirasm commented Mar 3, 2026

Automated Code Review

Summary

Clean mechanical rename of 4 types across 18 files with no behavior changes. All usages covered, all tests pass.

Findings

Strengths

  • Leaf-first rename order (PtyStore before DaemonSessionStore) prevents intermediate compile failures
  • Field rename pty_managerpty_store maintains consistency between type and field names
  • Doc comments and intra-doc links updated alongside code
  • CLAUDE.md and AGENTS.md documentation kept in sync
  • Post-rename grep confirms zero straggler references in Rust or markdown

Suggestions (non-blocking)

  • CLAUDE.md:154 describes projects/ as "(types, validation, persistence, manager)" — the word "manager" here refers to the file name manager.rs not the type, so correctly left unchanged
  • Test function names like test_project_manager_* still reference the old type name — this is pre-existing and out of scope for this PR (per artifact scope boundaries: "File names (manager.rs) — renaming files is a separate concern")

Security

  • No security concerns — pure rename refactor

Checklist

  • Rename covers all usages (verified via rg post-rename)
  • Code follows codebase patterns
  • All existing tests pass unchanged
  • No behavior changes introduced
  • Documentation updated (CLAUDE.md, AGENTS.md)

Self-reviewed by Claude

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.

refactor: rename *Manager types to domain-role names

1 participant