Commit Graph
13034 Commits
Author SHA1 Message Date
Brenda Wallace a3a2006ed9 Wrap long job names on the notepad, clip very long ones (#5079)
* Add responsive styling to notepad name for better text handling

* Add notepad-pill mixin for consistent styling of job chips
2026-10-25 17:59:07 +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 a79f24cf5e Refactor API controllers and specs for improved request handling and error responses 2026-10-25 18:44:05 +13:00
Brenda Wallace 142052a2db Merge remote-tracking branch 'origin/main' into api/graphiti 2026-10-25 18:40:09 +13:00
Daniel O'Connor 4271f41340 Drop to 2 seconds 2026-10-25 18:26:37 +13:00
google-labs-jules[bot]andCloCkWeRX 0494796e86 Fade out flash messages 3s after user interaction
Automatically fade out flash alert messages 3 seconds after the user begins interacting with content (scroll, touch, click, keydown, focusin). Following UX best practices, the auto-dismiss timer is paused while the user hovers over or focuses inside the alert notification itself.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-10-25 18:26:37 +13:00
Brenda Wallace 759b5290fa Merge branch 'main' into api/graphiti 2026-10-25 15:36:13 +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 7dcd1ef5b3 Refactor notepad menu and day styles for improved layout and alignment 2026-10-25 13:01:02 +13:00
Brenda Wallace 733961b27e Enhance notepad due date styling with button-like appearance and hover effects 2026-10-25 13:01:02 +13:00
Brenda Wallace ddd9277696 Refactor CSRF token handling in job ideas and notepad scripts; improve rendering of notepad groups 2026-10-25 13:01:02 +13:00
Brenda Wallace d03f81d1c8 Add functionality to hide completed jobs in notepad and update styles 2026-10-25 13:01:02 +13:00
Brenda Wallace 1135c763de Tidy API resources: read_only and owned macros, private hook helpers
Declare read-only resources and the owner relationship once each, make
the resource hook helpers private, simplify token auth, and cache the
generated API docs for an hour.
2026-10-25 11:48:28 +13:00
Brenda Wallace 086140205d fixing authorize in the APi 2026-10-25 11:44:02 +13:00
Brenda Wallace ed8eded23b Merge remote-tracking branch 'origin/main' into api/graphiti 2026-10-25 11:24:34 +13:00
Daniel O'Connorandgoogle-labs-jules[bot] d46ade4722 Replace deprecated SimpleCov.add_filter with SimpleCov.skip (#5068)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-24 05:56:47 +00:00
Brenda Wallace e711ae9e9a Add admin and crops current section tracking to menu and update header specs for crop wranglers 2026-10-24 18:40:10 +13:00
Brenda Wallace 7a9fa0de11 Add job-templates-table class to job templates tables for styling consistency 2026-10-24 18:40:10 +13:00
Brenda Wallace c830624a75 Crop job admin 2026-10-24 18:40:10 +13:00
Brenda Wallace f2e437dedc Add creator reference to crop job templates migration 2026-10-24 18:40:10 +13:00
Brenda Wallace bd4a55331e admin screen for crop job templates 2026-10-24 18:40:10 +13:00
Brenda Wallace e7387a37e0 Add API tests for dashed keys, resource ownership, and write operations
- Implement tests for handling dashed attribute names in API responses and requests in `dashed_keys_request_spec.rb`.
- Enhance error handling tests in `errors_request_spec.rb` for invalid filters and attributes.
- Refactor garden, harvest, and seed request specs to use shared examples for resource write operations.
- Introduce shared examples in `api_writes.rb` to streamline testing of create, update, and delete actions across various resources.
- Update pagination and sorting tests to include new scenarios for offsets and computed attributes.
- Remove redundant code and improve test clarity by utilizing shared contexts and helper methods.
2026-10-24 18:19:11 +13:00
Brenda Wallace 200514c5cc Refactor API controllers and resources to remove redundant resource_class assignments and improve parameter handling in API documentation 2026-10-24 18:19:11 +13:00
Brenda Wallace 27794dcb38 Remove Swagger helper configuration file 2026-10-24 18:19:11 +13:00
Brenda Wallace c87a164b0a Refactor code structure for improved readability and maintainability 2026-10-24 18:19:11 +13:00
Brenda Wallace 73f62d4983 Add API resources for photos, plantings, and seeds; update application configuration
- Introduced `PhotoResource`, `PlantingResource`, and `SeedResource` to manage respective models.
- Updated application configuration to include API base URL.
- Modified production and test environments to set API base URL dynamically.
- Removed outdated JSONAPI resources initializers and patches.
- Refactored routes to use resourceful routing for API endpoints.
- Updated request specs to reflect changes in API responses and relationships.
- Added helper methods for generating related links in request specs.
2026-10-24 18:19:11 +13:00
Brenda Wallace 07612ff385 Add API request specs for filtering, pagination, sorting, and relationships 2026-10-24 18:19:11 +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
Brenda Wallace 8e0825b1b0 Add job finished event handling and descriptions
- Implemented event description logic for finished jobs in EventHelper.
- Created a new partial for finished job descriptions.
- Updated TimelineService to include finished jobs in event queries.
- Enhanced specs for event descriptions and timeline service to cover finished jobs.
2026-10-24 17:48:57 +13:00
Brenda Wallace 0f0de4f0fd Update Ruby to 4.0.9 2026-10-24 17:31:23 +13:00
7d2a1cf0ed Update Node.js engine requirement to 24.x in package.json (#5047)
* Update Node.js engine requirement to 24.x in package.json

* Use Node.js 24 in Docker image

Co-authored-by: Br3nda <12266+Br3nda@users.noreply.github.com>

* Add Copilot

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-10-24 04:17:16 +00:00
d491df87fc Filter deleted members by default and enable bulk ban on admin members (#5060)
* Filter deleted members by default and enable bulk ban on admin members

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

* Drop instagram

* Default sort

* Update specs

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-24 14:30:50 +10:30
e0b24f860b Add rel=nofollow to member website link when member has no plantings (#5056)
* Add rel=nofollow to member website link when member has no plantings

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

* Add rel=nofollow to member website and other URL links when user has no plantings

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

* Remove low value coverage

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-24 13:47:00 +10:30
Brenda Wallace b5a46fe2f2 Enhance job notepad functionality with date management and improved UI for done tasks 2026-10-24 15:53:33 +13:00
Brenda Wallace 168e394150 Expands "Friends and Neighbours" to 300 items release99 2026-10-24 15:43:19 +13:00
Brenda Wallace d62125e4f5 Add world neighbours feature for job suggestions based on latitude 2026-10-24 15:29:17 +13:00
Daniel O'Connorandgoogle-labs-jules[bot] ad74235b95 Make flash messages sticky when page is scrolled (#4999)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-24 12:40:18 +10:30
Brenda Wallace 0d24f5c27d Drop the byebug (#5052) 2026-10-24 12:08:27 +10:30
google-labs-jules[bot]andCloCkWeRX a9849a7e50 Redirect comments actions to commentable with #comments anchor
Update CommentsController create, update, and destroy actions to redirect to
the commentable resource path with the #comments anchor tag. Also update
CommentsController spec assertions to expect the #comments anchor tag on
redirection.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-10-24 11:27:58 +10:30
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
Daniel O'Connorandgoogle-labs-jules[bot] 7cdfc1b1f1 Set default hyperlink on planting chip actions menu toggle (#4961)
Pass the planting view URL to ActionsMenu in PlantingChip and accept
an optional href prop in ActionsMenu so middle/ctrl clicks open the
planting view in a new tab.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-24 00:38:32 +10:30
dependabot[bot]andDaniel O'Connor c80225c4bc Bump rails from 8.1.3.1 to 8.1.4 (#4856)
* Bump rails from 8.1.3.1 to 8.1.4

Bumps [rails](https://github.com/rails/rails) from 8.1.3.1 to 8.1.4.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v8.1.3.1...v8.1.4)

---
updated-dependencies:
- dependency-name: rails
  dependency-version: 8.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Drop stale expectation

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-10-24 00:00:34 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] dc821b28ac Add missing en.layouts.menu translation keys (#5006)
Add missing translation keys under the `en.layouts.menu` namespace in
`config/locales/en.yml` for navigation links used in `app/views/layouts/_menu.haml`.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-23 23:42:10 +10:30
3e0ef4ff8c Use site_name in Devise signup/welcome email subjects (#553) (#5007)
- Subclass Devise::Mailer as DeviseMailer overriding subject_for to pass site_name option.
- Configure config.mailer = 'DeviseMailer' and config.mailer_sender in Devise initializer using GROWSTUFF_SITE_NAME env var.
- Update Devise locale subject strings in config/locales/devise.en.yml to use %{site_name}.
- Add spec/mailers/devise_mailer_spec.rb to verify subject interpolation.

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-23 23:34:53 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] af40114ab8 Fix race condition in gardens_spec.rb feature tests (#5038)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-23 23:09:37 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] dd649f428e Update @percy/cli and fast-xml-parser dependencies (#5037)
Update @percy/cli to ^1.32.12 in package.json and update yarn.lock, ensuring fast-xml-parser transitive dependency requirement (^4.4.1) from @percy/core is satisfied with the updated version.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-23 22:58:19 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] f1da4a38eb Fix navbar drawer media query for medium screen sizes (#5005)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-23 22:38:48 +10:30
Daniel O'Connor 149c2171f4 Doubled key (#5036) 2026-10-23 22:31:24 +10:30
Brenda Wallace bbb8a142c7 widening the range for suggsting jobs (#5034)
* 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.

* Add ApplyCropJobTemplate service and for_crop scope to CropJobTemplate model

* 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.

* Add PlantedLastYear service and update JobIdeas to include it

* Add action attribute to Job model and update related files

* Refactor JobIdeas service: replace LastYear and PlantedLastYear with PastJobs and PastPlantings; update related specs

* Add community and nearby job ideas sources; implement shown and more methods in JobIdeas service

* Implement job idea dismissal duration and snooze functionality; add hidden_until attribute and related specs

* Add Harvest class to JobIdeas service for managing harvest-related job ideas; implement ideas generation and related specs

* Add JobIdeas feature: implement JobIdeasController, views, and related services for job suggestions; include functionality for adding, hiding, and snoozing job ideas

* Refactor button options in job ideas view for improved readability and maintainability

* Enhance Job Ideas feature: add styling for idea cards, implement filtering options, and update controller logic to manage skipped sources; improve localization for job idea reasons and sections

* Add job ideas count and badge display; implement helper methods and update views for better visibility of job ideas

* Enhance Job Ideas feature: add UI elements for job suggestions, implement schedule display for template jobs, and improve localization; update related specs for new functionality

* Enhance Job Ideas feature: implement overlay for job suggestions, add animations for job transitions, and improve UI components; update controller and helper methods for better handling of job ideas

* Refactor Job Ideas feature: remove badge display and related tests; update UI components for better layout and visibility of job suggestions

* Refactor Jobs view and update specs: improve layout for job groups and enhance test coverage for jobs index with ideas

* Refactor Job Ideas feature: replace dismiss! with hide! method, update job count logic, and enhance UI components for better visibility and layout

* Add job ideas feature: implement ideas banner on homepage, enhance overlay logic, and add tests for job ideas display

* widen the range for suggseting jobs

* Fix comment to accurately describe planted crops timeframe in PastPlantings class
2026-10-23 22:24:12 +10:30
Brenda Wallace ff1dd8bb05 adding coverage 2026-10-23 21:34:33 +13:00