Conversation
Since 08233b7 the Section list in the Add item dialog only offers the sections already in pantry.conf once the pantry has an item, so a second section could never be created from the web UI. Add a "New section…" choice that reveals a field for its name. The server already creates a missing section on add. Typed section names can now hold spaces, slashes or accents, so encode the section in the item update/remove URLs and escape it in the selector used after a removal. Closes cooklang#628 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LeMyst
marked this pull request as ready for review
October 5, 2026 21:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #628
Problem
Since 08233b7 (#293), the Section list in the pantry's Add item dialog only lists the sections already in
pantry.confonce the pantry has an item. With a single[fridge]section, every new item had to go to the fridge.Change
/api/pantry/Wine%20cellar/Merlot). The selector that runs after a removal escapes it withCSS.escape.pantry-section-newandpantry-section-new-nameare added in all 9 locales.The server already created a missing section on
POST /api/pantry/add, so there is no Rust change.Testing
cargo fmt --check,cargo clippy --all-targets(no warnings),cargo test(all pass, includinglocales_test)[fridge]:fridgeandNew section…. The name field is hidden until "New section…" is picked.["Wine cellar"]topantry.conf, and the page shows both sections.fridgestill works, and the field stays hidden.DELETE /api/pantry/Wine%20cellar/Merlot, which returns 200.🤖 Generated with Claude Code