Skip to content

fix(flows): ask Shortcut users for their Team, not a Project - #87

Merged
kjgbot merged 1 commit into
mainfrom
fix/shortcut-team-field
Sep 16, 2026
Merged

kjgbot merged 1 commit into
mainfrom
fix/shortcut-team-field

Conversation

@kjgbot

@kjgbot kjgbot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Why

The Shortcut onboarding field asked for a project name (placeholder "Web app"), and the Cloud launcher compared that against the story's numeric project_id. "Web app" vs "55" cannot ever be true, so a Shortcut flow silently dropped every story — dispatch matched, then the launcher skipped with filtered and no reason recorded anywhere.

Shortcut scopes work by Group, branded "Team" in its UI. Projects are legacy:

  • /api/v3/projects returns [] in a modern workspace (see nango-integrations/shortcut-relay/tests/list-projects.test.json in the cloud repo).
  • A story's project_id is null there, and it names its team only by group_id.

So no spelling of a project filter could ever match such a workspace. This asks for the thing a story actually carries.

What changed

  • web/lib/flow-sources.ts — Shortcut's field is now { key: 'team', label: 'Team (group)', placeholder: 'Platform' }.
  • ISSUE_OPTIONAL_FIELDS already declares team (Linear uses it), so the generated Issue type and the generated filter need no other change.
  • web/lib/test/flow-sources.test.ts — updated, and its positive is now paired with a same-workspace, different-team negative, so a change that widened the filter into "always match" cannot pass.

Merge order

AgentWorkforce/cloud#3690 must merge first. That PR is what teaches the launcher to accept a team setting and to stop mis-comparing project. Until it ships, a flow deployed from this field would send a setting Cloud ignores.

Note that Shortcut is blocked upstream of both PRs regardless: nango-integrations/shortcut-relay/ has no on-events/ directory and no register-webhook action, so nothing registers Shortcut's outgoing webhook and no event arrives until a human creates one in Shortcut's UI. That is a separate defect, tracked outside this change.

Verification

npm --workspace web run test — full suite green (numbers in the PR thread).

🤖 Generated with Claude Code


Note

Medium Risk
Changes how Shortcut flow settings are stored and filtered; behavior depends on the paired Cloud PR merging first, or Shortcut flows may still not match correctly in production.

Overview
Shortcut flow onboarding no longer asks for a Project name; it asks for Team (group) so saved preferences align with how Shortcut stories are scoped (group/team, not legacy projects).

The UI field in flow-sources.ts switches from { key: 'project', ... } to { key: 'team', label: 'Team (group)', ... }, with comments explaining why project filtering could never match modern workspaces. Generated filters and validation reuse the existing team key (already used for Linear), so no separate type plumbing is required in this repo.

Tests in flow-sources.test.ts now configure and assert Shortcut matching on team, including a same workspace, wrong team negative so the filter cannot regress to always passing.

Merge note: Cloud launcher support for Shortcut team (vs the old broken project compare) must ship first (AgentWorkforce/cloud#3690); until then, flows would send a setting Cloud ignores.

Reviewed by Cursor Bugbot for commit 6d94213. Bugbot is set up for automated code reviews on this repo. Configure here.

The Shortcut onboarding field asked for a project NAME ("Web app"), and the
Cloud launcher compared it against the story's numeric `project_id` — a test
that cannot ever be true, so every story was silently dropped.

Shortcut scopes work by Group, branded "Team" in its UI. Projects are legacy:
`/api/v3/projects` returns an empty list in a modern workspace and a story's
`project_id` is null there, so no spelling of a project filter could match one.
A story names its team by `group_id`, which Cloud now resolves to a team name
(or matches against the group id directly).

So ask for the thing a story actually carries. `ISSUE_OPTIONAL_FIELDS` already
declares `team`, so the generated Issue type and filter need no other change.

Pairs the generated-filter test's positive with a same-workspace,
different-team negative, so a change that widened the filter into "always
match" cannot pass.

REQUIRES AgentWorkforce/cloud#3690 TO MERGE FIRST. That PR is what teaches the
launcher to accept a `team` setting and to stop mis-comparing `project`; until
it ships, a flow deployed from this field would send a setting Cloud ignores.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: ff028913-7c51-4c59-ae02-b46496b9b1cd


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Preview deployed!

Environment URL
Web https://ff7f0758-agentrelay-web.agent-workforce.workers.dev

This is a Cloudflare Workers preview version of this PR's build.

@kjgbot
kjgbot merged commit b18c258 into main Sep 16, 2026
5 checks passed
@kjgbot
kjgbot deleted the fix/shortcut-team-field branch September 16, 2026 14:56
Sign up for free to 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.

1 participant