Skip to content

Add automated work intake pipeline for external issue trackers#133

Open
jrchatruc wants to merge 57 commits intomainfrom
feat/automated-intake-pipeline
Open

Add automated work intake pipeline for external issue trackers#133
jrchatruc wants to merge 57 commits intomainfrom
feat/automated-intake-pipeline

Conversation

@jrchatruc
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a polling daemon that monitors external issue trackers (GitHub Issues, with Linear/Jira planned) and automatically dispatches coding agents for matching issues — no manual task creation required
  • Includes admin API endpoints (CRUD, toggle, test-poll, view issues/logs) and frontend UI for managing intake sources
  • Refactors task creation to support programmatic spawning with skip_followup mode for intake tasks to auto-complete

Test plan

  • Configure a GitHub intake source via the Admin UI and verify polling picks up new issues
  • Verify deduplication: the same issue should not spawn duplicate tasks
  • Test global and per-source concurrency limits
  • Test the "test poll" preview from the Admin UI
  • Verify intake tasks auto-complete (skip_followup mode)
  • Check poll log viewer shows correct polling history

🤖 Generated with Claude Code

jrchatruc and others added 21 commits March 5, 2026 17:54
Adds a Symphony-style polling daemon that monitors external issue trackers
(GitHub Issues, with Linear/Jira support planned) and automatically dispatches
coding agents for matching issues — no manual task creation required.

Backend:
- New intake.rs: polling daemon with 30s cycle, GitHub provider, template-based
  prompt building, global + per-source concurrency limits, deduplication
- New intake_admin.rs: 8 admin API endpoints (CRUD, toggle, test-poll, view
  issues/logs)
- Refactored tasks.rs: extracted spawn_task_internal() for programmatic task
  creation, added skip_followup mode for intake tasks to auto-complete
- New DB tables: intake_sources, intake_issues, intake_poll_log
- Config: INTAKE_ENABLED, INTAKE_MAX_GLOBAL_CONCURRENT env vars

Frontend:
- IntakeSourcesSection in Admin page with create/edit dialogs, test-poll
  preview, issue viewer, and poll log viewer
- API client functions for all intake endpoints
Fixes clippy too_many_arguments and needless_borrows_for_generic_args errors.
Backend:
- GET /api/admin/intake/issues: list all intake issues with source name
  and task status joined
- PATCH /api/admin/intake/issues/:id/status: update issue status with
  validation

Frontend:
- New IntakeBoard page with 6 columns (Backlog, Pending, In Progress,
  Review, Done, Failed)
- Drag-and-drop between columns via @hello-pangea/dnd with optimistic
  updates
- Issue cards show title, source, labels, external link, linked task,
  time ago, and error indicator
- Search and source filter controls
- Skeleton loading state, dark mode support
- Added /intake route and admin nav item
Columns now share available space equally instead of being fixed at
320px, so all 6 columns fit on screen without horizontal scrolling.
Cards now display the target repo (monospace, with git icon) alongside
the source name. The source dropdown filter also shows the repo.
- Switch to CSS grid (grid-cols-6) so all columns always fit
- Compact card design with smaller text/padding
- Click a card to open detail dialog showing full issue body,
  external issue link, linked task button, and status change buttons
- Truncate labels to 3 with overflow count
Seed intake_sources, intake_issues, and intake_poll_log tables with
test data covering all 6 statuses. Add Playwright specs for the intake
board (filtering, card dialogs, access control) and admin intake
sources section (source list, issues/logs dialogs, non-admin redirect).
Comprehensive guide covering quick start, architecture, test patterns,
seed data, CI pipeline, code coverage, and Lighthouse audits.
Tests must always hit the real stack (PostgreSQL, Rust backend, Chromium).
Mocking the database or API is explicitly prohibited.
psql -U tekton defaults to a database named "tekton", which doesn't
exist. Adding -d postgres fixes the connection for both the Makefile
target and the docs setup instructions.
- Fix issue count assertion to match actual UI text (no parentheses)
- Use .font-mono locator with toBeAttached for truncated repo names
- Add admin role check to IntakeBoard with redirect to home for non-admins
@fedacking
Copy link
Copy Markdown
Contributor

The custom prompt template field in the Admin UI doesn't surface which placeholders are available — users see a blank textarea with no hints about what they can use. The supported placeholders are:

  • {{number}} — issue number/ID
  • {{title}} — issue title
  • {{body}} — issue body
  • {{url}} — issue URL
  • {{labels}} — comma-separated labels
  • {{repo}} — target repository (owner/repo)

We should make these discoverable in the UI (e.g. helper text, tooltip, or placeholder example in the textarea).

Concurrent container creates could read the same slot from .next_slot
before either process incremented it, resulting in duplicate IPs. Replace
separate next_slot/bump_slot with a single flock-guarded claim_slot that
atomically reads and increments the counter.
writeShellApplication runs shellcheck which rejects single-quoted strings
containing dollar expressions. Switch from `flock FILE bash -c '...'` to
fd-based locking with `flock 9` in a subshell, which avoids the inner
script string entirely.
fedacking and others added 26 commits March 18, 2026 16:28
Polling now only creates backlog issues (no tasks spawned). Users
promote issues to pending via the Kanban board, and the daemon picks
them up when concurrency slots are available. Concurrency slots are
held by task_created + review statuses and freed by done/failed.

- Add prompt column to intake_issues, store built prompt at poll time
- Change default intake status from pending to backlog
- Add process_pending_issues() that spawns tasks for pending issues
- Enforce status transition rules server-side and client-side
- Clear task_id/error_message when retrying failed issues
- Show concurrency slot usage in IntakeBoard header
…leted

Tasks go through awaiting_followup before completed. The intake issue
should move to review as soon as the task is done working, not after
the user has already marked the task complete.
Adds a review → done transition in sync_intake_statuses so that
intake issues are automatically marked done when the user completes
the associated task.
- Redirect non-admin users from /intake immediately (wait for auth
  check before rendering)
- Add test-only endpoints for intake sync and status updates
- Add intake-sync e2e spec with seed data
- Build frontend before running e2e tests in Makefile
- Add serial e2e tests for create, edit, and delete intake sources
- Add make e2e.debug E2E_TEST='name' target for debugging single tests
- Refactor e2e setup (postgres + test DB) into shared e2e.setup prerequisite
Remove --reporter=text-summary override so nyc uses all reporters
configured in .nycrc.json (text, text-summary, and html).
- Add e2e tests for intake board: label badges, dialog close, status
  change via dialog buttons, slots-in-use indicator, issue body display
- Add e2e tests for admin intake: toggle enabled/disabled, test poll
  dialog, close buttons, status badges, column headers
- Add labels to intake issue seed data for label rendering coverage
- Fix getByText multi-match failures across audit-log, responsive, and
  new intake tests by scoping to roles/locators (label, columnheader,
  heading, span.rounded-full, data-testid)
- Add data-testid="dialog-footer" to DialogFooter component
- Document getByText pitfall in docs/e2e-testing.md Common Pitfalls
The intake source form previously asked for a separate GitHub token.
This was unnecessary since the system already stores each user's
GitHub token from OAuth login. Now the intake system uses the
run_as_user's token from the users table for polling and test polls.
@jrchatruc jrchatruc force-pushed the feat/automated-intake-pipeline branch from f4fbd1e to 8cb9283 Compare March 30, 2026 17:32
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.

2 participants