github emdash-cms/emdash @emdash-cms/admin@1.7.0

Minor Changes

  • #4686 91dfa31 Thanks @ascorbic! - Adds editorial comments: threads that staff leave on an entry while reviewing it, separate from the public comments visitors post.

    A thread points at the whole entry, a field, a Portable Text block, or a range of text in a block, and holds a conversation that can be resolved and reopened. Threads are private to staff and never appear on the site.

    In the entry editor, select text in any Portable Text field and choose Comment in the formatting toolbar, or press ⌘⌥M (Ctrl+Alt+M), to start a thread beside it. To comment on an image, embed, divider or other non-text block, choose Comment in its block menu (or, without edit access, select the block and choose Comment in the toolbar above it), and to comment on a whole field, use the comment button at the end of the field's label row. The comment button in the editor bar, just before the settings panel toggle, shows or hides the margin and shows how many threads are open. Commenting needs no edit access: Contributors who can't edit an entry, and anyone viewing an entry while someone else holds its edit lock, can still select text and comment. Commented text stays highlighted as you edit, and a thread whose text was deleted is listed as detached with the text it referred to. Links of the form ?thread=<id> open the editor with that thread selected and its text in view, and Go to text on an open thread selects the text it refers to.

    The API lives under each entry, at /_emdash/api/content/{collection}/{id}/threads, with routes to list and start threads, reply, edit and delete comments, resolve and reopen threads, and store anchors after the entry's content changes. Each thread and comment in a response carries can flags that say what the caller may do with it.

    Mentions and email

    Type @ in a comment to mention someone who can take part in threads. A comment body stores each mention as <@USER_ID>, and every thread in a response lists the users it mentions under mentions, with their current names, so a renamed user shows the new name. GET …/threads/mentionable?q= returns up to 10 people to mention, matched by display name, without email addresses. A new comment, or an edit that adds a mention, fails with VALIDATION_ERROR when it mentions a user who doesn't exist or can't take part. Mentions already in a comment don't stop it being edited.

    When the site has an email provider, a new comment emails the people it mentions, the thread's creator and the authors of its earlier comments that weren't deleted, except its own author, anyone who can no longer take part, and users whose email address isn't verified. Editing a comment to mention someone new emails only that person. The email has the entry's title, an excerpt of the comment and a link to the thread. Without an email provider, nothing is sent, and the comment is still saved. See Comment on an entry for mentions and comment emails.

    MCP tools

    AI agents can review entries through five MCP tools: editorial_thread_list, editorial_mentionable_list, editorial_thread_create, editorial_comment_create and editorial_thread_resolve. A token needs the content:read scope for editorial_thread_list and editorial_mentionable_list, and the content:write scope for the other three. editorial_mentionable_list finds the user IDs that comment bodies mention as <@USER_ID>. The user behind the token needs the editorial:comment and content:read_drafts permissions for every tool.

    editorial_thread_create starts a thread on the whole entry, or on one field when you pass field. To comment on specific text, pass field and the exact quote, with optional prefix and suffix to tell repeated text apart. The tool finds the quote in the entry's current draft. Passing prefix or suffix without quote fails with VALIDATION_ERROR.

    Visual editing

    Editors can review threads on the site itself. In edit mode, each element bound with {...entry.edit} or {...entry.edit.field} shows a badge with the number of its open threads; threads on text and blocks in a field count toward that field's badge, and threads on a field the page doesn't show count toward the entry's badge. Hover over or tab to a bound element to show its comment button, which opens a popover where you can reply, resolve a thread you're allowed to resolve, follow Open in admin, and start a new thread on the entry or field.

    A Portable Text field rendered with <PortableText> in edit mode gets a badge of its own even when no element around it is bound with {...entry.edit.field}. Its text and block threads are highlighted in the page editor, and clicking a highlight opens a popover next to it with just the threads on that text while the cursor stays in the text, and the field's badge still lists all of them; press ⌘⌥M (Ctrl+Alt+M) in a highlight to move to its reply box instead. To start a thread on text, select it and choose Comment in the formatting toolbar, or press ⌘⌥M (Ctrl+Alt+M). When you edit text that a thread points at, the thread moves with it on the next save. The page editor now keeps each block's _key when it saves, instead of giving every block a new one, so links to a block from comments and other content survive edits made on the page.

    The toolbar loads threads with one request per entry on the page, at most four at a time, and only for signed-in users in edit mode who can take part in threads. The popover's code loads the first time someone opens it, from the editor-only /_emdash/visual-editing/comments page, which the site's Astro build bundles with @astrojs/react, as it does the inline editor. Pages for logged-out visitors don't change.

    Permissions

    Two permissions are new in @emdash-cms/auth. Every editorial route also needs content:read_drafts.

    • editorial:comment (Contributor and above): read threads, start them, and reply.
    • editorial:manage (Editor and above): resolve, reopen and delete any thread, and delete anyone's comment.

    A thread's creator may also resolve and reopen it, and so may the entry's author when they hold content:edit_own. A creator may delete their own thread until someone else replies, and only a comment's author may edit it. Storing recomputed anchors needs edit access to the entry and its current _rev.

    New playground sessions open with example threads on the "Building for the Long Term" post, from a demo reviewer, so visitors can reply, resolve and add their own.

    Upgrading

    A migration adds two tables, _emdash_editorial_threads and _emdash_editorial_comments. Threads stay while an entry is in the trash, where their comments and threads can still be deleted but not added, edited, resolved or moved, and are deleted with the entry or its collection. Site transfer leaves them out.

