Repository navigation
Feat/support ticketing foundation - #1446
Merged
Merged
Conversation
…cket with compat views
storage.ts is the only code that touches support_ticket and support_ticket_message. It parses rows into Ticket (legacy closed reads as resolved). service.ts opens, replies, resolves and lists tickets in transactions, locks the ticket row, and moves status only through next. requesterHasWritten comes from the ticket's public customer messages. orgTickets filters tickets with canSee and messages with visibleMessages. A staff reply on a resolved ticket now keeps it resolved. Also: valid transition test dates, per-event handler types, an exact pointer Slack line assertion, a one-line 0058 header, and a compat test for the old release's default-keyword insert with returning.
…ds as waiting Resolving an already resolved ticket leaves status and resolved_at as they are, so resolve times do not drift. normalizeStatus maps legacy 'open' to waiting_on_dembrane next to 'closed' to resolved, so an org with an old open row still lists; only unknown values throw.
…lock only in a transaction
…te replies stamp first response - resolveTicket skips the write when the clock is unchanged, so updatedAt stays put. - A staff reply on a resolved ticket keeps it resolved but stamps a missing firstResponseAt once the requester has written (the 0058 backfill rule). - postMessage rejects an internal note that is not from staff. - The reply-vs-resolve race test waits for a lock waiter in pg_locks, not a fixed sleep.
…eps ticket text home - Customer and staff questions open, reply and resolve through @dembrane/support; the accounts ticket queries are gone. Reads go through orgTickets or a visibility-checked lookup, and every response goes through a public-only ticketView. - Contract: TicketStatus is waiting_on_customer | waiting_on_dembrane | resolved, closed_at becomes resolved_at. The frontend follows separately. - The sam payload and Slack line come from the support notice functions. With SUPPORT_FORWARD_CONTENT=pointer they carry the ticket number and the staff card link, never the subject, message or asker's email. - The staff list counts neither resolved nor internal tickets. - The demo seed opens its question through the service; openTicket takes an optional id so the seed finds it again.
Export lists the tickets a person raised or opened (number, subject, status, created_at) and the messages they wrote, keyed by ticket number, in documents.json as support_tickets and support_ticket_messages. Erase, in the existing transaction, deletes the tickets they requested (messages cascade) and every message they wrote, and clears opened_by and assignee_user_id where they hold them. The dry-run plan counts both.
Internal notes are staff working notes about customers, so a former staff member's export lists only their public messages. Erase still deletes every message they wrote, notes included.
supportTickets(p) reads tickets and public messages apart from documents(p); eraseTicketsWithThreads removes the tickets a person requested with every message on them. Comments the names now carry are dropped. Export output and erase behaviour are unchanged.
…d replaces Closed
…cked, db lists pinned to the model
…s visibleMessages
…ster-only resolve
…o find - A session that runs out keeps drafts for 30 minutes, then forgets them, staff internal notes included; a reload past that finds none. - The list opens on the tab holding an unread reply, and marks that tab. - Search, empty tabs and an unread reply on an older page load older pages; counts read n+ while more may come. - The staff list shows a ticket once while paging; an old open ticket no longer refetches the list on every poll. - Draft inputs wait until the signed-in person is known after a reload. - The images-not-kept line shows once, on the staff composer too. - The account card says a replayed reply landed, with no error toast.
22-e2e-support brings up a throwaway database with a customer and a staff login, the API and the built dashboard, then runs e2e/support-roundtrip.spec.ts. The spec checks the badge goes up by one and back, so a leftover unread ticket no longer fails it.
The id only makes a retried assistant call meet the ticket it opened; it is a UUIDv8 from SHA-256 now, not v5 from SHA-1, which code scanning flags. The ids are new in this release, so nothing stored depends on the old ones.
…g early - A sign-in through another tab or a redirect (Google) now ends the 30 minute grace too, so a signed-in person's drafts are never wiped. - An empty tab asks for older pages only while they could hold its tickets: open ones all come before the first resolved one.
…he staff list The staff inbox and ticket now carry the assignee's avatar, each staff message its author's, and the staff list each member's, so staff are shown by face and name as in other tools.
Staff: one-line queue with the numbers in one strip and the queues as one bar; a ticket opens in a drawer over the list with Conversation, Customer and Context tabs and triage in its header. Names and avatars instead of You, K next and J previous, an open composer that keeps its height, and a one-line To row with a tag when replying reopens a ticket. Customer: full pages for the list, New ticket and a ticket, with side cards for who can see it, what is sent and the person's open tickets. Missing fields say so on Send, back returns to the tab you came from, and resolved reads green everywhere. Both: message images open in a viewer in the app instead of a new tab.
- New ticket carries the page Support was opened from, for the whole visit. - Image Download opens a new tab where the browser ignores download, never this one. - The round-trip spec reads the new ticket from its page, so a reused account passes; it unticks open-next by keyboard. - The staff inbox URL is never read as a customer Support page. - The suggested category stays tagged in the dropdown; the list total respects the category filter; the conversation stays mounted behind the drawer's other tabs. - Field errors are announced, hints open on focus and touch, reply errors sit above the sticky reply box, Esc closes metrics, an internal row says Internal once.
… an internal ticket's head The server's dashboard path snapshot and the flow map both follow the router, so the New ticket page goes in each. An internal ticket names no place, so its head skips that segment.
…e app's The catalogs follow the line moved in TicketPanes.tsx. The Support pages' own crumb gets its own landmark name, so a screen reader hears one Breadcrumb.
…gned replies Test replies on staging stay out of the real support inbox; production keeps support@dembrane.com through echo-gitops.
Contributor
|
Now on staging, deployed 2026-12-02 08:48 UTC. |
This branch was successfully deployed
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.
No description provided.