Skip to content

feat: add the resource replacement controller and schema contract - #1269

Open
Maxxich wants to merge 1 commit into
refactor/shared-editor-dependenciesfrom
feat/resource-replacement-core
Open

Maxxich wants to merge 1 commit into
refactor/shared-editor-dependenciesfrom
feat/resource-replacement-core

Conversation

@Maxxich

@Maxxich Maxxich commented Sep 24, 2026 •

Copy link
Copy Markdown

Depends on PR: refactor: share lazily initialized editor dependencies.

Define opt-in NodeSpec._resource metadata and a shared asynchronous controller.
Deduplicate requests by kind/value, validate responses, handle cancellation and
timeouts, and expose engine-independent resource reading and replacement helpers.
URL normalization remains separate from opaque identifiers. Include unit coverage
with the core behavior; editor adapters are connected in dependent changes.

Summary by Sourcery

Introduce the shared resource replacement contract and controller, while enabling reusable lazy editor dependency preparation.

New Features:

  • Add opt-in resource metadata and shared helpers for reading, validating, and replacing node resources across editor modes.
  • Add an asynchronous resource replacement controller with request deduplication, cancellation, timeouts, response validation, lifecycle events, and error handling.

Enhancements:

  • Separate URL normalization and validation from opaque resource identifiers while excluding code content from replacements.
  • Support lazily prepared and reusable editor dependencies without accumulating editor-specific plugins or components.

Tests:

  • Add unit coverage for resource replacement lifecycle behavior, schema validation, URL handling, opaque identifiers, and shared editor dependency reuse.

@gravity-ui

gravity-ui Bot commented Sep 24, 2026

Copy link
Copy Markdown

Storybook Deployed

@gravity-ui

gravity-ui Bot commented Sep 24, 2026

Copy link
Copy Markdown

🎭 Playwright Report

@Maxxich
Maxxich marked this pull request as ready for review September 24, 2026 10:48

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@Maxxich
Maxxich changed the base branch from main to refactor/shared-editor-dependencies October 5, 2026 09:03
@d3m1d0v
d3m1d0v added this pull request to stack #1320 October 5, 2026 13:17

This branch has not been deployed

No deployments
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