Commit Graph
1297 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
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 3c8645ce05 Add planting reminders feature and corresponding tests 2026-10-26 19:38:38 +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 c830624a75 Crop job admin 2026-10-24 18:40:10 +13:00
Brenda Wallace 85b5ff9ecd Add feature flags, with job ideas as the first
Admins switch features on and off at /admin/features, kept in Flipper.
Job ideas (the page, the banners and the overlay) only show while its
flag is on. Features are off until switched on.

Closes #5050
2026-10-24 18:01:56 +13:00
Daniel O'Connorandgoogle-labs-jules[bot] fbab11e189 Add full CRUD capabilities for member API token management (#5041)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-24 02:44:08 +10:30
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 6332f26c58 Merge pull request #4994 from Growstuff/crop-job-templates-admin
Admin for crop job templates, a tidier crop wrangling page, and crop and template seeds
2026-10-23 13:26:33 +10:30
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 f718f3e122 Refactor job handling and UI updates: streamline job path usage, enhance celebration text, and improve notepad interactions 2026-10-22 18:31:28 +13:00
Brenda Wallace afd053465d Enhance job creation and notepad functionality to handle empty jobbable links and ensure Add button remains enabled during submission 2026-10-22 18:18:56 +13: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 26a7b196f7 Move crop search to postgres (no elasticsearch) 2026-10-21 12:58:48 +13:00
Brenda Wallace 238880ef36 Revert "Refactor crop search functionality to use Postgres extensions for improved matching and update pagination logic"
This reverts commit 998a362b34.
2026-10-21 08:22:10 +13:00
Brenda Wallace 998a362b34 Refactor crop search functionality to use Postgres extensions for improved matching and update pagination logic 2026-10-21 08:06:42 +13:00