Skip to content

feat(opportunities): link-lead command + lead_id passthrough (1.3.28) - #24

Merged
mayoalexander merged 1 commit into
devfrom
feat/cli-opportunity-lead-link
May 4, 2026
Merged

feat(opportunities): link-lead command + lead_id passthrough (1.3.28)#24
mayoalexander merged 1 commit into
devfrom
feat/cli-opportunity-lead-link

Conversation

@mayoalexander

Copy link
Copy Markdown

Adds iris opportunities link-lead <oppId> <leadId> for one-shot CRM linking + wires lead_id through push/diff. Pairs with fl-api PR anomalyco#69.

- New `iris opportunities link-lead <oppId> <leadId>` command — sets
opportunity.lead_id with one call. Pass `0` to unlink.
- push: forwards lead_id from local JSON
- diff: includes lead_id in compared fields
Pairs with fl-api PR anomalyco#69 which exposes lead_id on the opportunity
update endpoint + public payload.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings May 4, 2026 05:11
@mayoalexander
mayoalexander merged commit 772b086 into devMay 4, 2026
1 check failed

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a dedicated CLI subcommand to link/unlink marketplace opportunities to CRM leads, and ensures lead_id is included in the existing push/diff workflows to keep local JSON and live API state aligned.

Changes:

  • Add iris opportunities link-lead <oppId> <leadId> to set/unset opportunity.lead_id via API update.
  • Include lead_id in iris opportunities push payload and iris opportunities diff field comparison list.
  • Bump packages/opencode version to 1.3.28.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
packages/opencode/src/cli/cmd/platform-opportunities.tsAdds link-lead subcommand and threads lead_id through push/diff logic.
packages/opencode/package.jsonVersion bump to 1.3.28 for the new CLI feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if (!ok) { spinner.stop("Failed", 1); prompts.outro("Done"); return }

spinner.stop(`${success("✓")} ${args.leadId === 0 ? "Unlinked" : `Linked to lead #${args.leadId}`}`)
prompts.outro(dim(`iris leads get ${args.leadId} | iris opportunities get ${args.id}`))
mayoalexander added a commit that referenced this pull request May 4, 2026
* docs(how-to): add preview_mode + Smart Notebook canonical example (#20)
- Documents preview_mode behavior (banner, disabled buttons, "Preview"
label) and when to use it
- Points the recipe at the Smart Notebook seeder as the canonical
reference implementation — every field exercised, real numbers
- Bumps scaffold manifest to 2026.05.05 so installer picks up the
updated how-to
Pairs with fl-api PR anomalyco#67 + fl-elon-web-ui PR anomalyco#70.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(opportunities): wire crowdfunding + preview_mode fields through CLI (1.3.26) (#21)
The May 3 push/pull/diff/create commands silently dropped every
crowdfunding field — funding_goal_cents, equity_pool_bps, roles[],
pitch_sections[], plus the new preview_mode boolean. Round-tripping
JSON appeared to work but never persisted any of the new fields.
Fixes:
- push: forwards funding_goal_cents/equity_pool_bps/roles/pitch_sections/preview_mode/is_public
- diff: compares those fields plus correct skills_required key
- create: --funding-goal (dollars), --equity-pool-pct, --roles-file, --pitch-file, --preview
- new `iris opportunities preview <id>` command — toggles preview_mode
with optional --on/--off flags; without flags it auto-detects current
state and flips it
How-to recipe documents the CLI-only flow + manifest bumped to
2026.05.06 so installer picks up the new docs.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: bump to 1.3.27 (1.3.26 already used by sync-comms release)
* feat(opportunities): link-lead command + lead_id passthrough (1.3.28) (#24)
- New `iris opportunities link-lead <oppId> <leadId>` command — sets
opportunity.lead_id with one call. Pass `0` to unlink.
- push: forwards lead_id from local JSON
- diff: includes lead_id in compared fields
Pairs with fl-api PR anomalyco#69 which exposes lead_id on the opportunity
update endpoint + public payload.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mayoalexander added a commit that referenced this pull request May 4, 2026
* docs(how-to): add preview_mode + Smart Notebook canonical example (#20)
- Documents preview_mode behavior (banner, disabled buttons, "Preview"
label) and when to use it
- Points the recipe at the Smart Notebook seeder as the canonical
reference implementation — every field exercised, real numbers
- Bumps scaffold manifest to 2026.05.05 so installer picks up the
updated how-to
Pairs with fl-api PR anomalyco#67 + fl-elon-web-ui PR anomalyco#70.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(opportunities): wire crowdfunding + preview_mode fields through CLI (1.3.26) (#21)
The May 3 push/pull/diff/create commands silently dropped every
crowdfunding field — funding_goal_cents, equity_pool_bps, roles[],
pitch_sections[], plus the new preview_mode boolean. Round-tripping
JSON appeared to work but never persisted any of the new fields.
Fixes:
- push: forwards funding_goal_cents/equity_pool_bps/roles/pitch_sections/preview_mode/is_public
- diff: compares those fields plus correct skills_required key
- create: --funding-goal (dollars), --equity-pool-pct, --roles-file, --pitch-file, --preview
- new `iris opportunities preview <id>` command — toggles preview_mode
with optional --on/--off flags; without flags it auto-detects current
state and flips it
How-to recipe documents the CLI-only flow + manifest bumped to
2026.05.06 so installer picks up the new docs.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: bump to 1.3.27 (1.3.26 already used by sync-comms release)
* feat(opportunities): link-lead command + lead_id passthrough (1.3.28) (#24)
- New `iris opportunities link-lead <oppId> <leadId>` command — sets
opportunity.lead_id with one call. Pass `0` to unlink.
- push: forwards lead_id from local JSON
- diff: includes lead_id in compared fields
Pairs with fl-api PR anomalyco#69 which exposes lead_id on the opportunity
update endpoint + public payload.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(install): parse subscription_active boolean directly (jq // bug) (#27)
The smart paywall block in PR #16 used json_field() to extract
subscription_active from the cli/auth/me response, but json_field's
jq path uses `(.field // .data.field) // empty` — and jq's `//`
operator treats both `null` AND `false` as "missing", so when the
API returns subscription_active=false, json_field returns an empty
string instead of "false".
Result: the gate's outer if/elif both fail to match, so no Stripe
popup AND no "active subscription" message — install just exits
silently after Hive registration. The user has identity but no
paywall enforcement and no signal that anything's wrong.
Confirmed by founder smoke test: alex@freelabel.net (sub_active=false
in cli/auth/me) ran the installer, got "Authenticated! / Hive
registered / Ready to go!" with no paywall step in between.
Fix: extract subscription_active directly via `jq -r '.subscription_active'`
which prints the literal "true"/"false" string. Same fallback chain
as json_field (jq → python3 → sed-grep) so no platform regressions.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for freeto 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

@mayoalexander