Skip to content

refactor(src): delete dead mod.rs Jira wrappers (-432 LOC)#82

Merged
saagpatel merged 1 commit intomasterfrom
codex/refactor/delete-dead-jira-wrappers
Apr 22, 2026
Merged

refactor(src): delete dead mod.rs Jira wrappers (-432 LOC)#82
saagpatel merged 1 commit intomasterfrom
codex/refactor/delete-dead-jira-wrappers

Conversation

@saagpatel
Copy link
Copy Markdown
Owner

Summary

commands/mod.rs had 10 Jira-related functions and two constants that shadowed src-tauri/src/commands/jira_commands.rs. Neither block was registered (the registry points at jira_commands::* directly) nor called from anywhere else — pure dead code from an older layout where the Jira commands were duplicated in both places.

  • 4 wrappers (is_jira_configured, get_jira_config, configure_jira, clear_jira_config) were pure delegations to jira_commands::*_impl. PR refactor(src): migrate jira commands to AppError with From<JiraError> #81 added temporary .map_err(|e| e.to_string()) bridges to keep them compiling during the error-type migration; this PR removes them entirely.
  • 6 wrappers (get_jira_ticket, add_jira_comment, push_draft_to_jira, get_jira_transitions, transition_jira_ticket, post_and_transition) were full reimplementations with their own DB queries and HTTP calls — genuine duplicates with zero delegations.

Also removed:

  • The now-unused TOKEN_JIRA import (only referenced inside the deleted blocks)
  • The now-unused validate_ticket_id import (same)

Impact

  • mod.rs: 6022 → 5593 lines (−432 LOC net of the two cleanup lines)
  • Zero runtime behavior change — no caller existed for any of the removed symbols
  • Future session won't have to wonder which copy is "the real one"

Test plan

  • Verified via grep that every reference to the deleted symbols is either the definition itself or inside the deleted blocks
  • cargo check --all-targets — clean (zero warnings)
  • cargo test --lib — 311 pass, 1 ignored
  • cargo test --test command_contracts — 8 pass

🤖 Generated with Claude Code

commands/mod.rs had 10 Jira-related functions + two constants that
shadowed src-tauri/src/commands/jira_commands.rs. The registry
(registry.rs:205-211 and the post_and_transition entry) points at
jira_commands::* directly — neither block in mod.rs was registered
nor called from anywhere else. Leftover from an older layout that
moved Jira commands into their own file but never deleted the
originals.

Four of the deleted wrappers (is_jira_configured, get_jira_config,
configure_jira, clear_jira_config) were pure delegations to
jira_commands::*_impl; the other six (get_jira_ticket,
add_jira_comment, push_draft_to_jira, get_jira_transitions,
transition_jira_ticket, post_and_transition) were full
reimplementations that duplicated the DB queries and HTTP calls.

Also removed the now-unused TOKEN_JIRA import and the unused
validate_ticket_id import (the latter was only consumed by the
deleted duplicates).

mod.rs: 6022 lines -> 5593 lines (-432 LOC net of the two +2 lines
of cleanups to the use statements).

Verified:
- cargo check --all-targets clean (no warnings)
- cargo test --lib: 311 pass, 1 ignored
- cargo test --test command_contracts: 8 pass

Follow-up to PR #81 which left the dead block in place as temporary
compile-bridging scaffolding.
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.

2 participants