You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@security.apache.org by "basantjamwal (via GitHub)" <gi...@apache.org> on 2026/09/19 11:09:35 UTC

[PR] Show all thread links for reports that contain duplicate threads [security-dash]

basantjamwal opened a new pull request, #30:
URL: https://github.com/apache/security-dash/pull/30

   Fixes #25
   
   ## Problem
   
   Each label file in `data/<pmc>/` becomes one row on the dashboard. The row was
   built from the first email only: title, reporter, date and a single thread
   link. When a file contained emails from more than one thread, only the
   earliest thread was shown. The other thread links were never rendered.
   
   ## Fix
   
   - Emails in a report are grouped into distinct threads. The data has no thread
     ID, so grouping uses the normalized subject: leading `Re:`, `Fwd:`, `Fw:`,
     `AW:` and `[SECURITY]` prefixes are removed, and case and whitespace are
     ignored.
   - The earliest thread remains the main link. Existing behavior is unchanged.
   - Any other threads are listed in the row under a "+N more thread(s)" toggle.
     Each entry links to its own thread.
   
   ## Changes
   
   - `app/reports.py`
     - Added the `ThreadLink` dataclass (title, link).
     - Added `Report.duplicates`, a tuple of `ThreadLink` with default `()`.
       Existing `Report(...)` calls are unaffected.
     - Added the helpers `_title`, `_thread_key` and `_threads`. `_title` is the
       existing title-cleaning code moved into a function, with the same behavior.
   - `app/templates/project.html`: added a `<details>` element in the title cell
     that lists the extra threads. It renders only when there are any.
   - `app/static/assets/css/app.css`: added styles for the toggle and list, using
     the same one-line ellipsis truncation as `.reports-title`.
   - `app/test_reports.py`: added two tests. One checks that replies in the same
     thread are not reported as duplicates. The other checks that distinct
     threads in one report are all linked, with the correct links and order.
   
   ## Testing
   
   - `uv run pytest app`: 30 passed, including the 2 new tests.
   - Checked manually with synthetic label files. A thread with a reply renders a
     normal row. Two differently titled threads render the "+1 more thread"
     toggle, which expands to a working link.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@security.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Show all thread links for reports that contain duplicate threads [security-dash]

Posted by "basantjamwal (via GitHub)" <gi...@apache.org>.
basantjamwal commented on PR #30:
URL: https://github.com/apache/security-dash/pull/30#issuecomment-5790882302

   Conflicts are resolved (merged upstream/frontend, all tests pass). Ready for another look — thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@security.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Show all thread links for reports that contain duplicate threads [security-dash]

Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof merged PR #30:
URL: https://github.com/apache/security-dash/pull/30


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@security.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Show all thread links for reports that contain duplicate threads [security-dash]

Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof commented on PR #30:
URL: https://github.com/apache/security-dash/pull/30#issuecomment-5774486950

   Thanks a lot for looking into this! A screenshot of the new behavior would make reviewing quicker ;) - I'll look at it later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@security.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Show all thread links for reports that contain duplicate threads [security-dash]

Posted by "basantjamwal (via GitHub)" <gi...@apache.org>.
basantjamwal commented on PR #30:
URL: https://github.com/apache/security-dash/pull/30#issuecomment-5790497574

   Here's a screenshot of the new behavior.
   
   Collapsed (default view):
   
   <img width="1920" height="1080" alt="Screenshot 2026-09-23 122754" src="https://github.com/user-attachments/assets/712c5480-c771-49ea-9be6-1a61c454b648" />
   
   
   
   Expanded (click "+1 more thread"):
   
   <img width="1920" height="1080" alt="Screenshot 2026-09-23 122802" src="https://github.com/user-attachments/assets/5952e2cf-0bca-468b-8e99-14788c211797" />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@security.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org