Commit Graph
61 Commits
Author SHA1 Message Date
Hayden bf5c95f088 chore: speed up the backend test suite (#8477) 2026-09-20 19:01:54 +00:00
Vladimir Babin d1b02872ea fix: keep caller-supplied id when creating a model via auto_init (#8432) 2026-09-16 21:55:34 +00:00
jallier b386e7289f feat: add recipe note linking to recipe instructions (#7591) 2026-09-13 00:15:30 +00:00
cbcd7f3744 feat: filter meal plan rules by food label (#8126)
Co-authored-by: Jonathan Malessa <13995942+Xyolyp@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 17:53:02 +00:00
Derek Liu fae43c2fdf fix: aggregate to-many orderings instead of joining (#8332) 2026-09-11 15:43:56 +00:00
Michael Genson f7d75eeebb fix: substitution recipe ref handling (#8311) 2026-09-06 12:19:08 -05:00
Derek Liu 35c1c1735a fix: filter related fields with EXISTS instead of joins (#8297) 2026-09-06 13:55:35 +00:00
Michael Genson 30284d5651 feat: ingredient substitutions (#8265) 2026-09-05 10:10:44 -05:00
Michael Genson 56d039c7e3 fix: harden public filtering (#8286) 2026-09-04 15:24:40 -05:00
henry1113nz 8e42fc572f fix: repoint shopping list items when merging a food or unit (#8146) 2026-08-27 15:31:49 +00:00
Michael GensonandHayden 642c826f2b fix: Protect sensitive data in query filter API (GHSA-8m57-7cv5-rjp8) (#7629)
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2026-05-21 21:08:41 +00:00
Michael GensonandCopilot d340fdd9df fix: Update backend normalization to match search normalization logic (#7603)
Co-authored-by: Copilot <copilot@github.com>
2026-05-10 21:23:57 -05:00
26924ab054 fix: #6802 prevent 500 internal server error when patching recipe tags (#6803)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Co-authored-by: Michael Genson <genson.michael@gmail.com>
2026-03-18 13:45:51 -05:00
Michael Genson b5c089f58c feat: Unit standardization / conversion (#7121) 2026-03-09 17:13:41 +00:00
Michael Genson 216ae8571c fix: Include unmade recipes when filtering by last made (#7130) 2026-02-23 18:34:16 -06:00
Michael Genson b64f14aaae feat: Dynamic Placeholders UI (#7034) 2026-02-11 05:43:17 +00:00
Michael Genson fb8e318739 fix: Flaky $NOW tests (#6990) 2026-02-02 11:24:13 -06:00
Michael Genson 987c7209fc feat: Query relative dates (#6984) 2026-02-01 21:36:46 -06:00
Michael Genson d02023e12c fix: Only fetch recipes with a household id (#6773) 2025-12-23 16:48:27 -06:00
AurelienandMichael Genson 7b32508201 fix: the add_pagination_to_query now always returns the correct count (#6505)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
2025-12-22 10:39:35 -06:00
Michael Genson 481ce92d84 fix: CONTAINS ALL doesn't contain all (#5900) 2025-08-14 12:21:40 +00:00
Michael Genson 0f58ac5b47 fix: "NOT IN" doesn't apply filter properly (#5154) 2025-03-18 18:07:26 +00:00
Michael Genson ad59e653da fix: Case Insensitive Query Filters (#5162) 2025-03-10 10:56:12 +00:00
Michael GensonandKuchenpirat e9892aba89 feat: Move "on hand" and "last made" to household (#4616)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2025-01-13 17:19:49 +01:00
2c2de1e95b chore(deps): update dependency ruff to ^0.9.0 (#4871)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2025-01-13 15:43:55 +00:00
Michael Genson 4e0cf985bc feat: Recipe Finder (aka Cocktail Builder) (#4542) 2024-12-03 13:27:41 +00:00
Michael Genson b8e62ab8dd feat: Query Filter Builder for Cookbooks and Meal Plans (#4346) 2024-10-17 17:35:39 +02:00
Michael Genson dbbd662e7d feat: Allow Cookbooks To Share Names (#4186) 2024-09-15 11:42:58 +00:00
Michael Genson eb170cc7e5 feat: Add Households to Mealie (#3970) 2024-08-22 10:14:32 -05:00
Christian Clauss 432914e310 fix: Lint Python code with ruff (#3799) 2024-08-12 15:09:30 +00:00
Michael Gensonandboc-the-git d5f7a883df fix: Make Mealie Timezone-Aware (#3847)
Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
2024-07-08 21:12:20 +00:00
Michael Genson 2a541f081a feat: User-specific Recipe Ratings (#3345) 2024-04-11 21:28:43 -05:00
Hayden 9e6ae2e514 chore: remove black (#3437) 2024-04-11 20:36:55 -05:00
Michael Genson 0bf3aed287 updated models/services/tests to include user_id 2024-02-23 17:02:32 +00:00
Michael Genson 7a107584c7 feat: Upgrade to Pydantic V2 (#3134)
* bumped pydantic
2024-02-11 16:47:37 +00:00
Michael Genson e1cd2717d3 fix: Update Group Slug When Updating Group (#3084)
* added slug update hook to group updates

* added test

* force refresh if group slug changes

* added alert if something goes wrong
2024-01-30 18:41:37 +00:00
Michael Genson a98e863bca fix: database unique constraints (#2594)
* fixed missing migration name

* added unique constraints to all m2m tables

* fixed bug trying to create duplicate tags

* added more unique constraints

* fixed duplicate seeder data

* updated tests

* fixed seed rollback error
2023-10-07 11:23:13 -08:00
Michael Genson 2dfbe9f08d feat: Improved Ingredient Matching (#2535)
* added normalization to foods and units

* changed search to reference new normalized fields

* fix tests

* added parsed food matching to backend

* prevent pagination from ordering when searching

* added extra fuzzy matching to sqlite ing matching

* added tests

* only apply search ordering when order_by is null

* enabled post-search fuzzy matching for postgres

* fixed postgres fuzzy search test

* idk why this is failing

* 🤦

* simplified frontend ing matching
and restored automatic unit creation

* tightened food fuzzy threshold

* change to rapidfuzz

* sped up fuzzy matching with process

* fixed units not matching by abbreviation

* fast return for exact matches

* replace db searching with pure fuzz

* added fuzzy normalization

* tightened unit fuzzy matching thresh

* cleaned up comments/var names

* ran matching logic through the dryer

* oops

* simplified order by application logic
2023-09-15 17:19:34 +00:00
Michael GensonandHayden aec4cb4f31 feat: Advanced Query Filter Record Ordering (#2530)
* added support for multiple order_by strs

* refactored qf to expose nested attr logic

* added nested attr support to order_by

* added tests

* changed unique user to be function-level

* updated docs

* added support for null handling

* updated docs

* undid fixture changes

* fix leaky tests

* added advanced shopping list item test

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-09-14 14:09:05 +00:00
Michael GensonandHayden 095edef95e feat: Improve Public URL Readability (#2482)
* added support for group slugs

* modified frontend to use links with group slug

* fixed test refs

* unused import

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-08-20 10:38:46 -08:00
Michael GensonandHayden 99372aa2b6 feat: Generalize Search to Other Models (#2472)
* generalized search logic to SearchFilter

* added default search behavior for all models

* fix for schema overrides

* added search support to several models

* fix for label search

* tests and fixes

* add config for normalizing characters

* dramatically simplified search tests

* bark bark

* fix normalization bug

* tweaked tests

* maybe this time?

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-08-20 10:30:21 -08:00
Jacob CornandHayden e1d3a247c7 feat: random sort option for front page (#2363)
* Add hook for random sorting

* Add random sorting to front page

* Add multiple tests for random sorting.

* Be extra sure that all recipes are returned.

* Too stable random. seed doesn't reach backend.

* add timestamp to useRecipeSearch

* Update randomization tests for timestamp seeding

* ruff cleanup

* pass timestamp separately in getAll

* remove debugging log items

* remove timestamp from address bar

* remove defaults from backend timestamps

* timestamp should be optional

* fix edge case: query without timestamp

* similar edge case: no timestamp in pagination

* ruff :/

* better edge case handling

* stabilize random search test w/more recipes

* better pagination seeding

* update pagination seed test

* remove redundant random/seed check

* Test for api routes to random sorting.

* please the typing gods

* hack to make query parameters throw correct exc

* ruff

* fix validator message typo

* black reformatting

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-05-29 16:56:20 -08:00
Jacob Corn 7e0d29afc7 feat: search tokenization, handling of quoted literal search, and postgres fuzziness (#2351)
* Creating postgres migration script and starting to set up to detect database

* non-working placeholders for postgres pg_tgrm

* First draft of some indexes

* non-working commit of postgres indexing

* Further non-working edits to db-centric fuzzy search

* update alembic for extensions

* More non-working setup

* Move db type check to init_db

* fix typo in db name check

* Add sqlite token search and postgres full text search

* reorder search to hit exact matches faster

* Add settings and docs for POSTGRES_LANGUAGE (full text search)

* Use user-specified POSTGRES_LANGUAGE in search

* fix fuzzy search typo

* Remove full text search and instead order by trigram match

* cleaner adding of indices, remove fulltext

* Cleanup old import of getting app settings

* Fix typo in index

* Fix some alembic fuzzy typos

* Remove diagnostic printing from alembic migration

* Fix mixed up commutator for trigram operator and relax criteria

* forgot to remove query debug

* sort only on name

* token and fuzzy search tests

* Refactor recipe search test to avoid rare random string cross-matches.

* Add ability to quote parts of search for exact match

* Remove internal punctuation, unless it's quoted for literal search

* Add tests for special character removal and literal search

* Remove the outer double quotes from searches, but leave internal single quotes alone.

* Update tests to avoid intra-test name collisions

* Fixing leftovers highlighted by lint

* cleanup linting and mypy errors

* Fix test cross-matching on dirty db (leftovers from bulk import)

* forgot to cleanup something when debugging mypy errors

* re-order pg_trgm loading in postgres

* address comments
2023-05-28 09:46:53 -08:00
Michael Genson 8e2d50054c Fix: Query Filter Date Comparisons Are Off By One Date (#2389)
* fixed erroneous date -> datetime conversion

* added tests for date and datetime bounds
2023-05-11 22:28:14 -08:00
Michael Genson 5d87b7e411 feature: query filter support for common SQL keywords (#2366)
* added support for SQL keywords IS, IN, LIKE, NOT
deprecated datetime workaround for "<> null"
updated frontend reference for "<> null" to "IS NOT NULL"

* tests

* refactored query filtering to leverage orm

* added CONTAINS ALL keyword

* tests

* fixed bug where "and" or "or" was in an attr name

* more tests

* linter fixes

* TIL this works
2023-05-06 14:28:40 -08:00
Michael GensonandHayden fe17922bb8 Feature: Global Timeline (#2265)
* extended query filter to accept nested tables

* decoupled timeline api from recipe slug

* modified frontend to use simplified events api

* fixed nested loop index ghosting

* updated existing tests

* gave mypy a snack

* added tests for nested queries

* fixed "last made" render error

* decoupled recipe timeline from dialog

* removed unused props

* tweaked recipe get_all to accept ids

* created group global timeline
added new timeline page to sidebar
reformatted the recipe timeline
added vertical option to recipe card mobile

* extracted timeline item into its own component

* fixed apploader centering

* added paginated scrolling to recipe timeline

* added sort direction config
fixed infinite scroll on dialog
fixed hasMore var not resetting during instantiation

* added sort direction to user preferences

* updated API docs with new query filter feature

* better error tracing

* fix for recipe not found response

* simplified recipe crud route for slug/id
added test for fetching by slug/id

* made query filter UUID validation clearer

* moved timeline menu option below shopping lists

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-04-25 09:46:00 -08:00
Sören 6a5f9d7f6b feat: diacritic-insensitive search (#2132)
* add normalized columns and use them for search

* add migration to fill all normalized columns
2023-02-19 15:40:18 -09:00
HaydenandSören 71f8c1066a feat: server side search (#2112) (#2117)
* feat: server side search API (#2112)

* refactor repository_recipes filter building

* add food filter to recipe repository page_all

* fix query type annotations

* working search

* add tests and make sure title matches are ordered correctly

* remove instruction matching again

* fix formatting and small issues

* fix another linting error

* make search test no rely on actual words

* fix failing postgres compiled query

* revise incorrectly ordered migration

* automatically extract latest migration version

* test migration orderes

* run type generators

* new search function

* wip: new search page

* sortable field options

* fix virtual scroll issue

* fix search casing bug

* finalize search filters/sorts

* remove old composable

* fix type errors

---------

Co-authored-by: Sören <fleshgolem@gmx.net>
2023-02-11 21:26:10 -09:00
HaydenandSören Busch 9e77a9f367 prs-fleshgolem-2070: feat: sqlalchemy 2.0 (#2096)
* upgrade sqlalchemy to 2.0

* rewrite all db models to sqla 2.0 mapping api

* fix some importing and typing weirdness

* fix types of a lot of nullable columns

* remove get_ref methods

* fix issues found by tests

* rewrite all queries in repository_recipe to 2.0 style

* rewrite all repository queries to 2.0 api

* rewrite all remaining queries to 2.0 api

* remove now-unneeded __allow_unmapped__ flag

* remove and fix some unneeded cases of "# type: ignore"

* fix formatting

* bump black version

* run black

* can this please be the last one. okay. just. okay.

* fix repository errors

* remove return

* drop open API validator

---------

Co-authored-by: Sören Busch <fleshgolem@gmx.net>
2023-02-06 18:43:12 -09:00
Hayden a8f0fb14a7 chore: upgrade pre-commit hooks (#1735)
* change pep585 hook to pyupgrade

* run pyupgrade + cleanup lint errors
2022-10-17 14:37:06 -08:00