Bug
parseSocialFollowTarget passes the raw CLI argument directly to new URL() and to the bare-handle fallback. Inputs with surrounding whitespace, such as @alice.bsky.social or copied Bluesky URLs with a trailing space, are rejected even though the same value is otherwise valid.
Expected
The social follow parser should trim surrounding whitespace before URL parsing and handle detection, matching the rest of the CLI input handling behavior.
Reproduction
parseSocialFollowTarget(' @alice.bsky.social ', 'bluesky') throws instead of returning the Bluesky profile target.
Fix direction
Trim the input once at the parser boundary, use the trimmed value for URL parsing and fallback handle matching, and add a regression test.
Bug
parseSocialFollowTargetpasses the raw CLI argument directly tonew URL()and to the bare-handle fallback. Inputs with surrounding whitespace, such as@alice.bsky.socialor copied Bluesky URLs with a trailing space, are rejected even though the same value is otherwise valid.Expected
The social follow parser should trim surrounding whitespace before URL parsing and handle detection, matching the rest of the CLI input handling behavior.
Reproduction
parseSocialFollowTarget(' @alice.bsky.social ', 'bluesky')throws instead of returning the Bluesky profile target.Fix direction
Trim the input once at the parser boundary, use the trimmed value for URL parsing and fallback handle matching, and add a regression test.