Commit Graph
13034 Commits
Author SHA1 Message Date
Brenda Wallace 8e3814e615 Merge branch 'main' into seed-packet-text-api 2026-10-29 08:03:53 +13:00
Brenda Wallace 48d240f979 Merge pull request #5133 from Growstuff/release-phase-migrations
Run migrations in a Heroku release phase
2026-10-29 00:54:47 +13:00
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 WallaceandClaude Sonnet 5.5 6061b73602 Run migrations in a Heroku release phase
The Procfile had only a web process, so a deploy never ran migrations and they
had to be run by hand after the new code was live, leaving a window where the
code expected columns that did not exist yet. A release phase runs db:migrate
before the new release goes live, and if it fails the release is stopped and the
old code keeps running.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 22:56:31 +13:00
Brenda Wallace 6d2ca45368 Merge pull request #5132 from Growstuff/pin-node-24-19-0
Pin Node to 24.19.0 for Heroku builds
2026-10-28 22:54:18 +13:00
Brenda WallaceandClaude Sonnet 5.5 8a5c066fec Stop yarn enforcing the Node pin
yarn install refuses to run on a Node that does not match package.json
"engines", so pinning Node for Heroku broke CI (which runs 24.21.0) and would
block any contributor on another Node. Heroku still reads the pin; yarn no
longer enforces it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 22:41:25 +13:00
Brenda WallaceandClaude Sonnet 5.5 62abd15dda Pin Node to 24.19.0 for Heroku builds
Heroku builds have been failing since this morning while downloading the newest
24.x, 24.22.1, from nodejs.org (curl: (92) HTTP/2 stream was not closed
cleanly). The file downloads fine elsewhere, so pin an earlier 24.x to make the
build fetch a different one. CI sets its own Node version and is not affected.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 22:37:12 +13:00
Brenda Wallace 3b54fe0d25 Merge pull request #5129 from Growstuff/seed-packet-photo-sides
Label seed packet photos as front or back, and keep them out of crop photos
2026-10-28 22:16:44 +13:00
Brenda Wallace 70827646a4 Merge branch 'main' into seed-packet-photo-sides 2026-10-28 22:10:15 +13:00
Brenda Wallace 10008de917 Merge pull request #5053 from Growstuff/api/graphiti
Replace jsonapi-resources with Graphiti
2026-10-28 22:03:11 +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 f6b8b27a43 feat: Add photo size options and improve layout in PostEditor and PhotoFigure components 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 bb02a61f75 feat: Add photo selection functionality and update UI for CardPhotoDialog 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 e1aaa76143 Merge branch 'main' into seed-packet-photo-sides 2026-10-28 21:01:07 +13:00
Brenda Wallace d2ecb796e6 Merge branch 'main' into api/graphiti 2026-10-28 20:45:11 +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
dependabot[bot] f461fadc70 Bump bullet from 8.3.0 to 8.3.1 in the minor-and-patch group
Bumps the minor-and-patch group with 1 update: [bullet](https://github.com/flyerhzm/bullet).


Updates `bullet` from 8.3.0 to 8.3.1
- [Changelog](https://github.com/flyerhzm/bullet/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/8.3.0...8.3.1)

---
updated-dependencies:
- dependency-name: bullet
  dependency-version: 8.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-28 20:44:30 +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 ac47a92aad feat: add image cleaning functionality before OCR processing 2026-10-28 20:29:19 +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 20fbc7cc31 feat: add result message functionality for packet reading and update UI to display reader output 2026-10-28 20:04:29 +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 1cdcbcb7b7 Merge branch 'main' into api/graphiti 2026-10-28 18:16:29 +13:00
Brenda Wallace c56fa7d40c Merge pull request #5127 from Growstuff/fix-mobile-record-hero-layout-881308012172587192
Fix mobile layout responsiveness on record hero sections
2026-10-28 18:16:02 +13:00
google-labs-jules[bot]andCloCkWeRX 4747f0253d Fix record page hero mobile layout responsiveness
Improve layout flexibility on mobile viewports for record pages (seeds,
plantings, harvests, gardens):
- Reduce grower avatar size on md (56px) and sm (48px) screens
- Set min-width and flex properties on record identity and actions
- Allow parent record location text to wrap on mobile devices

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-10-28 03:00:48 +00: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
dependabot[bot] f0e4ace3d0 Bump hashie from 5.1.0 to 5.2.0 in the minor-and-patch group (#5119)
Bumps the minor-and-patch group with 1 update: [hashie](https://github.com/hashie/hashie).


Updates `hashie` from 5.1.0 to 5.2.0
- [Release notes](https://github.com/hashie/hashie/releases)
- [Changelog](https://github.com/hashie/hashie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hashie/hashie/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: hashie
  dependency-version: 5.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-27 18:04:09 +10:30
Brenda Wallace 1eecf65246 Merge pull request #5111 from Growstuff/feat/more-suggestions
Suggest jobs other gardeners have planned this month
2026-10-27 15:18:18 +13:00
Brenda Wallace ff078009b2 Merge branch 'main' into feat/more-suggestions 2026-10-27 15:12:55 +13:00
Brenda Wallace ed3fcefed2 Merge pull request #5091 from Growstuff/posts/tiptap-editor-page
Richer post editor (first step in modernising posts)
2026-10-27 15:12:00 +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 a6781bf80e Merge remote-tracking branch 'origin/posts/tiptap-editor-page' into posts/tiptap-editor-page 2026-10-27 13:55:23 +13:00
Brenda Wallace 6bebff9251 Merge remote-tracking branch 'origin/main' into posts/tiptap-editor-page 2026-10-27 13:55:01 +13:00