Hello, I found this bug today by accident.
If a store has two apps that contain the same handle, the theme editor will open both extensions in the list, but will scroll to the first one in view.
Example scenario:
Consider this deep link where the handle is themeCSS:
shopify:admin/themes/current/editor?context=apps&template=product&activateAppId=APP_ID/themeCSS
Expected behavior:
It should open only the extension under this path:
https://admin.shopify.com/store/STORE/themes/THEME/editor?context=apps&previewPath=%2Fproducts%2FPRODUCT&appEmbed=APP_ID%2FthemeCSS
Actual behavior:
If another app uses the same handle, it will also be expanded, example:
https://admin.shopify.com/store/STORE/themes/THEME/editor?context=apps&previewPath=%2Fproducts%2FPRODUCT&appEmbed=ANOTHER_APP_ID_THAT_HAS_NOTHING_TO_DO_WITH_THE_ORIGINAL%2FthemeCSS
# original extension also gets open but is not in view
https://admin.shopify.com/store/STORE/themes/THEME/editor?context=apps&previewPath=%2Fproducts%2FPRODUCT&appEmbed=APP_ID%2FthemeCSS
User confusion:
If the unrelated app ID appears first in the theme app extension list, users will be confused when the toast message says the app has been activated, but the toggle button appears as turned off.
Actually both apps have been expanded, but only the targeted one was activated and the wrong extension was scrolled into view.
Possible solution
Make the shopify mechanism find the corresponding extension using both the handle and the extension uuid, instead of only the app handle.