trilium icon indicating copy to clipboard operation
trilium copied to clipboard

First input box of the promoted multi relation edits last relation

Open geesecross opened this issue 2 weeks ago • 3 comments

Description

https://github.com/user-attachments/assets/6b15bf0d-b572-4fb2-b25e-a701aab0b8d7

Expected result

~template=Template ~topic="@Note A" ~topic="@Note B"

Actual result

  • When I added the second input box and write Note B, suddenly two input box filled with Note B but owned attributes was completely fine: ~topic="@Note A" ~topic="@Note B"
  • Tried to fix the value of the first input box to Note A, then the last topic value was changed: ~topic="@Note A" ~topic="@Note A"

How to reproduce

  1. Make a template named Template with the following owned property:
    #relation:topic=promoted,multi #template
    
  2. Make a instance of the template.
  3. Try to add and edit multiple topic relation as the video shows.

TriliumNext Version

0.100.0

What operating system are you using?

macOS

What is your setup?

Local (no sync)

Operating System Version

macOS Sequoia 15.7.2

Error logs

No response

geesecross avatar Dec 08 '25 12:12 geesecross

Hi @geesecross! I'm Dosu and I’m helping the Trilium team.

This is a bug in how Trilium handles promoted multi relation input boxes. When you add a second relation input, the UI reuses the same unique identifier for both input cells, so editing one updates both in the interface—even though the underlying attributes remain correct. The root cause is in the logic for creating and updating these cells in the PromotedAttributes component: each cell should get a truly unique ID, but currently, new cells may clone the original cell's ID, causing this mirroring effect. Fixing this requires assigning a unique identifier to each multi relation cell when it's created, rather than reusing an existing one. You can see the relevant code and logic here.

There are no documented workarounds or fixes yet. For now, you may need to edit the attributes directly or avoid using promoted multi relations until this is resolved in a future release.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

dosubot[bot] avatar Dec 08 '25 12:12 dosubot[bot]

@geesecross , the promoted attributes were recently ported to React so probably I missed this case. If it's a blocker for you, you can safely revert back to the previous version.

We'll fix it in the next release.

eliandoran avatar Dec 08 '25 12:12 eliandoran

Another example I've captured, which is pretty easy to recreate.

https://github.com/user-attachments/assets/c2b6e079-e8f7-4e54-ac6d-64949a233711

kleutzinger avatar Dec 08 '25 14:12 kleutzinger

yes, i also found this.

dongrentianyu avatar Dec 18 '25 06:12 dongrentianyu