Commit graph

3042 commits

Author SHA1 Message Date
Rohan Verma
ac76d50ec7
Merge pull request #1400 from guangyang1206/fix/cachekeys-order-stable-1370
Fix/cachekeys order stable 1370
2026-05-17 18:16:30 -07:00
Anish Sarkar
af1d2fa430 Merge remote-tracking branch 'upstream/dev' into fix/zero-cache-stale-replica-1355 2026-05-16 19:30:09 +05:30
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
c187b04e82 chore: linting 2026-05-15 17:33:44 -07: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
DESKTOP-RTLN3BA\$punk
dc88ce0277 Merge branch 'dev' of https://github.com/MODSetter/SurfSense into dev 2026-05-15 11:55:40 -07:00
DESKTOP-RTLN3BA\$punk
52a64fb96c feat: added blog posts 2026-05-15 11:55:30 -07:00
Rohan Verma
953c654452
Merge pull request #1398 from mvanhorn/osc/1373-platefile-jsdoc-mod-shift-s-dev
docs(editor): align PlateEditor onSave JSDoc with Mod+Shift+S chord
2026-05-15 11:28:15 -07:00
Rohan Verma
1afecc9194
Merge pull request #1397 from voidborne-d/fix/suppress-global-error-toast-mutations-dev
fix(web): suppress global error toast on mutations that own their toast UX
2026-05-15 11:27:40 -07:00
Matt Van Horn
f0a51fad6f
docs(editor): align PlateEditor onSave JSDoc with Mod+Shift+S chord
Per #1373, the registered save chord is Mod+Shift+S (not Mod+S, which
collides with the browser's Save-Page-As). The JSDoc on PlateEditorProps.onSave
still claims Mod+S, which is misleading for downstream consumers of the
component. Update the JSDoc to match the actual chord and call out why.

Targeting dev per maintainer request.
2026-05-15 09:06:42 -07:00
voidborne-d
bf2b4ebeb0 fix(web): suppress global error toast on mutations that own their toast UX
Closes #1371. Retarget of #1385 onto dev per maintainer request.

surfsense_web/lib/query-client/client.ts configures a global
MutationCache.onError that shows an error toast for every failed
mutation unless meta.suppressGlobalErrorToast is set. The opt-out
hook existed in the consumer but had zero producers — every mutation
atom that already had its own onError: toast.error(...) was
double-toasting on failure.

Add meta: { suppressGlobalErrorToast: true } to the 30 mutations
across 9 atom files that own their own error toast:

- atoms/prompts/prompts-mutation.atoms.ts (4)
- atoms/invites/invites-mutation.atoms.ts (4)
- atoms/chat-comments/comments-mutation.atoms.ts (4)
- atoms/new-llm-config/new-llm-config-mutation.atoms.ts (4)
- atoms/members/members-mutation.atoms.ts (3)
- atoms/roles/roles-mutation.atoms.ts (3)
- atoms/image-gen-config/image-gen-config-mutation.atoms.ts (3)
- atoms/vision-llm-config/vision-llm-config-mutation.atoms.ts (3)
- atoms/public-chat-snapshots/public-chat-snapshots-mutation.atoms.ts (2)

Atoms intentionally left alone (no local onError, rely on global):
auth, user, search-spaces, logs, documents, connectors.

Local validation (against dev): pnpm biome check on the 9 touched
files is clean; tsc --noEmit shows no new errors in the touched files
(pre-existing errors elsewhere unrelated).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 23:43:30 +08: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
CREDO23
c8b756ae8f hitl/wire: rename 'always' decision-type to 'approve_always'
Renames the SurfSense HITL extension decision-type from "always" to
"approve_always" so it sits in the same verb-first family as "approve",
"reject", and "edit". The Python constant is now SURFSENSE_DECISION_APPROVE_ALWAYS;
the wire value, the permission-domain decision_type, and the FE union members
all match (no wire/internal mismatch).

Both the multi_agent_chat permission middleware and the legacy new_chat one
accept the new wire value; the FE types.ts union is updated accordingly.

The "context.always" payload key is intentionally left untouched - it's the
patterns-to-promote field, semantically distinct from the decision type.
2026-05-15 14:47:32 +02:00
Rohan Verma
eea2d68098
Merge pull request #1396 from guangyang1206/fix/shared-thread-timestamp-formatter-1376
Some checks failed
Build and Push Docker Images / tag_release (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, production) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, production) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64, runner) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64, runner) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend) (push) Has been cancelled
Build and Push Docker Images / create_manifest (web, surfsense-web) (push) Has been cancelled
feat(shared): extract formatThreadTimestamp helper for chats sidebars…
2026-05-15 04:55:47 -07:00
Rohan Verma
7f66159af1
Merge pull request #1391 from guangyang1206/fix/log-mutations-invalidate-all-keys-1369
fix(web): invalidate all log cache keys on log mutations
2026-05-15 04:55:25 -07:00
Rohan Verma
4ab9544a66
Merge pull request #1382 from mvanhorn/osc/1372-use-canonical-log-types
refactor(use-logs): use canonical log types from contracts/types/log.types
2026-05-15 04:49:21 -07:00
Rohan Verma
4db3cf7fd5
Merge pull request #1377 from AnishSarkar22/feat/e2e-testing-ci
feat: add E2E CI and harden Docker build migrations
2026-05-15 04:47:26 -07:00
CREDO23
1bb9f435e5 chat-messages: render and batch-submit multiple HITL approval cards 2026-05-13 21:00:01 +02:00
guangyang1206
b7b4443276 fix(web): invalidate all log cache keys on log mutations
Fixes #1369 — log create/update/delete mutations did not invalidate
the query keys that useLogs actually subscribes to, causing UI staleness.

Replace narrow invalidations (list, summary) with prefix-level
invalidation (["logs"]) to cover withQueryParams, list, summary
and detail in one shot.
2026-05-13 20:59:08 +08:00
Anish Sarkar
883c72396c chore: add minimumReleaseAge configuration to pnpm workspace for dependency management 2026-05-13 03:38:04 +05:30
Anish Sarkar
d9ec401835 chore: remove caret from @rocicorp/zero dependency version 2026-05-13 03:34:28 +05:30
Anish Sarkar
6eb900cb0f chore: update packageManager version to pnpm@10.26.0 in both desktop and web projects 2026-05-12 23:59:58 +05:30
Anish Sarkar
0884b63406 chore: ran linting 2026-05-12 23:25:33 +05:30
Anish Sarkar
32ff864fd3 refactor(assistant-ui): streamline docstrings and comments 2026-05-12 23:24:01 +05:30
Anish Sarkar
2437716752 refactor(assistant-ui): enhance mention chip handling and editor focus behavior 2026-05-12 23:18:45 +05:30
Anish Sarkar
0c2beb7ce8 fix(thread): conditionally render screen capture button for desktop users 2026-05-12 21:26:33 +05:30
Anish Sarkar
8ea042e88c refactor(chat): improve user query handling and mention chip functionality 2026-05-12 20:57:15 +05:30
Anish Sarkar
ce4531461c chore: update zero-cache image and dependencies to version 1.4.0 2026-05-12 15:24:19 +05:30
Anish Sarkar
275e2c9e83 chore: fix linting 2026-05-12 04:00:04 +05:30
Anish Sarkar
4dbadbf159 chore: update .gitignore and biome.json to include additional test-related directories and files for improved E2E testing 2026-05-12 03:59:52 +05:30
Anish Sarkar
650b691a39 chore: enhance E2E tests by adding synthetic global LLM config and updating environment variables for Google OAuth 2026-05-12 02:37:39 +05:30
DESKTOP-RTLN3BA\$punk
ec957e6fae Merge commit 'd6618b8357' into dev 2026-05-11 12:35:04 -07:00
DESKTOP-RTLN3BA\$punk
81583ef382 chore: hide blog until published 2026-05-11 11:08:42 -07:00
Anish Sarkar
b247ff37df chore: implement test-only token mint endpoint and update E2E test authentication flow 2026-05-11 19:48:18 +05:30
Anish Sarkar
741d6e7eea chore: update pnpm workspace configuration to allow builds for specified dependencies 2026-05-11 17:02:06 +05:30
Anish Sarkar
83e40c5aea chore: update Docker configuration to include pnpm workspace and refine dependency management 2026-05-11 15:31:24 +05:30
Anish Sarkar
3b345e7091 chore: add pnpm configuration for only built dependencies in package.json 2026-05-11 13:41:38 +05:30
Matt Van Horn
b92cc963ce
refactor(use-logs): use canonical log types from contracts/types/log.types
Removes duplicated LogLevel, LogStatus, Log, LogFilters and LogSummary
definitions from surfsense_web/hooks/use-logs.ts. These shapes already
live as Zod-derived types in contracts/types/log.types.ts, which is the
source of truth used by logs-api.service.ts and log-mutation.atoms.ts.

Adds LogLevel and LogStatus aliases for LogLevelEnum/LogStatusEnum in
log.types.ts so the existing public surface from use-logs is preserved
without per-hook re-exports. The hook re-exports the canonical names so
callers (app/dashboard/[search_space_id]/logs/(manage)/page.tsx) do not
need to change.

Closes #1372
2026-05-11 00:11:05 -07:00
Rohan Verma
cb46da3525
Merge pull request #1381 from xclear-cast/codex/centralize-redirect-path
Some checks are pending
Build and Push Docker Images / tag_release (push) Waiting to run
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64) (push) Blocked by required conditions
Build and Push Docker Images / create_manifest (backend, surfsense-backend) (push) Blocked by required conditions
Build and Push Docker Images / create_manifest (web, surfsense-web) (push) Blocked by required conditions
fix(auth): centralize redirect path storage
2026-05-10 16:47:54 -07:00
Anish Sarkar
5344fa47e6 chore: update E2E test documentation for clarity and local setup instructions 2026-05-11 03:29:32 +05:30
Anish Sarkar
68f45335bc chore: implement E2E testing setup with Docker Compose and update workflow for backend and Redis services 2026-05-11 03:09:01 +05:30
너이름
fb0c13911d fix(auth): centralize redirect path storage 2026-05-11 06:30:26 +09:00
너이름
935cd7b7c9 fix(auth): remove redundant token storage write 2026-05-11 06:25:40 +09:00
Anish Sarkar
292b4d70ac chore: enhance E2E tests workflow by adding caching for Next.js build and updating test command 2026-05-10 22:21:06 +05:30
Anish Sarkar
21d3be14c9 chore: update E2E tests workflow name and adjust video recording settings 2026-05-10 21:13:57 +05:30
DESKTOP-RTLN3BA\$punk
c8374e6c5b feat: improved document, folder mentions rendering
Some checks are pending
Build and Push Docker Images / tag_release (push) Waiting to run
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64) (push) Blocked by required conditions
Build and Push Docker Images / create_manifest (backend, surfsense-backend) (push) Blocked by required conditions
Build and Push Docker Images / create_manifest (web, surfsense-web) (push) Blocked by required conditions
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
Rohan Verma
28a02a9143
Merge pull request #1357 from CREDO23/feature/multi-agent
[Feature] Multi-agent chat: hierarchical timeline, live subagent streaming, and inline HITL approvals
2026-05-09 16:13:04 -07:00