Skip to content

Introduce local store auth summary API#7709

Open
dmerand wants to merge 1 commit into
donald/store-list-business-platformfrom
donald/store-list-local-auth-seam
Open

Introduce local store auth summary API#7709
dmerand wants to merge 1 commit into
donald/store-list-business-platformfrom
donald/store-list-local-auth-seam

Conversation

@dmerand

@dmerand dmerand commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Introduce a local auth summary API without changing shopify store list behavior yet.

Scope

  • add StoredStoreAuthSummary
  • add listStoredStoreAuthSummaries() under services/store/auth
  • keep token-bearing session buckets as the current persistence source of truth
  • keep conf traversal and bucket cleanup in session-store.ts
  • re-export the summary API from services/store/auth/index.ts
  • fix the stale store list command test assertion after the BP-only trim

Why this split exists

The next PR needs one narrow question answered first:

  • what locally stored store auth exists on this machine?

This PR answers that without taking on product behavior:

  • no --from store-auth
  • no organization→store-auth fallback
  • no persistence migration

That keeps the behavior PR focused on command policy and output, not on storage traversal.

Boundary this PR is trying to establish

  • persistence details stay in session-store.ts
  • callers see StoredStoreAuthSummary[]
  • callers do not need token-bearing session buckets or conf layout knowledge

@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Jun 3, 2026
@dmerand dmerand changed the title Introduce local store auth summary seam Introduce local store auth summary API Jun 4, 2026
@dmerand dmerand force-pushed the donald/store-list-business-platform branch from 92fffc1 to c7e152d Compare June 5, 2026 13:41
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch 2 times, most recently from 619636c to 7c049c1 Compare June 5, 2026 14:10
@dmerand dmerand force-pushed the donald/store-list-business-platform branch from 3ac3560 to 6fbe857 Compare June 5, 2026 14:24
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch from 7c049c1 to 52daf1c Compare June 5, 2026 14:24

dmerand commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@dmerand dmerand force-pushed the donald/store-list-business-platform branch from 6fbe857 to 87919a9 Compare June 5, 2026 18:12
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch 2 times, most recently from 00dce2a to 22e4f4a Compare June 5, 2026 18:31
@dmerand dmerand force-pushed the donald/store-list-business-platform branch 2 times, most recently from f516bbe to 79dbfa7 Compare June 5, 2026 19:06
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch from 22e4f4a to 31a07f1 Compare June 5, 2026 19:06
@dmerand dmerand force-pushed the donald/store-list-business-platform branch from 79dbfa7 to 9e07ceb Compare June 8, 2026 18:41
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch 2 times, most recently from c128517 to 9343914 Compare June 8, 2026 19:06
@dmerand dmerand force-pushed the donald/store-list-business-platform branch from 5986997 to b4c7faa Compare June 8, 2026 19:10
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch from 9343914 to 81229e4 Compare June 8, 2026 19:10
@dmerand dmerand marked this pull request as ready for review June 8, 2026 20:56
@dmerand dmerand requested a review from a team as a code owner June 8, 2026 20:56
@dmerand dmerand force-pushed the donald/store-list-business-platform branch from b4c7faa to cb1e68e Compare June 8, 2026 21:08
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch from 81229e4 to 04b87d7 Compare June 8, 2026 21:08
@dmerand dmerand force-pushed the donald/store-list-business-platform branch from cb1e68e to 4a2c0dd Compare June 10, 2026 14:34
@dmerand dmerand requested a review from a team as a code owner June 10, 2026 14:34
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch from 04b87d7 to b3f03fe Compare June 10, 2026 14:34
@dmerand dmerand force-pushed the donald/store-list-business-platform branch from 4a2c0dd to 0974dfd Compare June 10, 2026 15:00
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch from b3f03fe to 6246aef Compare June 10, 2026 15:00
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch 7 times, most recently from cc8b9c3 to 0d54c55 Compare June 11, 2026 01:43
@dmerand dmerand force-pushed the donald/store-list-business-platform branch from c61df52 to 429141b Compare June 11, 2026 01:58
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch 4 times, most recently from 8d4afd4 to a2cf41b Compare June 11, 2026 13:23
@dmerand dmerand force-pushed the donald/store-list-business-platform branch from 5cc2126 to 4075110 Compare June 11, 2026 13:31
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch from a2cf41b to 541a4a4 Compare June 11, 2026 13:31
@dmerand dmerand force-pushed the donald/store-list-business-platform branch from 4075110 to cd562c1 Compare June 11, 2026 15:28
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch from 541a4a4 to a053144 Compare June 11, 2026 15:37
@dmerand dmerand force-pushed the donald/store-list-business-platform branch from cd562c1 to 8dd1001 Compare June 11, 2026 15:40
@dmerand dmerand force-pushed the donald/store-list-local-auth-seam branch from a053144 to 489275a Compare June 11, 2026 15:40
@github-actions

Copy link
Copy Markdown
Contributor

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/public/common/string.d.ts
@@ -102,6 +102,16 @@ export declare function formatDate(date: Date): string;
  * @returns The transformed string in local system time.
  */
 export declare function formatLocalDate(dateString: string): string;
+/**
+ * Formats a date as a short calendar date like "May 22, 2026" () in UTC.
+ *
+ * UTC keeps the output deterministic regardless of the machine timezone. Returns an empty string
+ * when the value cannot be parsed into a valid date.
+ *
+ * @param value - A Date, epoch milliseconds, or a date string such as an ISO 8601 timestamp.
+ * @returns The formatted date, or an empty string when the value is invalid.
+ */
+export declare function formatShortDate(value: Date | number | string): string;
 /**
  * Given a list of items, it returns a string with the items joined by commas and the last item joined by "and".
  * All items are wrapped in double quotes.
packages/cli-kit/dist/public/common/url.d.ts
@@ -28,4 +28,13 @@ export declare function extractHost(value: string | null | undefined): string |
  * @param value - A URL or host string, possibly null/undefined.
  * @returns The myshopify subdomain handle, or undefined when the input isn't a  URL.
  */
-export declare function extractMyshopifyHandle(value: string | null | undefined): string | undefined;
\ No newline at end of file
+export declare function extractMyshopifyHandle(value: string | null | undefined): string | undefined;
+/**
+ * Extracts the leading subdomain label from a URL or host, across environments — e.g.
+ * , , or local development hosts — rather than assuming a
+ *  domain.
+ *
+ * @param value - A URL or host string, possibly null/undefined.
+ * @returns The first DNS label, or undefined when no host can be extracted.
+ */
+export declare function extractSubdomain(value: string | null | undefined): string | undefined;
\ No newline at end of file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant