Commit Graph
726 Commits
Author SHA1 Message Date
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 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 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 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 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 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 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
Daniel O'Connor 8de199bf53 Merge branch 'main' into api/graphiti 2026-10-26 12:47:17 +10:30
Brenda WallaceandDaniel O'Connor 8474bdd416 remove newsletter (#4974)
* Remove unused bluecloth gem

Last released in 2011. It was only required, never called; kramdown
renders the markdown.

* Add specs for Tilt markdown rendering and posts markdown partial

* Remove rails_12factor gem

Last released in 2014. Rails 5+ does this via RAILS_SERVE_STATIC_FILES
and RAILS_LOG_TO_STDOUT, which production.rb already reads.

* Remove memcachier gem from Gemfile and Gemfile.lock

* Remove unused webrat gem

Last released in 2011. Nothing requires it; the specs use Rails'
assert_select and Capybara matchers. Only generator comments mention it.

* Remove crowdin-cli gem

Last released in 2018. Crowdin now ships its own standalone CLI, which
reads crowdin.yml and doesn't need the gem. Also drops the dependencies
only it used (rest-client, gli, crowdin-api and friends).

* Removes the crowdin-cli gem (last released 2018), the dependencies only
it needed, and crowdin.yml. Crowdin was never set up: the config still
has a placeholder project ID and nothing else in the repo mentions it.

Assisted by Claude

* Remove newsletter functionality and associated views and tests

* Remove newsletter functionality and related code across the application

* keep the column

* Remove stale test step

* add back newsletter

* Add migration to update newsletter column comment in members table

