feat(kanban): link related assets to their file or folder (#453)

Related assets in the task edit dialog were plain rows with no way to
open them. Add an opt-in `linkable` prop to TaskRelatedAssets that turns
each row's thumbnail and name into a router Link to the asset in its
project (files -> /projects/$projectId/files/$fileId, folders ->
/projects/$projectId/folders/$folderId), falling back to the task's
project when the asset has none. The edit dialog opts in; the create
dialog does not, so a click cannot discard an unsaved draft.

Co-authored-by: Frederic De Decker <hello@trinity.video>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
FredericTrinity
2026-10-07 20:14:36 +08:00
committed by GitHub
co-authored by Frederic De Decker Claude Opus 5.5
parent f8beb195dd
commit 4b1b64fe2b
4 changed files with 119 additions and 27 deletions
@@ -445,6 +445,7 @@ export function TaskInfoForm({ teamId, task, canEdit = true }: TaskInfoFormProps
onAddAssets={(newAssets) => linkAssets(newAssets)}
onRemoveAsset={(assetId) => unlinkAsset(assetId)}
disabled={!canEdit}
linkable
/>
</div>
</div>