Skip to Content
FeaturesNotes & Comments

Notes & Comments

Notes let your team collaborate directly on your project. Attach comments to a record, a file, a model, an operation, a schedule or a user, mention team members, track action items, and resolve discussions — all without leaving the console.

Overview

Notes are threaded comments attached to one thing in your project. Your team can leave feedback, ask questions, or flag issues directly on what they are reviewing.

Blog Post: "Summer Sale Announcement" +-- Note: "Can we update the hero image?" (unresolved) | +-- Reply: "Done -- uploaded new image" (resolved) +-- Note: "Legal team needs to review pricing copy" (@sarah, due Friday) +-- Note: "Looks good to publish!" (resolved)

Key concepts:

  • Notes attach to one subject — the thing the note is about.
  • Threaded replies keep conversations organized under the original note.
  • Mentions tag team members and create trackable action items.
  • Resolution marks a discussion as complete.

Subjects

A subject is said in two parts: what kind of thing the note is about, and which one.

Subject typeWhat subjectId holds
recordThe record ID. Also set subjectModelKey to the record’s model key
fileThe file ID
modelThe model key
operationThe operation key
scheduleThe schedule ID
userThe user ID
projectThe project ID. A general task for your team in the console, for work with no record to hang on

subjectType is always one of those seven. It is never a model key: model keys are yours to choose, so a project with a model keyed file would otherwise make one value mean two different things. A note on a record is record plus the model key on its own field.

Note Properties

PropertyDescription
contentRich-text content — the { "body": "..." } shape used by the CLI and API
subjectTypeWhat kind of thing the note is about — one of the seven above
subjectIdWhich one, from the table above
subjectModelKeyThe record’s model key, such as article or page. Records only
parentNoteIdFor replies — creates a threaded conversation

A reply carries the same subject as the note it answers, so a thread stays with the thing it is about.

In the console

Creating Notes

  1. Open any record
  2. Click the Notes panel
  3. Write your comment (supports rich text)
  4. Optionally @mention team members
  5. Click Send (Reply in a thread)

Threaded Replies

  1. Click Reply on an existing note
  2. Write your response
  3. The reply appears nested under the parent note

Threads keep conversations contextual — each discussion stays with the note that started it.

Mentions

Tag team members with @mentions to notify them and create action items. Mentions have a status workflow:

StatusDescription
pendingMention created, user not yet notified
seenUser has seen the mention
acknowledgedUser has acknowledged the mention
completedUser has completed the requested action
dismissedUser dismissed the mention with a reason

You can also set a due date on mentions for time-sensitive tasks.

My Mentions Dashboard

View all your mentions across the project:

  • Pending — action items waiting for you
  • Past due — mentions with expired due dates
  • Completed this week — recently resolved items

Resolving Notes

When a discussion is complete or an issue is fixed:

  1. Click Resolve on a note
  2. Optionally add a resolution note explaining what was done

Replies are resolved individually, so a thread can hold a settled question alongside one that is still open.

Resolved notes are hidden by default but can be shown with the Show resolved filter.

Searching Notes

Find notes across your project by:

  • Content — full-text search across all notes
  • Subject — notes on one record, file, model, operation, schedule, user or the project itself
  • Author — notes from a specific team member
  • Status — resolved or unresolved

Via the CLI

--subject-type says what kind of thing the note is about and --subject-id says which one. For a record, add --model-key.

# List notes on a record (add --include-resolved to show resolved notes) foir notes list \ --subject-type record \ --subject-id kx7p2m9q4wr8n3vt6ybc1zjd \ --model-key article # List notes on a file -- no model key, because a file has no model foir notes list --subject-type file --subject-id q3v8t1nc7k2rb9wz5yjd6xpm # Get a specific note by ID foir notes get <id> # Create a note on a record foir notes create \ --subject-type record \ --subject-id kx7p2m9q4wr8n3vt6ybc1zjd \ --model-key article \ --body "Please review the updated hero section before publishing." # Create a note on a model -- a model is addressed by its key foir notes create \ --subject-type model \ --subject-id article \ --body "Adding a summary field here next sprint." # Create a threaded reply foir notes create \ --subject-type record \ --subject-id kx7p2m9q4wr8n3vt6ybc1zjd \ --model-key article \ --body "Looks good, approved." \ --parent-note-id v4h8nq2zr6mkt9xw3jbc7pfd # Resolve a note (optionally with a resolution message) foir notes resolve v4h8nq2zr6mkt9xw3jbc7pfd --resolution "Hero image updated and approved." # Delete a note foir notes delete <id>

