Repository navigation
Description
Context — In the tag manager (Filters › Tags › Manage), renaming a tag means ticking it in the cloud, then typing its whole new name in an empty « Destination name » field: ticking a tag does not put its name in the field, so fixing a typo means retyping the tag. And when a tag is ticked and « Rename » is clicked with the field empty, nothing happens and nothing is said: the button is lit (it only needs a tag ticked), the click is dropped. Reported on 1.2.1.
Change — Ticking one tag puts its name in the field, selected, so it is edited in place and confirmed with Enter or « Rename ». « Rename » / « Merge » is enabled only when the field holds a name that would change something; otherwise a short line under the field says why (no name typed, or the same name).
To do
- On
Tags::Toggle, when exactly one tag is ticked afterwards, set the field to its name and select it (focus the field); when several are ticked, leave the field as typed. - Do not overwrite what the user typed: fill the field only when it is empty or still holds the name filled by the previous tick.
-
tag-applyenabled only when the normalised target (notes::model::normalize_tag, throughui::api) is non-empty and, for one tag, differs from it (case-insensitive, as the column isNOCASE). - When disabled with a tag ticked, one line under the field: « Saisissez le nouveau nom. » / « C’est déjà son nom. » (keys in both locales); nothing is silent.
- Update
tagManager.selectionHintto say the field is filled from the tag.
Tests — kittest in tag_manager.rs: ticking staging fills tag-target with staging; ticking a second tag keeps the field; with the field emptied, tag-apply is disabled and the reason is shown (tag-target-reason); # alone is refused before any confirmation. e2e 14_tag_manager: the rename step ticks the tag, reads the field filled, edits it and confirms.
Technical analysis
Cause — the field. TagManagerView { target: String } (notes/overlays/tag_manager.rs:27-30) is written only by the TextField in form (line 270) and cleared on close or confirm. A tick (line 143) pushes Tags::Toggle, applied in state/tags.rs:85-91, which only changes the selection: nothing connects the ticked tag to the field. The reference behaved the same (tag-manager.component.ts, target set only by (input)), so this is a change, not a regression.
Cause — the silent click. The button is .enabled(ticked) (selection non-empty) and the click is then filtered by if ticked && (applied || entered) && !view.target.trim().is_empty() (line 312): an empty field drops the click without a word. Behind it, state/tags.rs:92-96 drops an empty target again. A target of # or # passes both (non-empty), the count runs, the confirmation is shown, and only on Confirm does the core refuse it (notes::model::retagging → validated_tag), reported as the generic errors.tagActionFailed. A target equal to the ticked tag goes through the confirmation and writes a no-op retag.
Fix. The fill belongs to the drawing of the view (D13: the field is view state): in item's click branch, besides pushing Tags::Toggle, set view.target when the selection will hold one tag (the view knows state.tags.is_selected and selected() before the action) and remember it (filled: Option<String>) to know whether the user typed since. Enabling: compute normalize_tag(&view.target) (a pure core function, under 1 ms, called through api/), compare to the ticked tag; show the reason with the existing say helper under the field. The state's guard stays as a backstop.
Risk. Low, overlay-local. The e2e 14_tag_manager types into tag-target after ticking: with the field now filled, its typing must replace the selection (the field selects its text on focus) or the step clears it first.
Activity
Captures: 1.2.2 #1669, before and after
vmillet-dev commentedon Nov 27, 2026
Fixed by #1680, merged into
dev/1.2.2.