Commit Graph
2804 Commits
Author SHA1 Message Date
Brenda Wallace f2fa894ea3 Add packet_text attribute and authorization logic to SeedResource; implement request specs for packet text writing 2026-10-28 23:38:18 +13:00
Brenda Wallace 70827646a4 Merge branch 'main' into seed-packet-photo-sides 2026-10-28 22:10:15 +13:00
Brenda Wallace a5e5ce4988 Merge remote-tracking branch 'origin/main' into seed-packet-photo-sides
# Conflicts:
#	db/schema.rb
2026-10-28 21:57:32 +13:00
Brenda Wallace a026a00a60 Merge branch 'main' into api/graphiti 2026-10-28 21:54:10 +13:00
Brenda Wallace f20bf69d32 feat: Allow saving blank drafts for photo attachments and update validations 2026-10-28 21:50:26 +13:00
Brenda Wallace 96e37b6c90 feat: Enhance photo handling in posts with new features and UI updates 2026-10-28 21:50:26 +13:00
Brenda Wallace 232a62c3a8 feat: Enhance post editor with link suggestions for crops, members, and plantings 2026-10-28 21:50:26 +13:00
Brenda Wallace b6006df384 feat: Implement draft autosave and preview functionality in PostEditor
- Added useDraftAutosave hook to handle automatic saving of post drafts.
- Enhanced PostEditor component to include a preview tab that fetches and displays rendered markdown.
- Updated Post model to manage draft state and associated published_at timestamp.
- Introduced card_photo association to Post for representing a primary image.
- Modified post form to support draft saving and publishing actions.
- Updated navigation to include links to drafts.
- Added tests for draft saving, preview functionality, and card photo validation.
- Created migrations for new database fields related to drafts and card photos.
2026-10-28 21:50:26 +13:00
Brenda WallaceandClaude Sonnet 5.5 4ec2bee2f7 Show the packet side of a photo as a Front | Back | None control
On a seed's own page, the owner now chooses which side of the packet a photo
is of with one small button group, the current choice lit, in place of a badge
and up to three long text links that wrapped in a narrow card. Everyone else
sees just a badge. The unused "mark as" locale keys are removed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 21:39:29 +13:00
Brenda WallaceandClaude Sonnet 5.5 ab024ac51a Address review comments on packet photo labels
Keep every packet label when a side is photographed again, and use the newest
photo of a side. Before, giving a second photo the same label cleared the
older photo's, which let it back into the crop's photos and default picture.

Carry the label through the HTML photo picker (its search form and the links
that add a photo), so a packet photo added without JavaScript is labelled.

