fix(linear): store state IDs in status mappings#1117
Merged
zbigniewsobiecki merged 1 commit intodevfrom Apr 15, 2026
Merged
Conversation
Linear webhooks deliver workflow-state UUIDs in data.stateId, but the PM wizard's status-mapping dropdown was saving display names as the option value. The status-changed trigger does strict-equality matching on the saved value, so every Linear status transition since the integration landed has been silently no-oping. JIRA gets away with names because JIRA webhooks deliver names; Linear does not. Changed the option value to s.id (s.name remains as the label so the dropdown still reads naturally). Added a regression test asserting every state ID appears as an option value and no state name does, plus a WHY comment to anchor the contract for future maintainers. Operator action required after deploy: re-run the Status Mappings wizard step on existing Linear-backed projects. Each saved name will no longer match a value, so dropdowns will appear empty — re-pick from the dropdown and save. New mappings persist as UUIDs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 15, 2026
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.
Summary
The Linear status-mapping step in the PM wizard was saving workflow-state names (e.g.
'Planning') as the dropdown'svalue, but Linear webhooks deliver state UUIDs indata.stateId. The trigger handler atsrc/triggers/linear/status-changed.ts:60does strict equality — so every status transition since Linear support landed has been silently no-oping.JIRA gets away with names because JIRA's webhook delivers names; Linear does not.
Root cause
web/src/components/projects/pm-wizard-linear-steps.tsx:178rendered each option with{ label: s.name, value: s.name }instead of{ label: s.name, value: s.id }.Fix
s.idas the option value; keeps.nameas the label so the dropdown still reads naturally.idappears as an<option value="…">and no state name does.Reproducing the bug (before fix)
Move any Linear issue between configured states. Router logs
Linear state transition does not map to any agentwithnewStateId: <UUID>andconfiguredStatuses: { planning: 'Planning', ... }. CLI:cascade webhooklogs list --source linearshows the request hit but no agent fired.Operator action required after this lands
Existing projects have status mappings stored as names — those will not match incoming UUIDs. Re-run the Status Mappings wizard step for each Linear-backed project: each dropdown will appear empty (because the saved name no longer matches a
value), pick from the dropdown, save. Going forward the wizard saves UUIDs.Out of scope (separate follow-ups)
/linear/*and/sentry/*was missing from both prod and dev hostnames inmongrel-intelligence/infra— fixed there separately (committed directly to main; already live). Without it the webhook never reached the router at all (404 from dashboard).fb14e237predates Linear support entirely; needs a redeploy from `main` to pick up the/linear/webhookroute. Caddy now routes correctly but the prod router itself returns 404 until rebuilt.linearLabelswizard input is free-text; the create-issue adapter (src/pm/linear/adapter.ts:88-94) treats values as label IDs while triggers (src/triggers/linear/label-added.ts:46) tolerate either name or ID. Not breaking the user's reported flow; deserves a focused PR.Test plan
npm run lint,npm run typecheck,npm testall clean locallytests/unit/web/linear-field-mapping-step.test.ts > uses state IDs (not names) as dropdown option valuesLinear issue transitioned to agent-triggering stateand a planning agent run starts🤖 Generated with Claude Code