---------

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-10-26 11:48:36 +10:30
Brenda Wallace d3f61775b4 Enhance job validation and resource authorization for gardens; add tests for job creation and linking 2026-10-25 19:04:05 +13:00
Brenda Wallace 586fcc70f9 Implement job permissions for members and admins in Ability model; add corresponding specs 2026-10-25 15:33:32 +13:00
Brenda Wallace b22fa68bdf Refactor Job Ideas feature: replace dismiss! with hide! method, update job count logic, and enhance UI components for better visibility and layout 2026-10-23 21:04:21 +13:00
Brenda Wallace c6bf51c542 Implement job idea dismissal duration and snooze functionality; add hidden_until attribute and related specs 2026-10-23 21:04:21 +13:00
Brenda Wallace 1266c0e537 Add action attribute to Job model and update related files 2026-10-23 21:04:21 +13:00
Brenda Wallace a3764739b3 Add job idea dismissal feature and related services
- Introduced JobIdeaDismissal model to manage dismissed job ideas for members.
- Added associations and validations for job idea dismissals in the Member model.
- Created JobIdeas service to generate job ideas based on templates and last year's activities.
- Implemented JobIdeas::LastYear and JobIdeas::Templates classes to fetch relevant job ideas.
- Added migration for job_idea_dismissals table and updated schema.
- Developed tests for job idea dismissal functionality and related services.
2026-10-23 21:04:21 +13:00
Brenda Wallace c5b04b78a3 Add ApplyCropJobTemplate service and for_crop scope to CropJobTemplate model 2026-10-23 21:04:21 +13:00
Brenda Wallace 89599a665d Add crop_job_step association to Job model and migration
- Introduced a has_many association in CropJobStep for jobs with dependent nullify.
- Added crop_job_step reference to Job model with optional association.
- Created migration to add crop_job_step reference to jobs table with foreign key.
- Updated schema to reflect the new association.
- Added tests for crop_job_step association in Job model.
2026-10-23 21:04:21 +13:00
Brenda Wallace e64e893b4f Merge pull request #5015 from Growstuff/job-photos
Photos on jobs, before and after
2026-10-23 13:20:46 +10:30
Brenda Wallace 5312090a67 Merge remote-tracking branch 'origin/job-links-from-typing' into job-celebration 2026-10-23 08:04:26 +13:00
Brenda Wallace 07a86dfd3b Merge remote-tracking branch 'origin/main' into job-links-from-typing 2026-10-23 08:03:09 +13:00
Brenda Wallace 5b7624814e Merge remote-tracking branch 'origin/main' into rename-activities-to-jobs 2026-10-23 07:49:43 +13:00
Brenda Wallace 7c299b0f50 Merge remote-tracking branch 'origin/main' into rename-activities-to-jobs 2026-10-23 07:26:02 +13:00
Brenda Wallace 2b542eadf2 Merge remote-tracking branch 'origin/main' into crop-job-templates 2026-10-23 07:17:28 +13:00
Brenda Wallace 66b70180cd Add external_uri attribute to CropJobStep with validations and tests 2026-10-23 07:16:43 +13:00
Daniel O'Connorandgoogle-labs-jules[bot] 744ec9b7ec Display layout preview and edit/view controls on garden show (#5003)
Add `Garden#has_layout?` method to detect whether a garden has an
existing layout. On `gardens#show`, if a garden has a layout, display
an SVG preview of the layout (placed plants and features) inside the
teaser bed frame, remove the "New" badge, update the title to
"Garden layout", and offer "Edit layout →" or "View layout →" controls.
If no layout exists, preserve the original "Map out this bed" teaser
and "New" badge.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-22 18:08:05 +00:00
51feec8de1 Add comment support for plantings (#4984)
* Add comment support for plantings

- Add polymorphic comments association, subject, and author methods to Planting.
- Add comments_count column migration for Planting counter cache.
- Update CommentsController and comments view templates to support Planting.
- Render comments list and form on Planting show view.
- Add specs for Planting comments in models, controllers, and requests.

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

* put 4.0.7 back

* Opt comments on posts into record-page styling temporarily

* Drop hr

* Flatten comments

* Update schema

---------

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-22 15:22:32 +00:00
Brenda Wallace 51923aadd8 Add job celebration features with animations and notifications for completed tasks 2026-10-22 18:11:35 +13:00
Brenda Wallace 871c7ff9ce Enhance job notepad and linking functionality with UI improvements and code refactoring 2026-10-22 18:02:21 +13:00
Brenda Wallace d7d14cf65e Implement job linking functionality with crop suggestions and UI enhancements 2026-10-22 17:59:27 +13:00
Brenda Wallace a0b24381ac Refactor activities to jobs across the application
- Renamed all instances of 'Activity' to 'Job' in views, controllers, and models.
- Updated routes to reflect the change from activities to jobs.
- Modified database schema to rename the activities table to jobs and adjusted related columns.
- Updated locale files to change activity-related translations to jobs.
- Adjusted tests to ensure they reference jobs instead of activities.
- Removed the category field from jobs as they are now a plain list.
- Updated seed data and sample data generation to create jobs instead of activities.
2026-10-22 17:16:25 +13:00
Brenda Wallace 77bf9d5e92 Rename activities to jobs and update related files for consistency 2026-10-22 17:06:55 +13:00
Brenda Wallace ffacf8f236 Add crop job templates and steps models with associated migrations and tests 2026-10-22 16:56:47 +13:00
Brenda Wallace 977a984c24 Remove Elasticsearch integration and related code
- Deleted Elasticsearch gems from Gemfile and Gemfile.lock.
- Updated README and TECH documentation to reflect the removal of Elasticsearch.
- Removed Elasticsearch-related code from models, controllers, services, and factories.
- Adjusted tests to eliminate dependencies on Elasticsearch.
- Cleaned up Docker configuration and environment variables related to Elasticsearch.
- Added a TODO file for future gem reviews and potential removals.
2026-10-22 15:37:03 +13:00
Brenda Wallace 229cd7e5e1 Implement normalized name handling and search improvements in Postgres 2026-10-21 12:58:48 +13:00
Brenda Wallace 225a9057c5 Implement transplant functionality: refactor planting movement to record history of gardens, update modal for transplanting, and adjust related components and tests accordingly. 2026-10-17 22:57:38 +13:00
Brenda Wallace f4107e2b8d Refactor nursery management: replace plant_out functionality with transplant modal
- Removed NurseryScoped concern and associated controllers for plant_out and leftovers.
- Introduced TransplantModal component for handling the transplanting of seedlings.
- Updated PlantingsController to support transplanting with a new date handling method.
- Modified GardensHelper to provide active gardens for transplanting.
- Updated NurseryChip component to include transplant functionality.
- Removed legacy plant_out views and associated routes.
- Adjusted tests to reflect the new transplanting workflow and removed obsolete tests related to plant_out.
2026-10-17 21:10:56 +13:00
Brenda Wallace 6b1ce4df8b removing plannted plantings 2026-10-17 20:15:27 +13:00
Brenda Wallace 074a72d719 Refactor nursery and planting features: introduce planned and sown scopes, enhance nursery chip component, update views for planned plantings, and improve test coverage for nursery functionality. 2026-10-17 17:57:21 +13:00
Brenda Wallace 12633ac9e7 Refactor nursery management: Introduce NurseryScoped concern and restructure nursery-related controllers
- Created NurseryScoped module to handle nursery authentication and setup.
- Refactored GardensController to remove nursery-related actions and utilize the new NurseryScoped.
- Added new Nurseries::DeclinesController for handling nursery decline actions.
- Introduced Nurseries::LeftoversController for managing leftover plantings in the nursery.
- Created Nurseries::PlantOutsController for handling the planting out of seedlings from the nursery.
- Added NurseriesController to manage nursery display and creation.
- Updated routes to reflect new nursery structure and actions.
- Modified views to accommodate new nursery management flow and updated links.
- Enhanced models to support nursery functionality, including plant_out and finish_leftovers methods.
- Updated tests to reflect changes in nursery handling and ensure functionality.
2026-10-17 17:38:38 +13:00
Brenda Wallace dc47ba6b39 Implement plant out functionality: add plant_out and create_plant_out actions in GardensController, create plant_out view, update routes, and enhance Planting model for transplanting seedlings. 2026-10-17 13:16:07 +13:00
Brenda Wallace 310d7245a3 Implement nursery sowing functionality: add SowSeedsModal component, enhance planting logic to track seed usage, and update nursery views to display sown and planned seedlings. 2026-10-17 13:11:48 +13:00
Brenda Wallace a2466f41cc Implement nursery functionality: add nursery actions in gardens controller, update routes, and enhance views; add ability to transplant seedlings and manage nursery state. 2026-10-16 23:34:38 +13:00
Brenda Wallace bd3c015f60 Add nursery functionality to gardens: implement nursery scope, validations, and migration; update member model to manage nursery creation and ensure uniqueness. 2026-10-16 23:14:28 +13:00
Brenda Wallace c8c32014bb tidying up, as react components 2026-10-16 17:32:09 +13:00
Brenda Wallace fdebe79b7d Refactor seed management features
- Introduced `@other_count` in SeedsController to track in-stock and finished seeds based on the filter applied.
- Enhanced SeedsHelper with new methods: `seed_owner_label`, `seed_stacks`, and `seed_choice_link` for better organization and readability.
- Updated views to utilize new helper methods, improving the display of seed information and filtering options.
- Adjusted the Seed model to include methods for determining if a seed's sow-by date has passed and to return the heirloom type.
- Improved tests for filters and helper methods to ensure accurate functionality and coverage.
2026-10-16 17:32:09 +13:00
Brenda Wallace 1b9e6d036f Add seed filtering, messaging features, and enhance seed helper methods
- Implemented filtering for seeds based on source (own, bought, traded, heirloom) and sow-by dates in the SeedsController.
- Added feature specs for seed filtering and messaging functionalities.
- Enhanced SeedsHelper with methods for seed source labels, packet rules, and distance calculations.
- Updated views to reflect changes in seed display and filtering options.
- Created request specs for message creation and conversation handling related to seeds.
2026-10-16 17:32:09 +13:00