Skip to content

Mention teammates and react to post notes, on the web, the API and MCP - #490

Merged
paulocastellano merged 42 commits into
mainfrom
post-note-mentions-reactions
Nov 13, 2026
Merged

paulocastellano merged 42 commits into
mainfrom
post-note-mentions-reactions

Conversation

@paulocastellano

@paulocastellano paulocastellano commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Notes on posts were plain text: no way to call a teammate in, and every new note emailed the whole workspace. This brings mentions, @all and reactions to notes, on the web, the API and MCP, all through the same actions. It also loads the thread through Inertia's infinite scroll and makes every browser-test wait an assertion, which found two real bugs (see the end).

Mentions

  • Typing @ in a note lists @all (in the reader's language: @todos, @alle, …) and the teammates who see the post; Enter, Tab or a click picks one and inserts a chip.
  • A mention is stored by id only: @[user:{uuid}], and @[everyone] for everyone. Names never live in the body, so a renamed member shows their current name everywhere. post_note_mentions (note, user) records who a note mentions; the API, MCP and web resources return mentions: [{id, name}].
  • The server is the one place that reads the markup (App\Support\PostNoteMentions, one pattern). The web resource sends each note split into parts (text, mention with the person's id and current name, everyone), and the app shows and edits a note from them, so there is no parser or regex on the front. The API and MCP keep body + mentions.
  • Who can be mentioned is ListPostNoteAudience: every member of the workspace, and on a pending request only the approvers and the member who asked. A mention of anyone else is removed when the note is saved (withoutMentionsOutside), so a note never names someone it cannot reach.
  • Create and update store the body and its mentions in one transaction.

Note editor (TipTap)

The composer field is a TipTap editor (new dependencies, approved). Plain-text editors are built from components/tiptap/:

  • editor.ts: the plain-text nodes every editor shares (document, paragraph, text, line break, placeholder).
  • plugins/noteBody.ts: TipTap's own Mention, configured so a chip reads back as its markup through renderText. The body to store is just editor.getText(); setNoteParts(parts) opens a note from its parts (each line break becomes TipTap's hardBreak node). A copied chip reads @Name. The plugin is the one front-end file that knows the note format.
  • plugins/noteKeys.ts: Enter sends and Esc cancels, leaving both keys to the @ list while it is open.

The mention search filters the people loaded once per post, in memory; it never queries the server per keystroke.

Mention card

Hovering or focusing a mention opens a card with the person's photo, name and local time (in the viewer's clock format). A mention of yourself opens your own card; someone no longer in the workspace reads as "unknown".

Who gets an email

