Skip to content

feat: render board and lane filters from lane configuration#433

Merged
joryirving merged 3 commits into
mainfrom
feat/configurable-lane-ui
Jun 18, 2026
Merged

feat: render board and lane filters from lane configuration#433
joryirving merged 3 commits into
mainfrom
feat/configurable-lane-ui

Conversation

@joryirving

Copy link
Copy Markdown
Contributor

Closes #386

- Update work-summary API to use getConfiguredLanes() instead of VALID_LANES
- Update groom API escalate action to use getEscalationLane()
- Add lane filter support to issues API route and board page
- Add lane dropdown to FilterBar component with non-claimable labels
- Add lane badge to IssueCard using configured title, color, and claimable state
- Wire lane config through KanbanBoardClient -> KanbanBoard -> IssueCard
- Fix hardcoded backlog checks in reconcile and next-task routes
its-saffron[bot]

This comment was marked as outdated.

- Normalize hex colors in issue-card lane badge (handle with/without #)
- Return 400 for invalid lane query param on /api/issues
- Add tests for lane badge rendering and invalid lane filter
- Add FilterBar lane filter tests
its-saffron[bot]

This comment was marked as outdated.

- Add authorizeRequest to GET /api/issues before query parsing
- Add authorizeRequest to GET /api/agents/[agentName]/work-summary
- Both routes return 401 for unauthorized requests
- Unauthorized requests short-circuit (no DB calls)
- Add auth tests: 401 no header, 401 bad token, authorized behavior,
  short-circuit verification, and invalid lane still returns 400 after auth

@its-saffron its-saffron Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Automated Review (incremental)

Incremental review: reviewed the changes since the last managed review; unresolved findings from that review are carried forward.

Analysis engine: MiniMax-M2.7@https://litellm.jory.dev/v1 (anthropic) — routed smart (risk match: public_route_changes)

Review Summary

Recommendation: Approve

This PR adds route-level authorization to two API endpoints that previously lacked it, tightening access controls rather than exposing new endpoints.


Change-by-Change Findings

1. src/app/api/issues/route.ts — Authorization Added

  • Added authorizeRequest guard at the top of the GET handler
  • Returns 401 Unauthorized when no valid auth token/cookie is present
  • The authorizeRequest helper (from @/lib/auth) supports all configured auth modes: Basic Auth, Bearer token (DISPATCH_AGENT_TOKEN), and OIDC session cookies
  • No new query parameters or request shape changes; auth is additive

2. src/app/api/agents/[agentName]/work-summary/route.ts — Authorization Added

  • Same authorizeRequest guard pattern applied
  • Consistent 401 response for unauthorized requests
  • No behavioral changes to the existing query logic

3. Test Coverage (route.test.ts files)

  • Both test suites now include explicit auth-negative cases: missing Authorization header, wrong bearer token
  • Verifies Prisma queries are NOT called on unauthorized requests (defense-in-depth)
  • Existing positive cases preserved to confirm normal operation continues

Standards Compliance

Standard Status
API routes return appropriate HTTP status codes ✅ 401 returned for auth failures
Error handling via error instanceof Error pattern ✅ Not applicable to auth guard
No new endpoints introduced ✅ Auth is additive, not expansive

The authorizeRequest helper is the repository's canonical auth gate and is used consistently across other API routes (e.g., groom/route.ts, reconcile/route.ts as shown in tool harness reads). This PR extends that pattern uniformly.


Linked Issue Fit

PR body references "Closes PR 386". The diff adds authorization to issue listing and work-summary endpoints, which are foundational API routes. Without full issue PR 386 body, the intent appears to be securing these read endpoints that return issue data — consistent with a feature adding configurable lane UI rendering, where both the UI and its backing APIs should require authentication.


Evidence Provider Findings

No evidence providers configured for this PR.


Tool Harness Findings

The incremental diff was verified against the actual source files:

File Authorization Present
src/app/api/issues/route.ts authorizeRequest check added
src/app/api/agents/[agentName]/work-summary/route.ts authorizeRequest check added
src/app/api/issues/groom/route.ts ✅ Already had auth (not modified in diff)
src/app/api/issues/reconcile/route.ts ✅ Already had auth (not modified in diff)

Required Checks — Explicit Results

Check Result
verify route access controls are in place ✅ VERIFIED — Both modified endpoints (GET /api/issues, GET /api/agents/[agentName]/work-summary) now enforce authorizeRequest. Test files confirm 401 responses for missing/invalid credentials and verify no database queries execute without auth.
check for unintended public endpoints ✅ VERIFIED — No new endpoints introduced. All changes are additive auth guards on existing routes. No endpoint was changed from protected to public.

Unknowns / Needs Verification

None identified. CI passed (Docker Build, Validate), auth patterns are consistent with the repository's established authorizeRequest helper, and test coverage explicitly validates auth rejection paths.

@joryirving joryirving merged commit 5075fb9 into main Jun 18, 2026
3 checks passed
@joryirving joryirving deleted the feat/configurable-lane-ui branch June 18, 2026 02:29
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.

feat: render board and lane filters from lane configuration

1 participant