Comments
A comment is a thread on a page. The owner writes it on a draft.
A thread holds messages from the owner and from the agent. Either side can reply. Either side can resolve a thread, and either side can open it again.
No deployment is attached to a thread. A comment is about the site, and the next message says whether the change is made.
How the owner writes one
Clave adds a small overlay script to each draft response. The owner selects a box on the page and types.
The build output never holds that script. A publish of a draft is a restore, so a script in the files would go live with them.
What a thread keeps
- The words in the box. These are the part that lasts. The agent finds the place in the source by them, and the overlay finds the box again by them.
- A position, with the scroll of the page beside it. A box at 390 pixels means nothing at 1440.
- A picture of the window, with the box drawn on it. The picture travels with the window size, the pixel ratio, the colour scheme and the user agent, which is what makes "it is wrong on my phone" repeatable.
A picture cannot be searched. The words are what the agent works from.
A picture that fails says why. The browser draws the page again to make one, so it can meet a colour or a rule it cannot read. Clave reports that rather than leave the field out.
How an agent learns of one
Nothing here can wake an agent. GET /v1/sites reports open_comments
for each site, so the agent learns of a comment when it asks.
Read Comments.