feat(ios): label-aware local search and synced label edits - #595
Merged
Conversation
- searchLocal and the search-field filter rank name, then English label, then brand, mirroring the server; queries fold through LabelNormalizer, a port of the server's normalizeLabel - SyncOperation.setFoodLabels with API call, temp-id remap and sync case; FoodRepository.setLabels writes the row optimistically then queues it - labels section in the food edit form (normalized on add, 20 cap)
Contributor
Playwright E2E Results✅ All tests passed |
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.
Summary
Fifth of five label PRs (server → MCP → web → Android → iOS). Builds on #591. Written blind (Linux); the iOS build job is the compile gate.
FoodRepository.searchLocaland the search field's recent/favorites filter rank name → English label → brand, mirroring the server; queries fold throughLabelNormalizer, a port of the server'snormalizeLabel.LocalFood.labelsalready existed, so no store migration.SyncOperation.setFoodLabels(typeName, affectedTable/Id, temp-id remap, summary) +SyncManagercase callingBissbilanzAPI.setFoodLabels(PUT /api/foods/{id}/labels, decoded as{labels, dropped}exactly as the server sends it, so the op is never silently dropped).FoodRepository.setLabelspatches the row optimistically, then queues.Test plan
bun run securitycleaniOS Build & Testjob green🤖 Generated with Claude Code