Upgrading from --entity-type

--entity-type and --entity-id have been replaced. --entity-type held a model key rather than a kind, so it could say “an article” and could never say “a file”. Passing either flag now fails with the replacement rather than being read as a record.

# Before foir notes list --entity-type article --entity-id kx7p2m9q4wr8n3vt6ybc1zjd # After foir notes list \ --subject-type record \ --subject-id kx7p2m9q4wr8n3vt6ybc1zjd \ --model-key article

For your users

A signed-in user of your site can write notes and read the ones they wrote, through the public API. This is what turns notes from an internal annotation tool into a feedback channel: the shopper on your Delivery and Returns page who noticed their order came via a different courier can say so, against the record that rendered the page, and it lands in the same inbox your team already triages.

Read the notes this user has written:

query { myNotes(first: 20) { edges { node { id body subjectType subjectId subjectModelKey createdAt } } pageInfo { hasNextPage endCursor } } }
const mine = await foir.ns.notes.myNotes({ first: 20 });

Write one, against the record the page rendered from:

mutation { writeNote( subjectType: "record" subjectId: "kx7p2m9q4wr8n3vt6ybc1zjd" subjectModelKey: "article" body: "My order arrived with a different courier than the page says." ) { id } }
await foir.ns.notes.writeNote({ subjectType: 'record', subjectId: 'kx7p2m9q4wr8n3vt6ybc1zjd', subjectModelKey: 'article', body: 'My order arrived with a different courier than the page says.', });

Your page already knows which record it is about

The hard part of a feedback widget is not the form. It is answering what is this about on every page, in a way that keeps being true.

The usual answers do not. Anchor feedback to a URL and it detaches when you change your routes. Anchor it to a CSS selector and it detaches at the next redesign. Anchor it to a translated page and the same comment arrives twice, once per locale, as if they were different subjects.

A page rendered through the Foir SDK does not have to choose any of those, because the client already fetched the record. Hand it a registry and it keeps track:

import { createFoirClient, createFoirSubjectRegistry } from '@foir/sdk/data'; import * as generated from './foir.generated'; export const subjects = createFoirSubjectRegistry({ label: (record) => (typeof record.title === 'string' ? record.title : null), }); export const foir = createFoirClient({ apiUrl: process.env.PLATFORM_API_URL, apiKey: process.env.PLATFORM_API_KEY, generated, subjects, });

Now every page that reads a record tells your widget what it is looking at, with no route table and no per-page wiring:

const article = await foir.article.findUnique({ naturalKey: 'about-us' }); subjects.subject(); // { modelKey: 'article', recordId: 'kx7p2m9q4wr8n3vt6ybc1zjd', label: 'About Us' }

Which is exactly what a note wants:

const subject = subjects.subject(); if (subject) { await foir.ns.notes.writeNote({ subjectType: 'record', subjectId: subject.recordId, subjectModelKey: subject.modelKey, body: feedback, }); }

Rename the route, rebuild the template, serve the German translation: the note is still filed against article/kx7p2m9q4wr8n3vt6ybc1zjd, and it lands in the same panel your team opens when they edit that article.

The registry is off unless you build one, and there is no flag that turns it on by accident — a list of the records a page fetched is worth deciding about deliberately, because it names content the reader may never have seen rendered. See Subjects & Annotations for what it records, how to override it, and when to clear it.

The widget, if you would rather not build the form

<FoirFeedback> is that form, wired to all of the above:

import { FoirFeedback } from '@foir/sdk/react'; import { foir, subjects } from './foir'; export function Layout({ children }) { return ( <> {children} <FoirFeedback client={foir} subjects={subjects} /> </> ); }

Drop that into your layout once and every page that reads a record can be commented on. No route table, no per-page configuration, and nothing to keep in step when your URLs change. A reader presses its button or the project’s shortcut, points at the field, the element or the page they mean, and writes.

It is a React component rather than a script tag on purpose. A snippet loaded from a <script> tag has no way to reach the client your page fetched through, so the only thing it could anchor to is the address bar, which is exactly the fragility the record anchor exists to remove.

