Fix public services page filtering and messaging thread detail #16

Closed
opened 2026-02-09 21:05:01 +00:00 by mik-tf · 3 comments
Owner

Problem 1: Public Services Page Empty

The public "Human Energy Services" page at /marketplace/services is empty despite having service listings in hero_osis.

Root Cause

In src/controllers/marketplace.rs (line ~900), the services handler filters products by:

category_id == "service" || category_id == "application"

But all hero_osis listings have category_id = "compute". The seed script needs to create listings with category_id = "service" and "application", and/or the filter logic needs to be reviewed.

Fix

  1. Update seed script to create listings with correct category_id values ("service", "application", "compute")
  2. Verify the marketplace services page filters match actual data categories
  3. Ensure the public services grid renders correctly with real data

Problem 2: Messaging Thread Detail Empty

Message threads appear in the list, but clicking a thread shows empty conversation.

Root Cause

Thread-to-message association uses thread_id field, but there is a mismatch between the thread IDs stored in threads vs the thread_id field in messages in hero_osis.

Fix

  1. Verify message querying uses correct thread_id association
  2. Ensure seed script creates messages with matching thread_id references
  3. Fix the message detail handler to properly query messages for a thread
  4. Test send/reply functionality

Acceptance Criteria

  • Public services page shows service-type listings
  • Public applications page shows application-type listings
  • Clicking a message thread shows the conversation messages
  • Sending a reply adds a message to the thread
  • Seed script creates data with correct category_id values

Dependencies

  • Can be done independently or after #10-#13
  • Affects seed script (scripts/seed-hero-osis.sh)
## Problem 1: Public Services Page Empty The public "Human Energy Services" page at `/marketplace/services` is empty despite having service listings in hero_osis. ### Root Cause In `src/controllers/marketplace.rs` (line ~900), the services handler filters products by: ```rust category_id == "service" || category_id == "application" ``` But all hero_osis listings have `category_id = "compute"`. The seed script needs to create listings with `category_id = "service"` and `"application"`, and/or the filter logic needs to be reviewed. ### Fix 1. Update seed script to create listings with correct `category_id` values ("service", "application", "compute") 2. Verify the marketplace services page filters match actual data categories 3. Ensure the public services grid renders correctly with real data ## Problem 2: Messaging Thread Detail Empty Message threads appear in the list, but clicking a thread shows empty conversation. ### Root Cause Thread-to-message association uses `thread_id` field, but there is a mismatch between the thread IDs stored in threads vs the `thread_id` field in messages in hero_osis. ### Fix 1. Verify message querying uses correct thread_id association 2. Ensure seed script creates messages with matching thread_id references 3. Fix the message detail handler to properly query messages for a thread 4. Test send/reply functionality ## Acceptance Criteria - [ ] Public services page shows service-type listings - [ ] Public applications page shows application-type listings - [ ] Clicking a message thread shows the conversation messages - [ ] Sending a reply adds a message to the thread - [ ] Seed script creates data with correct category_id values ## Dependencies - Can be done independently or after #10-#13 - Affects seed script (`scripts/seed-hero-osis.sh`)
Author
Owner

Public services page uses services.products.search_products_advanced(). Messaging uses services.messaging.* for all public handlers.

Public services page uses services.products.search_products_advanced(). Messaging uses services.messaging.* for all public handlers.
Author
Owner

Reopened — remaining work

Remaining bypasses in messaging.rs:

  • 12x UserPersistence calls for message thread operations

These should be rewired to use services.messaging.* — the MessagingManager trait already has all needed methods (get_threads, get_thread_messages, create_thread, send_message, mark_thread_read).

## Reopened — remaining work Remaining bypasses in messaging.rs: - 12x `UserPersistence` calls for message thread operations These should be rewired to use `services.messaging.*` — the MessagingManager trait already has all needed methods (get_threads, get_thread_messages, create_thread, send_message, mark_thread_read).
Author
Owner

archived repo, closing

archived repo, closing
Commenting is not possible because the repository is archived.
No description provided.