110 Commits

Author SHA1 Message Date
alonso.torres
19205b13ff ✨ Keep autosave and the workspace alive when saves fail
- A save that failed on a short platform failure (a lost or refused
  database connection, lack of resources, a server shutting down, a
  serialization failure or deadlock, a socket or HTTP timeout, a host
  that did not resolve, an interruption) answered 500, which stops
  autosave. It now answers 503, which the frontend retries. Other I/O
  and database errors keep answering 500, timeouts 504.
- A save answered not-found no longer replaces the workspace with the
  access page. It is a terminal save error: the workspace stays open
  with the failed save notice, report and reload link. When edit rights
  are lost, the notice says how many changes could not be saved.
- A library sync marked the library synced three seconds later,
  whatever happened to its save. A rejected sync was undone but stayed
  marked: copies stayed out of date and the "updates available" notice
  never came back. The mark now waits for the save, a rollback of the
  sync brings the notice back, and a failed mark (e.g. the user just
  became a viewer) is logged instead of leaving the workspace.
- While saves fail the workspace is read-only. The view-mode banner
  says editing is disabled because changes can't be saved, with the
  Inspect banner's size and bold lead and no Done button. Users can
  still switch pages, pan, zoom and inspect. The lock lifts when a save
  lands and brings back the mode the user had or picked meanwhile; the
  WebGL context lock keeps the workspace read-only if it lasts longer.
  The lock lives in app.main.data.persistence.lock.
- A viewer is never locked. A role change that leaves the user a viewer
  keeps the edits that lost permission, queued and on screen, and shows
  the count notice again. The role change that brings edit rights back
  releases them and rolls them back on screen, as a rejected save would.
  Any other terminal failure is released by the next role change or file
  opened.

The debug faults `io` (socket timeout, 503) and `eof` (500) cover both
sides of the I/O rule.
2026-11-04 15:01:49 +01:00
alonso.torres
91a2a21ecd ✨ Keep the valid commits of a save that fails validation
A save whose changes failed validation was rejected as a whole: autosave
stopped, the edits made after it piled up unsent, and a reload lost
them all, the valid ones included.

The frontend now sends each commit of a save as its own group with its
commit id (:changes-with-metadata). When applying and validating all of
them at once fails, the backend searches by bisection for the first
commit that fails, keeps the commits before it and answers with
:rejected (that commit and every later one). Only the kept changes are
stored, snapshotted and broadcast, so other users never see the rejected
ones. Flat :changes and groups without ids stay all-or-nothing; database
and network errors still fail the whole request. A rejection without an
error type is reported as an internal error.

The frontend rolls the file back to what the server holds: it undoes
every pending commit of that file, applies again the remote changes that
arrived meanwhile, and redoes the kept commits. Undoing only the
rejected commits would write stale values over a peer's later change to
the same attribute. The rejected and later commits leave the queue, the
buffer and the undo history, and a warning that hides after ten seconds
tells the user. The pure bookkeeping lives in
app.main.data.persistence.commits.

The pending notice of a commit the rollback dropped no longer leaves the
save status at pending, which made "Pin this version" hang and fail.

Debug tools drive these cases by hand: debug.commitInvalidChange() makes a
save fail validation, holdSaves() delays the answers, failNextSave() and
failNextRollback() fail them on purpose (backend flag debug-save-faults),
and persistenceState() shows the queue.
2026-11-04 15:01:49 +01:00
Andrey Antukh
0ef35fc52a
🐛 Harden browser logging against invalid levels (#11693)
* 🐛 Stop browser logging from crashing on empty levels

Stop level->int crashes from taking down the dashboard when a
nil or unknown level reaches the browser logger. Invalid levels
now warn and are ignored in enabled?, setup! and the console
handler, which renders unknown records with a neutral fallback.

Alias the schema-legal :fatal level to :error in the browser
mappings and validate the JS-exported debug.set_logging, which
previously threw on missing arguments and wrote unreachable
keyword keys into the loggers map.

Closes #11690

AI-assisted-by: muse-spark-1.3-contributor

* 🐛 Guard logger args and strengthen logging tests

Close the residual throw paths next to the empty-level crash:
guard non-string loggers in enabled? and setup!, coerce
set_logging arguments safely, and validate logger keys.

Strengthen the regression tests so the fatal alias cannot
regress silently: enabled-logger filtering, JVM fatal and bogus
cases, setup! skip proof, and invalid-logger cases.

Related to #11690

AI-assisted-by: muse-spark-1.3-contributor

* 🐛 Address low findings from logging review

Validate the logger before the level in console-log-handler,
share a public valid-logger? predicate with debug/set-logging,
and keep warn formatting consistent across boundaries.

Document the fail-soft-FE/strict-BE split on enabled? and the
valid-level? contract on set-level!. Cover safe fallbacks, bad
logger keys, handler logger skips, and loggers-map isolation in
common tests, and add a frontend test for debug/set-logging.

Related to #11690

AI-assisted-by: muse-spark-1.3-contributor
2026-09-30 07:17:02 +02:00
alonso.torres
fb4d70a82a ✨ Add a debug helper that simulates an intermediary response 2026-09-23 12:05:24 +02:00
Andrey Antukh
81c3b3cd56
📎 Update copyright name on file header (#11346) 2026-08-25 11:55:10 +02:00
Elena Torró
38b990ef90
🔧 Add exporter headless backend (#10875)
* ✨ Add headless wasm render backend to the exporter

* ♻️ Move render-wasm bridge to common and split wasm builds

* 🔧 Upload builtin font variants in the wasm exporter

* ♻️ Move shared font and resources utils out of render_wasm

* ⚡ Fetch only the exported roots in the wasm exporter

* ⚡ Bound save_layer rects in the vector export path
2026-08-06 16:13:06 +02:00
Pablo Alba
0ff73ae711
✨ Add prune-unrelated-items debug utility (#10687) 2026-07-21 12:31:23 +02:00
Aitor Moreno
d0f6d5b3a1
♻️ Refactor render pipeline (#9891)
* ♻️ Refactor viewbox

* 🎉 Add draw_atlas alternative to draw tiles

* 🐛 Fix minor glitches

* ♻️ Change how process_animation_frame works

* ♻️ Refactor document atlas

* ♻️ Refactor max texture size

* ♻️ Refactor entrypoints and dead_code
2026-06-02 09:38:52 +02:00
Andrey Antukh
c5de4c27b0 Merge remote-tracking branch 'origin/main' into staging 2026-06-01 12:57:39 +02:00
Yamila Moreno
ddba2ffa75
📎 Update Kaleidos Copyright (#9929) 2026-05-29 11:24:58 +02:00
Aitor Moreno
a5da9449b5 ♻️ Refactor how target and backbuffer works 2026-05-13 16:05:19 +02:00
Aitor Moreno
73944e46b7 🔧 Change build and cargo settings 2026-04-29 14:35:00 +02:00
Andrey Antukh
3a39676969 ⏪ Backport MCP from staging (part 1) 2026-04-20 19:37:02 +02:00
Alejandro Alonso
c08c3bd160 🎉 Tiles atlas support 2026-04-17 09:05:52 +02:00
Alejandro Alonso
5eebc17ce2 🎉 Support for debugging cache texture 2026-04-09 19:02:14 +02:00
Andrey Antukh
6079ef4e22 ✨ Make mcp plugin always ready to be in multiuser 2026-03-17 15:18:22 +01:00
Andrey Antukh
d80ba1856a
✨ Add several improvements to frontend error reporting
* ✨ Add major improvement on error handling

* ✨ Add the ability to store frontend reports

* 📎 Add PR feedback changes
2026-02-04 12:45:38 +01:00
Andrey Antukh
61969f3eb5 ✨ Improve unhandled exception handling 2026-01-27 13:46:51 +01:00
alonso.torres
a230d2fcf6 ✨ Improve tile rendering updating 2025-11-05 17:16:06 +01:00
Alonso Torres
40e9a78f67
✨ Add telemetry for events performance measures (#7457) 2025-10-08 14:03:09 +02:00
Andrey Antukh
8bb210e7b6 🎉 Add binary fills integration 2025-07-23 08:03:23 +02:00
Andrey Antukh
fa3fc12594 ✨ Sanitize uuid on the rest of code 2025-04-14 09:23:29 +02:00
Andrey Antukh
bc957893f4 ⚡ Make feature resolved on team load
That simplifies features retrieval to simple get
2025-04-07 07:50:40 +02:00
Alejandro Alonso
625cfa4c97 🐛 Fix debug.dump_selected() 2025-01-22 08:24:50 +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
Andrey Antukh
e5894ceea1 ♻️ Rename workspace-libraries to libraries on state and refs 2024-12-10 14:45:56 +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
5f4af76d28 ✨ Add permission checking to file snapshot rpc methods 2024-10-30 13:39:38 +01:00
alonso.torres
ecb7f0a2f6 ✨ File history versions management 2024-10-29 14:23:35 +01:00
Andrey Antukh
043c23899a 🎉 Add first impl of wasm-friendly for Shape data structure 2024-10-29 11:30:31 +01:00
Pablo Alba
823792339f ✨ Kick out of a team - Visibility of System Status 2024-10-15 13:38:46 +02:00
Andrey Antukh
334e83479f ✨ Add minor improvements for text-editor-v2 2024-10-03 09:51:04 +02:00
Andrey Antukh
50df2279a7 🐛 Make the media cleaning on file-gc task aware of snapshots
It now takes in account the snapshots, and prevents
deletion of media files used in snapshots.
2024-09-03 14:50:17 +02:00
Andrey Antukh
569674452a ✨ Add label and id support for debug snapshot helpers 2024-08-27 15:43:31 +02:00
Andrey Antukh
2643dae0a7 🐛 Fix json encoding on zip encoding decoding 2024-08-27 15:43:31 +02:00
Andrey Antukh
ceaafdbb1c ✨ Add offload mechanism for file snapshots 2024-08-26 13:52:42 +02:00
Andrés Moya
b5477c4e30 🔧 Improve debug utility 2024-06-14 10:45:20 +02:00
Andrey Antukh
6436ef334b ♻️ Refactor persistence layer 2024-06-04 10:15:32 +02:00
alonso.torres
440983d2b9 ✨ Add new debug panel 2024-01-29 15:26:23 +01:00
Andrés Moya
4d6c0f3da9 🐛 Fix debug validate single shape 2024-01-09 18:28:32 +01:00
Aitor
b47cea7ead 🐛 Fix generating unnecessary thumbnails 2024-01-09 09:55:51 +01:00
Andrey Antukh
833871df65 💄 Format frontend code 2024-01-08 09:32:50 +01:00
alonso.torres
c9200f235e ♻️ Changes to update-shape parameters 2024-01-02 18:09:55 +01:00
Andrey Antukh
96f5a33f5f ⬆️ Upgrade to beicon2 (part1) 2023-12-26 14:14:20 +01:00
Andrey Antukh
2dbe7bca07 ✨ Add general improvements to file validation and repair api 2023-12-14 10:35:24 +01:00
Andrey Antukh
366975f067 📎 Add debug.validate_schema helper 2023-11-20 19:42:46 +01:00
Andrey Antukh
973214ea50 ✨ Add proper error reporting on debug.validare fn 2023-11-20 11:21:13 +01:00
Andrés Moya
b7a61aba7c 🐛 Fix validate script in frontend 2023-11-07 17:39:34 +01:00
Andrey Antukh
6f93b41920 🎉 Add features assignation for teams 2023-11-07 12:48:31 +01:00
Andrés Moya
2fe820304e ✨ Add some migrations and fixes to component-v2 migration 2023-10-20 16:13:01 +02:00