Add activeWriteScopeId to scope.info, expose useActiveWriteScopeId#509
Draft
RhysSullivan wants to merge 1 commit intors/cloud-workspaces-08-workspace-contextfrom
Draft
Add activeWriteScopeId to scope.info, expose useActiveWriteScopeId#509RhysSullivan wants to merge 1 commit intors/cloud-workspaces-08-workspace-contextfrom
RhysSullivan wants to merge 1 commit intors/cloud-workspaces-08-workspace-contextfrom
Conversation
The scope handler now returns three things: the active display scope (`id`/`name`/`dir`), a pre-computed `activeWriteScopeId` (the default source-definition write target — `org` in global, `workspace` in workspace contexts), and the full innermost-first stack for storage-target selectors. The active write scope is computed by skipping personal scopes (those whose id is prefixed `user_org_` or `user_workspace_`) and picking the first non-personal scope from the inner end. That collapses to `org` in the global stack `[user_org, org]` and to `workspace` in the workspace stack `[user_workspace, workspace, user_org, org]`. Client side, expose `useActiveWriteScopeId()` for default writes; keep `useScope()` as an alias so plugin and existing pages don't churn. Update the cloud shell + every page in `packages/react/src/pages/` to call the explicit hook so intent is clear.
This was referenced May 4, 2026
Owner
Author
This was referenced May 4, 2026
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 21a4511 | Commit Preview URL Branch Preview URL |
May 04 2026, 05:14 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 21a4511 | May 04 2026, 05:15 PM |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/storage-core
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-google-discovery
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The scope handler now returns three things: the active display scope
(
id/name/dir), a pre-computedactiveWriteScopeId(the defaultsource-definition write target —
orgin global,workspacein workspacecontexts), and the full innermost-first stack for storage-target selectors.
The active write scope is computed by skipping personal scopes (those whose
id is prefixed
user_org_oruser_workspace_) and picking the firstnon-personal scope from the inner end. That collapses to
orgin theglobal stack
[user_org, org]and toworkspacein the workspace stack[user_workspace, workspace, user_org, org].Client side, expose
useActiveWriteScopeId()for default writes; keepuseScope()as an alias so plugin and existing pages don't churn. Updatethe cloud shell + every page in
packages/react/src/pages/to call theexplicit hook so intent is clear.