From a06c3cd0b13dcbad4c11fdd4765a5de185d4ce6e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 15:06:30 +0000 Subject: [PATCH 1/8] Initial plan From 66172b3419236cb4271935d7be42a0c4b20d887e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 15:28:28 +0000 Subject: [PATCH 2/8] Add sticky incidents fix documentation and patch Co-authored-by: jbrooksuk <246103+jbrooksuk@users.noreply.github.com> --- STICKY_INCIDENTS_FIX.md | 65 ++++++++++ sticky-incidents-fix.patch | 244 +++++++++++++++++++++++++++++++++++++ 2 files changed, 309 insertions(+) create mode 100644 STICKY_INCIDENTS_FIX.md create mode 100644 sticky-incidents-fix.patch diff --git a/STICKY_INCIDENTS_FIX.md b/STICKY_INCIDENTS_FIX.md new file mode 100644 index 00000000000..bacbbddfee6 --- /dev/null +++ b/STICKY_INCIDENTS_FIX.md @@ -0,0 +1,65 @@ +# Sticky Incidents Fix + +## Problem +Sticky incidents were not being displayed prominently at the top of the status page. They appeared only in the regular incident timeline based on their date. + +## Root Cause +The `IncidentTimeline` component in the `cachethq/core` package did not separate sticky incidents from regular incidents when fetching and displaying them. + +## Solution +The fix involves modifying three files in the `cachethq/core` repository: + +### 1. `src/View/Components/IncidentTimeline.php` +- Added a new `stickiedIncidents()` method that fetches only stickied incidents +- Modified the `incidents()` method to exclude stickied incidents using `->where('stickied', false)` +- Updated the `render()` method to pass `stickiedIncidents` to the view + +### 2. `resources/views/components/incident-timeline.blade.php` +- Added a new section at the top to display stickied incidents separately +- Stickied incidents now appear with a distinctive amber border (ring-2 ring-amber-500) +- The section only displays when there are stickied incidents +- Each stickied incident shows all its details (status, updates, timeline) + +### 3. `resources/lang/en/incident.php` +- Added translation key `timeline.stickied_incidents_header` = "Stickied Incidents" + +### 4. `tests/Feature/View/Components/IncidentTimelineTest.php` (New file) +- Added comprehensive tests for sticky incident functionality +- Tests verify sticky incidents are displayed separately +- Tests verify sticky incidents don't appear in regular timeline +- Tests verify proper sorting and display behavior + +## Visual Changes +- **Stickied Incidents Section**: New section appears at the top with heading "Stickied Incidents" +- **Visual Distinction**: Stickied incidents have an amber ring border to make them stand out +- **Background**: Slight amber tint on the header background for stickied incidents +- **Separation**: Clear visual separation between stickied and regular incidents + +## Implementation Details +The key changes ensure that: +1. Stickied incidents are always visible at the top of the page, regardless of their date +2. Stickied incidents are excluded from the date-based timeline +3. Multiple stickied incidents are sorted by timestamp (newest first) +4. The stickied section only appears when there are stickied incidents +5. All incident features (updates, status, components) work the same for stickied incidents + +## Applying the Fix + +Since the actual code changes are in the `cachethq/core` repository, the fix needs to be applied there. The patch file `sticky-incidents-fix.patch` contains all the changes that need to be merged into the core repository. + +To apply locally for testing: +```bash +cd vendor/cachethq/core +patch -p1 < ../../../sticky-incidents-fix.patch +``` + +## Testing +Run the test suite to verify the changes: +```bash +cd vendor/cachethq/core +php vendor/bin/pest tests/Feature/View/Components/IncidentTimelineTest.php +``` + +## Screenshots +Before: Sticky incidents appear only in the regular timeline under their date +After: Sticky incidents appear in a dedicated section at the top with visual distinction diff --git a/sticky-incidents-fix.patch b/sticky-incidents-fix.patch new file mode 100644 index 00000000000..7f9187b9e64 --- /dev/null +++ b/sticky-incidents-fix.patch @@ -0,0 +1,244 @@ +diff --git a/resources/lang/en/incident.php b/resources/lang/en/incident.php +index 91a51c1..fe573d2 100644 +--- a/resources/lang/en/incident.php ++++ b/resources/lang/en/incident.php +@@ -16,6 +16,7 @@ return [ + 'timeline' => [ + 'past_incidents_header' => 'Past Incidents', + 'recent_incidents_header' => 'Recent Incidents', ++ 'stickied_incidents_header' => 'Stickied Incidents', + 'no_incidents_reported_between' => 'No incidents reported between :from and :to', + 'navigate' => [ + 'previous' => 'Previous', +diff --git a/resources/views/components/incident-timeline.blade.php b/resources/views/components/incident-timeline.blade.php +index 8615dc0..849b822 100644 +--- a/resources/views/components/incident-timeline.blade.php ++++ b/resources/views/components/incident-timeline.blade.php +@@ -1,4 +1,81 @@ +