Add automated work intake pipeline for external issue trackers#133
Open
Add automated work intake pipeline for external issue trackers#133
Conversation
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.
…mated-intake-pipeline
…mated-intake-pipeline
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
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:
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.
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.
…viders in intake source forms
…ambdaclass/tekton into feat/automated-intake-pipeline
…remove select-none from labels
- 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.
f4fbd1e to
8cb9283
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
skip_followupmode for intake tasks to auto-completeTest plan
🤖 Generated with Claude Code