73 Commits

Author SHA1 Message Date
Andrey Antukh
1db1487c7f
🐛 Require thread access when marking threads as read (#12894)
* 🐛 Require thread access when marking threads as read

mark-all-threads-as-read took any list of thread ids and wrote the read
status of the caller on each of them, without checking that the caller
can access the file that owns the thread. It was the only comment
mutation that did not check permissions, and it took the ids as an
unbounded array, so a single request could keep a database connection
and a transaction open for a long time.

The rpc now resolves the threads in one query and checks the comment
permissions of every distinct file, answering not-found when a thread
does not exist or is not accessible. Both cases answer the same error
on purpose, so the response cannot be used to tell existing threads
apart.

The status rows are now written with a single insert, keeping the
modified-at date one second in the future that makes the thread count
as read. Repeated ids are deduped, the command returns nil again like
the sibling commands with no result, and the schema limits the number
of threads per call to 500 while the dashboard sends the ids in batches
of that size.

Tests cover access rejection, unknown threads, mixed batches that write
nothing, repeated ids, empty lists, marking twice, and the frontend
batch split.

Relates to GHSA-j4vc-cmf6-jhr7

AI-assisted-by: minimax-m3.1-flash

* 🐛 Refresh the unread list when a batch fails

The dashboard sends the thread ids in batches of 500 and each batch
commits on the server. A failure in a later batch left the unread list
stale: the re-read only ran when every batch succeeded, so the threads
already marked as read stayed visible as unread.

The re-read now runs in both paths. On failure the event is emitted
before the error is propagated, so the error toast still shows and the
success toast stays limited to a full success.

The backend also answers an empty list without opening a transaction,
since there is nothing to check and nothing to write.

Relates to GHSA-j4vc-cmf6-jhr7

AI-assisted-by: deepseek-v4.1-flash
2026-11-10 15:54:11 +01:00
Alonso Torres
cbb9e5d971
✨ Add end-to-end tests for plugins validation (#11587)
* ✨ Add missing plugin data validations

* ✨ Add migration to fix the new schema validations

* ✨ Add end-to-end tests for plugins validation

* 🐛 Fix unit tests after merge

* 🐛 Change normalize behavior
2026-09-23 19:59:22 +02:00
Andrey Antukh
ba608f8c77 Merge remote-tracking branch 'origin/staging' into develop 2026-09-14 14:50:32 +02:00
Andrey Antukh
8629dc6b2c
🔥 Remove unused comment profiles code in the frontend (#11624)
* 🔥 Remove unused comment profiles fan-out in dashboard

The dashboard event retrieve-unread-comment-threads issued one
get-profiles-for-file-comments call per distinct file id and stored
the result in :current-team-comments-users, a state key no one
reads. The dashboard renders each thread author from the thread
payload via get-owner, so the fan-out was N+1 dead work.

Drop the per-file branch and the state write; the event now issues
a single get-unread-comment-threads call.

AI-assisted-by: deepseek-flash

* 🔥 Remove unused file comments users event and state

fetch-file-comments-users had no callers and passed a :team-id
where get-profiles-for-file-comments requires :file-id. Its only
effect was writing :file-comments-users, a viewer state key no
one reads.

Remove the event and the unused state key. The viewer still
loads comment profiles through fetch-profiles.

AI-assisted-by: deepseek-flash
2026-09-14 13:23:44 +02:00
andrés gonzález
6f63a5fcbf
✨ Persist hide resolved comments preference (#10694)
Store the hide-resolved filter in user storage and restore it when
entering the workspace or viewer, consistent with canvas comment
visibility from #10239. Match the comments filter separator styling to
the main menu and add the missing mentions option in the viewer
dropdown.

Closes #10686

Signed-off-by: Andres Gonzalez <andres.gonzalez79@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 08:14:37 +02:00
Andrey Antukh
81c3b3cd56
📎 Update copyright name on file header (#11346) 2026-08-25 11:55:10 +02:00
Alonso Torres
80d688be93
🐛 Fix problems with comments clusters (#10543) 2026-07-09 11:37:45 +02:00
Yamila Moreno
ddba2ffa75
📎 Update Kaleidos Copyright (#9929) 2026-05-29 11:24:58 +02:00
Alonso Torres
9f05ba2fdf
✨ Add plugins and mcp event data (#9228)
* ✨ Add plugins and mcp event data

* ♻️ Changed data-event ::ev/event to ev/event
2026-05-11 08:36:53 +02:00
Andrey Antukh
283eb0419c ♻️ Refactor time related namespaces
Mainly removes the custom app.util.time namespace
from frontend and backend and normalize all to use
the app.common.time namespace
2025-08-01 11:20:01 +02:00
Andrey Antukh
fa3fc12594 ✨ Sanitize uuid on the rest of code 2025-04-14 09:23:29 +02:00
Andrey Antukh
28fe951c40 ♻️ Replace usage of dm/assert on several namespaces
And remove the `!` from the name on check functions
2025-03-18 16:19:55 +01:00
Alejandro Alonso
7885f413b8 Merge remote-tracking branch 'origin/staging' into develop 2025-02-26 18:00:51 +01:00
luisδμ
2cf3e37b7a
🐛 Fix comment update fails in viewer (#5958)
* 🐛 Fix comment update fails in viewer

* 🐛 Reload team members in workspace but not in viewer
2025-02-26 14:29:51 +01:00
Luis de Dios
91efcd17a2 🐛 Fix design panel does not reappear if comment draft is open 2025-02-25 10:30:11 +01:00
María Valderrama
59a57d6c3f
✨ Mark all notifications as read from dashboard (#5805)
* ✨ Mark all notifications as read from dashboard

* ♻️ Mark all notifications as read code review

* ♻️ Mark all notifications as read code review II
2025-02-14 11:48:24 +01:00
luisδμ
00b0a59868
🐛 Fix user unread comments appear in every workspace (#5786) 2025-02-06 14:24:30 +01:00
Andrey Antukh
85746e7cb2 ♻️ Refactor state locality
The main purpose of this refactor is reduce
a custom state from different pages and unify
them under common access patterns
2025-01-16 15:31:18 +01:00
alonso.torres
6e3f9db744 🐛 Fix problem in firefox comments 2025-01-09 12:10:31 +01:00
alonso.torres
b1dda02b47 ✨ Add mentions to notifications 2025-01-09 11:55:53 +01:00
luisddm
b5e5c4b0dd ♻️ Visual changes in comments 2024-12-27 11:43:51 +01:00
Andrey Antukh
3e090b126e ♻️ Refactor application routing
Mainly removes an inconsistent use of path params and normalize
all routes to use query params for make it extensible without
breaking urls.
2024-12-03 18:23:41 +01:00
Andrey Antukh
c6b96a81f1 ♻️ Rename data.events to data.event 2024-12-03 12:15:52 +01:00
Pablo Alba
22e64c1c81 ✨ Add event "resolve-comment-thread" 2024-11-27 13:51:21 +01:00
Andrey Antukh
88fb5e7ab5 ♻️ Update integrant to latest version
This upgrade also includes complete elimination of use spec
from the backend codebase, completing the long running migration
to fully use malli for validation and decoding.
2024-11-13 19:09:19 +01:00
Andrey Antukh
4ad4057878 ♻️ Refactor page options data structure 2024-09-18 12:15:12 +02:00
alonso.torres
214733c880 ⬆️ Update plugins runtime 2024-09-16 09:48:56 +02:00
alonso.torres
fb39dd5440 ✨ Methods for comments 2024-09-13 12:29:07 +02:00
Andrey Antukh
b882b9e283 🔥 Remove usage of public usage of sm/define funcion 2024-09-13 11:30:55 +02:00
alonso.torres
a4776cf27f 🐛 Fix problem with comment refreshing 2024-04-04 09:59:24 +02:00
AzazelN28
411af023d5 🐛 Fix comment reply menu 2024-04-02 15:29:07 +02:00
Andrey Antukh
1a12e63027 ♻️ Simplify audit events code 2024-03-14 15:59:47 +01:00
alonso.torres
b00b77895f 🐛 Fix comment number in sidebar 2024-03-13 16:21:41 +01:00
Andrey Antukh
833871df65 💄 Format frontend code 2024-01-08 09:32:50 +01:00
Andrey Antukh
96f5a33f5f ⬆️ Upgrade to beicon2 (part1) 2023-12-26 14:14:20 +01:00
Andrey Antukh
37e4939af7 ✨ Add usability improvements to schema validation subsystem 2023-11-23 17:19:37 +01:00
Alejandro Alonso
69f2e7c43f Merge remote-tracking branch 'origin/staging' into develop 2023-09-01 12:40:17 +02:00
Alejandro Alonso
0c5c04e58a 🐛 Fix deleted pages comments shown in right sidebar 2023-08-31 15:16:55 +02:00
Andrey Antukh
b7eb20dc44 ⚡ Reduce unnecesary lookups on get-frame-by-position fn 2023-08-29 17:09:00 +02:00
Alejandro Alonso
53d1624f3f 🐛 Fix deleted pages comments shown in right sidebar 2023-08-29 13:13:12 +02:00
Alejandro Alonso
1aa7960863 🐛 Fix retrieve unread comment threads extra calls 2023-07-25 14:50:42 +02:00
alonso.torres
fc35b0b853 🐛 Fix retrieve user comments in dashboard 2023-07-12 13:06:42 +02:00
Andrey Antukh
f85a9011ee 🐛 Fix excessive data fetching on workspace comments 2023-07-10 12:44:24 +02:00
alonso.torres
647beec1e8 🐛 Fix problem with comments when user left the team 2023-07-07 10:18:28 +02:00
Andrey Antukh
5ca3d01ea1 🎉 Add malli based validation and coersion subsystem 2023-05-17 16:05:29 +02:00
Andrey Antukh
dbc08ba80f 📎 Fix linter issues on frontend 2023-05-17 15:47:21 +02:00
Alejandro Alonso
3b2083134e 🐛 Fix multiplayer username sometimes is not displayed correctly 2023-03-23 09:14:58 +01:00
alonso.torres
5d77f7e5b1 🐛 Fix linter issues 2023-03-21 17:11:23 +01:00
Andrey Antukh
27451b9796 ♻️ Refactor comments RPC methods and add tests 2022-12-31 12:00:57 +01:00
Andrey Antukh
41134f22e9 📎 Update license header 2022-09-20 23:23:22 +02:00