refactor: comments and notifications doctype - #3700
Draft
RitvikSardana wants to merge 14 commits into
Draft
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.
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.depends-on: frappe/frappe#41924