refactor(workspace): relocate compact_text to CLI presentation module (YT-19) #62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/relocate-presentation-YT-19"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Final subtask of the workspace refactor epic (YT-15). Depends on the merged
youtrack-client(YT-17) andyoutrack-config(YT-18) extractions.What
Move the last display-only helper out of the former
src/yt/shim so the library crates provably carry no presentation logic. This is the cleanup that guarantees the MCP never transitively pulls comfy-table.How
compact_text(whitespace-collapsing truncation) moves fromcrates/yt-cli/src/yt/output.rsto a new top-levelcrates/yt-cli/src/presentation.rsviagit mv(history + unit tests preserved). The now-emptysrc/yt/output.rsand thesrc/yt/mod.rsshim are deleted, andmod yt;becomesmod presentation;inmain.rs. The two call sites (issue/inspect.rs,issue/history.rs) importcrate::presentation::compact_text.The data-shaped formatters (
format_millis,parse_ymd_to_ms_utc, custom-field value presentation,author_name,tail) stay inyoutrack_client::outputsince the MCP needs human-readable values; only the pure display helper is CLI-local. Table rendering (comfy-table) was already command-local and is untouched.Acceptance criteria
cargo tree -p youtrack-clientandcargo tree -p youtrack-configshow no comfy-table / clap / rpassword dependency.src/yt/output.rsremains; display helpers live undercrates/yt-cli.compact_textand table rendering are in the CLI crate only.just pre-commitgreen (fmt, clippy -D warnings, build, 121 tests); table and inspect output byte-identical.Epic
This closes the four subtasks of YT-15 (workspace skeleton, youtrack-client, youtrack-config, presentation relocation).
🤖 Generated with Claude Code