Skip to content

fix: [PR-1797] suppress migration banner after sf migrate completes#269

Merged
sigmachirality merged 1 commit into
mainfrom
dt/sf-upgrade
May 27, 2026
Merged

fix: [PR-1797] suppress migration banner after sf migrate completes#269
sigmachirality merged 1 commit into
mainfrom
dt/sf-upgrade

Conversation

@sigmachirality
Copy link
Copy Markdown
Member

Summary

  • Persist migrated_to_rust_cli: true in ~/.sfcompute/config when sf migrate succeeds.
  • Gate the migration banner on that flag so sf-old stops nagging users who've already migrated.
  • SF_CLI_DISABLE_MIGRATE_BANNER continues to work as an explicit override.

Test plan

  • Run sf migrate on a clean config; verify migrated_to_rust_cli: true is written.
  • Re-run sf-old <anything> and confirm the migration banner no longer renders.
  • With the flag absent, banner still appears as before.

🤖 Generated with Claude Code

Persist `migrated_to_rust_cli: true` in the user's config when `sf migrate`
succeeds, and gate the banner on that flag so `sf-old` stops nagging users
who've already migrated.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented May 27, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  src/index.ts  49% smaller
  src/helpers/config.ts  0% smaller
  src/lib/migrate.ts  0% smaller

@indent
Copy link
Copy Markdown
Contributor

indent Bot commented May 27, 2026

PR Summary

Stops the legacy sf-old CLI from repeatedly showing the "we've rewritten sf in Rust" banner to users who already ran sf migrate, by persisting a flag in ~/.sfcompute/config and gating the banner on it.

  • src/helpers/config.ts: adds optional migrated_to_rust_cli?: boolean to the Config interface.
  • src/lib/migrate.ts: after a successful install (or dev-mode skip), best-effort writes { ...config, migrated_to_rust_cli: true } via saveConfig, wrapped in try/catch so a write failure just leaves the banner showing.
  • src/index.ts: hoists the existing loadConfig() call above the banner block (net I/O unchanged — the prior call site is removed and the account-id hydration reuses the hoisted config), and adds !config.migrated_to_rust_cli as a new conjunct on the banner-show condition alongside the existing SF_CLI_DISABLE_MIGRATE_BANNER / migrate / upgrade guards.

Issues

No issues found.

CI Checks

All CI checks passed on 7e8040d.

@capy-ai
Copy link
Copy Markdown

capy-ai Bot commented May 27, 2026

Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

@sigmachirality sigmachirality requested review from Sladuca and joshi4 May 27, 2026 01:16
@sigmachirality sigmachirality self-assigned this May 27, 2026
@sigmachirality sigmachirality merged commit 4725173 into main May 27, 2026
1 of 2 checks passed
@sigmachirality sigmachirality deleted the dt/sf-upgrade branch May 27, 2026 01:17
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