Skip to content

Editor autosave brings back a recipe renamed or deleted in another tab #808

Closed

Description

@LeMyst

When a recipe is renamed (or deleted) while another editor tab still has it open, that other tab's autosave writes the old file back.

To reproduce:

  1. Open the same recipe in the editor in two tabs.
  2. In tab A, rename it (Rename → "New Name"), or delete it.
  3. In tab B, type anything.

A second later, B's autosave sends PUT /api/recipes/<old path>. That endpoint creates a missing file, so the old name reappears beside the renamed one: two copies, and B's later edits go to the old one. A deleted recipe comes back.

The editor already guards its own rename (renaming in templates/edit.html, whose comment describes exactly this), but not a rename or delete from another tab or device. In-editor rename came in with 2c6e839 (#623); the delete case predates it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions