fix: cloud sidebar PR links open the PR pane; pass creator id to start hook
Summary
Two small fixes for cloud workspaces.
Cloud sidebar PR links open the workspace's PR pane
Clicking the PR icon on a cloud sidebar row, or the PR in the row's hover card, used to go to /pull-requests/:number. Both now navigate to the workspace and open its pull-request pane, the same as local sidebar rows and the v2 workspaces list. This uses the existing usePullRequestPaneIntent store through a new useOpenCloudWorkspacePullRequest hook. A URL that is not a GitHub PR link opens externally.
Cloud workspaces come up signed in again
setup.cloud.sh runs db:seed-cloud-auth-token to sign the desktop dev app in as the workspace creator, but the seed always skipped with "no workspace creator". The creator id is in /etc/superset/sandbox.conf, but it was dropped twice on the way to the start hook:
superset-bootstarts host-service withenv -iand an allowlist that did not includeSUPERSET_SANDBOX_CREATOR_USER_IDorSUPERSET_SANDBOX_ORGANIZATION_ID.buildStartHookEnvstrips everySUPERSET_*key that is not on the terminal keep list, and added back only the workspace id.
Both now pass the org id and the creator id (when set). seed-cloud-mobile-token had the same problem and gets the same fix. Boxes pick this up after the Sandbox workflow's production-release runs.
Validation
bun testforbuildStartHookEnv: 4 pass, including new cases for keeping the ids and leaving out a missing creator.bash -n superset-bootis clean.- Desktop
bun run typecheckand biome are clean. - Not verified end to end: I did not click through the sidebar in a running app, and I did not boot a sandbox with the new bundle.
Summary by cubic
Fixes two cloud workspace issues: sidebar PR links now open the workspace's PR pane, and cloud workspaces come up signed in again.
Bug Fixes
- Cloud sidebar PR links and hover-card PRs now navigate to the workspace with its pull-request pane open, instead of going to
/pull-requests; non-PR URLs still open externally. superset-boot's env allowlist andbuildStartHookEnvnow passSUPERSET_SANDBOX_ORGANIZATION_IDandSUPERSET_SANDBOX_CREATOR_USER_IDto the start hook, so theseed-cloud-auth-tokenandseed-cloud-mobile-tokenseeds stop skipping and sign the desktop dev app in as the workspace creator.- Boxes pick up the sandbox fix after the Sandbox workflow's
production-releaseruns.
Summary by CodeRabbit
- New Features
- Opening a pull-request link from a cloud workspace now takes you to that workspace with its pull-request pane selected.
- Links that aren’t recognized as pull requests continue to open externally.
- Bug Fixes
- Sandbox startup now preserves available workspace, organization, and creator identity details in its environment.