Add outbound lead direction to items (book-donation search stream) #2

Open
pyr0ball wants to merge 0 commits from feat/book-donation-chorus-search into main
Owner

Summary

  • Adds a direction field (inbound/outbound) to items, alongside a parallel OUTBOUND_STAGES set (New → Reviewed → Outreach Drafted → Outreach Sent → Replied → Pickup Scheduled → Picked Up → Logged in Bookmark), validated the same way the existing type-based stages are.
  • Adds a leads-found Discord channel mapped to modality lead_found, so Donna can flag a manually-forwarded screenshot as "I found this" instead of "someone sent this to me" using the existing manual-share pattern — no new bot commands or UI.
  • Threads direction through the full ping-embed build/parse cycle, manual_share.py/thread_ingest.py/backend_client.py, and the backend model/schema/crud, defaulting to inbound everywhere for full backward compatibility with existing items and embeds.
  • Companion work on the Magpie side (already merged there) posts Reddit/Lemmy book-donation leads into this same #inbox pipeline via a Discord webhook using the same embed field contract.

Design doc: circuitforge-plans/books-in-hand/superpowers/specs/2026-07-13-chorus-magpie-book-search-design.md
Implementation plan: circuitforge-plans/shared/superpowers/plans/2026-07-13-chorus-magpie-book-search-plan.md

Known follow-up

  • books-in-hand/chorus#1: ItemModal.vue is not yet direction-aware, so outbound leads can't be advanced past new through the actual triage UI yet (only via direct API calls). Filed as a separate issue, not a blocker for this PR since the frontend wasn't touched here.

Deploy note

This repo has no migration tooling (Base.metadata.create_all only, no Alembic). Any already-running chorus.db needs either a manual ALTER TABLE items ADD COLUMN direction VARCHAR NOT NULL DEFAULT 'inbound' or a fresh DB before this deploys — confirmed no such file exists in this repo currently, so this is a note for whoever deploys next, not a blocker.

Test plan

  • bot/ suite: 18/18 passing
  • backend/ suite: 28/28 passing
  • Manual: create the leads-found Discord channel and verify a forwarded screenshot creates an outbound item
  • Manual: verify a Magpie-posted lead (once its webhook is configured) creates an outbound item via the same path
## Summary - Adds a `direction` field (`inbound`/`outbound`) to items, alongside a parallel `OUTBOUND_STAGES` set (New → Reviewed → Outreach Drafted → Outreach Sent → Replied → Pickup Scheduled → Picked Up → Logged in Bookmark), validated the same way the existing type-based stages are. - Adds a `leads-found` Discord channel mapped to modality `lead_found`, so Donna can flag a manually-forwarded screenshot as "I found this" instead of "someone sent this to me" using the existing manual-share pattern — no new bot commands or UI. - Threads `direction` through the full ping-embed build/parse cycle, `manual_share.py`/`thread_ingest.py`/`backend_client.py`, and the backend model/schema/crud, defaulting to `inbound` everywhere for full backward compatibility with existing items and embeds. - Companion work on the Magpie side (already merged there) posts Reddit/Lemmy book-donation leads into this same `#inbox` pipeline via a Discord webhook using the same embed field contract. Design doc: `circuitforge-plans/books-in-hand/superpowers/specs/2026-07-13-chorus-magpie-book-search-design.md` Implementation plan: `circuitforge-plans/shared/superpowers/plans/2026-07-13-chorus-magpie-book-search-plan.md` ## Known follow-up - books-in-hand/chorus#1: `ItemModal.vue` is not yet direction-aware, so outbound leads can't be advanced past `new` through the actual triage UI yet (only via direct API calls). Filed as a separate issue, not a blocker for this PR since the frontend wasn't touched here. ## Deploy note This repo has no migration tooling (`Base.metadata.create_all` only, no Alembic). Any already-running `chorus.db` needs either a manual `ALTER TABLE items ADD COLUMN direction VARCHAR NOT NULL DEFAULT 'inbound'` or a fresh DB before this deploys — confirmed no such file exists in this repo currently, so this is a note for whoever deploys next, not a blocker. ## Test plan - [x] `bot/` suite: 18/18 passing - [x] `backend/` suite: 28/28 passing - [ ] Manual: create the `leads-found` Discord channel and verify a forwarded screenshot creates an outbound item - [ ] Manual: verify a Magpie-posted lead (once its webhook is configured) creates an outbound item via the same path
pyr0ball added 5 commits 2026-07-13 19:10:14 -07:00
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/book-donation-chorus-search:feat/book-donation-chorus-search
git checkout feat/book-donation-chorus-search

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff feat/book-donation-chorus-search
git checkout feat/book-donation-chorus-search
git rebase main
git checkout main
git merge --ff-only feat/book-donation-chorus-search
git checkout feat/book-donation-chorus-search
git rebase main
git checkout main
git merge --no-ff feat/book-donation-chorus-search
git checkout main
git merge --squash feat/book-donation-chorus-search
git checkout main
git merge --ff-only feat/book-donation-chorus-search
git checkout main
git merge feat/book-donation-chorus-search
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: books-in-hand/chorus#2
No description provided.