NotifyPostNoteRecipients replaces NotifyPostNoteAdded:

  • Mentioned members (everyone on the post for @all) get the new PostNoteMentioned email (Maizzle, 16 locales), with mentions shown as @Name.
  • A new note emails the post's participants: its author, the member who asked for approval and everyone who wrote a note on it. It no longer emails the whole workspace.
  • An edit emails only the people it mentions for the first time.
  • Both emails share PostNoteEmail and read their words from mail.php, and stay behind the existing "New note on a post" preference. A mention outside the audience, or of yourself, emails nobody.
  • A note deleted before its email goes out drops the queued job instead of failing it (#[DeleteWhenMissingModels] on SendNotification and PostNoteEmail).

Reactions

  • post_note_reactions (note, user, emoji), unique on the three. App\Rules\SingleEmoji takes exactly one emoji: a pictograph, a flag or a keycap, at most 16 code points.
  • On MySQL the emoji column uses utf8mb4_bin: utf8mb4_unicode_ci compares different emoji as equal, so 👍 and 🎉 would collide on the unique index.
  • Adding is idempotent, removing only takes back your own reaction, and both broadcast post.note.changed only when something changed (dispatchIf). Reactions send no email.

Loading notes (infinite scroll)

  • The publish page sends the open thread as the postNotes scroll prop (BuildPostNotesProps, Inertia::scroll over ListPostNotes::thread()), paged by cursor (notes_cursor, with meta.total): notes are added and deleted while a thread is open, and an offset page would then skip or repeat a note. This is an owner exception recorded in AGENTS.md; the API and MCP keep page pagination. The panel reads it with <InfiniteScroll reverse>: scrolling up loads older notes, the first load lands on the newest.
  • Opening a post's notes reloads only these props (?notes= in the URL, replaced, no history entry), so one thread is open at a time.
  • A change touches only its note, so older pages, the scroll and an edit in progress stay: sending, editing, reacting and deleting update the thread from the response, and post.note.changed names the note (note_id) so other members' threads fetch just that note (GET posts/{post}/notes/{note}, new on the web and the API) or drop it. A refused send or edit says why and keeps the text.
  • A link to an older note (from an email) loads pages until it shows, then highlights it.
  • Every request of the panel goes through Inertia's useHttp instead of fetch. The web GET posts/{post}/notes JSON endpoint is gone; the API and MCP keep theirs.

Web, API and MCP

Web (app.) / API (api.) MCP
People who see the post GET posts/{post}/notes/mentionables list-post-note-mentionables-tool
React PUT posts/{post}/notes/{note}/reactions {emoji} add-post-note-reaction-tool
Take back DELETE posts/{post}/notes/{note}/reactions {emoji} remove-post-note-reaction-tool (destructive)

The note tools describe the mention syntax, what an id missing from mentions means, and who is emailed.

Browser-test waits now fail

Every waitFor* helper goes through waitForCondition (tests/Pest.php), which polled for 30 seconds and then returned silently: a test whose wait never came true went on as if it had. It now asserts the condition was met. That made 17 tests outside notes fail on every run. Each one was investigated:

Real bugs (fixed)

  1. Ideas board: a card snapped back. Dropping a card while another move was in flight put it back in its old column until the first request finished (the queued move did not update the board). pages/create/Ideas.vue now applies queued moves at once and sends every one, in order, each with its column as the board shows it then (a card dropped twice keeps its last drop). CreateIdeasBoardTest covers one, three and a repeated card, each failing before its fix.
  2. Note editor: aria-expanded never turned true. TipTap only recomputes the editable's attributes when the document changes, so opening the mention list left aria-expanded="false" and no aria-activedescendant for screen readers. The editor now refreshes them when the list opens or the highlight moves.

Tests that waited for something that never happens (app was right)

Test What was wrong
ComposerXPollTest (2) Waited for the file <input> to be visible; it is always hidden. Now waits for it to exist.
LinkedInCommentTest Looked for <br> in a <textarea>; the line break is in its value.
LabelRowMenuTest Waited for a label that lands on the second page (31 labels, pages of 25). Now waits for any row.
ComposerAutosaveTest Compared a thread reply with a string; replies are {text, media}.
ComposerUnsavedChangesTest Waited to leave /schedule after clicking the logo, which links to /schedule. Now waits for the URL to change. The guard itself is untouched.
CalendarDragAndDropTest (2) Waited for a success toast right after the newer of two moves answered; the calendar defers it on purpose until the older move is confirmed. Now counts answered requests, and checks both toasts show at the end.
WebhookShowTest Waited for two toasts; flash toasts share one id, so the second replaces the first. Now counts the pings on the server.
ChannelMetricsCardTest Looked for types[] in the URL, which holds types[0].
ConnectChannelDialogTest Waited for a collapsed section to leave the DOM; reka-ui keeps it, hidden.
ComposerSharedDataTest Since #397 an image already stored on the post is not rechecked, so deleting its row raises no error. The test now has another member remove the image first, which still gets the error on the right item.
InsightsChannelFilterTest Waited for the desktop range buttons at 390px, where a menu replaces them.
PostComposerDialogTest Waited for the composer to be open right after it closed. A second test there clicked the label picker while the new-label dialog was closing (flaky); it now waits for the dialog to close.
PublishQueueTest Waited for an empty slot that the queued post itself holds. Now uses the next free one.
ChangelogTest Compared the stored reaction (an enum once read through Eloquent) with a string.

waitForDatabase asserts its condition too.

To confirm

ComposerChannelSettingsTest meant to cover "a pending reel stays pending for a member who needs approval", but acted as the workspace owner, who always publishes directly. With a real member it shows that, after saving, a member who is not an admin sees the step to reconnect the Instagram account through Facebook. Reconnecting is usually an admin action; tell me if it should not be offered there (useSaveAndLinkFacebook).

Review fixes

Three review passes found, and this PR fixes, with a test that fails without each: a reaction's own broadcast resetting the thread (now single-note updates), a second post's thread showing the first one's notes, a linked note's page load that could loop or hang, Enter not sending while the mention list finds nobody, aria-controls pointing at a missing list and the edit field without a name, a refused send or edit losing the text silently, a note repeated by an older page staying after deletion, an update broadcast bringing a deleted note back, notes in the same second swapping pages (id tiebreaker), and failed deletes or reactions showing "couldn't save".

Tests

  • PostNoteControllerTest: the thread pages by cursor (a deleted recent note does not make the older page skip one), every change broadcasts its note id, a note deleted before its email goes out drops the job, malformed thread ids, edits dropping mentions of someone who left, delete cascades, participants, mentions replacing the note email, edits emailing only new mentions, @all, the pending audience, the postNotes page prop (newest first, notes_page, hidden for someone who cannot see the post).
  • PostNotesParityTest: the note show route on the web and the API, reactions and emoji rules, the mention list, mentions stored lower-case and outsiders dropped through the API and MCP, hidden pending requests and cross-tenant 404s, on every surface.
  • PostNoteMentionsTest: a note splits into parts with nothing lost, and mention parts carry names (or null once the person is gone).
  • MailRenderingTest: the mention email in English and Portuguese, @all in each language, a gone member as "unknown".
  • PostNotesTest (browser, 25): a note with blank lines, people and everyone saved unchanged through the editor, mention from the list and the keyboard, @all, the card, reactions, edits, a refused edit, Enter with no match, one thread at a time and closing it, scrolling up loads older notes and reacting or sending keeps them, a repeated note removed on delete, failed delete and reaction toasts, a link to a note two pages back, a gone member as "unknown".
  • The full browser suite passes with the strict waits.

Test plan

Automated:

  • Feature and Unit suites (PostgreSQL)
  • Note controller, parity and mention tests on MySQL
  • Full browser suite with strict waits

Manual test plan

Setup

  • Run php artisan migrate (creates post_note_reactions and post_note_mentions) and php artisan changelog:sync
  • Have four users in one workspace: the owner (admin), a member who publishes directly, and two members who need approval (call them Ana and Bia); give one of them a photo and leave one without
  • Keep Herd Mail and Horizon open to watch emails and queued jobs
  • Use two browsers (or a normal and a private window) logged in as different users for the realtime checks
  • Use a post with more than 50 notes for the scrolling checks (the seeded post works)

Opening a thread

  • Click Notes on a post card: the thread opens with the newest note at the bottom and the composer below
  • The URL gains ?notes=<post id> and the browser Back button does not step through opening and closing threads
  • Opening another post's notes closes the first thread and opens the second one
  • Clicking Notes again closes the thread and removes ?notes from the URL
  • A post without notes shows "No notes yet. Only your team sees them."
  • The count on the Notes button matches the thread and changes when a note is sent or deleted
  • The Notes button shows a filled icon once the post has notes, and its tooltip says Show notes / Hide notes
  • Past 99 notes the count reads "99+"
  • Reloading the page with ?notes=<post id> reopens that thread
  • Notes open from the Queue, Drafts, Approvals and Sent tabs and from a channel's publish page

Writing a note

  • The send button is disabled with no text or only spaces, and shows a spinner while sending
  • Enter sends; Shift+Enter adds a line break; the sent note keeps its line breaks
  • Text typed while a note is sending is not wiped when it lands
  • After sending, the cursor is back in the composer, ready for the next note
  • Esc in the composer with no list open changes nothing
  • On a phone, the keyboard's return key sends the note
  • A note over 2000 characters shows "Notes can have up to 2000 characters." and the text stays in the composer
  • With the network offline (DevTools), sending shows "Couldn't save your note. Try again." and the text stays

Mentions

  • Typing @ opens the list: @all first (in your language: @todos in Portuguese, @alle in German…), then the teammates who see the post, never yourself
  • The @all row has the people icon and "Everyone on this post"; each teammate row has their photo or initials
  • The list opens next to the field and stays on screen near the bottom of the page
  • With more than 8 teammates the list shows 8 and narrows as you type
  • Typing after @ filters by name, ignoring case and accents (@ana finds "Ána")
  • Up/Down move the highlight, Enter or Tab pick it, a click picks it
  • Opening the list under a still mouse does not move the highlight; moving the mouse does
  • A search with no match shows "No teammate matches", and Enter then sends the text as typed
  • Esc closes the list and keeps the text
  • A picked mention shows as a chip @Name; Backspace removes the whole chip
  • The @all row and chip never cut the word, in Portuguese and German too
  • The sent note shows each mention as @Name in the current name: rename a mentioned member and the note shows the new name
  • A mention of a user who was deleted shows as "@unknown"
  • Copying text with a chip (Cmd/Ctrl+C) and pasting it elsewhere gives @Name, not the stored markup
  • Pasting text into the composer keeps it as plain text (pasted @[user:…] markup is not turned into a chip; agreed, nobody pastes it)
  • A teammate removed from the workspace no longer appears in the @ list once the thread reopens
  • Mentioning yourself is not offered, and a self-mention sent through the API emails nobody

Mention card

  • Hovering a mention (or focusing it with Tab) opens a card above it with photo (or initials), name and the person's local time in your clock format (12h/24h)
  • For a teammate in another time zone (set theirs to Tokyo) the card shows their time, not yours
  • A mention of yourself opens your own card
  • A mention of someone who left the workspace shows their name (or "@unknown" once deleted) and opens no broken card
  • On a phone, tapping a mention opens the card
  • The card reads well in dark mode

Editing and deleting

  • Edit opens the editor with the same text, line breaks and chips; saving without changes keeps the note exactly as it was
  • Adding a mention in an edit saves it, and the note shows "(edited)"
  • Editing a note that has @all and a deleted user's mention shows @all and @unknown chips; saving a change keeps @all and drops the mention of the deleted user
  • Esc or Cancel closes the editor without saving
  • Save shows a spinner and the editor closes only once the server saved it
  • An edit over 2000 characters shows the error and keeps the editor open with the text
  • Only the author sees Edit and Delete on a note
  • Delete removes the note and lowers the count
  • With the network offline, a failed delete says "Couldn't delete the note. Try again." and a failed reaction "Couldn't update the reaction. Try again."

Reactions

  • The reaction button opens the emoji picker; picking one shows it under the note with a count of 1, highlighted as yours
  • Searching in the picker ("heart", "fire") finds the emoji
  • Hovering a reaction lists who reacted
  • Another member reacting with the same emoji raises the count; a different emoji adds a new group
  • Clicking your own reaction takes it back
  • Flags, keycaps (1️⃣) and skin tones work as reactions

Older notes (infinite scroll)

  • On a post with many notes, scrolling to the top of the thread loads older notes without a button, with a spinner at the top, and keeps your place
  • Scrolling keeps loading until the first note; the URL never gains a page or cursor parameter
  • With older notes loaded, sending, editing, reacting and deleting keep them loaded and do not jump the scroll
  • With older notes loaded, deleting a note does not leave a gap or a repeated note when you keep scrolling

Realtime (two browsers on the same post)

  • A note sent in one browser appears in the other at the bottom (and scrolls to it if you were at the bottom)
  • An edit, a reaction and a reaction taken back show in the other browser on that note only, without reloading the thread
  • A deleted note disappears in the other browser and the count goes down
  • Your own action never shows twice in your browser
  • An edit you are typing on an older note is not lost when the other browser sends a note or reacts

Links to a note

  • The View note button in a note email opens the publish page with that post's thread open and the note highlighted for a few seconds
  • It works for a note far up the thread (older pages load until it shows)
  • The highlight fades after a few seconds
  • A link with a note id that does not exist opens the thread without errors

Emails (Herd Mail)

  • A note that mentions Bia sends Bia the "mentioned you" email, showing the note with @Name for each mention
  • A note with @all sends the mention email to everyone who sees the post except its author, and @all reads in each recipient's language
  • A new note sends the "new note" email to the post's participants (its author, the approval requester, earlier note authors), never to the rest of the workspace and never to the note's author
  • Nobody gets both a mention email and a note email for the same note
  • The subjects read " mentioned you in a note" and " added a note to a post"
  • An edit emails only the people it mentions for the first time
  • An edit that adds @all emails only the people the note had not mentioned yet
  • A note mentioning a deleted user shows "@unknown" in the email
  • Reactions and deletes send no email
  • Turning off "New note on a post" in notification settings stops both emails; its description reads "Receive an email when a teammate mentions you in a note, or adds one to a post you created or commented on"
  • Emails render in the recipient's language (check Portuguese)
  • Sending a note and deleting it right away leaves no failed job in Horizon

Posts pending approval

  • Ana sends a post for approval: Ana sees it and can read and write its notes to explain it
  • The owner and the member who publishes directly see it and its notes
  • Bia (who also needs approval) does not see Ana's request, and a link with ?notes= to it opens no thread
  • On Ana's pending post, the @ list offers only the approvers and Ana; a mention of Bia sent through the API is removed
  • A note on Ana's pending post emails Ana and the people it mentions, never Bia
  • After the post is approved, everyone sees it and its notes

Layout

  • On a phone (390px wide) the thread, the composer, the mention list and the card fit the screen without side scroll
  • Light and dark mode look right
  • In Arabic the thread reads right to left

API (personal access token of an admin)

  • GET /api/posts/{post}/notes lists notes newest first with mentions, reactions and page metadata
  • ?page=2 returns the next page and meta.total stays right
  • POST /api/posts/{post}/notes with @[user:<id>] and @[everyone] stores the mentions and emails the people mentioned; a mention of someone outside the workspace is removed
  • GET /api/posts/{post}/notes/{note} returns one note
  • PUT / DELETE /api/posts/{post}/notes/{note} edit and delete your own note
  • GET /api/posts/{post}/notes/mentionables lists who can be mentioned
  • PUT / DELETE /api/posts/{post}/notes/{note}/reactions with {"emoji": "👍"} add and take back a reaction; {"emoji": "ab"} returns 422
  • Adding the same reaction twice keeps one; a note of another workspace's post returns 404

MCP (Claude or ChatGPT connected)

  • Ask it to list a post's notes, write a note mentioning a teammate and @all, edit it, react to it, take the reaction back and delete it; each works and the app shows it live
  • Ask who can be mentioned on a post: it uses the mentionables tool
  • Taking back a reaction asks for confirmation in the client (the tool is marked destructive); adding one does not

Ideas board

  • Drag a card to another column and, while it saves, drag a second and a third card: all three land where dropped and stay there after a reload
  • While a move saves, drag the same card twice: it ends in the last column you dropped it in after a reload
  • With the network offline, a move shows the error toast and the board goes back to how it was

What's New

  • The sidebar card announces "Better notes for collaborating on posts" with its cover, and the entry opens in the What's New modal
  • After opening it, the sidebar card goes away

Other languages

  • In Portuguese, Spanish and German, the thread, the mention list (including "No teammate matches"), the card, the errors and the emails are translated and nothing wraps or cuts

Paulo Castellano added 30 commits November 12, 2026 11:21
Notes take @mentions (stored as @[Name](user:id), parsed by
PostNoteMentions and its TypeScript mirror) and emoji reactions
(post_note_reactions). A mention emails the person; a new note emails
the post's participants instead of the whole workspace. Mentionables,
reactions and the new emails go through shared actions, with matching
API endpoints and MCP tools.
- SingleEmoji takes a flag pair or a keycap only in their real shape and
  caps the code points, so a pictograph with stacked combining marks gets
  a 422 instead of overflowing the column.
- The mention list is ordered in PHP, the same on both engines, and the
  mention input is an accessible combobox.
- Laravel and front-end helpers where they fit; the mention corpus is a
  fixture.
- Tests for valid emoji, hidden pending requests, notes of another post,
  removing a reaction you lack, edits through the API and MCP, the
  approval requester as a participant, and the keyboard and edit flows
  in the browser.
- Every emoji the picker offers is a valid reaction (SingleEmojiTest
  reads data/emojis.ts through a Node harness).
- The note email shows mentions as names; the mention list on a draft
  is every member but you, sorted ignoring case and accents; reactions
  go with their note and their member.
- The browser test picks with Tab and cancels an edit with Esc.
- The note mails read the plain body once, the reaction request reads
  its route's method, and the audience docblock is rewrapped.
- The mention list carries each member's time zone and whether they are
  an admin (isAdminThrough, the owner always counts), on the web, the API
  and MCP.
- It lists the viewer too, so a mention of yourself opens your own card;
  only the @ picker leaves you out.
- PostNoteMention draws the chip and a hover card (also on focus), and
  loads the people the first time a card opens; someone no longer on the
  post shows by name only.
- Browser test covers an admin with a photo, a member, a former member and
  your own mention.
Rounded-xl with a shadow and no border in light mode, like the menus and
the sidebar channel card; a 40px rounded avatar, the name with the Admin
badge on one line and the local time below, like the user menu header.
The card shows the photo, the name and the local time, with no gap
between the two lines. is_admin leaves the mention list on the web, the
API and MCP, with isAdminThrough and its lang key.
… note author

- @ALL (in each reader's language: @todos, @tous, ...) is stored as
  @[word](everyone) and mentions everyone who sees the post; the @ picker
  offers it first and the chip and emails show the reader's word.
- The note actions take the author instead of reading it off the note,
  so NotifyPostNoteRecipients needs no type check.
- A saved mention carries the person's current name; a mention of
  someone outside the post becomes plain text.
- Editing a note keeps a mention after punctuation and gives each of two
  same-named people their own mention (round-trip parity test).
- A late mention list for another post is dropped, MariaDB gets the
  binary emoji collation, the card wait uses waitForState, and the stray
  mark.png leaves the repo.
The everyone option uses the primary-strong pair (the sidebar's New
button) at the row's height, readable in light and dark. mark.png is
untracked again; it was re-added by a broad git add.
…e cases

- The @ list re-reads the query on keyup and focus, so moving the caret
  closes or reopens it instead of inserting at the wrong place; Esc closes
  the search even while the people load.
- A picked @ana no longer blocks searching @ana Lima, and people removed
  from the text leave the picked list.
- A mention ends at a space or punctuation, not before a CJK character, so
  @all-hands stays text and @山田さん mentions 山田 (round-trip tests).
- Names Str::ascii empties sort by their own text, then id, the same on
  both engines.
- The audience is listed once per note; reaction actions take the post;
  reused note types live in types/post-note.ts; the keyboard browser test
  waits for the highlighted option before pressing Enter.
PostNoteMentions reads people and @ALL with the same single pattern as
noteMentions.ts, and the front end checks ids with isUuid(), Laravel's
Str::isUuid() mirrored in lib/helpers.ts and covered by HelpersParityTest.
The note input was a textarea that guessed, by matching names, which
@name in the text were mentions. It is now a TipTap editor with the
Mention extension: a picked person is a node that keeps their id, and the
body is written from the document (docToNoteBody) and read back into it
(noteBodyToDoc), so the name-matching rules are gone.

- The @ list keeps its look (everyone first, Enter, Tab, arrows, Esc) and
  follows the mouse only once it moves, so a list opening under a still
  cursor never takes the highlight from the keyboard.
- markupName() cleans a name the same way on both sides (brackets to
  spaces, squished, '?' when nothing is left), so a name like '[]' no
  longer writes markup nobody can read; a names parity test covers it.
- The round-trip parity test now goes through the editor document.
- Browser tests read the editor's text through waitForEditorText and wait
  for what they check instead of asserting right after another wait.
A note body now writes @[user:{id}] and @[everyone], with no name inside,
so the server no longer cleans or rewrites names. The members a note
mentions are kept in post_note_mentions (synced on save) and every note
comes with mentions [{id, name}]: the chip, the hover card, the emails
and API/MCP clients read the current name from there, and a person no
longer there reads as unknown (notes.mention_unknown, 16 locales).

- A mention of someone who cannot see the post is removed on save.
- PostNote::DISPLAY_RELATIONS is what every note is loaded with.
- The parity corpora, MCP descriptions and tests use the new format.
…strict uuid pattern per side

- PostNotesPanel: every request goes through Inertia's useHttp (XSRF and
  headers handled by Inertia), saving a note copies the whole response so
  new mentions show their names
- PostNoteEditor: options carry their id and label, so picking, keys and
  the list no longer switch on the kind
- The mention pattern only matches a uuid, which drops the isUuid checks
  and the front-end isUuid helper
- Reactions dispatch the change event with dispatchIf
- Browser tests wait for the editor before typing
… and mention coverage

- Create and update store the note and its mentions in one transaction
- PostNoteAdded and PostNoteMentioned share PostNoteEmail and only name
  their template
- Mentionable resources describe the @[user:id] markup
- The note MCP tools say that outside mentions are dropped, that edits
  show live and what an id missing from mentions means
- PostNoteMention reads the id already lower-cased by the parser
- Tests: api and mcp store mentions in lower case, drop outsiders and
  return names; a mention of a gone user reads as unknown
The note emails name everyone and a gone member with their own
mail.post_note_added / mail.post_note_mentioned keys, in all 16
locales, instead of the notes feature file.
…ked note recursively

loadNotes(page) branched on page 1; loadLatestNotes replaces the thread
and scrolls down, loadOlderNotes prepends the next page and says whether
it loaded one, and findNote loads older pages until the linked note shows
up. A browser test covers loading older notes and opening an older note
from its link.
The publish page sends the open thread as the postNotes scroll prop
(BuildPostNotesProps, page name notes_page), and the panel reads it
with <InfiniteScroll reverse>: scrolling up loads older notes and a
linked note loads pages until it shows. Opening notes reloads only the
thread's props, so one thread is open at a time. The web notes JSON
index is gone; the API and MCP keep theirs.
- components/tiptap/editor.ts holds the plain-text nodes every editor
  shares; plugins/noteBody.ts stores a mention chip as its markup through
  Mention's renderText, so the body is editor.getText() and docToNoteBody
  is gone; plugins/noteKeys.ts sends on Enter and cancels on Esc
- The parity harness reads the body back with TipTap's generateText
- The editor refreshes aria-expanded and aria-activedescendant when the
  mention list opens or the highlight moves
- The notes panel finds a linked note through function refs
- The caret test uses arrows, which move the caret on every platform
waitForCondition (behind every waitFor* helper) returned silently when
its 30 seconds ran out, so a test passed whatever the page did. It now
asserts the condition was met.

What that uncovered:
- Ideas board: a card dropped while another move is in flight snapped
  back to its old column until the first move finished; the queued move
  now updates the board at once
- Tests that waited for something that never happens: a hidden file
  input, a <br> in a textarea, a label on the second page, a thread reply
  read as a string, a path the sidebar logo never leaves, a success toast
  the calendar defers on purpose, two flash toasts sharing one id,
  types[] instead of types[0], a collapsible reka-ui keeps in the DOM, a
  stored image the server no longer rechecks, the desktop range buttons
  at 390px, the composer reopened after it closed, a queue slot its own
  post holds
- The pending reel test for a member who needs approval now uses such a
  member instead of the workspace owner
- The label picker test waits for the new-label dialog to close
- A note change broadcasts the note it touched; an open thread updates
  that note alone (new GET posts/{post}/notes/{note} on the web and the
  API) instead of reloading the newest page, so older pages, the scroll
  and an edit in progress stay
- Sending, editing, reacting and deleting update the thread from the
  answer; a refused send or edit says why and keeps the text (an edit
  stays open until saved)
- Loading older pages for a linked note settles when the visit finishes
  and stops when it fails
- Enter sends while the mention list finds nobody; aria-controls only
  points at a rendered list; the edit field has a name
- Pasted mention markup becomes a chip, a copied chip reads @name, and
  chips named before the people loaded get their names once they do
- The notes emails and their job are dropped when the note is gone
  (DeleteWhenMissingModels) instead of failing
- Ideas board: every drop made while a move is saving is sent, in order,
  with its column as the board shows it
- waitForDatabase fails the test when its condition never holds
- Tests for each of the above, the note show route, malformed thread
  ids, cascades and edits of mentions outside the audience
- PostNoteMentions::parts splits a note into text, people (with their
  names) and everyone; the web resource sends it as parts, and the app
  shows and edits a note from them. The TypeScript parser, its regex and
  the paste rule are gone: the server is the one place that reads the
  markup, and the editor writes it back through TipTap's renderText
- A note repeated by an older page is replaced or removed everywhere it
  shows, and an update broadcast never adds a note back (only a created
  one is added)
- Notes page newest first with the id as tiebreaker
- Ideas board: a card dropped twice while a move is saving keeps its
  last drop
- A failed delete or reaction says what failed, in all 16 locales
- The changelog test compares the stored reaction as the enum it reads
- Tests for each, including a note survives an edit unchanged when
  opened from its parts
…e browser

- The publish page's notes thread pages by cursor (ListPostNotes::thread,
  notes_cursor) with meta.total, so a note added or deleted while the
  thread is open no longer makes an older page skip or repeat one. AGENTS.md
  records it as an owner exception; the API and MCP keep page pagination
