Skip to content

INT-1707 Reducer and mock data updates#26

Open
clxp01 wants to merge 2 commits intodevelopfrom
claudiu/int-1707-update-reducers
Open

INT-1707 Reducer and mock data updates#26
clxp01 wants to merge 2 commits intodevelopfrom
claudiu/int-1707-update-reducers

Conversation

@clxp01
Copy link

@clxp01 clxp01 commented Feb 27, 2026

No description provided.

@CitadelOfBlairs
Copy link

CitadelOfBlairs commented Feb 27, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the details reducer and accompanying mock payload to match the newer indicators response shape (array of indicator objects) and reduce what is passed through to the UI.

Changes:

  • Simplifies reducers/details.json by removing the prior deep indicator hit/source transformations and replacing them with a smaller set of dropped indicator fields.
  • Updates mocks/details.json to provide indicators as an array with latest_sighting and related fields.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
reducers/details.json Reworks the details reducer pipeline for indicators and prunes unused fields.
mocks/details.json Updates mock “details” payload to the new indicators array structure.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +48 to +50
"reduced_results.indicators[].id",
"reduced_results.indicators[].sort_date",
"reduced_results.indicators[].platform_urls",
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

The reducer is dropping reduced_results.indicators[].id, but the UI relies on indicator.id to fetch indicator details (GET_INDICATOR_DETAILS in client/block.js). Removing it will break the “View Sighting, Related IOCs, and Mitre ATT&CK” flow. Keep id in the reduced indicator objects (and consider keeping platform_urls as the template uses it for the “View in Flashpoint” link).

Suggested change
"reduced_results.indicators[].id",
"reduced_results.indicators[].sort_date",
"reduced_results.indicators[].platform_urls",
"reduced_results.indicators[].sort_date",

Copilot uses AI. Check for mistakes.
Copy link
Author

@clxp01 clxp01 Feb 27, 2026

Choose a reason for hiding this comment

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

@sarus For me makes sense the above comment. I updated the changes to keep the id and platform urls. what do you think?

Comment on lines +102 to +106
"description": "Simulated sighting: suspicious DNS request [2026-02-26T08:31:10.111Z]",
"href": "https://api.flashpoint.io/technical-intelligence/v2/sightings/AtlBmYHSXzeJXShr2MdqKA",
"id": "AtlBmYHSXzeJXShr2MdqKA",
"sighted_at": "2026-02-26T08:29:34.054000Z",
"source": "mock_dns_sensor",
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

latest_sighting.description contains a timestamp (2026-02-26T08:31:10.111Z) that doesn’t match the latest_sighting.sighted_at value (2026-02-26T08:29:34.054000Z). Align these in the mock data to avoid confusing UI output and future tests that may assert on timestamps.

Copilot uses AI. Check for mistakes.
Comment on lines +153 to +157
"description": "Simulated sighting: outbound callback pattern [2026-02-26T08:35:54.900Z]",
"href": "https://api.flashpoint.io/technical-intelligence/v2/sightings/AtlBmYHSXzeJXShr2MdqKA",
"id": "AtlBmYHSXzeJXShr2MdqKA",
"sighted_at": "2026-02-26T08:29:34.054000Z",
"source": "mock_network_collector",
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

latest_sighting.description includes 2026-02-26T08:35:54.900Z but latest_sighting.sighted_at is 2026-02-26T08:29:34.054000Z. For consistency in the mock payload, update one of these so the description timestamp matches the actual sighted_at.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants