* fix(tests): align subagent catalog division count with bundled library
The bundled subagent catalog now loads 19 divisions (272 agents), but two
tests still hard-coded an expected count of 16. Update the assertions so the
pre-commit suite is green.
* feat(dashboard,backend): native clipboard fallback and chat UI polish
Replace the copy-to-clipboard dependency in the dashboard with a native
navigator.clipboard + execCommand fallback (copyText), and refine the chat
UI components (ChatInputActionsRow, MessageBubble, ScrollToBottomButton).
Backend: adjust mobile shell_ws, browser setup, and connector cli_install,
with accompanying unit tests.
---------
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
* feat: add per-user module permissions (RBAC) with admin bypass
Introduce a module-level permission system so non-admin users can be
scoped to a subset of dashboard modules. Adds a `permissions` TEXT column
on the `users` table (migration 006, SQLite + PostgreSQL), a central
permission catalog in `infra/users/permissions.py`, backend ACL checks
across routers, and dashboard gating via `RequirePermission` /
`ForbiddenPage` keyed by nav module. `admin` always bypasses every gate;
read access and chat/agent use are never gated.
* fix: gate connector install-cli by connectors permission (not admin-only)
The host CLI installer is a connectors-module operation and should be
gated by the `connectors` module permission, consistent with the rest of
the connector routes, instead of being admin-only.
The earlier RBAC change demoted this route from `current_admin` but the
test `test_install_cli_forbidden_for_non_admin` still failed because the
`create_user` test helper grants `BASELINE_PERMISSIONS` (which includes
`connectors`) by default, so the "non-admin" user actually held the
permission. Gate the route with `require_permission("connectors")` and
create the test user with `permissions=[]` so it genuinely lacks the
key and is rejected with 403.
---------
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
* feat(browser): support real remote drag with shared canvas pointer
Forward CDP mousedown/mousemove/mouseup (with clickCount) so remote
browser and desktop can drag instead of pan-to-scroll, and share a
connecting indicator while the stream starts.
* fix(chat): restore loading earlier messages on scroll up
Keep the load-older gate armed across virtual list updates, release
the in-flight latch when history declines to start, and expose a
clickable fallback when the list does not overflow.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(workspace): clarify path semantics with from_workspace
Add from_workspace so workspace UI keeps leading-slash relative paths
while chat/tool downloads can pass host-absolute send_file paths
through BackendWorkspace, with a host download allowlist.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(workspace): preserve chat document path semantics
* fix(workspace): harden file URL and host path checks on Windows
Preserve Unix-style file:// paths instead of url2pathname backslashes,
decode percent-encoded segments, and deny POSIX system roots like /etc
before Path.resolve() on Windows.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(workspace): decode Windows file URLs to native paths
Unquote percent-encoded segments in file:///C:/… URLs and normalize
via Path so send_file enrichment matches str(Path.resolve()) on Windows.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>