Conversation
commands/mod.rs had three dead-code blocks of draft/template/playbook/variable wrappers duplicating draft_commands.rs. Neither was registered (registry.rs:141-183 points at draft_commands::* directly), none called externally. Same dead-duplicate pattern as PRs #82 (Jira), #83 (Jobs), #85 (Ops-Analytics). Deleted: - mod.rs:2788-3183 (Export/Draft/Template/Playbook/Action Shortcut/Custom Variable sections): export_draft_formatted, format_draft_for_clipboard, list_drafts, search_drafts, get_draft, save_draft, delete_draft, list_autosaves, cleanup_autosaves, get_draft_versions, create_draft_version, list_draft_versions, finalize_draft, archive_draft, update_draft_handoff, list_playbooks, get_playbook, save_playbook, use_playbook, delete_playbook, list_action_shortcuts, get_action_shortcut, save_action_shortcut, delete_action_shortcut, list_templates, get_template, save_template, delete_template, list_custom_variables, get_custom_variable, save_custom_variable, delete_custom_variable — plus the section's use crate::db:: {ResponseTemplate, SavedDraft} import (only consumed here). - mod.rs:4309-4328 (Phase 6 Draft Version Restore): restore_draft_version. - mod.rs:4367-4525 (Saved Response Templates + Response Alternatives sections): save_response_as_template, list_saved_response_templates, increment_saved_template_usage, find_similar_saved_responses, save_response_alternative, get_alternatives_for_draft, choose_alternative. Preserved: mod.rs:4330-4366 (KB Staleness/Review Commands including get_kb_health_stats, mark_document_reviewed, get_documents_needing_review) — sandwiched between two dead blocks but not part of the duplication; still registered and called. mod.rs: 4578 -> 4003 lines (-575). Cumulative mod.rs cleanup this session: - PR #82 (Jira): -432 - PR #83 (Jobs): -484 - PR #85 (Ops-Analytics): -535 - PR #89 (Drafts, this PR): -575 - Total: -2,026 LOC Verified: - cargo check --all-targets clean, zero warnings - cargo test --lib: 311 pass, 1 ignored - cargo test --test command_contracts: 8 pass
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
Fourth and final dead-code sweep of
commands/mod.rswrappers that duplicate a domain-specific file. Three blocks of draft/template/playbook/variable wrappers shadowdraft_commands.rs. None registered, none called externally.Deleted
use crate::db::{ResponseTemplate, SavedDraft}import)restore_draft_version)save_response_as_template,list_saved_response_templates,increment_saved_template_usage,find_similar_saved_responses,save_response_alternative,get_alternatives_for_draft,choose_alternative)Preserved
mod.rs:4330-4366 — KB Staleness / Review Commands (
get_kb_health_stats,mark_document_reviewed,get_documents_needing_review). Sandwiched between the two dead blocks but not part of the duplication — still registered and called.Impact
mod.rs: 4578 → 4003 lines (−575 LOC)Cumulative mod.rs shrinkage this session
mod.rshas shrunk from 6,022 lines → 4,003 lines (−33%) this session without changing a single user-facing behavior.Test plan
cargo check --all-targets— clean, zero warningscargo test --lib— 311 pass, 1 ignoredcargo test --test command_contracts— 8 pass🤖 Generated with Claude Code