Skip to content

feat: add react doctor to the ci#1984

Merged
mfortman11 merged 15 commits into
mainfrom
react-doctor-ci
Jul 1, 2026
Merged

feat: add react doctor to the ci#1984
mfortman11 merged 15 commits into
mainfrom
react-doctor-ci

Conversation

@mfortman11

@mfortman11 mfortman11 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Adds react doctor to the ci.

The current score is at 42 we'll start by blocking changes that drop it below 40

Also adds a series of fixes

Summary by CodeRabbit

  • Bug Fixes

    • Improved folder selection compatibility in uploads by using the browser-supported folder picker attribute.
    • Refined several app interactions and error-message handling for more consistent feedback.
  • Refactor

    • Updated multiple data-loading and action flows for better performance and maintainability.
    • Simplified several UI helpers and default states for more stable behavior.

@github-actions github-actions Bot added community ci ⬛ CI/CD, build, and infrastructure issues labels Jun 29, 2026
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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

This PR extracts inline async fetch/mutation functions to module scope across numerous React Query hooks, hoists component-local helper functions to module level, fixes minor logic patterns (reduce over sort, flatMap over map+filter, toSorted), updates UI attributes (webkitdirectory, data-cmdk-input-wrapper), and adds a React Doctor GitHub Actions workflow with a score gate.

Changes

Frontend refactors and UI updates

Layer / File(s) Summary
Shared defaults, reducers, and minor logic fixes
frontend/app/chat/_components/assistant-message.tsx, frontend/components/cloud-picker/unified-cloud-picker.tsx, frontend/app/knowledge/page.tsx, frontend/components/dev-role-toggle.tsx, frontend/lib/task-utils.ts
Introduces module-level EMPTY_FUNCTION_CALLS and EMPTY_FILES constants as prop defaults, replaces sort-based candidate selection with reduce in getTaskIdForRow, switches error array parsing to flatMap, and updates sortTaskFileEntries to toSorted.
Mutation helper extraction and sync preview invalidation
frontend/app/api/mutations/useCancelTaskMutation.ts, useCreateApiKeyMutation.ts, useOnboardingMutation.ts, useOnboardingRollbackMutation.ts, useRetryTaskMutation.ts, useRevokeApiKeyMutation.ts, useSyncConnector.ts, useUpdateSettingsMutation.ts
Moves cancel, create API key, onboarding submit/rollback, retry task, revoke API key, and update settings async functions from inside hooks to module scope; adds ["tasks"] query invalidation via onSettled to useSyncConnectorPreview and useSyncAllConnectorsPreview.
Query helper extraction
frontend/app/api/queries/useDoclingHealthQuery.ts, useGetAllFiltersQuery.ts, useGetApiKeysQuery.ts, useGetSearchQuery.ts, useGetSettingsQuery.ts, useGetTasksQuery.ts
Extracts checkDoclingHealth, getAllFilters, getApiKeys, getFileIdentity, getSettings, and getTasks from inside hook bodies to module-level functions; hook wiring and query configurations remain the same.
Component rendering and UI updates
frontend/components/knowledge-dropdown.tsx, frontend/components/ui/command.tsx, frontend/components/navigation.tsx, frontend/app/settings/_components/s3-settings-form.tsx, frontend/components/knowledge-filter-list.tsx, frontend/components/knowledge-filter-panel.tsx, frontend/components/sync-confirm-dialog.tsx, frontend/components/task-notification-menu.tsx
Switches folder input to webkitdirectory, fixes CommandInput wrapper to data-cmdk-input-wrapper, removes keyboard accessibility wiring from navigation dropdown trigger, updates S3 placeholder text to generic guidance, and hoists parseQueryData, formatDate, renderOrphanList, and task notification helpers (getTaskIcon, formatTaskProgress, formatDuration, formatRelativeTime) to module scope.

React Doctor CI workflow

Layer / File(s) Summary
React Doctor workflow and lint job
.github/workflows/react-doctor.yml, .github/workflows/lint-frontend.yml
Adds a standalone react-doctor.yml workflow triggered on PRs and main pushes using millionco/react-doctor@v2, and adds a react-doctor job to lint-frontend.yml that enforces a minimum score of 50 with verbose diagnostics on failure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • langflow-ai/openrag#1592: Introduces the sync-confirm dialog orphan preview flow in the same frontend/components/sync-confirm-dialog.tsx component refactored here.
  • langflow-ai/openrag#1703: Directly modifies frontend/components/sync-confirm-dialog.tsx orphan list rendering, the same code refactored by this PR's renderOrphanList extraction.
  • langflow-ai/openrag#1739: Modifies frontend/components/task-notification-menu.tsx by adding an openTaskDialog button, overlapping with this PR's helper hoisting in the same component.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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
Title check ✅ Passed The title clearly matches the main change: adding React Doctor to CI.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch react-doctor-ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 @.github/workflows/lint-frontend.yml:
- Around line 72-76: The React Doctor checks in the lint-frontend workflow are
using a moving target, which makes the CI result unstable. Update both
invocations in the workflow to use a fixed, validated react-doctor version
instead of `@latest`, keeping the score check and verbose fallback aligned by
referencing the same pinned version in the existing SCORE assignment and the
failure-reporting npx call.
- Line 56: The checkout step in the lint-frontend workflow should disable
persisted Git credentials because this job does not need authenticated git
access and later runs third-party code. Update the actions/checkout usage in the
workflow to set persist-credentials to false so the token is not exposed
unnecessarily.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 957aab8b-4e3d-471d-935c-c3d1fab21905

📥 Commits

Reviewing files that changed from the base of the PR and between 74fe6be and 9748e52.

📒 Files selected for processing (1)
  • .github/workflows/lint-frontend.yml

Comment thread .github/workflows/lint-frontend.yml
Comment thread .github/workflows/lint-frontend.yml Outdated
@github-actions github-actions Bot added frontend 🟨 Issues related to the UI/UX enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 29, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 `@frontend/components/navigation.tsx`:
- Around line 522-531: The overflow trigger in navigation.tsx is currently
rendered as a real button inside the conversation row’s outer row button,
creating invalid nested interactive elements. Update the row structure in the
conversation item so the primary row action and the More options trigger are
siblings, or make the trigger non-button while the row remains the button; use
the existing button wrapper and EllipsisVertical trigger placement to locate and
refactor this interaction.

In `@frontend/components/ui/command.tsx`:
- Line 43: The wrapper data attribute in the command input area is out of sync
with the selector used by CommandDialog, so the SVG sizing rule no longer
applies. Update the selector/reference in the CommandDialog styling logic to
match the new data-cmdk-input-wrapper attribute, and verify the command input
wrapper and its SVG stay aligned by using the same unique identifiers in the JSX
and CSS selector.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 67dd2b5f-c14d-49eb-ac2b-39965e7c272f

📥 Commits

Reviewing files that changed from the base of the PR and between 9748e52 and cdb02fe.

📒 Files selected for processing (8)
  • frontend/app/chat/_components/assistant-message.tsx
  • frontend/app/knowledge/page.tsx
  • frontend/components/cloud-picker/unified-cloud-picker.tsx
  • frontend/components/dev-role-toggle.tsx
  • frontend/components/knowledge-dropdown.tsx
  • frontend/components/navigation.tsx
  • frontend/components/ui/command.tsx
  • frontend/lib/task-utils.ts
💤 Files with no reviewable changes (1)
  • frontend/components/knowledge-dropdown.tsx

Comment thread frontend/components/navigation.tsx Outdated
Comment thread frontend/components/ui/command.tsx
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 `@frontend/.github/workflows/react-doctor.yml`:
- Around line 1-50: The React Doctor workflow is placed under a nested
.github/workflows directory, so GitHub won’t discover it. Move the
react-doctor.yml workflow to the repository-root .github/workflows folder and
keep the same job definition and triggers so the existing react-doctor job
continues to run.
- Line 32: The React Doctor workflow uses actions/checkout without full history,
which can cause incorrect PR baselining. Update the checkout step in the
workflow to include fetch-depth: 0 so React Doctor can compare against the merge
base correctly; use the existing actions/checkout step as the location to
adjust.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ba0acf08-be67-4bfd-8f8b-994db3282efc

📥 Commits

Reviewing files that changed from the base of the PR and between cdb02fe and 788b92f.

📒 Files selected for processing (1)
  • frontend/.github/workflows/react-doctor.yml

Comment thread .github/workflows/react-doctor.yml
Comment thread .github/workflows/react-doctor.yml Outdated
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 29, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 29, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 30, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 30, 2026

@Wallgau Wallgau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice work! One small thing: this PR uses actions/checkout@v5, while lint-frontend.yml (and most of the other workflows) are still on @v4, and codeql.yml is on @v6. Nothing will break since they're all valid versions, but it leaves us with a mix of versions that's a bit harder to maintain. Would it make sense to standardize on a single version across the repo?

@github-actions github-actions Bot added the lgtm label Jun 30, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 30, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 30, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 30, 2026
@mfortman11
mfortman11 merged commit d305ddd into main Jul 1, 2026
23 of 25 checks passed
@github-actions
github-actions Bot deleted the react-doctor-ci branch July 1, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci ⬛ CI/CD, build, and infrastructure issues community enhancement 🔵 New feature or request frontend 🟨 Issues related to the UI/UX lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants