You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The web editor can create, save and delete a recipe or menu, but not rename one. Today the only way is to create a new file, paste the text, and delete the old one — which loses the title and step pictures (Recipe.jpg, Recipe.2.jpg, Recipe.1.2.jpg) and leaves every @./Old Name{} reference in other recipes and menus pointing at a file that no longer exists.
Proposal
A Rename button in the editor, next to Picture and Delete, opening a small dialog with the current name. Behind it, POST /api/recipe_rename/{*path} with { "name": "New name" }:
the file stays in its folder (a name, not a path);
its pictures are renamed with it;
references to it in the collection's .cook and .menu files are rewritten to the new name.
What it must never do
Renaming touches several files at once, so it needs to be stricter than the other write endpoints:
never overwrite anything — a name that is taken, or a picture that would land on an existing file, is refused (409), with no race between the check and the move;
never change what another reference means: renaming Foo.cook to Week when Week.menu exists would make every @./Week{} reach the recipe instead of the menu (.cook is looked up first);
only rewrite a reference that names the file exactly, keeping every other byte of the file; report the ones it cannot rewrite exactly instead of guessing;
not lose an edit to the editor's autosave, which writes the old path a second after each keystroke and would recreate the old file;
leave .shopping-list alone (its format is shared with the apps), but say when it still names the old path.
Activity