fix: setup team persistence, interactive pager, blocked-by relations#37
Conversation
Thermo-nuclear review: PR #37PR: #37 What's solid
Blockers1.
|
| Criterion | Status |
|---|---|
| No clear structural regression | Fail — config.rs past 1k; main.rs larger god-file |
| No obvious missed simplification | Fail — Workspace splat, dual invert, dual team fetch |
| No unjustified file-size explosion | Fail — config 724→1001 |
| No spaghetti special-case growth | Partial fail — default team only on 2 call sites |
| No wrong-layer / incomplete abstraction | Fail — default team not a real CLI-wide default |
| Behavior for the three issues | OK if tests + manual checks pass |
Verdict: REQUEST CHANGES — fix the structural items above (especially 1–4), then re-review.
Extract setup into commands/setup.rs, centralize fetch_all_teams and resolve_team_arg/require_team, add Workspace::with_api_key, simplify blocked-by display, wire defaults into sprint/statuses/cycles/triage, and keep config.rs under 1k lines.
Summary
setup,auth,interactive,doctor) so keyboard input works and the terminal is not left raw on macOS; fetch all teams via cursor pagination in setup/interactive instead of a single unpaginated page.linear setupandlinear config set default-team; document known config keys in help/show; use default team (orLINEAR_CLI_TEAM) when--teamis omitted.relations add --relation blocked-byto inverted Linearblocks(swap from/to) since Linear has noblockedByenum value.Test plan
linear setupon a large workspace — full team list, team saved, terminal still echoes after exitlinear config set default-team ENGtheni createwithout-trelations add A B -r blocked-bycreates B blocks A (same asblockswith swapped args)Closes #34
Closes #35
Closes #36
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.