24493 Commits

Author SHA1 Message Date
Miguel de Benito Delgado
d5272e3179 🚧 WIP Step 22 nicer macros 2026-10-28 19:17:39 +01:00
Miguel de Benito Delgado
bfc3abf10c 📎 clj-kondo hooks for benchmark macros 2026-10-28 19:17:39 +01:00
Miguel de Benito Delgado
693b0f5706 🚧 WIP Step 21.2 Cosmetic simplifications 2026-10-28 19:17:39 +01:00
Miguel de Benito Delgado
fe99cd46d1 🚧 WIP Step 21.2 Docstrings 2026-10-28 19:17:39 +01:00
Miguel de Benito Delgado
0338fead82 🚧 WIP Step 21.2 Docstrings 2026-10-28 19:17:39 +01:00
Miguel de Benito Delgado
1db15c68ef 🚧 WIP Step 21.1 Remove unnecessary kondo rule 2026-10-28 19:17:39 +01:00
Miguel de Benito Delgado
dc22e2d77f 🚧 WIP Step 21 Refactor namespaces 2026-10-28 19:17:39 +01:00
Miguel de Benito Delgado
23746893e6 🚧 WIP Step 20 test last round of features 2026-10-28 19:17:39 +01:00
Miguel de Benito Delgado
27e4597b45 🚧 WIP Step 19.2 Missing browser utils 2026-10-28 19:17:39 +01:00
Miguel de Benito Delgado
8140e751b8 🚧 WIP Step 19.1 Allow selecting cases in pilot 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
494abd17dd 🚧 WIP Step 19 New scenes, use camera 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
0eeba84af6 🚧 WIP Step 18 Camera ops 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
9cb53adb44 🚧 WIP Step 17 Support path construction 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
5ca9e06fa7 🚧 WIP Step 16.4 Refactor failures, remove legacy validation, cleanup 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
a76f225ba2 🚧 WIP Step 16.3 Cleanup pilot 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
54a4b70001 🚧 WIP Step 16.2 Renames and fixes 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
aa7bd111f8 🚧 WIP Step 16.1 Relax scene macro constraints 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
6cec9d7be4 🚧 WIP Step 16 Introduce hooks for the browser and load-scene 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
b01cdbe880 🚧 WIP Step 15.1, cosmetic 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
b982e864bd 🚧 WIP Step 15, Use transit to simplify validation 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
634b74d0c6 🚧 WIP Step 14, Grab correct w/h attrs from context 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
680408796a 🚧 WIP Step 13, Track failure causes
AI-assisted-by: muse-spark, GLM-5.3
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
9356c3a225 🚧 WIP Step 12.4, Comments
AI-assisted-by: gpt6-astra
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
5224a54cb7 🚧 WIP Step 12.3, Test cleanup + missing coverage
AI-assisted-by: muse-spark, deepseek-flash
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
9f945de1a6 🚧 WIP Step 12.2, Fix browser bridge, lifecycle
AI-assisted-by: muse-spark, glm-5.3
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
3b8b417045 🚧 WIP Step 12.1, Improve case validation
AI-assisted-by: muse-spark, glm-5.3
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
9e5620600f 🚧 WIP Step 12, temporary pilot
- pilot runner for testing
- will be entirely removed later

AI-assisted-by: muse-spark-1.3, deepseek-flash, glm-5.3
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
5afac4a330 🚧 WIP Step 11, browser bridge
- New schema:viewport
- Browser bridge (with some temp code)
- Move prepare-scene out measured regions
-
AI-assisted-by: muse-spark-1.3, deepseek-flash, glm-5.3
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
4e9d83b4ad 🚧 WIP Step 10, scene upload 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
d46f5e59c6 🚧 WIP Step 10, defcase body validation, docs 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
8d04530e07 🚧 WIP Step 9, fix naming conventions 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
c16233f841 🚧 WIP Step 8, simplify and clean up tests 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
44dfb47c98 🚧 WIP Step 7, scene and case declarations 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
551c3bffb7 🚧 WIP Step 6, ellipses 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
bfde40d1ab 🚧 WIP Step 5, bools 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
bd17e6d431 🚧 WIP Step 4, frames and groups 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
df4ec3ea33 ✨ Add --no-build to legacy bench runner 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
9d281b225e 🚧 WIP Step 3, fixture macros, prng, defaults, placeholder scene 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
01f6eb2a7a 🚧 WIP Step 2, common scene code, validation 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
50c72a1ad9 🚧 WIP Step 1, scaffold cljs benchmark runner 2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
50e2bf02c8 🐛 Fix regex filtering cargo feature names
Now allows underscores too
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
3b35187676 ✨ Expose the playground adapter for console access
mountScenario now assigns the mounted renderer to
globalThis.playgroundAdapter and removes it on dispose, so the
wasm module is reachable from the browser console on every
playground page (for example playgroundAdapter.module._render_stats()).

The benchmark verify-pages diagnostic already used this name by
patching the served lib.js. The source is now the canonical
writer, so the wrapper's assignment is redundant.

AI-assisted-by: deepseek-flash
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
23109b71fe 🐛 Fix playground rendering at non-unit device pixel ratio
The playground called _init and _set_render_options with the DPR,
which sets the ratio but leaves the Skia target, backbuffer and
UI surfaces at CSS resolution. The canvas drawing buffer is
physical (CSS x DPR), so at DPR > 1 the smaller surface anchored
to the bottom-left of the framebuffer and left the top and right
edges unpainted.

Call _resize_viewbox after setting the DPR, the same sequence the
application uses in resize-canvas!, so the renderer surfaces
match the physical drawing buffer.

Cover DPR 1, 1.25 and 2 in the adapter test.

AI-assisted-by: deepseek-flash
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
34e4dc1674 ✨ Coalesce playground wheel zoom per animation frame
Apply at most one _set_view + _render_from_cache per animation
frame in the wasm playground, accumulating the wheel zoom factor
and the last cursor point instead of rendering synchronously on
every wheel event.

This mirrors schedule-zoom! in
app.main.ui.workspace.viewport.actions so playground
interactions match the application. A comment records that the
playground should call the real function once it migrates to
ClojureScript.

Extend the adapter tests with the coalesced flush, factor reset
across frames, scale clamps, and per-move pointer pan.

AI-assisted-by: deepseek-flash
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
f81696886a ✨ Add feature-flag A/B harness to renderer benchmarks
Compare every on/off combination of requested Cargo features over the
Boolean-lattice edges, in Gray-code build order, with a matrix index of
configs, edge comparisons and provenance.

Single runs record explicit feature sets as schemaVersion 2 with resolved
defaults and build environments. Edge comparisons stay diagnostic; edges
clean apart from the intended toggle are marked controlled.

Validate with 68 focused tests, CLI fault checks, dry runs, and container
smoke matrices for branch-b pan cases.

AI-assisted-by: muse-spark-1.3-contributor-free
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
d0a8873e66 ✨ Lock shadow fixture and record sampling tradeoff
Add a regression test that keeps 1000 shadowed shapes with two
drop shadows and one inner shadow, seven FFI arguments, and
visible hidden flags. Record isolated load success against pan
and zoom context loss on SwiftShader without changing workloads.
Keep 3 warm-ups, 10 attempts, and 30s timeout provisional with
measured per-attempt costs and workflow guidance.

AI-assisted-by: muse-spark-1.3
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
0ae78cf7ec ✨ Verify benchmark failures and improve reports
Record manifest-default features without adding A/B selection. Keep
scored builds free of the optional function-name profiling switch.

Exercise CLI persistence, interruption, browser failure and legacy page
interactions through separate diagnostics. Share readable reports and
warn when offline comparisons include failed runs.

Validate with 50 focused tests, browser and CLI fault checks, two full
corpus workflow runs, and headed rectangle cases. Shadow graphics and
sampling calibration remain open.

AI-assisted-by: GPT-6
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
731bcc5664 🎉 Add playground renderer benchmark suite
Share seven deterministic fixtures with the playground pages and measure
renderer lifecycle, pan, and zoom through a prepared Playwright runner.
Retain raw attempts and failures with offline statistical comparisons.

Add focused tests and separate browser fault diagnostics. Full-suite
calibration and shadow GPU validation remain tracked follow-up work.

AI-assisted-by: GPT-6
2026-10-28 19:17:38 +01:00
Miguel de Benito Delgado
17489091c5 ♻️ Move use-shape into app.common.render_wasm
- Introduces a new ns since there wasn't a suitable one
- Simplifies serialize-shapes-batch! and allows usage outside the frontend
2026-10-28 19:17:38 +01:00
Dr. Dominik Jain
e20a0d748e
✨ Add OAuth support for MCP server (#12480)
* 🎉 Add OAuth support for remote MCP connections

Add MCP-specific discovery, client registration, and approval endpoints.
Exchange single-use authorization codes with PKCE for the fixed MCP user
token, enabling MCP and creating the token on approval when needed.

Use self-contained client IDs without new database tables or stored client
records. Keep temporary authorization state in Redis/Valkey.

Accept bearer credentials while preserving query-parameter connections.
Enable OAuth through PENPOT_MCP_AUTH_URI in multi-user mode. Document the
environment variable in the README and implementation details in Serena.

Explain protocol and concurrency decisions in the Clojure code. Cover token
provisioning, OAuth state, client registration, HTTP flows, and the approval
page with tests.

AI-assisted-by: gpt-6

* 🐛 Wait for devenv initialization before starting builds

Docker reports a container as Running as soon as its main process starts,
while the entrypoint may still be preparing the development environment.
manage.sh used that status to launch tmux jobs, allowing frontend builds
to race with ownership changes to /opt/rustup and Cargo setup.

On a fresh container, rustup could fail with Permission denied before the
frontend watcher started. Nginx would later serve the existing JavaScript,
leaving source changes absent from the running app despite restarting
devenv.

Wait for nginx's local health endpoint before launching the jobs. Nginx
starts after entrypoint setup, so its response confirms that setup has
finished. Allow up to 120 seconds and report a timeout without starting
the jobs if initialization does not complete.

Validation: shell syntax and whitespace checks pass.

AI-assisted-by: gpt-6

* ♻️ Share the login modal with MCP authorization

Extract the viewer login modal and its styles into a shared auth
component, retaining the viewer wrapper and its close behavior.

Use the modal on the MCP approval page and preserve the pending request
through login. Closing it clears the saved return URL and shows a
cancellation message without further actions.

Cover return URL handling and cancellation with frontend tests.

AI-assisted-by: gpt-6

* ✨ Show client icons in MCP authorization

Preserve HTTPS logo URLs from client registration and published metadata
and show the icon beside the application name on the approval page.
Ignore unusable URLs and hide failed images without blocking approval.

Update the access description to refer to MCP connections established
from Penpot. Cover logo metadata and approval responses in backend tests.

AI-assisted-by: gpt-6

* 🐛 Follow the system theme when no preference is configured

Default to the system theme in the shared resolver used by the app and
plugins. Preserve explicit light and dark choices, including the legacy
default value that means dark.

Reuse the reactive theme hook in progress widgets and show the system
preference in settings for accounts without a configured theme.

Verify preference resolution with regression tests and browser checks.
All 1,474 frontend tests pass.

AI-assisted-by: gpt-6

* 🐛 Replace expired MCP tokens during OAuth approval

Settings can give an MCP token an expiry date. OAuth approval reused
the newest MCP token without checking it, so an expired token reached
the client and never matched a plugin connection.

Approval now treats an expired token as missing and creates a new one.
Token exchange rejects a code whose token expired after approval with
invalid_grant.

AI-assisted-by: claude-opus-5-5

* 🐛 Log unexpected errors on MCP OAuth endpoints

The OAuth routes sit outside the shared HTTP middleware, so the shared
error handler never saw them, and their own handler turned unexpected
failures into a 503 without logging anything. Failures in the session
middleware of the approval endpoints had no handler at all.

Unexpected failures now also go through the shared error handler for
its logging, while clients still get an OAuth error body. The OAuth
error handler also wraps the session middleware of the approval
endpoints.

AI-assisted-by: claude-opus-5-5

* 🔧 Add devenv script to run the MCP server with OAuth

start-mcp-devenv-oauth starts the MCP server in multi-user mode with
PENPOT_MCP_AUTH_URI derived from PENPOT_PUBLIC_URI, to test OAuth in
the devenv. Agentic tooling still uses the single-user
start-mcp-devenv.

AI-assisted-by: claude-opus-5-5

* 🐛 Fix failing test case

---------

Co-authored-by: alonso.torres <alonso.torres@kaleidos.net>
2026-10-28 18:40:04 +01:00