Skip to content

Fix alert comments order#1099

Open
Acsigen wants to merge 2 commits into
dfir-iris:masterfrom
Acsigen:master
Open

Fix alert comments order#1099
Acsigen wants to merge 2 commits into
dfir-iris:masterfrom
Acsigen:master

Conversation

@Acsigen

@Acsigen Acsigen commented Jul 16, 2026

Copy link
Copy Markdown

The alert comments are not sorted and displayed randomly.

Summary by CodeRabbit

  • Bug Fixes
    • Alert comments are now displayed in chronological order, from oldest to newest (with consistent tie-breaking for comments on the same date).

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e13b51b4-2c20-44c4-bea0-6c1f492d09e3

📥 Commits

Reviewing files that changed from the base of the PR and between 70d8ee2 and 606a2a7.

📒 Files selected for processing (1)
  • source/app/datamgmt/alerts/alerts_db.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • source/app/datamgmt/alerts/alerts_db.py

Walkthrough

The alert comment retrieval query now explicitly sorts results by comment_date ascending, using comment_id as a deterministic tie-breaker.

Changes

Alert comment ordering

Layer / File(s) Summary
Chronological comment query
source/app/datamgmt/alerts/alerts_db.py
get_alert_comments orders matching comments by ascending comment_date, then ascending comment_id for equal timestamps.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a bunny with comments in line,
Sorted by date, all tidy and fine.
Old notes hop first,
New notes come last—
Equal dates follow IDs divine!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: making alert comments sort consistently.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@source/app/datamgmt/alerts/alerts_db.py`:
- Line 1396: Update the Comments query ordering to add the comment’s stable
unique primary key as a secondary ascending sort after Comments.comment_date,
preserving chronological ordering while making equal-timestamp results
deterministic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fd9e92c4-1ae1-4d6d-8c3a-e52b58952e91

📥 Commits

Reviewing files that changed from the base of the PR and between a4bfeda and 70d8ee2.

📒 Files selected for processing (1)
  • source/app/datamgmt/alerts/alerts_db.py

Comment thread source/app/datamgmt/alerts/alerts_db.py Outdated
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.

1 participant