Skip to content

Fix semgrep issues, improve type hints, and add all_subjects field#64

Merged
wreckage0907 merged 16 commits into
version-16-hotfixfrom
main
May 25, 2026
Merged

Fix semgrep issues, improve type hints, and add all_subjects field#64
wreckage0907 merged 16 commits into
version-16-hotfixfrom
main

Conversation

@wreckage0907

Copy link
Copy Markdown
Contributor

Description

This pull request introduces a new all_subjects field to the Gmail Thread doctype, enabling efficient searching and filtering across all email subjects within a thread. It also improves type annotations for API functions, enhances frontend robustness, and refines the handling of quoted replies in incoming emails. A database patch is included to backfill the new field for existing records.

  • Added a hidden, read-only all_subjects field to the Gmail Thread doctype for storing all unique subjects from the thread and its emails, enabling list-view filtering across all subjects

  • Updated the before_save method in gmail_thread.py to automatically populate all_subjects by collecting subjects from both the parent and child emails

  • Added a database patch script to backfill the all_subjects field for all existing threads

  • Added or improved type annotations for several API functions to clarify expected argument types and improve code reliability

  • Added # nosemgrep comments to suppress security linter warnings where appropriate

  • Improved robustness of timeline refresh logic in the activity JavaScript by adding null checks and ensuring timeline is refreshed only when available

  • Replaced the remove_quoted_replies method with pop_down_quoted_replies in GmailInboundMail, which now normalizes quoted reply containers from various email clients to a consistent Gmail-style format for better frontend rendering and user experience

Relevant Technical Choices

Testing Instructions

Additional Information:

Screenshot/Screencast

Checklist

  • I have carefully reviewed the code before submitting it for review.
  • This code is adequately covered by unit tests to validate its functionality.
  • I have conducted thorough testing to ensure it functions as intended.
  • A member of the QA team has reviewed and tested this PR (To be checked by QA or code reviewer)

Fixes #

@wreckage0907 wreckage0907 requested a review from niraj2477 May 25, 2026 08:11
@wreckage0907 wreckage0907 merged commit 65168ba into version-16-hotfix May 25, 2026
28 checks passed
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