Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

feat(policy): decommision alert#602

Merged
adonispuente merged 1 commit intoRedHatInsights:masterfrom
adonispuente:alert
Dec 10, 2025
Merged

feat(policy): decommision alert#602
adonispuente merged 1 commit intoRedHatInsights:masterfrom
adonispuente:alert

Conversation

@adonispuente
Copy link
Collaborator

@adonispuente adonispuente commented Dec 10, 2025

Adds an alert about decommisioning the app

Summary by Sourcery

New Features:

  • Display an inline warning alert on the list page announcing the application decommissioning date and advising users to export data and transition to alternatives.

@adonispuente adonispuente requested a review from a team as a code owner December 10, 2025 20:03
@sourcery-ai
Copy link

sourcery-ai bot commented Dec 10, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds an inline warning alert to the ListPage informing users about the upcoming decommissioning date of the application and advising them to export data and migrate to alternatives.

File-Level Changes

Change Details Files
Display an inline decommissioning warning alert on the ListPage.
  • Insert a PageSection above the existing notification opt-in section.
  • Render a PatternFly Alert with warning variant and inline display.
  • Set alert title to indicate application decommissioning and include body copy with the decommission date and migration/export guidance.
src/pages/ListPage/ListPage.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@adonispuente adonispuente merged commit 9a19515 into RedHatInsights:master Dec 10, 2025
2 of 7 checks passed
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Consider externalizing the decommission date and message into a config or constants file so it can be updated without code changes.
  • If the app is localized, this hard-coded English string should be moved into the existing i18n mechanism to keep translations consistent.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider externalizing the decommission date and message into a config or constants file so it can be updated without code changes.
- If the app is localized, this hard-coded English string should be moved into the existing i18n mechanism to keep translations consistent.

## Individual Comments

### Comment 1
<location> `src/pages/ListPage/ListPage.tsx:262` </location>
<code_context>
+                            isInline
+                        >
+                            <p>
+                                This application will be decommissioned on <strong>December 12th, 2025</strong>. 
+                                Please ensure you have exported any necessary data and transitioned to alternative solutions before this date.
+                            </p>
</code_context>

<issue_to_address>
**suggestion:** Avoid hard-coding the decommissioning date in the UI

Hard-coding this date means any change requires a code change and redeploy. Consider sourcing it from configuration or a feature flag/service so it can be updated without a release and reused across other surfaces (emails, docs, other pages) for consistency.

Suggested implementation:

```typescript
                        <Alert
                            variant="warning"
                            title="Application Decommissioning Notice"
                            isInline
                        >
                            <p>
                                This application will be decommissioned
                                { appContext.decommissionDate && (
                                    <> on <strong>{ appContext.decommissionDate }</strong></>
                                ) }
                                . Please ensure you have exported any necessary data and transitioned to alternative solutions before this date.
                            </p>
                        </Alert>

```

`).

Here are the changes:

<file_operations>
<file_operation operation="edit" file_path="src/pages/ListPage/ListPage.tsx">
<<<<<<< SEARCH
                        <Alert
                            variant="warning"
                            title="Application Decommissioning Notice"
                            isInline
                        >
                            <p>
                                This application will be decommissioned on <strong>December 12th, 2025</strong>. 
                                Please ensure you have exported any necessary data and transitioned to alternative solutions before this date.
                            </p>
                        </Alert>
=======
                        <Alert
                            variant="warning"
                            title="Application Decommissioning Notice"
                            isInline
                        >
                            <p>
                                This application will be decommissioned
                                { appContext.decommissionDate && (
                                    <> on <strong>{ appContext.decommissionDate }</strong></>
                                ) }
                                . Please ensure you have exported any necessary data and transitioned to alternative solutions before this date.
                            </p>
                        </Alert>
>>>>>>> REPLACE
</file_operation>
</file_operations>

<additional_changes>
To fully avoid hard-coding and enable reuse of the decommissioning date across surfaces, you’ll also need to:

1. Add a `decommissionDate` (or similarly named property) to your `AppContext` type/interface and its default value, sourcing it from your configuration mechanism (e.g. env config, feature flag service, or a centralized config module).
2. Initialize `appContext.decommissionDate` in your context provider using that configuration value.
3. Reuse this same context/config value in other surfaces (emails, docs, other pages) where you want a consistent decommission date.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

isInline
>
<p>
This application will be decommissioned on <strong>December 12th, 2025</strong>.
Copy link

Choose a reason for hiding this comment

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

suggestion: Avoid hard-coding the decommissioning date in the UI

Hard-coding this date means any change requires a code change and redeploy. Consider sourcing it from configuration or a feature flag/service so it can be updated without a release and reused across other surfaces (emails, docs, other pages) for consistency.

Suggested implementation:

                        <Alert
                            variant="warning"
                            title="Application Decommissioning Notice"
                            isInline
                        >
                            <p>
                                This application will be decommissioned
                                { appContext.decommissionDate && (
                                    <> on <strong>{ appContext.decommissionDate }</strong></>
                                ) }
                                . Please ensure you have exported any necessary data and transitioned to alternative solutions before this date.
                            </p>
                        </Alert>

`).

Here are the changes:

<file_operations>
<file_operation operation="edit" file_path="src/pages/ListPage/ListPage.tsx">
<<<<<<< SEARCH


This application will be decommissioned on December 12th, 2025.
Please ensure you have exported any necessary data and transitioned to alternative solutions before this date.


                    <Alert
                        variant="warning"
                        title="Application Decommissioning Notice"
                        isInline
                    >
                        <p>
                            This application will be decommissioned
                            { appContext.decommissionDate && (
                                <> on <strong>{ appContext.decommissionDate }</strong></>
                            ) }
                            . Please ensure you have exported any necessary data and transitioned to alternative solutions before this date.
                        </p>
                    </Alert>

REPLACE
</file_operation>
</file_operations>

<additional_changes>
To fully avoid hard-coding and enable reuse of the decommissioning date across surfaces, you’ll also need to:

  1. Add a decommissionDate (or similarly named property) to your AppContext type/interface and its default value, sourcing it from your configuration mechanism (e.g. env config, feature flag service, or a centralized config module).
  2. Initialize appContext.decommissionDate in your context provider using that configuration value.
  3. Reuse this same context/config value in other surfaces (emails, docs, other pages) where you want a consistent decommission date.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant