Skip to content

feat(studio): add bounded override persistence controls - #12

Open
bakasura980 wants to merge 7 commits into
feat/scenarios/override/raw-layoutfrom
feat/bounded-persist
Open

bakasura980 wants to merge 7 commits into
feat/scenarios/override/raw-layoutfrom
feat/bounded-persist

Conversation

@bakasura980

@bakasura980 bakasura980 commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

Greptile Summary

The PR adds bounded and indefinite override-persistence controls, stable override identities, cancellation flows, and serialized scenario updates.

  • Preserves persistence settings through scenario loading, editing, serialization, import, and export.
  • Adds stop-persistence behavior before removing or replacing active overrides.
  • Adds validation and tests for bounded slot counts and cancellation payloads.

Confidence Score: 3/5

The PR is not safe to merge until Surfpool consumes persistence settings and implements the cancellation RPC required by scenario deletion.

Persisted overrides are still registered through a backend type and scheduler with no persistence semantics, while deletion waits for a stop-persistence method absent from Surfpool’s RPC manifest, leaving both persistence behavior and deletion broken.

Files Needing Attention: apps/studio/src/lib/scenarios-api.ts, apps/studio/src/components/svm/scenarios-bento.tsx

Important Files Changed

Filename Overview
apps/studio/src/components/svm/scenario-editor.tsx Adds persistence controls, request invalidation, stable identities, cancellation handling, and serialized saves; the prior stale-selection paths are addressed.
apps/studio/src/components/svm/scenarios-bento.tsx Gates scenario deletion on persistence cancellation, but the required Surfpool RPC remains unavailable.
apps/studio/src/lib/scenarios-api.ts Adds persistence serialization and cancellation request helpers whose required backend contracts are not implemented by current Surfpool.
apps/studio/src/lib/scenarios-data.ts Extends scenario actions with lossless bounded or indefinite persistence settings.
apps/studio/src/lib/scenarios-api.test.ts Covers persistence serialization, validation, identity generation, and cancellation request construction, but not backend integration.

Sequence Diagram

sequenceDiagram
  participant User
  participant Studio as Studio UI
  participant ScenarioAPI as Scenario service
  participant Surfpool as Surfpool RPC
  User->>Studio: Configure persisted override
  Studio->>ScenarioAPI: PATCH scenario with persist setting
  User->>Studio: Start playback
  Studio->>Surfpool: surfnet_registerScenario
  User->>Studio: Stop or delete persisted override
  Studio->>Surfpool: surfnet_stopPersistingOverride
  Studio->>ScenarioAPI: Update or delete scenario
Loading

Reviews (6): Last reviewed commit: "fix(studio): prevent stale state when ed..." | Re-trigger Greptile

Context used:

bakasura980 and others added 2 commits August 26, 2026 12:43
* Extend support for Kamino and introduce all missing sub products

* Fix array nesting not shown in the override fields

* Fix prod build

* Fix hardcoded index 0

* Format with prettier
Comment thread apps/studio/src/lib/scenarios-api.ts
Comment thread apps/studio/src/components/svm/scenario-editor.tsx
Comment thread apps/studio/src/components/svm/scenarios-bento.tsx
@bakasura980
bakasura980 changed the base branch from feat/bisonfi-support to feat/studio/raw-layout September 14, 2026 11:59
Base automatically changed from feat/studio/raw-layout to feat/scenarios/override/raw-layout September 23, 2026 14:36
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