Skip to content

fix: session rename fails when generated name already exists #139

@dnlopes

Description

@dnlopes

Bug Description

When renaming a session, if the generated session name (derived from the display name) already exists, the rename operation fails - even though the new display name is different from existing sessions.

Expected Behavior

The rename should succeed by generating a unique session name (e.g., by appending a suffix like -1, -2, etc.) when the base generated name already exists, similar to how new session creation handles name conflicts.

Current Behavior

The rename operation fails with an error when the generated session name conflicts with an existing session name.

Steps to Reproduce

  1. Create a session with display name "[Repo] Main" (generates name like Rocha_Main)
  2. Try to rename the session to "[Repo] > Main" or something that would generate the same base name
  3. Observe the rename fails due to name conflict

Additional Context

The display name can be different while still generating the same underlying session name due to name normalization (lowercase, special characters removed, etc.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions