Commit Graph

485 Commits

Author SHA1 Message Date
Anish Sarkar e0ecea61f8 refactor: extract user avatar color and initials logic into a new utility module, update related components to use the new functions 2026-05-18 21:40:23 +05:30
Anish Sarkar 87caa4b6d0 Merge remote-tracking branch 'upstream/dev' into feat/ui-revamp 2026-05-18 09:39:35 +05:30
Rohan Verma 8fc4b98593 Merge pull request #1402 from guangyang1206/fix/extract-domain-helper-1368
Fix/extract domain helper 1368
2026-05-17 18:17:25 -07:00
Anish Sarkar f65bc81509 Merge remote-tracking branch 'upstream/dev' into feat/ui-revamp 2026-05-16 19:26:36 +05:30
guangyang1206 f096548a16 fix(web): extract single tryGetHostname helper (DRY, unified fallback)
Fixes #1368

Previously,  was duplicated in 4 places with 3 subtly different fallback behaviors:
1. inline-citation.tsx: returned  on error
2. markdown-text.tsx: returned  on error
3. assistant-message.tsx: returned  on error
4. citation.tsx: returned  on error

Created canonical  in  that:
- Returns
- Strips  prefix from hostname
- Returns  on invalid URL (safest contract)

Updated all 4 call sites:
- inline-citation.tsx:  (preserves original fallback)
- markdown-text.tsx:  (preserves original fallback)
- assistant-message.tsx:  (drop-in, both return )
- citation.tsx:  (drop-in, both return )

Co-authored-by: guangyang1206 <guangyang1206@users.noreply.github.com>
2026-05-16 12:15:16 +08:00
guangyang1206 3504be3413 fix(web): make cacheKeys.*.withQueryParams order-stable (sort entries)
Fixes #1370

Object.values() produces order-dependent cache keys because the order of values depends on the order of keys in the object. This causes the same logical query to produce different cache keys when the parameter object has keys in different orders.

Added stableEntries() helper that:
1. Filters out undefined values
2. Sorts entries by key name
3. Returns flat array of [key, value] pairs

This ensures cache key identity is stable regardless of parameter object key order.

Co-authored-by: guangyang1206 <guangyang1206@users.noreply.github.com>
2026-05-16 12:10:04 +08:00
DESKTOP-RTLN3BA\$punk 219a5977b7 fix: update URLs to use the "www" subdomain across the application
This commit modifies various metadata and canonical URLs in the SurfSense application to ensure consistency by using "https://www.surfsense.com" instead of "https://surfsense.com". Changes were made in layout files, blog posts, and SEO components to reflect this update.
2026-05-15 12:35:15 -07:00
CREDO23 4980f9f1ba Merge remote-tracking branch 'upstream/dev' into feature/multi-agent-with-task-parallelization 2026-05-15 16:44:22 +02:00
CREDO23 5327f3348c connector-popup: surface trusted-tools UI in MCP edit view; consolidate disconnect
- Slot MCPTrustedTools in mcp-service-config (gated on connector.id > 0) so
  any connected MCP-backed connector exposes a revoke surface for
  approve_always grants.
- Add new mcp-trusted-tools.tsx (audit + revoke list) and
  connectorsApiService.untrustMCPTool() that backs it.
- Drop the redundant row-level Disconnect from ConnectorAccountsListView:
  Manage now leads to the edit view whose own Disconnect is the single
  source of truth. Remove the now-dead onDisconnect prop, confirm-flow
  state, and handleDisconnectFromList hook callback + return entry.
2026-05-15 16:40:16 +02:00
CREDO23 1f1b6c5425 hitl/generic-approval: drop client-side MCP gate, dispatch approve_always
The 'Always Allow' button is now driven entirely by the server-supplied
allowed_decisions palette. The card no longer peeks at
context.mcp_connector_id to decide whether to render the button, and no
longer fires a separate trust-tool HTTP call on click - one
{type: 'approve_always'} dispatch is enough; the agent middleware
handles the in-memory promotion and (for MCP tools) the database save
via its trusted_tool_saver callback.

Drops the dead trustMCPTool / untrustMCPTool service helpers - they had
no remaining callers after this rework. The backing HTTP routes are
kept on the server as a programmatic surface.
2026-05-15 14:59:45 +02:00
Rohan Verma eea2d68098 Merge pull request #1396 from guangyang1206/fix/shared-thread-timestamp-formatter-1376
feat(shared): extract formatThreadTimestamp helper for chats sidebars…
2026-05-15 04:55:47 -07:00
Anish Sarkar 4083d33b5c refactor: enhance SidebarUserProfile component with download tracking and improved button styling 2026-05-14 22:53:41 +05:30
Anish Sarkar da55c75e5e refactor: remove ThreadList component and associated thread management logic 2026-05-14 14:42:41 +05:30
CREDO23 1bb9f435e5 chat-messages: render and batch-submit multiple HITL approval cards 2026-05-13 21:00:01 +02:00
Anish Sarkar 481bb406b6 Merge remote-tracking branch 'upstream/dev' into feat/ui-revamp 2026-05-13 03:02:23 +05:30
너이름 fb0c13911d fix(auth): centralize redirect path storage 2026-05-11 06:30:26 +09:00
DESKTOP-RTLN3BA\$punk c8374e6c5b feat: improved document, folder mentions rendering 2026-05-09 22:15:51 -07:00
guangyang1206 10212f3d5a feat(shared): extract formatThreadTimestamp helper for chats sidebars (fixes #1376)
- Add formatThreadTimestamp() to surfsense_web/lib/format-date.ts
- Use shared helper in AllPrivateChatsSidebar and AllSharedChatsSidebar
- Remove unused date-fns format import from both sidebar files
- Centralises timestamp formatting policy for future i18n/relative-time changes
2026-05-10 12:05:10 +08:00
CREDO23 932bf22a34 chat: fix mixed-decision HITL crash and fold resumed assistant messages into the interrupted bubble. 2026-05-09 22:54:07 +02:00
CREDO23 89e4953800 chat: suppress stale step separator emitted during resume rehydration. 2026-05-09 18:36:00 +02:00
CREDO23 ba0e1e70a0 chat: drop legacy thinking-steps, tool-fallback, hitl modules, and span-indent helper. 2026-05-09 18:35:52 +02:00
CREDO23 9c5a178468 chat: switch dashboard chat page to slice and drop superseded aborted rows on resume. 2026-05-09 18:35:39 +02:00
CREDO23 a8417e3c45 Render HITL approval cards inline in the thinking-steps timeline. 2026-05-09 14:37:06 +02:00
CREDO23 e7c5204b02 Indent tool cards under an active delegating task span. 2026-05-09 00:39:59 +02:00
CREDO23 39084b3075 Forward tool SSE metadata into the streaming content parts. 2026-05-09 00:39:50 +02:00
CREDO23 47e64d1861 Persist optional relay metadata on tool-call and thinking-step state. 2026-05-09 00:39:43 +02:00
CREDO23 78f4747382 refactor(chat): stream agent events via stream_output and remove parity v2 flag 2026-05-07 19:40:10 +02:00
DESKTOP-RTLN3BA\$punk b5be9408f7 Merge commit '9576d1f01fb3ed1bcec9c7908f8590be4da8ff37' into dev 2026-05-05 01:44:39 -07:00
DESKTOP-RTLN3BA\$punk 6e1dd40597 feat: implement finalize checkout endpoint and update purchase success handling
- Added a new endpoint `/stripe/finalize-checkout` to synchronously fulfill a checkout session, addressing the webhook-vs-redirect race condition.
- Updated the `PurchaseSuccessPage` component to handle various states of the checkout process, including loading, completed, pending, and failed states.
- Introduced a new response model `FinalizeCheckoutResponse` to provide immediate feedback on the purchase status.
- Enhanced the Stripe API service to include the new finalize checkout functionality.
2026-05-05 01:01:12 -07:00
CREDO23 5119915f4f Merge upstream/dev into feature/multi-agent 2026-05-05 01:44:46 +02:00
CREDO23 6a9433c8ff Apply per-card decisions in HITL bundle resume. 2026-05-05 00:22:10 +02:00
CREDO23 0af2c28a8d Stabilize HITL bundle UX and resume. 2026-05-04 23:58:53 +02:00
DESKTOP-RTLN3BA\$punk 19b6e0a025 feat: moved chat persistance to Server Side 2026-05-04 03:06:15 -07:00
Anish Sarkar 4e8c552440 Merge remote-tracking branch 'upstream/dev' into feat/ui-revamp 2026-05-03 18:58:55 +05:30
Anish Sarkar a9192beae3 feat(announcements): rename "Announcements" to "What's New" across the application; add AnnouncementsDialog component for displaying updates; update empty state messaging; remove unused AnnouncementsSidebar component. 2026-05-03 18:42:29 +05:30
DESKTOP-RTLN3BA\$punk c938d39277 feat: moved most things behind correct feature flag 2026-05-02 23:10:48 -07:00
DESKTOP-RTLN3BA\$punk ae9d36d77f feat: unified credits and its cost calculations 2026-05-02 14:34:23 -07:00
Anish Sarkar cd25175b84 chore: ran linting 2026-05-02 03:36:13 +05:30
Anish Sarkar d14fed43c6 feat(documents): add endpoint to retrieve document by virtual path 2026-05-02 02:45:27 +05:30
DESKTOP-RTLN3BA\$punk c644f02d05 chore: linting 2026-04-30 18:42:38 -07:00
DESKTOP-RTLN3BA\$punk 7aeb8bb0a8 feat(markdown): enable citation rendering in MarkdownViewer and related components
- Added `enableCitations` prop to `MarkdownViewer` to support interactive citation badges.
- Updated instances of `MarkdownViewer` across various components to utilize the new citation feature.
- Enhanced citation processing in `PlateEditor` for read-only views, ensuring citations are rendered correctly without affecting markdown serialization.
- Refactored citation handling in `InlineCitation` and `MarkdownText` to improve citation context management.
2026-04-30 18:40:55 -07:00
Anish Sarkar 8b4f136668 refactor(chat): enhance UserMessage component with mention parsing and segment rendering for improved message display 2026-05-01 04:02:24 +05:30
Anish Sarkar af66fbf106 refactor(chat): implement turn cancellation and status management in new chat routes for improved user experience and error handling 2026-05-01 01:47:52 +05:30
Anish Sarkar d65a3fdf76 refactor(chat): implement new error handling utilities and streamline interrupt request processing in NewChatPage for improved performance and maintainability 2026-04-30 18:22:34 +05:30
Anish Sarkar 86f6b285ce refactor(chat): introduce new stream handling utilities and restructure event processing for improved performance and maintainability 2026-04-30 18:09:34 +05:30
Anish Sarkar 872065f90d Merge remote-tracking branch 'upstream/dev' into feat/split-auto-free-premium 2026-04-30 16:23:05 +05:30
Anish Sarkar ba2a08b295 Merge remote-tracking branch 'upstream/dev' into feat/split-auto-free-premium 2026-04-30 15:45:11 +05:30
DESKTOP-RTLN3BA\$punk e651c41372 feat: enhance tool input streaming and agent action handling for improved chat experience 2026-04-30 03:13:58 -07:00
Anish Sarkar f60e742fac feat(chat): implement pre-accept failure handling and unified retry messaging for chat operations, enhancing user experience and error management 2026-04-30 14:58:56 +05:30
Anish Sarkar 35ea0eae53 feat(chat): enhance error classification and handling for thread busy scenarios, improving user feedback and response management 2026-04-30 14:03:09 +05:30