Skip to content

Rename Session alert opens empty after the first rename #7

Description

@javiertoledo

What happens

The Rename Session alert is only prefilled with the session's current name the first time it opens after launch. When it opens again, for the same session or another one, the field is empty and shows the Name placeholder.

Steps to reproduce

  1. Launch Shepherdr with at least one session.
  2. Right-click the session in the sidebar → Rename…. The field shows the current name.
  3. Rename it, or cancel.
  4. Right-click a session → Rename… again. The field is empty.

Expected

The field always starts with the session's current workspace name, ready to edit.

Impact

Renaming still works: typing a new name and pressing Rename renames the Herdr workspace. But a small edit to a long name means retyping all of it.

Notes

  • Seen on main at a09b789 (after Fix a race when renaming a session #3), macOS 26, in a scratch app copy pointed at a disposable Herdr session.
  • The alert's TextField binds to model.renaming?.name (App/MainView.swift). SwiftUI may be reusing the alert's text field across presentations without reading the binding again.
  • The Rename Group alert uses the same pattern (model.groupPrompt?.name) and may have the same problem; not checked.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions