Skip to content

[Do not merge]: Initial PR for OP-only P5 Editor#4207

Draft
msawired wants to merge 24 commits into
processing:OP-P5/mainfrom
msawired:OP-backend-refactor
Draft

[Do not merge]: Initial PR for OP-only P5 Editor#4207
msawired wants to merge 24 commits into
processing:OP-P5/mainfrom
msawired:OP-backend-refactor

Conversation

@msawired

Copy link
Copy Markdown

description is pending...

msawired and others added 24 commits April 17, 2026 16:23
- Replace internal API usage with an OpenProcessing (OP) API integration
- add opApiClient (with API_TOKEN),
- add opSketchAdapter to map OP sketches/code tabs <-> editor project/files, and adapt project/user actions to use OP endpoints. - Update project save/load/clone/delete/visibility flows to sync code tabs, create/update sketches, and preserve saved code titles; add SET_SAVED_CODE_TITLES constant and reducer handling.
- Improve request error payload handling and unify error messages.
- Update User actions to use /whoami and handle OP user shape. Add server routing guards to serve the SPA when API_TOKEN is present and expose API_TOKEN to client runtime.
- Add .env.example entries for API_URL and API_TOKEN.
- Remove legacy ZIP export and other deprecated internal API behaviors where applicable.
- sketch code files (index.html, sketch.js, etc.)
- user sketch list and pagination
Server dependencies removed, since OP doesn't support that.
This uses q-based OP sketch search with delayed, abortable requests so typing in Search Sketches does not trigger overlapping calls or stale updates.

Co-Authored-By: Cursor <cursoragent@cursor.com>
commit f3cb390
Author: msawired <sinan@openprocessing.org>
Date:   Fri May 15 15:58:44 2026 +0200

    Update OP preview file resolution.

    Co-authored-by: Cursor <cursoragent@cursor.com>

commit 480870f
Author: msawired <sinan@openprocessing.org>
Date:   Fri May 15 15:02:18 2026 +0200

    Update OP file asset handling.

    Co-authored-by: Cursor <cursoragent@cursor.com>

commit 67be52f
Author: msawired <sinan@openprocessing.org>
Date:   Thu May 14 20:15:24 2026 +0200

    file upload/delete/rename ready.

commit dc28e90
Author: msawired <sinan@openprocessing.org>
Date:   Fri May 8 13:41:16 2026 +0200

    Debounce sketch list API requests and cancel stale searches.

    This uses q-based OP sketch search with delayed, abortable requests so typing in Search Sketches does not trigger overlapping calls or stale updates.

    Co-authored-by: Cursor <cursoragent@cursor.com>

Squashed commit of the following:

commit fc78c28
Author: msawired <sinan@openprocessing.org>
Date:   Fri May 15 16:22:01 2026 +0200

    bug: user my assets fixed

    userId was missing

commit f3cb390
Author: msawired <sinan@openprocessing.org>
Date:   Fri May 15 15:58:44 2026 +0200

    Update OP preview file resolution.

    Co-authored-by: Cursor <cursoragent@cursor.com>

commit 480870f
Author: msawired <sinan@openprocessing.org>
Date:   Fri May 15 15:02:18 2026 +0200

    Update OP file asset handling.

    Co-authored-by: Cursor <cursoragent@cursor.com>

commit 67be52f
Author: msawired <sinan@openprocessing.org>
Date:   Thu May 14 20:15:24 2026 +0200

    file upload/delete/rename ready.

commit dc28e90
Author: msawired <sinan@openprocessing.org>
Date:   Fri May 8 13:41:16 2026 +0200

    Debounce sketch list API requests and cancel stale searches.

    This uses q-based OP sketch search with delayed, abortable requests so typing in Search Sketches does not trigger overlapping calls or stale updates.

    Co-authored-by: Cursor <cursoragent@cursor.com>
commit 6f6b8a3
Author: msawired <sinan@openprocessing.org>
Date:   Fri May 29 16:22:03 2026 +0200

    Migrate editor auth to OpenProcessing OAuth

    Replace the editor's local account system with OpenProcessing as the
    identity provider via OAuth 2.0 (Authorization Code + PKCE, popup flow).
    Add opAuth token helpers and OpenProcessingButton; route /login and
    /signup to the same OP sign-in page; link "My Account" to OP's user
    edit page.

    Surface AUTH_ERROR to the user via a toast (previously only visible in
    devtools), and render raw server messages instead of running them
    through i18next, which mangled strings containing ':' or URLs. Cap the
    toast width and wrap long content so messages no longer overflow.

    Remove the now-orphaned account-edit UI (AccountView, AccountForm,
    SignupForm, API key and social-auth components).

    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

commit 0e0ceb2
Merge: 2186f2f ba8cac1
Author: msawired <sinan@openprocessing.org>
Date:   Thu May 21 14:32:49 2026 +0200

    Merge branch 'OP-backend/main' into OP-backend/oAuth

commit 2186f2f
Merge: 21ac7f6 32362e5
Author: msawired <sinan@openprocessing.org>
Date:   Thu May 21 14:18:06 2026 +0200

    Merge branch 'OP-backend/main' into OP-backend/oAuth

commit 21ac7f6
Author: msawired <sinan@openprocessing.org>
Date:   Fri May 15 16:06:18 2026 +0200

    Squashed commit of the following:

    commit f3cb390
    Author: msawired <sinan@openprocessing.org>
    Date:   Fri May 15 15:58:44 2026 +0200

        Update OP preview file resolution.

        Co-authored-by: Cursor <cursoragent@cursor.com>

    commit 480870f
    Author: msawired <sinan@openprocessing.org>
    Date:   Fri May 15 15:02:18 2026 +0200

        Update OP file asset handling.

        Co-authored-by: Cursor <cursoragent@cursor.com>

    commit 67be52f
    Author: msawired <sinan@openprocessing.org>
    Date:   Thu May 14 20:15:24 2026 +0200

        file upload/delete/rename ready.

    commit dc28e90
    Author: msawired <sinan@openprocessing.org>
    Date:   Fri May 8 13:41:16 2026 +0200

        Debounce sketch list API requests and cancel stale searches.

        This uses q-based OP sketch search with delayed, abortable requests so typing in Search Sketches does not trigger overlapping calls or stale updates.

        Co-authored-by: Cursor <cursoragent@cursor.com>
Refactor the p5 editor "collections" feature to use the OpenProcessing
"curations" REST API instead of the editor server's own collection
endpoints.

- Add opCurationAdapter to map OP curations <-> the editor collection
  shape the store/components already expect (slug is the canonical id;
  OP-only fields like submitLevel/isPrivate/freezeSketches are omitted so
  the editor relies on API defaults).
- Rewrite IDE collections actions onto opApiClient: list via
  /user/{id}/curations, single collection (+sketches) via /curation/{slug},
  create/edit/delete and add/remove-sketch via the curation endpoints;
  add getCollection and getCollectionIdsForSketch.
- Reducer upserts a single loaded collection (SET_COLLECTION); selector and
  list row use numItems; Collection view loads one collection; AddToCollection
  membership comes from the sketch's curations.
- Use slug-based collection URLs and API calls.
- Retire the Express /editor collections API mount.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
origin updates pull, including cm6
Lets users copy the full S3 URL of uploaded files from both the
sidebar file tree and the My Assets list, with a toast confirmation.
@welcome

welcome Bot commented Jul 17, 2026

Copy link
Copy Markdown

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant