Skip to content

Improved: flow for app version support in case of embedded app - #145

Open
ymaheshwari1 wants to merge 4 commits into
hotwax:mainfrom
ymaheshwari1:fix/embed-app-flow
Open

ymaheshwari1 wants to merge 4 commits into
hotwax:mainfrom
ymaheshwari1:fix/embed-app-flow

Conversation

@ymaheshwari1

Copy link
Copy Markdown
Contributor

Related Issues

Short Description and Why It's Useful

Screenshots of Visual Changes before/after (If There Are Any)

Is the changes contains any breaking change?

If there are any breaking change include those in the release notes file

  • Yes
  • No

Contribution and Currently Important Rules Acceptance

@ymaheshwari1
ymaheshwari1 marked this pull request as ready for review August 17, 2026 09:32

@claude claude 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@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: 9c6c27d6de

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +141 to +142
const currentExpiration = embeddedAppStore?.getTokenExpiration || expirationTime.value;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate embedded credentials on the embedded session

When a merchant opens the standalone app on the same origin after an embedded session, the persisted embedded store still contains its token and expiration because only shopifyAppBridge is omitted from persistence. These lines therefore prefer those credentials even though commonUtil.isAppEmbedded() is false: an expired embedded token makes a valid cookie-backed standalone session appear unauthenticated, while a live one is paired with the store-first token/OMS helpers and can send requests using the previous embedded session. Select these values from the store only when the current page is actually embedded, or clear the embedded credentials when entering standalone mode.

Useful? React with 👍 / 👎.

@patelanil patelanil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Log message format review

I reviewed the log/error messages added in this PR against our best practice: log-messages.md.

These added messages do not follow the [Entity] [Context] - [Action/Outcome/Issue] pattern:

  1. App version "${pending}" is not served by this host; falling back to the root build for this session.
    Suggest: App Version [Version: ${pending}] - Not served by this host; falling back to the root build for this session

Dynamic IDs belong in the [Context] block and the action text should stay constant, so messages group and count cleanly in Grafana/Loki during log analysis. Please align these before merge.

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