fix(api): answer Linear questions from the task mirror when Linear is not connected

AV
2mo ago
+11-1

From live testing after #7585: "what linear tickets are there for cloud/sandboxes" used to be answered from Superset tasks, which mirror the organization's Linear issues. With the plugin bridge in, an unconnected user got told Linear is not connected instead.

Fix

The context line for an unconnected Linear now says Superset tasks mirror the org's Linear issues and to answer read questions from the task tools, noting the source. "Not connected" is reserved for anything that needs Linear itself, such as filing or commenting. GitHub has no mirror, so its line is unchanged.

Testing

  • bun test src/app/api/integrations/slack (120 pass)
  • bunx tsc --noEmit --pretty false in apps/api (exit 0)
  • bunx biome check apps packages

https://claude.ai/code/session_01BRrjyTLHZbdYSM5JYkff4B


Summary by cubic

Fixes the Slack agent's response when Linear is not connected so it can still answer read questions from Superset tasks (which mirror Linear issues) instead of refusing with "Linear is not connected". The "not connected" message is now reserved for actions that actually require Linear, like filing or commenting. GitHub is unchanged since it has no mirror.

Summary by CodeRabbit

  • New Features
    • When Linear is disconnected, Slack can direct Linear issue questions to available Superset task information and identify it as a copy.
    • For requests that require a disconnected integration, the assistant indicates that the integration is unavailable.
  • Tests
    • Added coverage verifying that the assistant mentions Superset task information and reports Linear as disconnected when answering a Linear-related question.