# UI Fixup — Tracker

Branch: `ui-fixup`. One commit per item where practical; build + test before each
commit.

1. [x] Truncate pasted text in all editors (cap the multiline text box; audit every
   editor for an unbounded `char_limit`).
2. [x] Pre-select "Untitled" when a route label is first added (select-all on first
   focus, decoupled from the Tab cycle).
3. [x] Animate resize handles (corners on blocks/comments) like route end points /
   new-pin targets: shrink at rest, grow within `3*GRID_SIZE`, animate on click.
4. [x] Locked blocks: a `locked: bool` on each block (default false). Material pin/
   port edits blocked; reposition, flip, resize, accent, expand, tag
   visibility allowed. Whole-block move/delete still allowed. Lock/unlock toggle in
   the selection overlay.
   *(Amended 2026-08-24: "retitle/retag" moved to the blocked side — a pin's name,
   type line and tag text are part of its definition. The split now lives in
   `src/edit/lock.rs` and is enforced by type; see the ratification sheet's B3.)*
5. [x] Placeholder text for every empty editor ("Add name", "Add route label",
   "+tag", …).
6. [x] Non-blocking `rfd` file dialog when adding a symbol.
7. [x] No zoom/pan animation on layer change (snap the view; keep animation for
   nav-dialog selection).
8. [x] Embedded PNG symbols (PNG stored inline, not referenced).
9. [x] Symbol foreground/background layer enum, with an overlay selector. Background
   symbols draw first and do not move with blocks; foreground symbols draw last and
   move with a containing rect.

## Follow-up fixes (round 2)

10. [x] Suppress on-canvas placeholder hints (e.g. "Add type") for a locked block —
    they are not actionable.
11. [x] The routing tool must not add pins to a locked block.
12. [x] Resize nodes are too small at rest — make them 30% larger.
13. [x] PNG symbols don't render on the canvas (no PNG decoder was installed).
14. [x] Route label editor must sit exactly over the label, and the underlying label
    must not draw while the editor is active.
15. [x] An empty route label shows the "Add route label" placeholder on canvas; a
    route label cleared to empty via the editor is removed from the diagram.
16. [x] An empty block tag shows the "+tag" placeholder on canvas.
17. [x] Blocks gain a third label (type), parallel to pins: name, type, tag. Name and
    tag stay editable when locked; type does not. Type defaults to the block's upper-
    left (like the name label) and follows the name in the Tab edit order.

## Follow-up fixes (round 3)

18. [x] Selection overlay gap to its object must scale with zoom — keep at least a
    1.5·GRID_SIZE (world-space) gap, not a fixed pixel gap.
19. [x] The "+tag" and "Add type" block placeholders must be double-clickable to
    start editing (the empty label has no hittable text rect).
20. [x] Double-clicking an uneditable target (e.g. a locked block's type) must not
    fit-to-view zoom the canvas.
21. [x] The block type label must stay within the rect's horizontal bounds when
    moved, like the title.
22. [x] Adding a route label to an already-labeled route (no editor opens) returns
    to the Select tool.
23. [x] Title, tag, and type labels all clamp to the block's horizontal bounds both
    while dragging and on release, via shared code (clamp_label_offset +
    label_side_for_y), anchored per label (center/right/left).

## Follow-up fixes (round 4)

24. [x] Disable the Add Port toolbar tool when inside a locked block (unavailable).
25. [ ] Nav widget: 3 columns (Name/Type/Tag), search across all three, in-place
    rename of editable fields, wider, and a collapse-to-title button. [plan]
26. [ ] Route tool shows/animates anchor start points like the select tool's
    route-start targets (grow when the mouse nears). [plan]
27. [x] Pin "+tag" placeholder is invisible when the tag is shown but empty — show
    it (with name/type) when the pin is selected.
28. [x] Port resize: the dragged edge must stick (currently the port grows but
    drifts the wrong way depending on orientation).
29. [x] Remove the now-redundant Add Pin Tag tool.
30. [x] When a pin is selected, show all empty-field hints (add name/type/tag).
