Skip to content

fix: document cleanup logic and mock Celery task in tests & some UI fixes#870

Merged
MODSetter merged 6 commits intoMODSetter:devfrom
AnishSarkar22:fix/ui-tests-ci
Mar 11, 2026
Merged

fix: document cleanup logic and mock Celery task in tests & some UI fixes#870
MODSetter merged 6 commits intoMODSetter:devfrom
AnishSarkar22:fix/ui-tests-ci

Conversation

@AnishSarkar22
Copy link
Contributor

@AnishSarkar22 AnishSarkar22 commented Mar 11, 2026

Description

  • Updated the document cleanup logic to correctly append remaining IDs when the response status is not 200, preventing potential data loss during cleanup failures. Additionally, added a fixture to mock the Celery delete task in CI environments so that tests no longer require a running broker connection.
  • Some UI fixes.

Motivation and Context

FIX #

Screenshots

API Changes

  • This PR includes API changes

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation
  • Dependency/Build system
  • Breaking change
  • Other (specify):

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR fixes document cleanup logic in the backend test suite and adds Celery task mocking for CI environments, along with several UI improvements in the web application. The backend changes ensure that document cleanup properly handles all non-200 status codes (not just 409) and mocks the Celery delete task to avoid broker dependencies during testing. The frontend changes address a race condition in the connector dialog state management, improve the report panel's right panel collapse/expand behavior, enhance the agent tools popover UI with scroll indicators and mobile responsiveness, fix dropdown menu z-index issues in the sidebar, and make various minor UI refinements including icon updates and connector display improvements.

⏱️ Estimated Review Time: 30-90 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_backend/tests/integration/document_upload/conftest.py
2 surfsense_web/atoms/chat/report-panel.atom.ts
3 surfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.ts
4 surfsense_web/components/assistant-ui/thread.tsx
5 surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx
6 surfsense_web/components/layout/ui/sidebar/ChatListItem.tsx
7 surfsense_web/components/layout/ui/sidebar/Sidebar.tsx
8 surfsense_web/components/layout/ui/sidebar/SidebarUserProfile.tsx

Need help? Join our Discord

Analyze latest changes

@vercel
Copy link

vercel bot commented Mar 11, 2026

@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@AnishSarkar22 AnishSarkar22 marked this pull request as ready for review March 11, 2026 07:01
Copy link

@recurseml recurseml bot left a comment

Choose a reason for hiding this comment

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

Review by RecurseML

🔍 Review performed on eec4db4..851856a

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (8)

surfsense_backend/tests/integration/document_upload/conftest.py
surfsense_web/atoms/chat/report-panel.atom.ts
surfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.ts
surfsense_web/components/assistant-ui/thread.tsx
surfsense_web/components/layout/ui/sidebar/ChatListItem.tsx
surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx
surfsense_web/components/layout/ui/sidebar/Sidebar.tsx
surfsense_web/components/layout/ui/sidebar/SidebarUserProfile.tsx

@MODSetter MODSetter merged commit a56383c into MODSetter:dev Mar 11, 2026
13 of 16 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.

2 participants