What your visitor sees:

  • The label, or nothing at all. About: Delivery and returns, using the label your registry resolved or the one you pass. Never the model key and never the record id: those are what the note is filed against, and they stay internal.
  • An honest answer when there is nothing to comment on. A page whose data all came out of lists has no subject, and the widget says so rather than picking one of the twelve. Name one yourself with the subject prop, or pass subject={null} to state that a page has none, and the widget shows nothing.
  • Nothing, when they cannot write. A signed-out visitor on a project that takes no visitors’ notes sees no button at all, rather than one that can only say no.

Style it by passing className, which turns the built-in inline styles off entirely and leaves the data-foir-feedback-* attributes as your hooks. The full prop list is in the SDK reference.

Screenshots

A visitor can attach a picture of what they were looking at. The button appears only when the project allows it and the browser can capture, and it captures only when they press it: the browser’s own picker is the consent gate, so nothing is taken without them choosing a window or a tab in a dialog your site does not control.

The still is uploaded the same way any other file is, which means your plan’s per-file limit and your workspace’s storage allowance (and the project’s cap, if one is set) apply to it, and the authoritative size is the one storage records. It arrives on the note as an attachment, visible to your team in the notes panel and to the author on their own thread.

Attaching needs files:write alongside notes:create, on the key and on the signed-in user’s role, for the same reason as below. An upload that fails fails the whole submission: a note that arrived without the picture is worse than one that did not arrive at all, because the author cannot tell, and what they wrote stops making sense.

Screenshots are allowed by default and can be switched off per project (see Where the notes settings are set). That gates the offer: no note surface renders a capture button, and notes that already carry attachments keep them.

Where the notes settings are set

A project’s two notes settings, Accept anonymous notes and Offer screenshots, are the project’s own, and every surface sets the same two:

SurfaceHow
Notes appSettings
ConsoleSettings → General → Notes
foir.config.tsproject.settings.anonymousNotesEnabled and noteScreenshotsEnabled, applied by foir push and filled in by foir pull. Left out, a push leaves them as they are
CLIfoir notes settings, with --anonymous / --no-anonymous and --screenshots / --no-screenshots
Agentsfoir_get_notes_settings reads them and foir_update_notes_settings turns either on or off

Changing them takes projects:write, held by a person signed in, in person or through an agent signed in as them. An API key is refused, and so is a push made with one.

What a user can and cannot see

myNotes returns the notes that user wrote, plus the replies your team deliberately sent them. It never returns another user’s notes, and it never returns your team’s internal ones. Not even the ones marked public, because “public” on a note means visible project-wide to your team, not world-readable.

The word doing the work there is deliberately. Sending a reply to a user is an explicit act, and it is what puts the reply in their myNotes. A team reply nobody sent is internal triage: it sits in the same thread and stays out of the user’s view. So a thread can hold your team’s working notes alongside the answer you chose to send, and the user sees only the second.

Replies also still reach the user by email. The two are the same reply seen two ways, not two features: the email is the nudge, myNotes is the record, and a user reading the thread back in your site sees what they were sent.

The API key needs the scopes

Mint a key carrying notes:read and notes:create. Whether your site collects feedback at all is your decision, and this is where it is expressed. A key without them cannot reach either operation.

The scopes gate the surface, not the scoping. A key holding notes:read still only ever returns the signed-in user’s own notes.

Whose notes a permission reaches

notes:read and notes:write are a holder’s own notes: the ones they wrote and the ones shared with them. notes:read.all and notes:write.all are every note in the project written for all to see, which is what your team reads in the console and what a server-side integration reads to triage the inbox.

WhoMay hold
A console rolenotes:read, notes:write, notes:create, and the two project-wide forms. Project manager and Workspace manager hold them all
A role for your app’s usersthe same. A role holds a project-wide form or it does not, whoever it is given to
An admin keythe same
A server keythe same, as the most a person signed in through it reaches. It gives a visitor neither project-wide form
A publishable keynotes:read, notes:write and notes:create, at its own reach only. Never a project-wide form: the key is public
A visitor who comes through any keynotes:create only

A key is the most anyone does through it, so a person signed in through a key reaches the project’s notes only where their role gives the project-wide form and the key holds it. The data API’s myNotes answers a signed-in user with the notes they wrote and the replies sent to them, whatever their role gives: it has no query for the project’s notes.

A note written for its writer alone is read by its writer and by whoever it names, whatever anyone else holds. A request on a publishable or a server key with nobody signed in reads no note and writes none, except as a visitor where the project takes visitors’ notes.

An admin key that reads the project’s notes needs notes:read.all and nothing of settings. The note verbs used to charge settings:read or settings:write beside the notes permission, and no longer do.

And the user needs a role that lets them write

The key is half of it. What a key holds is not what a user who signs in through it holds: a publishable key ships in your browser bundle, so anyone who reads the page has it. A signed-in user writes a note because their own role gives notes:create.

So a user whose project has no role granting notes:create gets:

missing required scope: notes:create

even with a correctly scoped key. The message names the scope, which reads like a key problem and is not one. notes:read needs no role, because a read is not mutating; it is confined by the user session instead.

Grant it once, on the default role, and every user inherits it:

# New project: create a default role that can leave feedback foir roles create --key default --name "Default" \ --grants "records:read:order,notes:create" --default # Existing default role: --grants REPLACES the whole list, so name what # the role already gives alongside the new grant foir roles list foir roles update <roleId> --grants "records:read:order,notes:create"

Or declare it in foir.config.ts under userRoles and foir push it, which is what most projects should do so the grant is in version control rather than in someone’s shell history.

Granting notes:create on the default role is right when you want any signed-in user to be able to leave feedback, which is the usual case. If feedback should come only from a subset, put it on a separate role and assign that instead:

foir roles create --key feedback --name "Feedback" --grants "notes:create" foir roles assign --user <userId> --role <roleId>

Note: users must sign in again to pick up a new or changed role. An existing session carries the scopes it was minted with, so an already-signed-in user keeps failing until their token is reissued.

A user session is required

myNotes refuses a request with no user session, rather than returning an empty list. writeNote refuses one too, unless the project takes notes from visitors (below). That is deliberate: an empty list would tell a caller “this person has no feedback” when the truth is “nobody is signed in”. The likeliest cause is a site that forgot to forward the session, which would otherwise look like a working integration returning nothing.

Feedback from visitors with no account

myNotes needs a signed-in user. writeNote does not: a visitor who has no account writes a note through the same field a signed-in user does, and is asked the same permission, notes:create.

Two things have to be so, and each is yours to decide:

  1. The project takes visitors’ notes. Turn on Accept anonymous notes (see Where the notes settings are set). While it is off, a visitor’s writeNote is refused, saying so.
  2. The key gives notes:create to whoever comes through it. That is the key’s own list of what it gives a caller with nobody signed in (a key’s two lists). Holding notes:create on the key is for the users who sign in through it, and gives a visitor nothing.
await foir.ns.notes.writeNote({ subjectType: 'record', subjectId: 'kx7p2m9q4wr8n3vt6ybc1zjd', subjectModelKey: 'article', body: 'The size chart on this page contradicts the one in the FAQ.', contactEmail: 'visitor@example.com', pick: ['id', 'createdAt'], });

There is no bearer token, because there is nobody to be.

It is write-only. Nothing reads a visitor’s note back on the public plane. A visitor is answered with the note’s id and createdAt, so they have something to quote when they follow up, and asking for any other field is refused before the note is written: hence the pick. The note itself lands in the project’s inbox, where your team sees it beside every other note.

It lands at the level the key is confined to: an organization’s own key files in that organization, and a project-wide key at the project, whatever X-Org-Id the request sends.

subjectType must be 'record' for a visitor, who may write about a record and nothing else, so subjectModelKey is required. A visitor’s note takes no parentNoteId and no attachmentFileIds.

Before this, a visitor’s note was taken because the key itself held notes:write. A publishable key that held it in a project with visitors’ notes switched on has been given notes:create for its visitors, so a form that worked still does. A key minted from now on gives it only if you list it.

contactEmail is optional and never verified. Nothing is sent to it to confirm it and the platform does not treat it as proof of who wrote the note, so do not build a flow that assumes the address is reachable. It is a visitor’s field: a signed-in user’s note has an author already, and writeNote refuses a contactEmail from one.

Submissions are rate-limited and quota’d per project and per IP. The settings toggle is a kill switch: turning it off refuses new submissions immediately.

The feedback widget takes it

With both of the above so, <FoirFeedback> shows itself to a signed-out visitor, adds an optional email field to the composer, and thanks them once their note is sent. It learns this from noteConfig, which answers a visitor whose note writeNote would take and says they are not signed in. Where the project does not take visitors’ notes, the widget shows a signed-out visitor nothing. See the feedback widget.

createMyNote is the older name of writeNote for a signed-in user. It is the same create and still answers, until the callers that name it have moved.

Tasks and assignment

A note becomes a task when you assign it. There is no separate task type to create and nothing extra to set up: every note carries a nullable assigneeId, and a note that has one is a task.