Have the OCR script treat any network failure on an image (DNS, timeout) as
that image failing, so the rest of the batch still runs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 21:20:27 +13:00
Brenda Wallace cd6f8f1876 feat: add packet labeling functionality and awaiting text scope for seed photos 2026-10-28 20:44:37 +13:00
Brenda Wallace 062bf738b3 Hide the packet text for now, and fix the packet_text migration
The text read from a packet is kept in seeds.packet_text but is not on any form
or page yet: the OCR script will fill it in a follow-up. The column's migration
comment had an apostrophe that broke its string, so it did not run.
2026-10-28 20:35:09 +13:00
Brenda Wallace 1701f77723 Add OCR task for seed packet photos and related specs
- Introduced a Rake task `packets:needing_ocr` to list photos of seed packets that lack text, outputting results as JSON lines.
- Created a Python script `read_packets.py` to process the output of the Rake task, downloading images and performing OCR to extract text.
- Updated model specs for `Crop` to ensure proper handling of photos associated with different seeds.
- Refactored API request specs for `Photos` and `Seeds`, removing unnecessary attributes from the response.
- Added tests for the new Rake task to ensure correct functionality and output format.
2026-10-28 20:23:35 +13:00
Brenda Wallace 8d71024075 Remove packet reading functionality and associated tests
- Deleted the packet_lines.js and packet_reader.js files along with their tests.
- Removed the packet_text.js file and its tests, which handled parsing of packet text.
- Eliminated the corresponding HTML for the packet reader button in the seed form.
- Updated package.json to remove tesseract.js dependency.
- Cleaned up related helper specs for packet image URLs.
2026-10-28 20:15:20 +13:00
Brenda Wallace 1036ad2ecf feat: add packet_text field to seeds and implement OCR reading functionality for seed packets 2026-10-28 20:12:47 +13:00
Brenda Wallace d94fd3ab1b feat: implement photo label updates for seed packets and enhance associated views 2026-10-28 19:46:00 +13:00
Brenda Wallace acfaa2a880 feat: add tesseract.js dependency and implement photo association tests
- Added `tesseract.js` as a dependency in `package.json`.
- Created a new spec file for `PhotosHelper` to test `packet_image_urls` method.
- Enhanced `Crop` model tests to ensure packet photos do not interfere with crop photos.
- Introduced validation tests for `Seed` model, covering row spacing and variety constraints.
- Updated API response in `seeds_request_spec.rb` to include variety, batch number, and row spacing.
- Updated `yarn.lock` to reflect new dependencies and versions.
2026-10-28 19:37:09 +13:00
Brenda Wallace 77e73778c1 Refactor PhotoResource to remove seeds association and update seed_ids method; adjust specs accordingly 2026-10-28 19:29:44 +13:00
Brenda Wallace 3a2528f5fa Rename 'moment' to 'label' in photo associations and update related functionality for job and seed photos 2026-10-28 19:11:12 +13:00
Brenda Wallace ecbbe6ae4b Merge branch 'main' into api/graphiti 2026-10-28 07:43:47 +13:00
b77fa5d4c4 Add 'This week' reschedule option for jobs (#5118)
* Add 'This week' reschedule option for jobs

- Add JobList.week_date helper returning the Friday of the current week.
- Add move_week translation key in config/locales/en.yml.
- Render 'This week' option in app/views/jobs/_reschedule.haml when week_date is after tomorrow.
- Add unit specs in spec/services/job_list_spec.rb and view specs in spec/views/jobs/_reschedule.haml_spec.rb.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Remove low value tests

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Brenda Wallace <brenda@wallace.net.nz>
2026-10-27 18:56:13 +10:30
Brenda Wallace ff078009b2 Merge branch 'main' into feat/more-suggestions 2026-10-27 15:12:55 +13:00
Brenda Wallace f5f84751d9 Fix selector for post body input in new post creation 2026-10-27 14:00:39 +13:00
Brenda Wallace 45cf7f4e5d Fix selector for post body input in post creation spec 2026-10-27 14:00:33 +13:00
Brenda Wallace 37fb45e05f Use send_keys for post body input in forum spec 2026-10-27 13:57:21 +13:00
Brenda Wallace 85480f666b Refactor post body input method in post creation spec 2026-10-27 13:57:15 +13:00
Brenda Wallace 2dd381f25a Add missing click on "Actions" link before editing a post 2026-10-27 13:55:53 +13:00
Brenda Wallace 6bebff9251 Merge remote-tracking branch 'origin/main' into posts/tiptap-editor-page 2026-10-27 13:55:01 +13:00
Brenda Wallace a2681e68e3 Merge remote-tracking branch 'origin/main' into feat/more-suggestions 2026-10-27 13:48:16 +13:00
Brenda Wallace e07a3fa04c more suggestions from other users 2026-10-27 13:46:44 +13:00
Brenda Wallace 4576b1a2ed Refactor garden suggestions feature: update suggestion logic, remove unused partial, and enhance localization 2026-10-27 11:11:05 +13:00
Brenda Wallace aeccc2c5ed Add planting suggestions feature to garden pages
- Introduced a suggestions section on the garden show page to display what can be planted now.
- Added a new view partial for garden suggestions.
- Updated the plant picker to allow selection of a specific garden.
- Enhanced navigation menu to include a link to planting suggestions.
- Added relevant translations for the new feature.
- Implemented feature specs to ensure suggestions display correctly for the user's garden.
2026-10-27 11:11:05 +13:00
Brenda Wallace 0ecb2c512c Add clean_database support for transactional tests 2026-10-27 09:56:15 +13:00
google-labs-jules[bot]andCloCkWeRX c99a271fec Remove database_cleaner in favor of Rails transactional tests
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-10-27 09:56:15 +13:00
Brenda Wallace 932b1883c9 Merge branch 'main' into api/graphiti 2026-10-27 07:01:40 +13:00
Daniel O'Connorandgoogle-labs-jules[bot] 5a1886b213 Link member profile image and name in mobile menu (#5105)
Update the offcanvas drawer header on small devices to wrap the
signed-in member's profile avatar image and login name in a link
pointing to the member's profile page.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-26 23:03:18 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] fc4a152bf1 Link conversation topic if present on show view (#5102)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-26 22:25:11 +10:30
Brenda WallaceandDaniel O'Connor 75595350bc Easier recording of harvests from the front page (#5077)
* Implement AddSeedsPicker component and enhance planting selection UI; update styles and serializers for better seed management

* Enhance PlantingPicker component: add hints and titles for harvest and seed actions; update test to reflect changes in seed saving behavior

* Enhance harvest recording: allow harvesting from crops without plantings; update forms and modals for better user experience

* Refactor code structure for improved readability and maintainability

* Remove AddSeedsPicker component and its associated tests

* Add planting picker functionality for harvesting and seed saving

- Introduced PlantingPickersController to handle JSON responses for member's plantings.
- Updated HomeHelper to include crop ID in planting picker properties.
- Refactored PlantPicker and PlantSomethingModal components to support multiple gardens.
- Created PlantingFlow component to manage planting actions (harvest and save seeds).
- Implemented RecordDialog component to handle server-rendered links for harvesting and seed saving.
- Updated various views to include data attributes for triggering the record dialog.
- Added routes for planting picker and corresponding request specs for testing.
- Adjusted styles in _plantings.scss for better layout and spacing.

* Add job management features including job creation and wishlist functionality

* Remove WishlistJobsController and associated views and tests

* Add suggestion links rendering and fix routes formatting

* Refactor AddJobModal and JobPicker components to simplify props and enhance user experience

* Update seed addition test to check dialog presence and current path

* Apply suggestion from @CloCkWeRX

---------

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-10-26 21:38:12 +10:30
a2abe79e6f Fix Translation missing en.seeds.updated (#5100)
* Fix missing en.seeds.updated translation

Add missing updated key under the seeds scope in config/locales/en.yml
and add controller test verifying flash notice on seed update.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Update SeedsController test route parameter to use slug

Seeds routes use param: :slug. Updated test parameter key from id to slug.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-26 19:56:13 +10:30
Brenda Wallace 6373f43700 Merge branch 'main' into api/graphiti 2026-10-26 22:25:21 +13:00
d19fd9657b Replace bootstrap datepicker with native HTML5 date inputs (#5057)
* Replace bootstrap datepicker with native HTML5 date inputs

Convert planting and seed date text fields to native HTML5 date fields
(`f.date_field`), matching existing date inputs across the app. Remove
bootstrap-datepicker JS/CSS imports, legacy site wrapper scripts,
package dependency, and update test specs.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Fix spec

* Fix spec

* Fix spec

* Drop expectations about removed control

* Fix specs

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-26 19:52:50 +10:30
Brenda Wallace 0f8942508e Refactor API request handling: introduce RequestShape concern, update query and request body validation, and enhance link handling in specs 2026-10-26 20:45:16 +13:00
Brenda Wallace ec7a35f16b Remove plantings_controller_spec and associated tests 2026-10-26 20:45:03 +13:00
Brenda Wallace a4a44389d4 Add query shape validation and related tests for API requests 2026-10-26 20:40:16 +13:00
Brenda Wallace 8d5bdbdfd4 Refactor API documentation for request bodies and filter parameters; add tests for nullable attributes and request body requirements 2026-10-26 20:22:48 +13:00
Brenda Wallace 75da93694a Merge branch 'main' into api/graphiti 2026-10-26 20:11:16 +13:00
Brenda Wallace dfffafca52 Add harvest reminders feature and update related specs and locales 2026-10-26 19:38:38 +13:00
Brenda Wallace 948cc59d1b Remove Sidekiq integration and update mailer delivery methods to deliver immediately 2026-10-26 19:38:38 +13:00
Brenda Wallace 3c8645ce05 Add planting reminders feature and corresponding tests 2026-10-26 19:38:38 +13:00
Brenda Wallace 530c177949 Merge remote-tracking branch 'origin/main' into api/graphiti 2026-10-26 17:56:00 +13:00