Patch Changes

  • #5189 1168a73 Thanks @khoinguyenpham04! - Fixes a memory leak in the admin's rich text editor. Once Backspace removed an empty line after an image, divider or embed, the editor stayed in memory after you left the entry, along with its content, its undo history and, with collaborative editing, its shared document. A long admin session used more memory with each entry edited that way.

  • #4982 7954e27 Thanks @khoinguyenpham04! - Fixes admin copy in three places, and the direction of empty text boxes in right-to-left languages:

    • The field dialog labels the length limits of Short Text, Long Text and Slug fields "Minimum characters" and "Maximum characters", instead of "Min Length" and "Max Length" with no unit.
    • Empty Long Text fields say "Enter plain text..." instead of "Enter markdown content...", since Long Text stores plain text. Empty Short Text fields now say "Enter text...".
    • In right-to-left admin languages, empty Short Text and Long Text boxes line up with the page, so their placeholder sits on the right edge until you type. Slug fields stay left-to-right, like the built-in slug box, and have no placeholder.
    • The Content Types page says that dragging sets the default order of content types in the sidebar. The order applies to everyone. A personal order set in Settings → Sidebars still takes precedence.
  • #5006 6396118 Thanks @khoinguyenpham04! - Updates the admin Dashboard so it stays readable on sites with many collections, long titles, or a phone-sized screen:

    • The counts sit in one Overview card, with digit grouping for your language (for example 20,969).
    • Recent Activity is the main column. Its collection and time columns line up across rows, and the collection column is hidden when the site has only one collection.
    • Content moves to a side column on wide screens, so a short collection list no longer leaves an empty card.
    • Plugin dashboard widgets declared with size: "third" sit in the side column on wide screens. All other widgets, including those with no size, take the full width of the main column.
    • With more than three collections, the first two New buttons stay and the rest move into a More menu.
    • Collections with no entries say No entries.
    • Long lists of collections and of failed scheduled publishes collapse behind a Show more button.
    • On phones, failed scheduled publishes stack their reason and Dismiss button instead of pushing them off-screen.
    • In the Arabic admin, English titles are cut off at their end rather than their start.
  • #5035 64df16d Thanks @danielmlr! - Fixes admin labels that a language couldn't translate differently from another label with the same English word: the Select field type (shared with the Select button), the Admin sidebar heading (shared with the Admin user role), and Authors for user accounts on the site import review (shared with plugin Authors). Each can now be translated on its own, and shows in English until a language translates it.

  • #5087 368b3e8 Thanks @ascorbic! - Fixes plugin README rendering in the admin so HTML written after an unclosed inline <kbd>, <code>, <pre> or <script> tag shows as text instead of being rendered. Links in a README always open in a new tab with rel="noopener noreferrer", and links that aren't http or https render as plain text.

  • #4824 d717fd6 Thanks @khoinguyenpham04! - Updates co-editing and Revisions to color each person from their generated avatar, so someone without a profile picture looks the same in the editor bar, in rich text and in revision history.

    • The avatars in the editor bar show the person's profile picture or generated avatar instead of their initials on a flat color.
    • A person's caret, selection and the name flag over their caret take one color from their generated avatar, and their name on a field label uses the same flag. People with a profile picture get the color of their generated avatar too. Flags are a soft gradient of darker shades of that color, so white names stay readable in light and dark mode. In dark mode, carets in the darker colors are a little lighter, so they stay visible on table headers and code blocks.
    • Revisions marks a version's dot and changes in the color of the person who made it.
    • People whose generated avatars share a palette share a color, and their names tell them apart. Before, co-editing gave the people in an entry different colors from a set of four.
    • Rich text fields have 4 px more room above the first line, so a co-editor's name there stays clear of the toolbar.

    Generated avatars change once

    Generated avatars now come from 18 palettes instead of 12, in two lightnesses, so people in the same entry look alike less often. A user's palette is chosen from their user ID and the number of palettes, and none of the old colors remain, so every user without a profile picture gets a different generated avatar after this upgrade. It then stays the same. Profile pictures are unaffected.

  • #5133 c78e210 Thanks @justincavery! - Fixes decimal validation for number_input in Block Kit forms and sandboxed field widgets. Values such as 5.25 without a minimum and 5.00 with a minimum of 0.01 now save. Sandboxed field widgets also enforce their declared min and max bounds.

  • #4981 6eb4bd6 Thanks @khoinguyenpham04! - Fixes alignment and layout shifts in the blocks UI. An empty blocks field now lines up No blocks yet with the Add block label, and the first block takes the message's place without changing the Add block row. In a blocks field's settings, ticking a block type under Allowed block types no longer makes its card taller, and each card's version line now starts under the block type's name.

  • #5179 58c4c33 Thanks @khoinguyenpham04! - Fixes co-editing losing or doubling text in a rich text block that people edit at the same time. It happened when two people started typing into the same empty block at the same moment, whether they kept typing or a third person typed into it, and when one person's change added or removed a line break near text another person was typing.

  • 00367c1 Thanks @ascorbic! - Changes GET /_emdash/api/content/{collection}/authors so it includes each author's email only for callers who hold users:read (admins), and for API tokens only when they also carry the admin scope. Contributors, authors, editors and narrower tokens receive id, name and avatarUrl. The content list's author filter labels an author with no name "Unnamed user".

    If you call the exported handleContentAuthors directly, it now omits email unless you pass { includeEmail: true }.

  • #4956 1bdcfa8 Thanks @emdash-autofix! - Fixes the media picker layout on phones with a two-column thumbnail grid, more room for scrolling results, and evenly stacked source controls instead of an upload button wrapping on its own.

  • #4924 45b3873 Thanks @danielmlr! - Fixes the rich text editor's slash menu listing nothing for /section, /video or /iframe when the admin language translates the command's name, such as "Abschnitt" in German or "Vidéo" in French. These commands now match their English names in every admin language, as the guides describe.

  • #5105 c0dd209 Thanks @ascorbic! - Shows the whole value when you review a sandboxed plugin's proposed editor changes. "Before" and "After" previously showed only the text of a rich text field, cut at 160 characters, so an added HTML block, image or embed, a changed link, a formatting change, or an edit further down did not appear. The review now shows plain paragraphs as text and every other block in full, including headings, lists, bold or italic text and links, and shows other values in full instead of truncating them.

  • #5177 92e81a8 Thanks @zaochih! - Gives the editorial comment buttons, menu item, and composer their own translation context, so translators can label them differently from visitor comments.

  • #5212 060e7e7 Thanks @khoinguyenpham04! - Updates the editorial comments UI so the page editor and the admin match. Each comment shows the person's photo or generated avatar with their name and time on one line, long threads collapse their middle replies, and the reply box keeps its send button in place. Opened from highlighted text, the page editor's comments popover no longer repeats the field name or the quoted text, and it fits short screens and long names.

  • #5171 e138e21 Thanks @theshubh77! - Completes English (UK) (en-GB) admin UI translations for newly extracted strings, applying British spelling updates (analyse, authorise, capitalisation, centre, customise, and recognised) across editorial, visual editing, transfer, block editor, and settings views.

  • #5036 933e2ee Thanks @SantiagoSM2000! - Adds Latin American Spanish (es-419) translations for the admin Calendar view, including month and agenda navigation, entry states, detail panel, scheduling actions, and error notices.

  • #5108 4b6bcbe Thanks @SantiagoSM2000! - Adds Latin American Spanish (es-419) translations for the content editor, content settings panel, and content list, and fixes existing mistranslations (Retry, Saving..., OG Image, Preview, Schedule, Locale, Trash).

  • #5042 5030c20 Thanks @ascorbic! - Fixes field links from the site (?field=) sometimes losing focus and collapsing the linked block when the entry's co-editing room joined after the editor appeared. The editor now waits for the first room join to finish before it goes to the linked field. If the room is full or busy, the editor goes to the field right away in the read-only view instead of waiting for a retry to get in.

  • #4306 0917f1b Thanks @iNerdStack! - Fixes the WordPress plugin import review screen so it lists the source site's navigation menus, letting you see which menus will be imported before running the import. Reports skipped menus when a same-named menu already exists, so the import result shows how many were created vs. skipped instead of silently dropping them.

  • #5174 83c764e Thanks @danielmlr! - Completes the German admin translations so German-speaking editors see localized text in editorial comments, both in the content editor and in visual editing on the site: threads, replies, mentions, resolving, deleting, and their error and notice messages. The field-type picker now names the single-choice field "Einfachauswahl", and the media picker's Select button reads "Auswählen" instead of "Einfachauswahl". The remaining WordPress import and site transfer texts are translated too.

  • #5073 0503743 Thanks @NickDimitratos! - Adds the Greek (el) admin translation catalog and calendar localization. Greek will appear in the language picker once a maintainer enables it after review.

  • #5149 bb86431 Thanks @CacheMeOwside! - Translates Hindi admin strings for co-editing presence, sync status, and sidebar customization. Hindi now uses transliterated terms for "collection" and "visitors" across the admin.

  • #5118 3c64f9b Thanks @ascorbic! - Fixes isolated HTML blocks seeing the full address of the page they are on, including its query string and fragment, when the block's JavaScript removes the frame's <base> element. document.baseURI in an isolated block is now always the site's root address, in the admin preview as well as on the site.

    The block's document now sits in a second sandboxed frame inside the block's frame. Blocks render, resize and open links as before. A few details change:

    • Block JavaScript: parent is now the outer frame, so it is no longer the same as top, and document.referrer is empty. Send messages to the page with parent.postMessage(), not top.postMessage(): the outer frame passes them on, and the site only accepts messages from it. Messages from the page arrive with the outer frame as event.source and an origin of "null".
    • Sites with a content security policy: if the policy blocks the block's styles, the block's content stays 150 pixels tall even if your site's styles make the frame taller. If the policy sets base-uri 'none', isolated blocks don't load; allow 'self' in base-uri to show them.
    • Browser tests: a test that looks inside an isolated block needs one more frame step, such as page.frameLocator("iframe[data-emdash-html-block]").frameLocator("iframe").
    • buildHtmlBlockFrame() from @emdash-cms/admin/html-block accepts an optional title for the inner frame.
  • #5201 9b494e0 Thanks @Zahid09987! - Updates the Indonesian (id) admin catalog to translate the editorial "Comment" action label in the content editor and margin comments panel.

  • #5169 e33afbe Thanks @Zahid09987! - Updates Indonesian (id) admin translations for editorial comments, visual editing comment overlays, text selection actions, and WordPress import connection errors.

  • #5153 4874deb Thanks @ascorbic! - The visual editor now reads and saves rich text with the admin editor's schema and converter, so a Portable Text field saves the same way from either editor. When you edit on the page, spans and link definitions keep their _keys (as blocks already did). Tables, galleries, embeds, videos and plugin blocks still show as placeholders to edit in the admin, and they save the way the admin editor saves them. If a field contains a table the admin editor can't open, the visual editor says so instead of loading the field.

    Both editors now keep the _key, dimensions, display size, alignment, link and blur placeholder (blurhash and dominantColor) of an image block stored with only a url and no asset, such as imported content. Before, the admin editor dropped them on save.

  • #5165 af15970 Thanks @Yusaku01! - Updates Japanese admin UI translations for WordPress import messages, the sidebar admin navigation group, site transfer author records, and the select field type.

  • #5202 17b2b2d Thanks @Yusaku01! - Updates Japanese admin UI translations for editorial comments and visual editing comment controls.

  • ef0e581 Thanks @ascorbic! - Updates the OAuth consent page at /_emdash/oauth/authorize and the device authorization page in the admin. The Approve and Authorize buttons now respond only after the page has been visible and in focus for one second; a bar fills the button while it waits, and Deny works at once. On the consent page, the delay comes from a script served by the site at /_emdash/oauth/authorize-guard, and the page's Content-Security-Policy allows only same-origin scripts. If that script cannot run, Approve stays disabled and the page says the script is needed. A consent form opened before a different user signs in on the same browser is rejected; reload the page to get a fresh one. The consent page can no longer be displayed inside a frame, and its form is accepted only when the browser submits it from the consent page on the same site. A script that posts the consent form directly must send the site's Origin header. A site behind a proxy that terminates HTTPS must set siteUrl (or EMDASH_SITE_URL) to its public address, or the form is rejected as cross-origin.

  • #4768 b843b56 Thanks @danielmlr! - Fixes Plugins and plugin registry pages offering Editors buttons that only an administrator can use. Editors still see the installed plugins and registry listings, but no longer see the controls to enable, disable, update, configure, uninstall or install a plugin, which always failed with a permissions error for them. The switch for a plugin's MCP tools still shows Editors whether the tools are on, but they can't change it.

  • #5156 96a63c9 Thanks @danielmlr! - Fixes Preview in the content editor showing the previously saved version when clicked right after an edit in single-editor mode. The preview tab now loads once the edit has saved.

  • #5158 a397efc Thanks @khoinguyenpham04! - Fixes links into the public site on sites that set Astro's base (for example /blog). These links now include the base instead of 404ing:

    • Preview links from the admin and the preview URL API, when they come from the collection's URL pattern or the default /{collection}/{id} path. A pathPattern in the request or EMDASH_PREVIEW_PATH_PATTERN is still used exactly as given.
    • Menu items that point to content, taxonomy terms, and collection archives. Custom menu URLs are unchanged.
    • The admin's View Site, Live View, View published, and calendar View live links.
    • Links you insert with the editor's link picker from now on. Links already saved in your content keep their old paths.
    • URLs returned by the plugin content API's getPublicUrl(), for trusted and sandboxed plugins.

    If you worked around this, remove the workaround after upgrading, or the base will appear twice:

    • A base written into a collection's URL pattern.
    • A template that puts the base in front of item.url from getMenu().
    • A plugin that adds the base to what getPublicUrl() returns.
  • #5060 afdf4c3 Thanks @emdash-autofix! - Fixes extending a saved link over adjacent text producing separate links on the rendered page. Saving now joins adjacent link spans with equivalent options while preserving stored link keys where possible. Existing split links are repaired the next time the content is edited and saved; links separated by unlinked text or with different options remain distinct.

  • #5191 facf797 Thanks @emdash-autofix! - Fixes plugin block dialogs opening without focusing their first field, so typing and pasting go into the dialog instead of the editor behind it.

  • c5877be Thanks @ascorbic! - Changes which redirects plugin routes declared with response: "raw" can return. A redirect can no longer make the browser repeat a request other than GET or HEAD: EmDash now answers 500 when a raw route returns 307 or 308 with a Location header for such a request, or 301 or 302 for a request other than POST.

    If a raw route redirects after a form submission or other write, return 303 See Other instead. The browser follows it with GET. Redirects in response to GET and HEAD requests are unchanged.

    The Portable Text block editor no longer follows redirects when it loads select options from a plugin's optionsRoute. The route must answer with the options directly. The editor also requests options only when optionsRoute is a valid plugin route name, such as forms/list, that stays inside the plugin's own routes, and when the plugin ID contains only lowercase letters, digits, _ and -. Otherwise it sends no request and shows the field's static options.

  • #5123 29caf9c Thanks @ascorbic! - Fixes the 404 Errors tab creating a pattern redirect from a logged path that contains brackets. "Mark as Gone (410)" on a row such as /posts/[slug] used to create a pattern rule that answered 410 Gone for every post, and "Create redirect" prefilled the same pattern. Both actions now percent-encode the brackets (/posts/%5Bslug%5D), so the rule matches only the path that was logged. Patterns typed into the redirect form work as before.

  • #5188 5409819 Thanks @emdash-autofix! - Fixes Cmd/Ctrl+S in the content editor to save pending changes instead of opening the browser's Save Page dialog.

  • #5003 87b8b0d Thanks @emdash-autofix! - Fixes gallery blocks overflowing the admin editor when an image has a long caption. Columns stay evenly sized and long captions truncate with an ellipsis.

  • #5047 35ffffb Thanks @emdash-autofix! - Fixes the menu editor's Add Content picker showing entries from other locales. The picker now lists only entries in the menu's locale, so translations with the same title and slug cannot be confused. Entries without a translation in the menu's locale no longer appear in this picker.

  • #5049 dcc6bc1 Thanks @dmythro! - Completes the Ukrainian admin translation, so Ukrainian-speaking editors see co-editing and presence, sidebar layout settings, SMTP email settings, site status, block fields and the content editor's new controls in Ukrainian instead of English. The content editor's back button also tells Ukrainian screen-reader users which list it returns to.

  • #5097 c78cc4b Thanks @ascorbic! - Fixes the WordPress import wizard accepting a "Connect with WordPress" approval that it did not start. The wizard now sends a one-time value through WordPress, and GET /_emdash/api/import/wordpress-plugin/callback sends the admin back to the wizard without connecting unless that value returns within ten minutes. The callback also requires the import:execute permission, like the other import routes. When WordPress does not approve the connection, or the approval expires, the wizard now shows a message and its starting screen so the admin can reconnect.

  • #5176 eb02dbd Thanks @zaochih! - Adds missing Simplified Chinese translations for editorial comments, the unpublish confirmation, bulk publish and draft confirmations, the settings panel toggle, and other recently added admin strings. Editorial comments use 批注 so they stay distinct from visitor comments (评论).

  • Updated dependencies [c78e210, 7afb693, 2072b22]:

    • @emdash-cms/blocks@1.7.0

Don't miss a new emdash release

NewReleases is sending notifications on new releases.