th crm: top-level module + deal economics (--mrr/--upfront) + deals update#277
Merged
Conversation
|
brentrager
enabled auto-merge (squash)
July 26, 2026 20:05
brentrager
force-pushed
the
th-89e2b5-crm-top-level
branch
2 times, most recently
from
July 26, 2026 21:44
781b24d to
92aa00b
Compare
…--upfront) + deals update th api crm was the only daily product surface not promoted to the top level (org/config/testing/booking/files/knowledge all are). Deals also had no update command at all — changing value/stage after creation meant hand-rolled REST PATCHes (th-cfd814) — and the economics triple the API already stores (value / mrr / implementationCost) was invisible to the CLI. - top-level `th crm` (same Cmd tree as `th api crm`) - `deals create --mrr/--upfront` (upfront ⇄ implementationCost) - new `deals update <deal>` — value/mrr/upfront/title/stage/close-date, only passed flags change, accepts id or title - `deals show`: MRR / Upfront / computed Year-1 lines - `deals list`: MRR column + org MRR run-rate in the totals row Dogfooded live against the Clark Insurance Group deal (value 13600, mrr 550, upfront 7000 — Year 1 = 7000 + 12×550 = 13600 ✓). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…d clippy allow The Clark deal was written with stage "proposal" while the board's column is "Proposal". The board groups by the literal deal.stage string, so it rendered in NO column and — having no stage row, hence no probability — counted $0 toward the forecast, while `deals show` looked perfectly fine. $13.6k invisible. resolve_stage_name() now canonicalizes case-insensitively against the org's stages and refuses an unknown stage, naming the valid columns. All three stage-writing paths (create / update / move) route through it. Also drops the duplicated #[allow(clippy::too_many_arguments)] that failed CI (clippy::duplicated_attributes, denied via workspace lints). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
brentrager
force-pushed
the
th-89e2b5-crm-top-level
branch
from
July 26, 2026 22:11
92aa00b to
f41f547
Compare
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.
Problem
th api crmwas the only daily product surface not promoted to the top level (org/config/testing/booking/files/knowledgeall are). Deals had noupdatecommand — changing value/stage after creation meant hand-rolled REST PATCHes (pearl th-cfd814) — and the economics triple the API already stores (value/mrr/implementationCost) was invisible to the CLI.Changes
th crm— sameCmdtree asth api crm, promotion pattern identical toth bookinget al.deals create --mrr / --upfront(--upfront⇄implementationCost, alias--implementation-cost)deals update <deal-id-or-title>—--value/--mrr/--upfront/--title/--stage/--close-date; only passed flags change; bails when no flags givendeals show: MRR / Upfront / computed Year 1 (upfront + 12×mrr) linesdeals list: MRR column + org MRR run-rate in the totals rowVerification
th crm deals listand the economics flags onupdateth crm deals update ec7d9af6… --value 13600 --mrr 550 --upfront 7000→ PATCH 200, show renders all three + Year 1 = $13,600 ✓ (= 7000 + 12×550, matches deal value exactly)Pearl: th-89e2b5
🤖 Generated with Claude Code