Skip to content

Store local sessions separately#6931

Merged
gonzaloriestra merged 1 commit intomainfrom
store-sessions-per-env
Mar 4, 2026
Merged

Store local sessions separately#6931
gonzaloriestra merged 1 commit intomainfrom
store-sessions-per-env

Conversation

@gonzaloriestra
Copy link
Contributor

@gonzaloriestra gonzaloriestra commented Mar 3, 2026

WHY are these changes introduced?

In #5914 we added support for multiple sessions, but if you switch between environments (production/development), the sessions get overwritten, so you have to log in again.

WHAT is this pull request doing?

When running the CLI against the local environment, save the sessions in different store fields.

How to test your changes?

  • npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260304092735
  • shopify auth logout
  • shopify app versions list
  • SHOPIFY_SERVICE_ENV=local shopify app versions list
  • shopify app versions list
  • SHOPIFY_SERVICE_ENV=local shopify app versions list

It should only start the login flow once per environment.

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 78.85% 14521/18416
🟡 Branches 73.16% 7224/9874
🟡 Functions 79.05% 3695/4674
🟡 Lines 79.19% 13720/17326

Test suite run success

3796 tests passing in 1449 suites.

Report generated by 🧪jest coverage report action from 99be1aa

@gonzaloriestra gonzaloriestra force-pushed the store-sessions-per-env branch from 3573760 to fc77660 Compare March 3, 2026 16:12
@gonzaloriestra
Copy link
Contributor Author

/snapit

@github-actions

This comment was marked as outdated.

@gonzaloriestra gonzaloriestra force-pushed the store-sessions-per-env branch 2 times, most recently from 721358e to 7e7ca2a Compare March 4, 2026 09:12
@gonzaloriestra gonzaloriestra force-pushed the store-sessions-per-env branch from 7e7ca2a to 99be1aa Compare March 4, 2026 09:24
@gonzaloriestra gonzaloriestra changed the title Store sessions per environment Store local sessions separately Mar 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/private/node/conf-store.d.ts
@@ -21,6 +21,8 @@ interface Cache {
 export interface ConfSchema {
     sessionStore: string;
     currentSessionId?: string;
+    devSessionStore?: string;
+    currentDevSessionId?: string;
     cache?: Cache;
 }
 /**

@gonzaloriestra
Copy link
Contributor Author

/snapit

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260304092735

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@gonzaloriestra gonzaloriestra marked this pull request as ready for review March 4, 2026 09:51
@gonzaloriestra gonzaloriestra requested a review from a team as a code owner March 4, 2026 09:51
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@binks-code-reviewer
Copy link

🤖 Code Review · #projects-dev-ai for questions
React with 👍/👎 or reply — all feedback helps improve the agent.

Complete - 1 findings

📋 History

✅ 1 findings

Copy link
Contributor Author

gonzaloriestra commented Mar 4, 2026

Merge activity

  • Mar 4, 11:39 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 4, 11:39 AM UTC: @gonzaloriestra added this pull request to the GitHub merge queue with Graphite.

@gonzaloriestra gonzaloriestra added this pull request to the merge queue Mar 4, 2026
Merged via the queue into main with commit 22f1086 Mar 4, 2026
44 of 46 checks passed
@gonzaloriestra gonzaloriestra deleted the store-sessions-per-env branch March 4, 2026 11:48
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