Skip to content

Feat/1956/issue details last seen#1965

Merged
alanpeixinho merged 3 commits into
kernelci:mainfrom
profusion:feat/1956/issue-details-last-seen
Jul 8, 2026
Merged

Feat/1956/issue details last seen#1965
alanpeixinho merged 3 commits into
kernelci:mainfrom
profusion:feat/1956/issue-details-last-seen

Conversation

@felipebergamin

@felipebergamin felipebergamin commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
  • Implements last_seen information on issue details

Closes issue #1956

Example of how it looks:

image

Comment thread dashboard/src/locales/messages/index.ts Outdated
Comment thread dashboard/src/types/issueExtras.ts Outdated
issue_version?: string;
};

export type LastIncident = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need a new type here? If there is no new data, we could just change to a type named Incident

Comment thread backend/kernelCI_app/typeModels/issues.py Outdated
Comment thread backend/kernelCI_app/queries/issues.py Outdated
if len(issue_id_list) == 1:
comparison = "= %s"
else:
placeholders = ", ".join(["%s"] * len(issue_id_list))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we dont need to do this trick here. We might be able to pass as a list parameter.
There is an example of the commits parameter (a list) on get_hardware_details_summary.

Comment thread backend/kernelCI_app/helpers/issueExtras.py Outdated
@felipebergamin felipebergamin marked this pull request as ready for review July 2, 2026 17:47
Comment thread backend/kernelCI_app/queries/issues.py Outdated
return records


def get_issue_last_seen_data(*, issue_id_list: list[str]) -> list[dict]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can be factored out with get_issue_first_seen_data into a single function with a toggle for asc/desc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

class ExtraIssuesData(BaseModel):
first_incident: FirstIncident
first_incident: Incident
last_incident: Optional[Incident] = None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

last incident should not be optional

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

last incident should not be optional

Agreed. It was optional before because ExtraIssuesData was being instantiated without last_incident, which was assigned later on. I changed backend/kernelCI_app/helpers/issueExtras.py to assign last_incident from the start.

},
];

export const getFirstIncidentSection = ({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lingering "First" in name - this gets first and last incidents

'issueDetails.issueDetails': 'Issue Details',
'issueDetails.issueListingInfo':
'The culprit for all issues listed is code',
'issueDetails.lastIncident': 'Last Incident Data',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I prefer "Latest Incident", as in "the issue might or might not be finished"

'hardwareListing.treeSelectorSearchPlaceholder': 'Search tree...',
'issue.alsoPresentTooltip': 'Issue also present in {tree}',
'issue.firstSeen': 'First seen',
'issue.lastSeen': 'Last seen',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No need to specify "last" when we are inside a "last incident" section. Ditto for "first seen"

@felipebergamin felipebergamin force-pushed the feat/1956/issue-details-last-seen branch from 5e2d10a to d2ea2cf Compare July 3, 2026 17:12
@felipebergamin felipebergamin requested a review from mentonin July 3, 2026 17:24

@alanpeixinho alanpeixinho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great

Comment thread backend/schema.yml
minimum: 0
title: End Days Ago
type: integer
description: Number of days ago that marks the end of the metrics interval

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unrelated schema fixes should be in a separate commit, referencing the commits or PRs that introduced those schema changes

Pending schema changes from commit 5ef7b2b

Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
Part of kernelci#1956

Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
Closes kernelci#1956

Signed-off-by: Felipe <felipebergamin@profusion.mobi>
@felipebergamin felipebergamin force-pushed the feat/1956/issue-details-last-seen branch from d2ea2cf to f7f6fce Compare July 6, 2026 17:24
@alanpeixinho alanpeixinho requested a review from mentonin July 6, 2026 21:16
@alanpeixinho alanpeixinho added this pull request to the merge queue Jul 8, 2026
Merged via the queue into kernelci:main with commit 2069443 Jul 8, 2026
@mentonin mentonin deleted the feat/1956/issue-details-last-seen branch July 8, 2026 17:11
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