Skip to content

Add structured vulnerability findings workflow#915

Open
ross0x01 wants to merge 36 commits into
mainfrom
codex/hac-30-findings
Open

Add structured vulnerability findings workflow#915
ross0x01 wants to merge 36 commits into
mainfrom
codex/hac-30-findings

Conversation

@ross0x01

@ross0x01 ross0x01 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the authenticated global /findings workspace and navigation for saved vulnerability reports
  • add the Agent/Agent-long-only create_vulnerability_report tool with strict validation, deterministic same-chat dedupe, server-derived CVSS 3.1 scoring/severity, and concise tool output
  • persist finding provenance in Convex, sanitize public shares/forks server-side, cascade chat/account deletion, and scrub inline tool parts when records are deleted
  • render compact inline finding cards that open complete reports in the Computer sidebar from chat
  • present Findings-page reports in a responsive blurred modal with source-message navigation, severity/category/status metadata, and focused evidence/remediation sections
  • add active/closed lifecycle with resolution reason and required closure context; preserve closed reports for future reference
  • add search, severity/category/status filters, newest-first pagination, severity/status indicators, CSV export, and a Start new scan action
  • improve validation/error states for streamed tool inputs and optional CVE/CWE/code-location fields

Validation

  • pnpm test --runInBand — 300 suites, 2,956 tests passed
  • pnpm typecheck
  • pnpm lint — passes with 6 existing warnings
  • pnpm exec prettier --check <16 changed files>
  • pre-commit hooks reran Prettier, ESLint, typecheck, and all Jest suites successfully

Visual verification

Verified in Google Chrome on desktop and a 390×844 mobile viewport:

  • Findings workspace layout, filters, status/severity dots, empty/loading states, and responsive table/cards
  • finding detail opens and closes as a blurred modal from /findings
  • close-finding dialog uses compact reasons, a required note, and mobile-safe controls
  • chat-origin finding detail remains in the Computer sidebar without workspace-only actions

Manual verification

  1. In a non-temporary Agent or Agent-long chat, confirm a vulnerability with evidence and a working PoC. Verify one compact finding card appears beneath the assistant message.
  2. Open the card from chat. Verify the complete report opens in the Computer sidebar and does not show workspace-only source/close actions.
  3. Open /findings. Verify search plus severity, category, and status filters; use Start new scan; export the current filtered results.
  4. Open a finding from /findings. Verify the blurred report modal closes with Back/X/Escape and its source link opens the exact originating assistant message.
  5. Close the finding with a reason and note. Verify it moves to Closed, retains the closure context, and remains filterable/viewable.
  6. Share the source chat publicly and fork it. Verify only safe compact metadata is exposed and no private report fields or identifiers are present.

Summary by CodeRabbit

  • New Features
    • Added a Findings workspace for browsing, searching, filtering, and exporting vulnerability reports.
    • Added detailed vulnerability reports with CVSS, evidence, remediation guidance, affected locations, and source-message links.
    • Added options to close findings with a reason and notes.
    • Added findings navigation and sidebar support, including mobile-friendly detail views.
    • Added secure finding cards to shared chat views.
  • Bug Fixes
    • Improved tool-error messages by hiding sensitive validation details and providing clearer next steps.
    • Improved source-message navigation, focus restoration, and reduced-motion support.
  • Tests
    • Added comprehensive coverage for findings, sharing, navigation, exports, lifecycle actions, and error handling.

@ross0x01

Copy link
Copy Markdown
Contributor Author

Reopening immediately to request a fresh Trigger.dev GitHub App clone after the isolated pre-build clone failure. The identical commit already deployed successfully as Trigger preview version 20260716.2.

@ross0x01 ross0x01 closed this Jul 16, 2026
@ross0x01 ross0x01 reopened this Jul 16, 2026
@ross0x01
ross0x01 force-pushed the codex/hac-30-findings branch from 9a89ddb to 4064018 Compare July 16, 2026 22:47
@ross0x01

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@ross0x01

Copy link
Copy Markdown
Contributor Author

Final integration evidence for 406401841b2488eb6cd8daf6e6f88cff3285d58b:

  • GitHub test (20.x) passed.
  • Trigger.dev GitHub App failed in 6 seconds at repository clone, before build.
  • The exact final commit then deployed successfully through the authenticated Trigger CLI as preview 20260716.2 with 1 detected task: https://cloud.trigger.dev/projects/v3/proj_fixirhycbcnfdpicejfb/deployments/dt5z6hh9
  • The active Main branch protection ruleset contains no required-status-check rule; only pull-request review is merge-blocking.
  • CodeRabbit passed on the byte-identical tree before the metadata-only amend. An explicit review was requested on the final SHA and monitored past 12 minutes; no new review, issue comment, or inline thread appeared.

@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hackerai Ready Ready Preview, Comment Jul 21, 2026 8:22pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Changes

This PR adds structured vulnerability findings with CVSS scoring, validated persistence, agent reporting, sharing sanitization, deletion cleanup, sidebar integration, source-message navigation, and responsive list/detail interfaces.

Vulnerability findings

Layer / File(s) Summary
Finding contracts, scoring, and validation
lib/findings/*, types/finding.ts, types/index.ts, convex/schema.ts
Adds finding types, CVSS 3.1 calculations, strict report validation, deduplication/search helpers, lifecycle rules, categories, and the Convex findings schema.
Convex persistence and queries
convex/findings.ts, lib/db/actions.ts, convex/__tests__/findings.test.ts
Creates, lists, reads, closes, and deletes user-owned findings with filtering, deduplication, source-chat metadata, and message-part scrubbing.
Agent reporting flow
lib/ai/tools/*, lib/system-prompt.ts, lib/chat/*
Adds the persistent-agent vulnerability-report tool, temporary-chat gating, retry behavior, analytics, prompt rules, abort handling, and compaction protection.
Sharing and message rendering
lib/findings/share-sanitizer.ts, convex/messages.ts, convex/sharedChats.ts, app/components/MessagePartHandler.tsx, app/share/...
Converts successful reports into compact shared metadata, sanitizes shared reads and forks, and renders finding cards with type-aware memoization.
Safe tool error handling
lib/chat/tool-error-display.ts, app/components/tools/ToolError*.tsx, lib/utils/sidebar-utils.ts
Classifies validation failures, removes payload-bearing details, and renders structured error details through chat and sidebar flows.
Finding UI and navigation
app/(chat)/findings/*, app/components/findings/*, app/components/SidebarHeader.tsx, app/components/ComputerSidebar.tsx, app/hooks/*, app/components/Messages.tsx
Adds the findings page, detail and card components, sidebar navigation/content, responsive selection behavior, and source-message focus navigation.
Deletion lifecycle
convex/chats.ts, convex/userDeletion.ts, convex/__tests__/chats.agentApprovalLifecycle.test.ts
Deletes findings before related chats and processes chat/user cleanup in bounded batches with continuation scheduling.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Agent
  participant ConvexFindings
  participant FindingsPage
  participant FindingDetail
  Agent->>ConvexFindings: createFindingForBackend(report)
  ConvexFindings-->>Agent: finding_id and compact result
  FindingsPage->>ConvexFindings: listFindings(filters)
  ConvexFindings-->>FindingsPage: paginated finding summaries
  FindingsPage->>FindingDetail: open selected finding
  FindingDetail->>ConvexFindings: getFinding(finding_id)
  ConvexFindings-->>FindingDetail: finding detail record
Loading

Possibly related PRs

Suggested labels: aardvark

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.92% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the PR’s main change: a structured vulnerability findings workflow.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/hac-30-findings

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 8

🧹 Nitpick comments (1)
convex/__tests__/findings.shared-security.test.ts (1)

6-19: 🔒 Security & Privacy | 🔵 Trivial | 🏗️ Heavy lift

Exercise the handlers instead of checking source text.

This regex can pass when the sanitizer exists but is no longer applied to the returned or inserted parts. Invoke getSharedMessages and forkSharedChat with the private fixture, then assert their observable outputs contain only data-shared-finding.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@convex/__tests__/findings.shared-security.test.ts` around lines 6 - 19,
Replace the source-text regex assertions in the test covering messagesSource and
forksSource with handler-level checks: invoke getSharedMessages and
forkSharedChat using the private fixture, then assert their returned messages or
inserted fork parts contain only data-shared-finding. Preserve coverage for both
public reads and shared-chat forks while validating observable outputs rather
than sanitizer presence.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/`(chat)/findings/page.tsx:
- Around line 296-316: Update the mobile detail branch around selectedFindingId
and FindingDetail to use the existing modal Dialog/Sheet primitive, or
equivalent modal semantics, instead of a fixed container. Move focus into the
detail view when it opens, trap focus within it while open, mark the findings
list inert, and restore focus to the triggering finding control when it closes.

In `@app/components/MessagePartHandler.tsx`:
- Around line 265-273: Update arePropsEqual to compare part.type for all message
parts, and when the type is "data-shared-finding", deep-compare
prevProps.part.data with nextProps.part.data so FindingCard updates when
shared-finding content changes. Preserve the existing comparisons for other
props and part types.

In `@app/components/SidebarHeader.tsx`:
- Around line 174-186: Update both Findings controls in the SidebarHeader
component, including the expanded button near the other occurrence, to set
aria-current="page" when pathname equals "/findings" and omit it otherwise. Keep
the existing visual active-state class and button behavior unchanged.

In `@convex/chats.ts`:
- Around line 1624-1632: Replace the unbounded findings query and deletion loop
in the chat deletion path with the existing batched deletion workflow, using
query.take(n) for each batch. Delete only the bounded batch per mutation, then
use ctx.scheduler.runAfter(...) to schedule continuation until all findings for
the chat are removed; do not call .collect() here.

In `@convex/findings.ts`:
- Around line 270-288: Update getFindingSourceChats to derive the unique chat
IDs from the authenticated user’s findings, then return only matching chats.
Replace the unbounded chats query collect() with for await iteration or
pagination, while preserving the existing access check and chat ordering.
- Around line 16-26: Update getChat and getFindingByPublicId to accept the
shared typed Convex context used by query and mutation helpers instead of any,
and replace first() with unique() for both by_chat_id and by_finding_id lookups
so duplicate records surface as errors.

In `@convex/schema.ts`:
- Around line 251-253: Add the by_user_severity_chat_created index to the
relevant schema definition in convex/schema.ts over user_id, severity, chat_id,
and created_at. In convex/findings.ts, update listFindings to use this index via
withIndex when both severity and chat filters are provided, and remove the
corresponding post-query filter.

In `@lib/ai/tools/schemas.ts`:
- Around line 595-596: Revise the vulnerability-report guidance so idempotency
means one successfully persisted report per root cause, while allowing a retry
after an explicit general “not saved” failure; prohibit retries only when the
response indicates a duplicate. Apply this distinction in
lib/ai/tools/schemas.ts lines 595-596 and 859-862, mirror it in
lib/system-prompt.ts lines 323-327, and update
lib/__tests__/system-prompt.test.ts lines 131-136 to assert successful
persistence, duplicate suppression, and general-failure retry behavior.

---

Nitpick comments:
In `@convex/__tests__/findings.shared-security.test.ts`:
- Around line 6-19: Replace the source-text regex assertions in the test
covering messagesSource and forksSource with handler-level checks: invoke
getSharedMessages and forkSharedChat using the private fixture, then assert
their returned messages or inserted fork parts contain only data-shared-finding.
Preserve coverage for both public reads and shared-chat forks while validating
observable outputs rather than sanitizer presence.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 24187c37-d790-4487-b1bf-62615773f22f

📥 Commits

Reviewing files that changed from the base of the PR and between c07cf63 and 419d7cf.

⛔ Files ignored due to path filters (1)
  • convex/_generated/api.d.ts is excluded by !**/_generated/**
📒 Files selected for processing (46)
  • app/(chat)/findings/__tests__/page.test.tsx
  • app/(chat)/findings/page.tsx
  • app/components/ComputerSidebar.tsx
  • app/components/MessagePartHandler.tsx
  • app/components/SidebarHeader.tsx
  • app/components/computer-sidebar-utils.tsx
  • app/components/findings/FindingCard.tsx
  • app/components/findings/FindingDetail.tsx
  • app/components/findings/__tests__/FindingCard.test.tsx
  • app/components/findings/__tests__/FindingDetail.test.tsx
  • app/components/tools/FindingToolHandler.tsx
  • app/components/tools/__tests__/FindingToolHandler.test.tsx
  • app/hooks/useSidebarNavigation.ts
  • app/share/[shareId]/components/SharedMessagePartHandler.tsx
  • convex/__tests__/chats.agentApprovalLifecycle.test.ts
  • convex/__tests__/findings.shared-security.test.ts
  • convex/__tests__/findings.test.ts
  • convex/__tests__/userDeletion.test.ts
  • convex/chats.ts
  • convex/findings.ts
  • convex/messages.ts
  • convex/schema.ts
  • convex/sharedChats.ts
  • convex/userDeletion.ts
  • lib/__tests__/system-prompt.test.ts
  • lib/ai/tools/__tests__/findings.test.ts
  • lib/ai/tools/__tests__/schemas.test.ts
  • lib/ai/tools/findings.ts
  • lib/ai/tools/index.ts
  • lib/ai/tools/schemas.ts
  • lib/api/__tests__/agent-long-contracts.test.ts
  • lib/chat/chat-processor.ts
  • lib/chat/compaction/__tests__/prune-tool-outputs.test.ts
  • lib/chat/compaction/prune-tool-outputs.ts
  • lib/db/actions.ts
  • lib/findings/__tests__/cvss31.test.ts
  • lib/findings/__tests__/share-sanitizer.test.ts
  • lib/findings/__tests__/validation.test.ts
  • lib/findings/cvss31.ts
  • lib/findings/share-sanitizer.ts
  • lib/findings/validation.ts
  • lib/system-prompt.ts
  • lib/utils/sidebar-utils.ts
  • types/chat.ts
  • types/finding.ts
  • types/index.ts

Comment thread app/(chat)/findings/page.tsx Outdated
Comment thread app/components/MessagePartHandler.tsx
Comment thread app/components/SidebarHeader.tsx
Comment thread convex/chats.ts Outdated
Comment thread convex/findings.ts Outdated
Comment thread convex/findings.ts
Comment thread convex/schema.ts
Comment thread lib/ai/tools/schemas.ts
@ross0x01

Copy link
Copy Markdown
Contributor Author

Also addressed the non-inline shared-security test nit in b08d1624: the tests now invoke getSharedMessages and forkSharedChat with a private finding fixture and assert that only data-shared-finding metadata is returned or persisted.

Validation after the review fixes:

  • corepack pnpm jest --runInBand — 275 suites, 2,761 tests passed
  • corepack pnpm typecheck
  • corepack pnpm lint — no errors; 6 existing warnings

@ross0x01

Copy link
Copy Markdown
Contributor Author

@coderabbitai review\n\nThe latest status check passed, but the walkthrough reports that the review itself failed. Please run a fresh review of b08d1624.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

@ross0x01 Got it — triggering a fresh review of the latest commit (b08d1624) now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/components/Messages.tsx`:
- Around line 126-134: Update the useSourceMessageNavigation call in
Messages.tsx to track pagination progress using the unfiltered loaded message
count rather than visibleMessageIds, while preserving visibleMessageIds for
source-message navigation. Ensure pages containing only auto-continue messages
still allow the next loadMore(28) request.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8b8c5afb-52bc-4881-bc5e-00ba9ceeae63

📥 Commits

Reviewing files that changed from the base of the PR and between b08d162 and 49ad875.

📒 Files selected for processing (8)
  • app/(chat)/findings/__tests__/page.test.tsx
  • app/(chat)/findings/page.tsx
  • app/components/Messages.tsx
  • app/components/findings/FindingDetail.tsx
  • app/components/findings/__tests__/FindingDetail.test.tsx
  • app/hooks/__tests__/useSourceMessageNavigation.test.tsx
  • app/hooks/useSourceMessageNavigation.ts
  • lib/findings/source-message.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • app/components/findings/tests/FindingDetail.test.tsx
  • app/(chat)/findings/page.tsx
  • app/(chat)/findings/tests/page.test.tsx
  • app/components/findings/FindingDetail.tsx

Comment thread app/components/Messages.tsx Outdated

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/hooks/useSourceMessageNavigation.ts`:
- Around line 48-51: Remove the explicit window.dispatchEvent call in the source
message navigation flow, leaving target.dispatchEvent with the bubbling
CustomEvent as the sole STICKY_BOTTOM_ESCAPE_EVENT dispatch so listeners are
triggered only once.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 45cfa10b-1b62-4117-88af-92a2f5cf03f2

📥 Commits

Reviewing files that changed from the base of the PR and between 1e67681 and e39bec4.

📒 Files selected for processing (3)
  • app/components/Messages.tsx
  • app/hooks/__tests__/useSourceMessageNavigation.test.tsx
  • app/hooks/useSourceMessageNavigation.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/components/Messages.tsx
  • app/hooks/tests/useSourceMessageNavigation.test.tsx

Comment thread app/hooks/useSourceMessageNavigation.ts Outdated
@ross0x01

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the Findings workspace and report presentation refactor in 8e735d23. The change preserves the existing V1 data and controls while revising the responsive list, filters, evidence hierarchy, and read-only remediation presentation.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

@ross0x01 I’ll review commit 8e735d23, focusing on the Findings workspace responsiveness, filters, evidence presentation, and read-only remediation UI.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/components/tools/ToolErrorHandler.tsx`:
- Around line 42-48: Update the ToolErrorHandler component to pass the
handleKeyDown value returned by useToolSidebar into ToolErrorBlock, then forward
that prop through ToolErrorBlock to ToolBlock, matching the keyboard-handler
flow used by other interactive tool cards.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7a47f734-b0a3-4c9f-906b-95982fb86c7e

📥 Commits

Reviewing files that changed from the base of the PR and between 4c702ee and 8e735d2.

📒 Files selected for processing (38)
  • app/(chat)/findings/__tests__/page.test.tsx
  • app/(chat)/findings/page.tsx
  • app/components/ComputerSidebar.tsx
  • app/components/MessagePartHandler.tsx
  • app/components/Messages.tsx
  • app/components/__tests__/ComputerSidebar.reconnect.test.tsx
  • app/components/__tests__/MessagePartHandler.memo.test.ts
  • app/components/computer-sidebar-utils.tsx
  • app/components/findings/FindingDetail.tsx
  • app/components/findings/__tests__/FindingDetail.test.tsx
  • app/components/tools/FindingToolHandler.tsx
  • app/components/tools/TerminalToolHandler.tsx
  • app/components/tools/TodoToolHandler.tsx
  • app/components/tools/ToolErrorDetail.tsx
  • app/components/tools/ToolErrorHandler.tsx
  • app/components/tools/WebToolHandler.tsx
  • app/components/tools/__tests__/FindingToolHandler.test.tsx
  • app/components/tools/__tests__/ToolErrorDetail.test.tsx
  • app/components/tools/__tests__/shell-tool-utils.test.ts
  • app/components/tools/shell-tool-utils.ts
  • app/globals.css
  • app/hooks/__tests__/useSourceMessageNavigation.test.tsx
  • app/hooks/useSourceMessageNavigation.ts
  • app/share/[shareId]/components/SharedMessagePartHandler.tsx
  • components/ui/__tests__/tool-block.test.tsx
  • components/ui/dialog.tsx
  • components/ui/tool-block.tsx
  • lib/ai/tools/__tests__/schemas.test.ts
  • lib/ai/tools/schemas.ts
  • lib/chat/__tests__/tool-error-display.test.ts
  • lib/chat/tool-error-display.ts
  • lib/findings/__tests__/share-sanitizer.test.ts
  • lib/findings/__tests__/validation.test.ts
  • lib/findings/share-sanitizer.ts
  • lib/findings/validation.ts
  • lib/utils/__tests__/sidebar-utils.test.ts
  • lib/utils/sidebar-utils.ts
  • types/chat.ts
🚧 Files skipped from review as they are similar to previous changes (12)
  • lib/findings/tests/share-sanitizer.test.ts
  • lib/findings/share-sanitizer.ts
  • app/share/[shareId]/components/SharedMessagePartHandler.tsx
  • app/components/computer-sidebar-utils.tsx
  • app/hooks/tests/useSourceMessageNavigation.test.tsx
  • app/components/tools/FindingToolHandler.tsx
  • app/hooks/useSourceMessageNavigation.ts
  • app/components/ComputerSidebar.tsx
  • app/components/Messages.tsx
  • lib/ai/tools/schemas.ts
  • lib/findings/validation.ts
  • lib/findings/tests/validation.test.ts

Comment thread app/components/tools/ToolErrorHandler.tsx Outdated
@ross0x01

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the final head 5ff7ec45, including the keyboard-handler forwarding fix for expandable tool-error cards.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

@ross0x01 I’ll review the final head 5ff7ec45, including the keyboard-handler forwarding fix for expandable tool-error cards.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the final head d322796f, focusing on the Findings category/status lifecycle, close-finding persistence, CSV export, responsive workspace/detail modal, and related Convex indexing and validation changes.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

@ross0x01 I’ll review final head d322796f, with focus on the Findings lifecycle, close persistence, CSV export, responsive workspace/detail modal, and Convex indexing/validation changes.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/`(chat)/findings/page.tsx:
- Around line 78-79: Update escapeCsvCell to prefix a guard character for values
whose first character is =, +, -, @, tab, or carriage return, then retain the
existing quote-wrapping and double-quote escaping. Apply the guard before
String(value) is quoted so exported finding.title and finding.target cells
cannot be interpreted as formulas.

In `@components/ui/radio-group.tsx`:
- Line 30: Update the class strings used by the radio indicator in the
radio-group component, including both occurrences, to remove the fixed
text-foreground color or replace it with text-inherit so the indicator inherits
the selected or unselected label color. Preserve the remaining styling classes
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d2285ba5-8aaa-446e-b8c7-5a14d55b2a45

📥 Commits

Reviewing files that changed from the base of the PR and between 5ff7ec4 and d322796.

📒 Files selected for processing (16)
  • app/(chat)/findings/__tests__/page.test.tsx
  • app/(chat)/findings/page.tsx
  • app/components/findings/FindingCard.tsx
  • app/components/findings/FindingDetail.tsx
  • app/components/findings/__tests__/FindingDetail.test.tsx
  • components/ui/radio-group.tsx
  • convex/__tests__/findings.test.ts
  • convex/findings.ts
  • convex/schema.ts
  • lib/findings/__tests__/category.test.ts
  • lib/findings/__tests__/lifecycle.test.ts
  • lib/findings/__tests__/validation.test.ts
  • lib/findings/category.ts
  • lib/findings/lifecycle.ts
  • lib/findings/validation.ts
  • types/finding.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • types/finding.ts
  • app/components/findings/FindingCard.tsx
  • convex/schema.ts
  • lib/findings/validation.ts

Comment thread app/(chat)/findings/page.tsx Outdated
Comment thread components/ui/radio-group.tsx Outdated

Copy link
Copy Markdown
Contributor Author

CodeRabbit follow-up addressed in 36f62f51:

  • CSV formula injection: exported cells now prefix a single-quote guard for leading =, +, -, @, tab, or CR before CSV quoting. Added a malicious title/target regression test.
  • Radio indicator color: removed the fixed text-foreground class so the indicator inherits each option’s selected/unselected color.

Validation: focused tests, typecheck, lint, Prettier, and the full 300-suite / 2,956-test pre-commit run all pass.

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