Assigning is not the same as mentioning. Mentioning someone means “see this”. Assigning means “you own this”. That lets you loop three people into a thread while only one of them is expected to act. Both are offered together in the composer, so you can assign at the moment you mention.

The assignee must be a user with access to the project. Assigning to anyone else is refused rather than stored, because an assignment also grants read access: a private note opens to whoever owns it, so a note flipped to private is still readable by the person told to deal with it. Unassigning takes that access away again, unless they are also mentioned.

Send an empty assigneeId to hand a note back to nobody.

Sub-tasks and replies

One parent link carries both. A child note with no assignee is a reply. A child note with an assignee is a sub-task. Threads can nest to any depth, so a reply can be answered and a sub-task can carry sub-tasks of its own.

Progress

Every note reports childCount and resolvedChildCount over its direct children, which is what a parent renders as “1 of 3 done”. Only direct children count, so a long discussion under one reply does not inflate the parent’s numbers.

Both counts reflect what you can see. A child on a record you have no access to is absent from the totals, so the progress figure always agrees with the list of children you can open.

Task due dates

A note carries its own dueDate, set and cleared independently of any mention. The two answer different questions: the note’s deadline is when the work is due, and a mention’s is when that person was asked to look. A note can be due Friday while the person you looped in was asked to read it today.

List with order_by: due_date for the task-queue order — soonest first, undated last. The default order is created_at, newest first, which is the inbox rather than the queue. A cursor does not survive a change of order.

Anchoring a note to a field

A note on a record can point at one field rather than the whole record. Three properties carry that, and they are record subjects only:

PropertyDescription
anchorFieldThe model field the note is about, such as summary
anchorNodeIdThe passage inside that field’s prose — the persistent node id from the record’s stored content ($.foirNodeId)
anchorSnippetThe text that was selected when the note was anchored, so the note still reads correctly after the passage moves

anchorNodeId and anchorSnippet both need anchorField: they say where inside a field, and there is no inside without one.

writeNote on the data API takes the same three and answers with them. A visitor’s note may carry them too, bounded: a field path of at most 200 characters, a block id of at most 64, and a quotation of at most 500. The field must be one the visitor can read: on the model as the data API serves it to them, and not guarded from them. Any other is refused in one sentence, so the refusal says nothing the data API does not already serve them. In Work, a note anchored to a field shows that field beside the thread, edited with the console’s own editor, so the change the note asks for is made where the note is read.

Resolution never cascades

Each note resolves on its own, and resolving a parent leaves its children alone. That is deliberate. Closing a parent with children still open is the right outcome when the rest of the work was dropped, and the progress counts still record what actually happened.

Resolution and assignment are independent. Resolving a note does not unassign it, and reassigning a note does not reopen it.

Note resolution is also separate from your mention inbox. isResolved answers whether the item is done. A mention’s own status answers whether you personally have dealt with being notified. The same note can be resolved while your mention of it is still unread.

Filtering by assignee

Pass assigneeId to list one user’s tasks. It works on its own for a project-wide queue, or alongside a subject to narrow to one record or file.

Users never see assignment. The user-facing note type deliberately omits assigneeId and the progress counts, because who owns a ticket internally and how many internal sub-tasks remain are not theirs to read. They see whether their note has been resolved.

From an agent

foir_list_notes accepts assignee_id and returns assignee_id, child_count and resolved_child_count on every note. foir_manage_note gains assign and unassign actions, and accepts assignee_id on create so a note can be written as a task in one call.

subject_type is the same closed set as everywhere else, project included, and is never a model key.

foir_list_notes also takes search_mode alongside query. text is the default and matches substrings. semantic ranks by meaning, so it finds notes that do not share the query’s words; when no embedder is configured it serves text instead and reports the reason rather than pretending it ranked by meaning.

foir_manage_note carries the deadline actions too — set_due_date (with due_date as RFC 3339) and clear_due_date — and accepts anchor_field, anchor_node_id and anchor_snippet on create.

Best Practices

  • Assign when someone owns it — a note with an assignee is a task, and it shows up in their queue.
  • Use mentions for action items — @mention the person responsible so it appears in their dashboard.
  • Set due dates on the note when the work has a deadline, and on a mention when you need someone to look by a certain day. They are separate.
  • Resolve when done — keep the notes panel clean by resolving completed discussions.
  • Reply in threads — keep conversations organized by replying to existing notes rather than creating new ones.
Last updated on