Skip to content

Dev#93

Merged
kasin-it merged 22 commits into
mainfrom
dev
Jun 18, 2026
Merged

Dev#93
kasin-it merged 22 commits into
mainfrom
dev

Conversation

@kasin-it

@kasin-it kasin-it commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added ticket runs view showing all workflow runs for a Jira ticket with cost, token, and outcome rollups
    • Introduced spotlight search (⌘K) with ticket deduplication and suggested results
    • Added time window selection (24h, 7d, 30d, all) for dashboard metrics
    • Added automatic PR link comments on Jira tickets
  • Improvements

    • Enhanced cost and token tracking with persistent step records
    • Improved cache token accounting for Claude API
  • Documentation

    • Updated setup to use Neon Postgres instead of Upstash Redis
    • Added Neon initialization guide for database setup

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-workflow-app (ai-workflow-demo) Ready Ready Preview, Comment Jun 18, 2026 10:32am
ai-workflow-app-dashboard Ready Ready Preview, Comment Jun 18, 2026 10:32am

Request Review

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fe4b00e1-c94d-4157-89e8-f30dc0c62691

📥 Commits

Reviewing files that changed from the base of the PR and between a315824 and b5978a0.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (140)
  • .claude/learnings.md
  • .claude/skills/init-agent/SKILL.md
  • .claude/skills/init-env/SKILL.md
  • .claude/skills/init-jira/SKILL.md
  • .claude/skills/init-neon/SKILL.md
  • .claude/skills/init-slack/SKILL.md
  • .claude/skills/init-slack/references/slash-commands.md
  • .claude/skills/init-upstash/SKILL.md
  • .claude/skills/init-vcs/SKILL.md
  • .github/workflows/ci.yml
  • .github/workflows/e2e.yml
  • README.md
  • SETUP.md
  • apps/dashboard/app/(cockpit)/cockpit-shell.tsx
  • apps/dashboard/app/(cockpit)/cost/page.tsx
  • apps/dashboard/app/(cockpit)/page.tsx
  • apps/dashboard/app/(cockpit)/runs/page.tsx
  • apps/dashboard/app/(cockpit)/ticket/[ticketKey]/page.tsx
  • apps/dashboard/app/api/runs/search/dedupe.test.ts
  • apps/dashboard/app/api/runs/search/dedupe.ts
  • apps/dashboard/app/api/runs/search/route.ts
  • apps/dashboard/app/cost-data.tsx
  • apps/dashboard/app/overview-data.tsx
  • apps/dashboard/app/runs-data.tsx
  • apps/dashboard/app/ticket-data.tsx
  • apps/dashboard/app/ticket-skeleton.tsx
  • apps/dashboard/components/cockpit/controls.tsx
  • apps/dashboard/components/cockpit/mobile/screens/overview-mobile.tsx
  • apps/dashboard/components/cockpit/mobile/screens/runs-mobile.tsx
  • apps/dashboard/components/cockpit/mobile/screens/ticket-mobile.tsx
  • apps/dashboard/components/cockpit/screens/cost.tsx
  • apps/dashboard/components/cockpit/screens/overview.tsx
  • apps/dashboard/components/cockpit/screens/prompts.tsx
  • apps/dashboard/components/cockpit/screens/runs.tsx
  • apps/dashboard/components/cockpit/screens/ticket-selection.tsx
  • apps/dashboard/components/cockpit/screens/ticket.tsx
  • apps/dashboard/components/cockpit/screens/trace.tsx
  • apps/dashboard/components/cockpit/spotlight-search.tsx
  • apps/dashboard/lib/api/fallbacks.ts
  • apps/dashboard/lib/api/server.ts
  • apps/dashboard/lib/api/ticket-runs.ts
  • apps/dashboard/lib/merge-live-runs.test.ts
  • apps/dashboard/lib/merge-live-runs.ts
  • apps/dashboard/lib/run-href.test.ts
  • apps/dashboard/lib/run-href.ts
  • apps/dashboard/lib/ticket.test.ts
  • apps/dashboard/lib/ticket.ts
  • apps/dashboard/lib/window.ts
  • apps/shared/contracts/api.ts
  • apps/shared/contracts/domain.ts
  • apps/worker/.env.e2e.example
  • apps/worker/.env.example
  • apps/worker/.gitignore
  • apps/worker/docs/superpowers/plans/2026-06-18-trace-persistence.md
  • apps/worker/docs/superpowers/specs/2026-06-18-trace-persistence-design.md
  • apps/worker/drizzle.config.ts
  • apps/worker/drizzle/0000_elite_paibok.sql
  • apps/worker/drizzle/0001_abnormal_dreaming_celestial.sql
  • apps/worker/drizzle/0002_icy_bastion.sql
  • apps/worker/drizzle/0003_even_excalibur.sql
  • apps/worker/drizzle/meta/0000_snapshot.json
  • apps/worker/drizzle/meta/0001_snapshot.json
  • apps/worker/drizzle/meta/0002_snapshot.json
  • apps/worker/drizzle/meta/0003_snapshot.json
  • apps/worker/drizzle/meta/_journal.json
  • apps/worker/e2e/env.ts
  • apps/worker/e2e/helpers/redis.ts
  • apps/worker/e2e/helpers/registry.ts
  • apps/worker/e2e/scripts/check-db.ts
  • apps/worker/e2e/tier2/us01-clear-ticket-pr.test.ts
  • apps/worker/e2e/tier2/us03-review-fix-cycle.test.ts
  • apps/worker/e2e/tier2/us04-merge-conflict-rebase.test.ts
  • apps/worker/e2e/tier2/us05-unclear-ticket-clarification.test.ts
  • apps/worker/e2e/tier2/us06-clarification-answered.test.ts
  • apps/worker/e2e/tier2/us07-agent-failure-backlog.test.ts
  • apps/worker/e2e/tier2/us08-previously-failed-skip.test.ts
  • apps/worker/e2e/tier2/us09-failed-marker-cleared.test.ts
  • apps/worker/e2e/tier2/us10-duplicate-dispatch-prevented.test.ts
  • apps/worker/e2e/tier2/us11-capacity-limit-respected.test.ts
  • apps/worker/e2e/tier2/us12-ticket-moved-out-during-dispatch.test.ts
  • apps/worker/e2e/tier2/us13-webhook-immediate-dispatch.test.ts
  • apps/worker/e2e/tier2/us14-stale-claim-cleanup.test.ts
  • apps/worker/e2e/tier2/us15-orphaned-run-cancelled.test.ts
  • apps/worker/env.test.ts
  • apps/worker/env.ts
  • apps/worker/package.json
  • apps/worker/scripts/clear-run-registry.ts
  • apps/worker/scripts/db-migrate.ts
  • apps/worker/src/adapters/run-registry/postgres.test.ts
  • apps/worker/src/adapters/run-registry/postgres.ts
  • apps/worker/src/adapters/run-registry/types.ts
  • apps/worker/src/adapters/run-registry/upstash.test.ts
  • apps/worker/src/adapters/run-registry/upstash.ts
  • apps/worker/src/db/client.ts
  • apps/worker/src/db/queries/run-detail-read.test.ts
  • apps/worker/src/db/queries/run-detail-read.ts
  • apps/worker/src/db/queries/runs-read.test.ts
  • apps/worker/src/db/queries/runs-read.ts
  • apps/worker/src/db/schema.ts
  • apps/worker/src/db/test-db.ts
  • apps/worker/src/lib/adapters.ts
  • apps/worker/src/lib/dispatch.test.ts
  • apps/worker/src/lib/dispatch.ts
  • apps/worker/src/lib/labels.test.ts
  • apps/worker/src/lib/labels.ts
  • apps/worker/src/lib/overview/collect-run-detail.test.ts
  • apps/worker/src/lib/overview/collect-run-detail.ts
  • apps/worker/src/lib/overview/collect-runs.test.ts
  • apps/worker/src/lib/overview/collect-runs.ts
  • apps/worker/src/lib/overview/collect-workflows.test.ts
  • apps/worker/src/lib/overview/collect-workflows.ts
  • apps/worker/src/lib/overview/resolve-run-detail.test.ts
  • apps/worker/src/lib/overview/resolve-run-detail.ts
  • apps/worker/src/lib/reconcile.ts
  • apps/worker/src/lib/step-adapters.ts
  • apps/worker/src/lib/telemetry/collect-snapshots.test.ts
  • apps/worker/src/lib/telemetry/collect-snapshots.ts
  • apps/worker/src/lib/telemetry/run-telemetry.test.ts
  • apps/worker/src/lib/telemetry/run-telemetry.ts
  • apps/worker/src/post-pr-gate/gate-store.test.ts
  • apps/worker/src/post-pr-gate/gate-store.ts
  • apps/worker/src/routes/api/v1/cost.get.ts
  • apps/worker/src/routes/api/v1/overview/kpis.get.ts
  • apps/worker/src/routes/api/v1/runs.get.ts
  • apps/worker/src/routes/api/v1/runs/[runId].get.ts
  • apps/worker/src/routes/api/v1/tickets/[ticketKey].get.ts
  • apps/worker/src/routes/api/v1/workflows.get.ts
  • apps/worker/src/routes/cron/poll.get.ts
  • apps/worker/src/routes/webhooks/github.post.ts
  • apps/worker/src/sandbox/agents/claude.test.ts
  • apps/worker/src/sandbox/agents/claude.ts
  • apps/worker/src/sandbox/stop-ticket-sandboxes.ts
  • apps/worker/src/sandbox/usage.ts
  • apps/worker/src/workflows/agent.ts
  • apps/worker/src/workflows/post-pr-gate.ts
  • docs/superpowers/plans/2026-06-10-redis-to-neon-postgres.md
  • docs/superpowers/plans/2026-06-17-ticket-runs-view.md
  • docs/superpowers/plans/2026-06-18-jira-pr-link-comment.md
  • docs/superpowers/specs/2026-06-17-ticket-runs-view-design.md
  • docs/superpowers/specs/2026-06-18-jira-pr-link-comment-design.md

