- 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.
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.
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.
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.
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
- 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
The hero carousel video card and use-cases grid image card already had
role="button", tabIndex={0}, and onKeyDown handlers. Adds the missing
aria-label so screen readers announce what each clickable card does.
Both cards now use aria-label={`Expand ${title}`}, matching the example
in the issue.
Fixes#913