Skip to content

Comments

Alerts for apps with issues or disabled apps in app list#5416

Merged
Cloud11PL merged 50 commits intomainfrom
PROD-100-app-list-apps-alert
Feb 21, 2025
Merged

Alerts for apps with issues or disabled apps in app list#5416
Cloud11PL merged 50 commits intomainfrom
PROD-100-app-list-apps-alert

Conversation

@Cloud11PL
Copy link
Contributor

@Cloud11PL Cloud11PL commented Feb 17, 2025

Scope of the change

CleanShot 2025-02-21 at 12 25 22

CleanShot 2025-02-18 at 09 44 04

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2025

🦋 Changeset detected

Latest commit: 608a8f1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
saleor-dashboard Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 91.39785% with 8 lines in your changes missing coverage. Please review.

Project coverage is 62.00%. Comparing base (5032656) to head (608a8f1).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...onents/InstalledAppListRow/InstalledAppListRow.tsx 66.66% 2 Missing and 1 partial ⚠️
...apps/components/AppAlerts/AlertExclamationIcon.tsx 83.33% 2 Missing ⚠️
.../apps/components/AppAlerts/AppRowDisabledAlert.tsx 90.90% 1 Missing ⚠️
src/apps/components/AppAlerts/utils.ts 96.87% 1 Missing ⚠️
src/icons/Disabled.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5416      +/-   ##
==========================================
+ Coverage   61.88%   62.00%   +0.12%     
==========================================
  Files        1259     1266       +7     
  Lines       21878    21940      +62     
  Branches     4339     4351      +12     
==========================================
+ Hits        13539    13604      +65     
+ Misses       8302     8298       -4     
- Partials       37       38       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Cloud11PL Cloud11PL force-pushed the PROD-100-app-list-apps-alert branch from fdc1008 to e600783 Compare February 17, 2025 13:01
@Cloud11PL Cloud11PL force-pushed the PROD-100-app-list-apps-alert branch from 5565d78 to 3276d98 Compare February 20, 2025 09:42
@github-actions github-actions bot temporarily deployed to pr-5416 February 20, 2025 09:44 Destroyed
@Cloud11PL Cloud11PL added run pw-e2e Run e2e (basic suite from PR automation) and removed do not merge labels Feb 20, 2025
@github-actions github-actions bot temporarily deployed to pr-5416 February 20, 2025 09:54 Destroyed
@github-actions
Copy link
Contributor

github-actions bot commented Feb 20, 2025

merge-reports: Run #4567

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
235 235 0 0 0 0 0 4m53s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@github-actions github-actions bot temporarily deployed to pr-5416 February 20, 2025 13:33 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5416 February 21, 2025 08:43 Destroyed
@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2025

merge-reports: Run #4579

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
235 235 0 0 0 0 0 4m52s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@github-actions github-actions bot temporarily deployed to pr-5416 February 21, 2025 11:37 Destroyed
</Tooltip.Trigger>

<Tooltip.Content align="start" side="bottom">
<StopPropagation>
Copy link
Contributor

Choose a reason for hiding this comment

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

question: why do you use StopPropagation ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the event is transffered to the app list row and when you click on the link inside the tooltip you would get navigated to the app instead of the link.

Comment on lines +6 to +7
const hasFailedAttemptsCheck = (webhook: Webhook) =>
webhook.failedDelivers && webhook.failedDelivers?.edges?.length > 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const hasFailedAttemptsCheck = (webhook: Webhook) =>
webhook.failedDelivers && webhook.failedDelivers?.edges?.length > 0;
const hasFailedAttemptsCheck = (webhook: Webhook) => webhook?.failedDelivers?.edges?.length > 0;

Copy link
Contributor Author

@Cloud11PL Cloud11PL Feb 21, 2025

Choose a reason for hiding this comment

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

Yes, I know it's makes more sense to do what you have proposed, but it seems like it doesn't work with Dashboard's TS version - it produces a TS error. It works with TS 5.7.2 tho

const hasFailedAttemptsCheck = (webhook: Webhook) =>
webhook.failedDelivers && webhook.failedDelivers?.edges?.length > 0;
const hasFailedAttemptsInPendingCheck = (webhook: Webhook) => {
const preliminaryCheck = webhook.pendingDelivers && webhook.pendingDelivers?.edges?.length > 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const preliminaryCheck = webhook.pendingDelivers && webhook.pendingDelivers?.edges?.length > 0;
const preliminaryCheck = webhook?.pendingDelivers?.edges?.length > 0;

@github-actions github-actions bot temporarily deployed to pr-5416 February 21, 2025 13:54 Destroyed
@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2025

merge-reports: Run #4592

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
235 235 0 0 0 0 0 5m2s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@github-actions github-actions bot temporarily deployed to pr-5416 February 21, 2025 14:19 Destroyed
@Cloud11PL Cloud11PL merged commit e56d180 into main Feb 21, 2025
17 checks passed
@Cloud11PL Cloud11PL deleted the PROD-100-app-list-apps-alert branch February 21, 2025 14:44
Cloud11PL added a commit that referenced this pull request Mar 6, 2025
* show alert if there are failed/pending deliveries

* i18n

* useMemo and booleans

* get latest failed/pending event

* check attempts

* add feature flag

* cr fixes

* fix test

* filter by thirdparty

* hook refactor

* add missing test

* generate flag

* generate flag

* add feature flag

* cr fixes

* generate flag

* generate flag

* add feature flag

* cr fixes

* apps list ui change

* show icon when app is disabled

* app list alerts

* row alert

* link to app details

* show focused and hover

* add alert for disabled app

* add tests

* changeset

* fix permission check

* sort installed apps

* add more tests

* fix tests

* i18n

* hide issues alert behind feature flag

* mock use flag in test

* fix icon import

* fix feature flag usage

* fetch more pending deliveries

* remove app sorting by issue

* fix date formatting

* don't fetch webhooks without permissions

* cr fixes

* fix custom app list query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run pw-e2e Run e2e (basic suite from PR automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants