发布

  • fix(cli): encode path segments in dashboard fallback URL (#3221)

    frostbyte_neo 发布于 2026-04-18 02:19:24 +00:00

    Summary

    • Fixes the handleNoManagedAuth fallback in composio link where
      the dashboard URL had unencoded path segments
    • The org name and toolkit slug were interpolated raw into the URL
      template — when the org name has special characters (spaces, @, etc.),
      the open library mangles the URL, turning ?open=true into
      %3Fopen%3Dtrue in the path
    • This caused the dashboard to treat twitter%3Fopen%3Dtrue as the
      toolkit slug → GET /api/v3/toolkits/twitter%3Fopen%3Dtrue404
      (20 events/24h, 3 users on
      Sentry)
    • Fix: encodeURIComponent() both orgName and toolkitSlug in the
      path, matching how the dashboard's own getUrl() builds URLs

    Test plan

    • Run composio link <toolkit> for a toolkit without managed auth,
      with an org name containing special characters (e.g. spaces)
    • Verify the opened dashboard URL has properly encoded path segments
      and ?open=true as a real query parameter
    • Verify the auto-open connect flow works on the dashboard side

    🤖 Generated with Claude Code

    下载附件