13047 Commits
Author SHA1 Message Date
Daniel O'Connorandgoogle-labs-jules[bot] 5b5b5b855e I have resolved the issue where toggling "Hide Completed" re-rendered the full page layout (#5097). (#5146)
When clicking "Hide Completed" on the jobs notepad, an AJAX GET request was sent without an explicit 'Accept: text/html' header. Rails evaluated `request.format` as non-HTML, causing `JobsController#notepad?` to return `false` and falling back to `respond_with` rendering the full page layout inside the notepad groups element.

Here is a summary of the changes:
1. Added the 'Accept: text/html' header to transmit in `job_notepad.js`.
2. Updated `JobsController#notepad?` to treat XHR requests for the current member's jobs as notepad requests.
3. Added unit tests in `job_notepad.test.js` for the "Hide Completed" action.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-30 08:40:09 +10:30
Daniel O'Connor ca92fc1a9d Fix ruby version in codespaces (#5145) 2026-10-29 22:41:46 +10:30
77f151d344 Add Shareon social share component to posts#show (#5143)
* Add Shareon social share component to posts#show for logged in users

- Install shareon npm package
- Add shareon JS module and stylesheet imports
- Render .shareon container with requested share links on posts#show for logged in users
- Add unit and view spec tests

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

* Add Shareon social share component to posts#show for logged in users

- Install shareon npm package
- Add shareon JS module and stylesheet imports
- Render .shareon container with requested share links on posts#show for logged in users
- Add unit and view spec tests

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-29 21:51:47 +10:30
Brenda Wallace a757d0bb30 Merge pull request #5140 from Growstuff/seed-packet-sheet
Show a seed's facts beside its packet, with the source as a ribbon
2026-10-29 19:00:59 +13:00
Brenda Wallace 240de4fac2 Refactor seed editing and display components
- Replace the modal dialog for editing seed details with an inline form within the packet sheet.
- Introduce a new partial for edit fields to streamline the editing process.
- Update the seed facts display to utilize a new fact row partial for better organization and readability.
- Implement a packet panel to show packet photos and text side by side, enhancing the user interface.
- Modify the hero section to include source information as a ribbon or badge based on the presence of a photo.
- Adjust tests to reflect changes in the editing process and the new layout of the seed show page.
2026-10-29 18:59:55 +13:00
Brenda Wallace 7ee99dd045 Merge pull request #5139 from Growstuff/ocr-script-upload
Let the OCR script save packet text, and show it on the seed page
2026-10-29 18:30:42 +13:00
Brenda Wallace 86515141ee Add OCR functionality for seed packet photos and display packet text on seed page
- Implemented Dockerfile for OCR processing with necessary dependencies.
- Enhanced read_packets.py to read and save text from seed packet photos.
- Created requirements.txt for Python dependencies.
- Updated show.html.haml to display OCR results when available.
- Added tests for displaying packet text on seed pages, including handling of markup.
2026-10-29 12:12:54 +13:00
Brenda Wallace 1a8da23e08 Merge pull request #5134 from Growstuff/photos-api-packet-ocr
Let the OCR script read packet photos from the API
2026-10-29 10:14:37 +13:00
Brenda Wallace ac93658878 Merge branch 'main' into photos-api-packet-ocr 2026-10-29 10:08:17 +13:00
Daniel O'Connorandgoogle-labs-jules[bot] 540c540576 Preserve scientific names when editing crops (#5137)
- Remove scientific name fields from crop edit form (retaining for new crop request only)
- Remove recreate_names('sci_name', 'scientific') from CropsController#update
- Add and update specs to verify scientific names and their metadata remain intact on crop update

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-29 07:30:43 +10:30
Brenda Wallace 8751453f54 Merge pull request #5135 from Growstuff/seed-packet-text-api
Let the OCR script save the text from a seed packet
2026-10-29 08:10:20 +13:00
Brenda Wallace b74f8a6614 Merge branch 'main' into photos-api-packet-ocr 2026-10-29 08:04:09 +13:00
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 Wallace 4d53b24e9a Enhance photo and seed resources with new attributes and filters
- Added `label` computed attribute to `PhotoResource` to indicate the side of the seed packet.
- Introduced `needs_ocr` filter in `PhotoResource` to identify photos awaiting OCR processing.
- Updated `SeedResource` to associate photos with seeds.
- Modified `photos_request_spec` to include seed relationships and test for photo labels.
- Added filtering tests for photos needing OCR in `photos_request_spec`.
- Removed obsolete Rake task for listing photos needing OCR.
- Updated `read_packets.py` to fetch photos needing OCR from the API.
2026-10-28 23:20:42 +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