V165: cross-module mentions and access requests.
phoenix_kit_mentions
The reverse index for @/# mentions. The canonical mention lives in the
text itself as a token, which is what survives copy-paste, edit history,
no-JS reading and a module being uninstalled. This table answers the
question the text cannot: what links here — and gives notification
fan-out something to diff against without re-scanning every body.
It is a CACHE of the current head of each field, rebuilt from the tokens on every durable save. It is deliberately not versioned: history lives in the text.
No foreign key on target_uuid: it points into ~28 optional packages'
tables, most of which may not be installed. The source side is the same —
a comment, a task description, a note. Orphans are expected and handled at
read time, where a target that no longer resolves renders as plain text
rather than a link.
phoenix_kit_access_requests
When a mention points at something the reader cannot open, the reader is told it exists but not what it is — and can ask for access. That request needs somewhere to live so the owner can act on it and so the same person cannot spam the same record.
status is a string sentinel (pending / granted / denied /
cancelled), matching the workspace's soft-delete convention rather than
a boolean pair.