refactor!: comments and notifications doctype - #3700
Merged
RitvikSardana merged 26 commits intoSep 9, 2026
Merged
RitvikSardana merged 26 commits into
RitvikSardana merged 26 commits into
Conversation
RitvikSardana
force-pushed
the
refactor/comments-notifications-migration
branch
from
August 15, 2026 08:58
7d2bd0d to
aed3227
Compare
RitvikSardana
force-pushed
the
refactor/comments-notifications-migration
branch
from
August 15, 2026 16:08
946d0cd to
e021793
Compare
…rch index, port reaction tests
Replace the hand-rolled ticket activity feed (TicketAgentActivities, EmailArea, CommentBox, HistoryBox, FeedbackBox) with the framework's ActivityTimeline + useActivityTimeline on both desktop and mobile. - one shared fetch per ticket (SHARED_VISIBLE_TYPES); tabs filter client-side - TimelineContainer bounds the feed; mobile page is a clamped column - comment extras (reactions/attachments) via helpdesk.api.timeline - deep links map ?highlight=comment-/communication- to timeline row keys - drop dead server endpoints (get_ticket_activities, get_history, get_version_history, get_views)
…actor/comments-notifications-migration
- assert the Add Comment action lands in core Comment, not HD Ticket Comment - reload the timeline after actions apply: the send-triggered reload races the action comment's socket append and can drop it until a refresh - drop contact from the version fields worth a feed row
The page gated on prefetchActivityTimeline, which no longer exists — the timeline store is only reachable through useActivityTimeline. TicketAgent now starts the feed itself and latches its loading flag, so the doc and the feed load behind a single spinner instead of two in sequence. Latched because a doc_update reloads the feed, which must not blank the page. Saved reply actions reload the feed through the mounted timeline, which registers its refresh on the ticketMap entry, keyed per ticket so a reload after a ticket switch hits the right feed. Also moves the timeline imports to the @framework/ui/ActivityTimeline entry point and picks up AttachmentChip for comment attachments.
RitvikSardana
marked this pull request as ready for review
September 7, 2026 11:03
Contributor
…actor/comments-notifications-migration
|
Tick the box to add this pull request to the merge queue (same as
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3700 +/- ##
===========================================
+ Coverage 73.76% 75.07% +1.30%
===========================================
Files 148 154 +6
Lines 10841 11437 +596
===========================================
+ Hits 7997 8586 +589
- Misses 2844 2851 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
@greptileai rereview |
Member
Author
|
@greptileai rereview |
…ermissions Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RLRT2UCFYoGRxyahBphFbY
…ry tab change Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RLRT2UCFYoGRxyahBphFbY
…cket Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RLRT2UCFYoGRxyahBphFbY
Member
Author
|
@greptileai rereview |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Migrating helpdesk specific doctypes to their core equivalents.
Info), only tag, auto close and split rowsPatches
Versionrow of their ownNotes
bench migrateresumesInside the patch: one HD Ticket Comment, one fate
What
copy_chunkandresolve_name_collisionsdecide for each row on its way to coreComment. Every path is safe to reach twice, which is the whole idempotency story.flowchart TD S["Next batch: 50,000 HD Ticket Comments<br/><i>name > lower AND name ≤ upper</i>"] --> Q1{"Same name already exists<br/>as a core Comment?<br/><i>NOT EXISTS check</i>"} Q1 -- "no" --> INS["INSERT as core Comment,<br/>name + creation preserved"] INS --> COMMIT["Chunk commits,<br/>resumable checkpoint"] Q1 -- "yes, skipped by copy_chunk" --> Q2{"That core Comment has my creation<br/>and points at HD Ticket?"} Q2 -- "yes" --> MINE["It's my own migrated copy<br/>(re-run / resumed run), do nothing"] Q2 -- "no, a stranger owns my name" --> Q3{"Core Comment copy of me exists<br/>under ANY name?<br/><i>creation + owner fingerprint</i>"} Q3 -- "yes" --> FIXED["Prior run already resolved me,<br/>do nothing"] Q3 -- "no" --> FRESH["INSERT core Comment under fresh hash,<br/>relink reactions · files · notifications,<br/>log the rename"] style Q1 stroke:#9a6b1f,stroke-width:2px style Q2 stroke:#9a6b1f,stroke-width:2px style Q3 stroke:#9a6b1f,stroke-width:2px style INS stroke:#2e7d4f,stroke-width:2px style FRESH stroke:#2e7d4f,stroke-width:2px style MINE stroke-dasharray: 5 4 style FIXED stroke-dasharray: 5 4Crash anywhere? Committed chunks stay, the interrupted chunk rolled back atomically. Re-running
bench migratereplays the same tree: finished rows land on a dashed no-op, unfinished rows take the green path. Same statement, same answer, no duplicates and no manual repair.New Timeline UI
New.Ticket.mp4
depends-on: frappe/frappe#41924frappe/frappe#42082
frappe/frappe#42142
frappe/frappe#42685
Migrating your customizations
If you have custom code written against
HD Ticket Comment,HD Ticket ActivityorHD Notification, it keeps running after this change, but it now reads and writes rows nothing displays.The wiki page below is the upgrade guide: full field mapping, how to create and read a comment now, where to move your
doc_eventsand why the handler needs areference_doctypeguard, the reaction and attachment changes, the notification mapping, and a grep checklist at the end.Migrating customizations from HD Ticket Comment to Comment