Skip to content

feat: citation UI for web links & many UI/UX improvements#1036

Open
AnishSarkar22 wants to merge 24 commits intoMODSetter:devfrom
AnishSarkar22:fix/chat-ux
Open

feat: citation UI for web links & many UI/UX improvements#1036
AnishSarkar22 wants to merge 24 commits intoMODSetter:devfrom
AnishSarkar22:fix/chat-ux

Conversation

@AnishSarkar22
Copy link
Copy Markdown
Contributor

@AnishSarkar22 AnishSarkar22 commented Mar 29, 2026

Description

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 introduces web search citations with rich UI components, improves chat tab management with better deletion handling, and refines the onboarding experience. It adds a new Citation component system that displays web search results with metadata (title, snippet, favicon) in various styles (inline, stacked, default cards), extracts citation data from backend web search tool results via SSE, and integrates it throughout the chat UI. The tab system now properly handles deleted chats by switching to a fallback tab and preventing recreation race conditions. The onboarding flow has been streamlined with a cleaner form layout, and model/image configuration dialogs have been consolidated into reusable shared components. Additional improvements include consistent loading spinners with absolute positioning, expanded FILE document editing support, better author avatar visibility logic for shared chats, and numerous small UX polish items like improved delete confirmations, toast messages with model names, and header layout refinements.

⏱️ Estimated Review Time: 30-90 minutes

💡 Review Order Suggestion
Order File Path
1 docs/chinese-llm-setup.md
2 surfsense_web/messages/en.json
3 surfsense_web/messages/es.json
4 surfsense_web/messages/hi.json
5 surfsense_web/messages/pt.json
6 surfsense_web/messages/zh.json
7 surfsense_web/components/tool-ui/shared/schema.ts
8 surfsense_web/components/tool-ui/shared/media/sanitize-href.ts
9 surfsense_web/components/tool-ui/shared/media/safe-navigation.ts
10 surfsense_web/components/tool-ui/shared/media/index.ts
11 surfsense_web/components/tool-ui/citation/schema.ts
12 surfsense_web/components/tool-ui/citation/_adapter.tsx
13 surfsense_web/components/tool-ui/citation/citation.tsx
14 surfsense_web/components/tool-ui/citation/citation-list.tsx
15 surfsense_web/components/tool-ui/citation/index.ts
16 surfsense_backend/app/tasks/chat/stream_new_chat.py
17 surfsense_web/components/assistant-ui/citation-metadata-context.tsx
18 surfsense_web/components/assistant-ui/inline-citation.tsx
19 surfsense_web/components/assistant-ui/assistant-message.tsx
20 surfsense_web/components/public-chat/public-thread.tsx
21 surfsense_web/atoms/tabs/tabs.atom.ts
22 surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx
23 surfsense_web/components/layout/providers/LayoutDataProvider.tsx
24 surfsense_web/components/layout/ui/sidebar/AllPrivateChatsSidebar.tsx
25 surfsense_web/components/layout/ui/sidebar/AllSharedChatsSidebar.tsx
26 surfsense_web/hooks/use-global-loading.ts
27 surfsense_web/app/dashboard/[search_space_id]/onboard/page.tsx
28 surfsense_web/components/shared/llm-config-form.tsx
29 surfsense_web/components/shared/model-config-dialog.tsx
30 surfsense_web/components/shared/image-config-dialog.tsx
31 surfsense_web/components/new-chat/chat-header.tsx
32 surfsense_web/components/new-chat/model-selector.tsx
33 surfsense_web/components/settings/model-config-manager.tsx
34 surfsense_web/components/settings/image-model-manager.tsx
35 surfsense_web/atoms/new-llm-config/new-llm-config-mutation.atoms.ts
36 surfsense_web/atoms/image-gen-config/image-gen-config-mutation.atoms.ts
37 surfsense_web/app/dashboard/[search_space_id]/user-settings/components/PromptsContent.tsx
38 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx
39 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx
40 surfsense_web/components/documents/DocumentNode.tsx
41 surfsense_web/components/editor-panel/editor-panel.tsx
42 surfsense_web/components/layout/ui/tabs/DocumentTabContent.tsx
43 surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx
44 surfsense_web/components/assistant-ui/user-message.tsx
45 surfsense_web/components/assistant-ui/thinking-steps.tsx
46 surfsense_web/components/assistant-ui/connector-popup.tsx
47 surfsense_web/components/assistant-ui/connector-popup/components/connector-card.tsx
48 surfsense_web/contracts/enums/toolIcons.tsx
49 surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx
50 surfsense_web/components/layout/ui/shell/LayoutShell.tsx
51 surfsense_web/components/layout/ui/tabs/TabBar.tsx
52 surfsense_web/components/layout/ui/header/Header.tsx
53 surfsense_web/components/layout/ui/right-panel/RightPanel.tsx
54 surfsense_web/components/layout/ui/sidebar/Sidebar.tsx

Need help? Join our Discord

Analyze latest changes

…rts in chat-header and image-model-manager for better organization
…e related imports for better organization and clarity
…o-configuration and redirect features for UI testing
…reamline LLMConfigForm usage for improved user experience
…edback messages for improved clarity and consistency
…g auto mode references for improved clarity and consistency
…component heights, and enhance right panel functionality with expanded button integration
…tle update logic for improved user experience
…tion and preventing race conditions during deletion for improved user experience
…e related logic across components for improved functionality
…esponsive design adjustments for improved user experience
…unctionality and schema validation for enhanced citation management
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 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 changed the title feat: web links UI and many UX improvements feat: citation UI for web links & many UI/UX improvements Mar 29, 2026
Copy link
Copy Markdown

@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 05030f6..74826b3

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (50)

docs/chinese-llm-setup.md
surfsense_backend/app/tasks/chat/stream_new_chat.py
surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx
surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx
surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx
surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx
surfsense_web/app/dashboard/[search_space_id]/onboard/page.tsx
surfsense_web/app/dashboard/[search_space_id]/user-settings/components/PromptsContent.tsx
surfsense_web/atoms/image-gen-config/image-gen-config-mutation.atoms.ts
surfsense_web/atoms/new-llm-config/new-llm-config-mutation.atoms.ts
surfsense_web/atoms/tabs/tabs.atom.ts
surfsense_web/components/assistant-ui/assistant-message.tsx
surfsense_web/components/assistant-ui/citation-metadata-context.tsx
surfsense_web/components/assistant-ui/connector-popup.tsx
surfsense_web/components/assistant-ui/connector-popup/components/connector-card.tsx
surfsense_web/components/assistant-ui/inline-citation.tsx
surfsense_web/components/assistant-ui/thinking-steps.tsx
surfsense_web/components/assistant-ui/user-message.tsx
surfsense_web/components/documents/DocumentNode.tsx
surfsense_web/components/editor-panel/editor-panel.tsx
surfsense_web/components/layout/providers/LayoutDataProvider.tsx
surfsense_web/components/layout/ui/header/Header.tsx
surfsense_web/components/layout/ui/right-panel/RightPanel.tsx
surfsense_web/components/layout/ui/shell/LayoutShell.tsx
surfsense_web/components/layout/ui/sidebar/AllPrivateChatsSidebar.tsx
surfsense_web/components/layout/ui/sidebar/AllSharedChatsSidebar.tsx
surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx
surfsense_web/components/layout/ui/sidebar/Sidebar.tsx
surfsense_web/components/layout/ui/tabs/DocumentTabContent.tsx
surfsense_web/components/layout/ui/tabs/TabBar.tsx
surfsense_web/components/new-chat/chat-header.tsx
surfsense_web/components/new-chat/image-config-dialog.tsx
surfsense_web/components/new-chat/model-config-dialog.tsx
surfsense_web/components/new-chat/model-selector.tsx
surfsense_web/components/public-chat/public-thread.tsx
surfsense_web/components/settings/image-model-manager.tsx
surfsense_web/components/settings/model-config-manager.tsx
surfsense_web/components/shared/image-config-dialog.tsx
surfsense_web/components/shared/llm-config-form.tsx
surfsense_web/components/shared/model-config-dialog.tsx
surfsense_web/components/tool-ui/citation/_adapter.tsx
surfsense_web/components/tool-ui/citation/citation-list.tsx
surfsense_web/components/tool-ui/citation/citation.tsx
surfsense_web/components/tool-ui/citation/index.ts
surfsense_web/components/tool-ui/citation/schema.ts
surfsense_web/components/tool-ui/shared/media/index.ts
surfsense_web/components/tool-ui/shared/media/safe-navigation.ts
surfsense_web/components/tool-ui/shared/media/sanitize-href.ts
surfsense_web/components/tool-ui/shared/schema.ts
surfsense_web/contracts/enums/toolIcons.tsx

⏭️ Files skipped (5)
  Locations  
surfsense_web/messages/en.json
surfsense_web/messages/es.json
surfsense_web/messages/hi.json
surfsense_web/messages/pt.json
surfsense_web/messages/zh.json

@AnishSarkar22 AnishSarkar22 marked this pull request as ready for review March 29, 2026 20:17
@AnishSarkar22 AnishSarkar22 marked this pull request as draft March 29, 2026 20:17
@AnishSarkar22 AnishSarkar22 marked this pull request as ready for review March 29, 2026 20:21
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