- The Node harness that read notes back through TipTap needed npm packages
  the backend CI job does not install; a browser test now opens a note with
  blank lines, people and everyone in the real editor and saves it unchanged
Paulo Castellano and others added 12 commits November 12, 2026 22:21
…ugin

- parts() splits the body around its mentions with preg_split instead of
  walking offsets, and toPlainText() is the parts read as text
- The note document (parts to TipTap JSON, line breaks as hardBreak nodes)
  moves into plugins/noteBody.ts, which already writes the body back;
  lib/noteMentions.ts is gone
InfiniteScroll reverse keeps the reader's place after loading an older
page, which scrolled a linked note back out of view right after the panel
scrolled to it (found in manual testing). The panel now waits for the
page to paint before scrolling, and the browser test checks the note is
inside the thread, not only highlighted.
The InputGroup is h-9 unless its control is a textarea; the TipTap editor
is a div, so a long note spilled above the box over the thread (found in
manual testing). The composer box now grows with the editor, and the
browser test checks the box, not only the editor.
TipTap's Mention turns a chip back into its @ on Backspace by default,
leaving a stray @ (found in manual testing). deleteTriggerWithBackspace
removes the chip and its @ together, as the test plan expects.
The edit scrolled into view before TipTap mounted its content, so the
editor grew afterwards and pushed Cancel and Save below the thread on the
last note. Wait for the paint first, through afterPaint now shared in
lib/utils.
Once a note lands, the composer drops the text that was sent and keeps
what was typed after it, instead of keeping both; a field changed inside
the sent text stays as it is. The grow-and-edit browser test now waits
for the composer text before sending, so a slow CI runner cannot send a
partial note.
A link to a deleted note, or to a note of another post, made the thread
load every older page looking for it.
An @unknown mention opened the card with whatever the page still knew
about that id, such as the name of a member deleted after the page
loaded. It is now a plain chip with no card and no focus stop.
Moving a card or a stage handled validation and HTTP errors but not a
network error, so offline the board kept the move with no error toast
while the server never stored it.
Playwright's fill writes the DOM and TipTap reads it a moment later; on a
slow CI runner a Shift+Enter or Enter pressed right away redrew the field
without the filled text.
@paulocastellano
paulocastellano merged commit 0ce4bc7 into main Nov 13, 2026
10 checks passed
@paulocastellano
paulocastellano deleted the post-note-mentions-reactions branch November 13, 2026 02:54
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.

1 participant