Follow-up to #73 (observation 2 from @CedricWagner).
Problem
When a linked target is deleted (or otherwise no longer resolvable for the current user), its reference stays in the File Link field list — which is intentional (we do not prune on delete; see the reasoning in #73). But a dead entry currently looks identical to a live one, which is confusing.
Proposed fix (UI only, no event listening)
When a token's fileid does not resolve, render it in an explicit unavailable state instead of a normal clickable row:
- greyed out, non-clickable name (fall back to the basename of the cached path so there is still a label),
- a small "no longer available" hint/badge,
- keep the remove (×) button so the user can clear it deliberately.
Implementation notes
- The resolution already happens server-side via
FileReferenceService::resolveMany(); a token is "unavailable" when its fileId is absent from the resolved map.
FileLinkFieldInput.vue already declares a resolved prop shaped [{ fileId, name, path, exists }], but exists is currently never populated/used. Wire that through: mark a token unavailable when there is no resolved entry for its id.
- Backend (
Application::resolveFilelinkNames() and the sidebar/grid resolve paths) currently returns only fileid => name for resolved ids. Expose enough for the frontend to distinguish "resolved" from "unresolved" (e.g. include the resolved-id set, or pass through exists).
- Pure frontend + a small payload tweak — no
CacheEntryRemovedEvent/move listeners.
Acceptance
- A File Link row pointing at a deleted/inaccessible file shows as unavailable (greyed, "no longer available") and is not clickable.
- The user can still remove it.
- A live reference is unchanged.
Follow-up to #73 (observation 2 from @CedricWagner).
Problem
When a linked target is deleted (or otherwise no longer resolvable for the current user), its reference stays in the File Link field list — which is intentional (we do not prune on delete; see the reasoning in #73). But a dead entry currently looks identical to a live one, which is confusing.
Proposed fix (UI only, no event listening)
When a token's
fileiddoes not resolve, render it in an explicit unavailable state instead of a normal clickable row:Implementation notes
FileReferenceService::resolveMany(); a token is "unavailable" when itsfileIdis absent from the resolved map.FileLinkFieldInput.vuealready declares aresolvedprop shaped[{ fileId, name, path, exists }], butexistsis currently never populated/used. Wire that through: mark a token unavailable when there is no resolved entry for its id.Application::resolveFilelinkNames()and the sidebar/grid resolve paths) currently returns onlyfileid => namefor resolved ids. Expose enough for the frontend to distinguish "resolved" from "unresolved" (e.g. include the resolved-id set, or pass throughexists).CacheEntryRemovedEvent/move listeners.Acceptance