Skip to content

Feat: PR diff viewer, finding verification pass, and account settings with timezone-aware stats - #55

Open
devarshishimpi wants to merge 19 commits into
mainfrom
feature/pr-diff-ui
Open

Feat: PR diff viewer, finding verification pass, and account settings with timezone-aware stats#55
devarshishimpi wants to merge 19 commits into
mainfrom
feature/pr-diff-ui

Conversation

@devarshishimpi

@devarshishimpi devarshishimpi commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Description

Files-changed diff viewer. Real diff view on job detail with syntax highlighting, findings inline, and overview / files / logs tabs. diff_input is no longer persisted; GET /api/jobs/:id/diffs rebuilds it from KV or GitHub using the job's own base and head commits. Returns the full PR diff so it matches GitHub mid-review. Migration 003_diff_accounts.sql clears the old values.

Verification pass. The accuracy fix. One extra model call re-checks the top 40 findings against their diff and drops false positives. Best effort, so a model error can't block a review. Findings are deduped too.

Account settings. New account_settings table, /account page, and GET/PATCH /api/auth/account for display name and IANA timezone. Timestamps stay TIMESTAMPTZ; the zone only affects rendering.

Telemetry fix. Token and model totals now count done reviews only (null counts from failed ones were deflating them). Added concurrencyLevel, prTotalLinesChanged, retryCount.

UI. Radix to @base-ui/react, reworked primitives, redesigned stats, repos, jobs, settings, landing, and app shell. Plus session caching in useJobDetail, GraphQL in the GitHub client, PR-number filtering on jobs.

Chores. Dependency bumps, CI actions to v7 / CodeQL v4, Dependabot cooldown, docs point at main not dev.

Closes #42 #44
Part of #40 #43

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Chore (refactoring, dependency updates, etc.)

How Has This Been Tested?

New tests for the verification pass, timezone formatting, and finding dedupe. test/api.spec.ts reworked to cover the new diffs and account routes. Dashboard e2e updated for Base UI.

  • Unit Tests
  • Integration Tests
  • Manual Dashboard Verification
  • Manual GitHub Webhook Verification

Checklist:

  • I have starred Codra on GitHub
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have signed the CLA

- Updated button styles for primary variant to include border and hover effects.
- Implemented session-scoped caching in `useJobDetail` hook to improve performance by reading from sessionStorage.
- Added a new `highlight` utility for syntax highlighting in the diff viewer, supporting multiple languages.
- Refactored dashboard and job detail pages to improve UI and user experience, including tab navigation for job details.
- Replaced icons in the dashboard and jobs pages for better visual representation.
- Updated job logs page to enhance file status representation with badges.
- Introduced GraphQL support in GitHub client for more efficient data fetching.
- Enhanced database queries to support filtering by pull request number.
- Updated shared schema to include new query parameters.
- Added tests to ensure UI flows are functioning correctly.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

codra-app-personal[bot]

This comment was marked as resolved.

devarshishimpi and others added 2 commits August 1, 2026 22:37
Conflicts were limited to package.json / package-lock.json, where main's
Dependabot bumps overlapped this branch's own dependency changes.

Resolution takes the newer of each side:
- wrangler ^4.114.0 (main) over ^4.110.0
- @cloudflare/vitest-pool-workers ^0.18.8, concurrently ^9.2.4 (main)
- vitest ^4.1.10 (this branch) so it stays in lockstep with
  @vitest/browser and @vitest/browser-playwright, which pin an exact peer
- Base UI retained and the Radix packages stay removed

package-lock.json was regenerated from scratch rather than hand-merged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread src/client/lib/highlight.tsx Dismissed
chatgpt-codex-connector[bot]

This comment was marked as resolved.

codra-app-personal[bot]

This comment was marked as resolved.

codra-app-personal[bot]

This comment was marked as resolved.

@chatgpt-codex-connector

This comment was marked as resolved.

codra-app-personal[bot]

This comment was marked as resolved.

Findings must quote the diff line they describe; unmatched quotes are
dropped as hallucinations and the quote becomes the comment anchor.
Response schemas are now per call, fixing a verification pass that was
silently a no-op. Fingerprint + anchor hash stop re-posting findings on
later commits, and webhook feedback suppresses ones humans delete.
Adds nit priority, min_severity default P3, and consolidates migrations
003-008.
Cap quota 429s at 2 per file and defer the rest instead of walking the whole
fallback chain; honor Google's body-stated cool-off. Size the per-file
subrequest estimate from the chain length, and yield 8s (was 2s) so chunks
stop sharing one invocation's budget.

Move max_files to an instance-wide setting (1-500, default 200) and report
files left over the cap in the review summary.
codra-app-personal[bot]

This comment was marked as resolved.

Repository owner deleted a comment from chatgpt-codex-connector Bot Aug 3, 2026
Add claim_type per finding, a disposition column recording which stage
dropped it (was just posted=false), and shadow-eval logging for candidate
filter rules. Drop the merged React language entry, which was double-
checklisting .tsx files and causing hook-dependency false positives.
codra-app-personal[bot]

This comment was marked as resolved.

…an labels

Enforce grounding on every provider, deny risky claim types by default,
and rework verification into a subtractive pass with per-drop reasons.

Add dashboard right/wrong labels on findings. Also fix temperature-0
sampling, migration lock scoping, and quote-folding for evidence matches.
Repository owner deleted a comment from chatgpt-codex-connector Bot Aug 3, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Aug 3, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Aug 3, 2026
codra-app-personal[bot]

This comment was marked as resolved.

codra-app-personal[bot]

This comment was marked as resolved.

codra-app-personal[bot]

This comment was marked as resolved.

codra-app-personal[bot]

This comment was marked as resolved.

codra-app-personal[bot]

This comment was marked as resolved.

…d JSONB encoding fixes

Extract review.ts into focused modules (review-budget, review-diff-cache,
review-request, verify-findings) and add a regex-based rule channel
(rules/detect.ts, rules/table.ts) alongside the LLM, tagged via new
source/rule_id columns for per-channel precision tracking.

Add Google Vertex as a distinct provider (OAuth2 vs API keys) and a
centralized SSRF guard for operator-supplied provider base URLs.

Fix a jsonb encoding bug where JSON.stringify() bound to $n::jsonb stored a
string scalar instead of an object across six columns; writers now bind
$n::text::jsonb. Also adds fingerprint_v2 for recurrence detection.

Client: PR diff UI additions (file-tree, prompt-diff, selection helpers)
and removal of unused sparkline/card/dropdown-menu/meter components.
codra-app-personal[bot]

This comment was marked as resolved.

Repository owner deleted a comment from chatgpt-codex-connector Bot Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature UI: Capability to view diffs and files changes

2 participants