📝 Walkthrough

Walkthrough

This PR moves worker registry and dashboard reads to Neon/Postgres, adds ticket-focused dashboard navigation and spotlight search, persists more run telemetry and trace data, updates E2E/CI database validation, and rewrites setup, skills, and planning docs around the new storage model.

Changes

Core migration and cockpit updates

Layer / File(s) Summary
Docs and setup rewrite
.claude/learnings.md, .claude/skills/*, README.md, SETUP.md, docs/superpowers/*, apps/worker/docs/superpowers/*
Skills, setup docs, plans, specs, and learnings are updated for Neon/Postgres setup, branch isolation, ticket views, trace persistence, and Jira PR comments.
Postgres storage foundation
apps/worker/drizzle*, apps/worker/src/db/*, apps/worker/src/adapters/run-registry/*, apps/worker/src/post-pr-gate/*, apps/worker/scripts/*, apps/worker/env.ts, apps/worker/package.json, apps/worker/src/lib/adapters.ts, apps/worker/src/lib/step-adapters.ts
The worker adds Drizzle schema and migrations, Neon DB access, Postgres-backed run registry and gate store implementations, migration/build scripts, and wiring that replaces Redis-backed storage.
Telemetry persistence and worker APIs
apps/worker/src/lib/telemetry/*, apps/worker/src/db/queries/*, apps/worker/src/routes/api/v1/*, apps/worker/src/workflows/agent.ts, apps/worker/src/sandbox/*, apps/shared/contracts/*
Run snapshots, usage, durable trace steps, DB-backed dashboard queries, and ticket/run detail APIs are added, while agent workflow telemetry and Jira PR comment handling write the new data.
E2E registry and CI verification
.github/workflows/*, apps/worker/e2e/*, apps/worker/.env.e2e.example
CI and E2E jobs now require DATABASE_URL, verify migrated tables before running, and use Neon-backed registry helpers and updated cleanup/assertion paths.
Window-aware cockpit and spotlight
apps/dashboard/app/(cockpit)/page.tsx, apps/dashboard/app/(cockpit)/runs/page.tsx, apps/dashboard/app/(cockpit)/cost/page.tsx, apps/dashboard/components/cockpit/controls.tsx, apps/dashboard/components/cockpit/screens/{overview,runs,cost}.tsx, apps/dashboard/components/cockpit/mobile/screens/*, apps/dashboard/components/cockpit/spotlight-search.tsx, apps/dashboard/lib/{window,merge-live-runs}.ts, apps/dashboard/app/api/runs/search/*
The cockpit adds shared window/query helpers, URL-driven controls, Postgres-backed spotlight search, live-run merge logic, and window-scoped overview, runs, and cost screens.
Ticket runs navigation and trace reuse
apps/dashboard/app/(cockpit)/ticket/[ticketKey]/page.tsx, apps/dashboard/app/ticket-*.tsx, apps/dashboard/components/cockpit/screens/{ticket,ticket-selection,trace}.tsx, apps/dashboard/components/cockpit/mobile/screens/ticket-mobile.tsx, apps/dashboard/lib/{ticket,run-href}.ts, apps/dashboard/lib/api/{fallbacks,ticket-runs}.ts
A ticket runs page is added with desktop and mobile layouts, URL-driven run selection, trace reuse, ticket-aware run links, and ticket-scoped data loading with fallbacks and live overlays.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • Blazity/ai-workflow#92: Both PRs touch the Redis→Postgres worker infrastructure, including run registry, adapter wiring, and gate storage.
  • Blazity/ai-workflow#87: This PR changes cockpit run navigation to ticket-aware runHref(...), extending earlier CockpitShell run-opening behavior.
  • Blazity/ai-workflow#37: Both PRs implement failed-ticket registry persistence paths, now backed here by Postgres tables and registry helpers.

Poem

🐇 I traded old burrows for Neon light,
and tucked each run in tables tight.
Tickets now hop with traces in tow,
while spotlights bloom where searches go.
A tidy rabbit cheers: “Persist, then spring!”

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Comment @coderabbitai help to get the list of available commands and usage tips.

@kasin-it kasin-it merged commit 0118ecc into main Jun 18, 2026
4 of 5 checks passed
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.

1 participant