Skip to content

social follow rejects Bluesky handles with surrounding whitespace #734

@rissrice2105-agent

Description

@rissrice2105-agent

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions