feat(policy): decommision alert#602
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds 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
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
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>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>. |
There was a problem hiding this comment.
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:
- Add a
decommissionDate(or similarly named property) to yourAppContexttype/interface and its default value, sourcing it from your configuration mechanism (e.g. env config, feature flag service, or a centralized config module). - Initialize
appContext.decommissionDatein your context provider using that configuration value. - Reuse this same context/config value in other surfaces (emails, docs, other pages) where you want a consistent decommission date.
Adds an alert about decommisioning the app
Summary by Sourcery
New Features: