Skip to content

Add Ingestion Management under Operation section#1

Merged
bahattincinic merged 2 commits intomainfrom
ingestion-operation-handlers
Mar 3, 2026
Merged

Add Ingestion Management under Operation section#1
bahattincinic merged 2 commits intomainfrom
ingestion-operation-handlers

Conversation

@emsorkun
Copy link

Summary

  • Adds a new Operation > Ingestion page to the backoffice for managing ingestion settings — a key BAU workflow previously done via raw cURL commands.
  • Four tabs: Client Ingestion (enable/disable + priority via Genesis API), Brand Ingestion (enable/disable via Genesis API), Channel Schedule (start time via Hodor API), and Trigger Workflow (manual ingestion dispatch via Hodor API) with a confirmation dialog.
  • Current ingestion status is displayed read-only before any action — pulled from PostgreSQL via raw SQL for clients/channels (ingestions_enabled, ingestion_priority, ingestion_start_time). These columns exist in the DB but are not in the Prisma schema since they're managed by Genesis/Hodor.
  • Reusable SearchableSelect component replaces raw ID inputs with typeahead name-based dropdowns for better usability.
  • Client detail page (client-form.tsx) now shows an Ingestion Status badge.

New files

File Purpose
src/lib/external-apis.ts Genesis + Hodor API request helpers
src/components/searchable-select.tsx Reusable typeahead dropdown
src/app/dashboard/ingestion/page.tsx Ingestion Management page (4 tabs)
src/app/api/ingestion/status/route.ts Read-only ingestion status via raw SQL
src/app/api/ingestion/clients/[id]/route.ts Proxy → Genesis PATCH
src/app/api/ingestion/brands/[id]/route.ts Proxy → Genesis PUT
src/app/api/ingestion/channel-schedules/route.ts Proxy → Hodor PATCH
src/app/api/ingestion/trigger/route.ts Proxy → Hodor POST

Env vars required

  • GENESIS_API_URL (defaults to https://genesis.growdash.xyz)
  • HODOR_API_URL (defaults to https://hodor.growdash.xyz)

Test plan

  • Verify the Ingestion item appears under Operation in the sidebar
  • Client Ingestion tab: select a client, verify current status loads, toggle enabled/priority, submit
  • Brand Ingestion tab: select a brand, toggle enabled, submit
  • Channel Schedule tab: verify current schedules table populates, update a channel's start time
  • Trigger Workflow tab: select channels/entities/clients, trigger with confirmation dialog
  • Client detail page: verify Ingestion Status badge shows on existing clients
  • Verify no regressions on other pages (options API untouched)

Made with Cursor

Introduces a new Operation > Ingestion page for managing ingestion
settings across clients, brands, channels, and manual workflow triggers.

- Sidebar: new "Operation" nav group with Ingestion item
- Ingestion page with 4 tabs:
  - Client Ingestion: searchable client dropdown, current status from DB,
    toggle enabled/disabled + priority (proxies to Genesis PATCH)
  - Brand Ingestion: searchable brand dropdown, toggle enabled/disabled
    (proxies to Genesis PUT)
  - Channel Schedule: current schedules table from DB, update start time
    per channel (proxies to Hodor PATCH)
  - Trigger Workflow: multi-select channels/entities/clients, branch IDs,
    delay, with confirmation dialog (proxies to Hodor POST)
- API proxy routes for Genesis (auth-aware) and Hodor (internal)
- Dedicated /api/ingestion/status endpoint using raw SQL to read
  ingestion columns managed by external services (not in Prisma schema)
- Reusable SearchableSelect component for typeahead dropdowns
- Client detail page shows read-only ingestion status badge

Env vars: GENESIS_API_URL, HODOR_API_URL

Co-authored-by: Cursor <cursoragent@cursor.com>
@railway-app
Copy link

railway-app bot commented Feb 25, 2026

This PR was not deployed automatically as @emsorkun does not have access to the Railway project.

In order to get automatic PR deploys, please add @emsorkun to your workspace on Railway.

@bahattincinic bahattincinic merged commit b03e1cc into main Mar 3, 2026
1 check failed
@bahattincinic bahattincinic deleted the ingestion-operation-handlers branch March 3, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants