Skip to content

fix(desktop): migrate Sprout workspace storage#1016

Merged
baxen merged 1 commit into
mainfrom
fizz/fix-default-relay
Jun 12, 2026
Merged

fix(desktop): migrate Sprout workspace storage#1016
baxen merged 1 commit into
mainfrom
fizz/fix-default-relay

Conversation

@baxen

@baxen baxen commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Why

Buzz should preserve a returning user's configured Sprout relays after the product rename instead of treating the rename as a fresh install and falling back to localhost.

What

  • Read legacy Sprout WebKit localStorage for stored workspaces, active workspace, and onboarding completion state
  • Seed Buzz localStorage before React initializes, while preserving existing non-local Buzz workspace state
  • Hide the default-workspace shortcut when the default relay is local dev so true first-time users enter a relay URL

Risk Assessment

Medium-low — limited to desktop startup/onboarding and only writes workspace localStorage when Buzz has no usable workspace state or only the known broken localhost workspace.

References

  • Validated: cargo test --manifest-path desktop/src-tauri/Cargo.toml legacy_storage
  • Validated: pnpm -C desktop test -- src/features/workspaces/legacyWorkspaceStorage.test.mjs
  • Validated: pnpm -C desktop typecheck
  • Validated: pnpm -C desktop check (existing warnings only in tests/e2e/onboarding.spec.ts)
  • Push hook ran and passed desktop/rust checks; mobile hook skipped due missing dart locally.

Generated with Goose

Co-authored-by: Bradley Axen <baxen@squareup.com>
Signed-off-by: Bradley Axen <baxen@squareup.com>
@baxen baxen marked this pull request as ready for review June 12, 2026 20:58

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 86dc697c43

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +108 to +112
if (!workspaceName && isLocalDevRelayUrl(trimmedUrl)) {
setError("Enter your relay URL to join a workspace.");
setTransitionMode("forward");
setPage("create-workspace");
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow key import with local default relay

When the configured default relay is ws://localhost:3000 or ws://127.0.0.1:3000, the “I already have a key” flow still calls handleConnect(defaultRelayUrl, undefined, identity.pubkey) after importing the key, so this new guard diverts the user back to the join-workspace page instead of creating the workspace. In local/dev builds with a localhost default relay, importing an existing key therefore leaves onboarding incomplete even though the identity was already changed.

Useful? React with 👍 / 👎.

@baxen baxen enabled auto-merge (squash) June 12, 2026 21:41
@baxen baxen merged commit 563f684 into main Jun 12, 2026
23 checks passed
@baxen baxen deleted the fizz/fix-default-relay branch June 12, 2026 21:51
tlongwell-block pushed a commit that referenced this pull request Jun 13, 2026
* origin/main: (33 commits)
  fix(desktop): make Windows release compile cleanly (#1029)
  Add production Docker Compose bundle (#985)
  feat(profile): show active turn badges on agent profile panel and popover (#1026)
  chore(release): release version 0.3.20 (#1027)
  fix(release): resolve Windows sidecar path and Linux AppImage updater format (#1024)
  chore(release): release version 0.3.19 (#1014)
  fix(release): ignore prerelease tags in changelog generation (#1021)
  fix: repair main build after cross-PR merge skew (#1020)
  feat(agents): show per-turn duration and prune dead turns within ~25s of host crash (#1017)
  fix(release): replace hermit with native tool setup on Windows job (#1018)
  feat(acp): surface error-class outcomes to the activity feed only, never the channel (#1010)
  fix(desktop): migrate Sprout workspace storage (#1016)
  feat(auth): force token refresh on rejected token (401/403), never the browser (#1015)
  fix(release): mark prerelease versions so they do not become latest (#1013)
  feat(acp): implement systemPrompt with protocol version gating (#981)
  fix(release): update repository name check from block/sprout to block/buzz (#1012)
  feat(release): all-OS desktop builds + universal auto-update manifest (#1011)
  Add relay disconnect UX: friendly errors, reconnect, cached identity (#1004)
  feat(agents): add active turn indicators to Agents Menu (#1005)
  ci: add fork guards to docker, release, and auto-tag workflows (#1007)
  ...

Co-authored-by: npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr <5a968df9a7494b4e019b9ecf739e088ba61097b4312124e9a88ae5b42e3f5f3e@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr <5a968df9a7494b4e019b9ecf739e088ba61097b4312124e9a88ae5b42e3f5f3e@sprout-oss.stage.blox.sqprod.co>
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.

2 participants