Skip to content

Editor polish: asset-bounded suggest clicks, confidence only in preview, selected-only labels #513

Description

@JArmandoAnaya

Three editor-surface corrections, all frontend. No wire changes: openapi.json and the
generated client stay exactly where they are.

1. A suggest click outside the asset is a no-op

AnnotatorCanvas's input surface is the whole pane, deliberately — "a press in the margin
around the picture reaches the machine with the negative or past-the-edge coordinate it
deserves"
— and imagePoint returns that coordinate unclamped. That is right for drawing,
where the interaction machine and the kernel both have an opinion about an out-of-frame
corner. It is wrong for a prompt point: the stage surround is not the asset, and a click
there has nothing for a segmenter to segment.

With the suggest tool armed, hit-test the press against the asset's rendered rectangle
before it becomes a prompt. Outside: nothing happens — no point recorded, no request sent,
no preview change. Positive and negative (alt) clicks alike. Correct under zoom and pan.
Clicks inside the asset behave exactly as they do today, including on top of an existing
shape.

2. Confidence renders only on the live suggestion preview

The number is a decision aid for accept-or-reject, and it stops being one the moment the
shape is accepted. So it stays on the preview overlay and leaves the editor everywhere
else. This narrows what shipped when a reviewer gained the ability to see which labels a
model drew and how sure it was (#512), which implemented criterion 2 of the work surfacing
model provenance and confidence in the review loop (#417):

confidence and model_ref are unchanged on the wire and unchanged in storage. The number's
home is the batch review loop, where unattended pre-labeling is reviewed at volume (#425).

confidencePercent stays exported — it is the shared spelling the preview consumes and the
review surfaces will.

3. The canvas label renders only while its shape is selected

DESIGN.md states the rule under Annotation shape rendering (canvas): the class label
renders only while selected, anchored at the first vertex, never a pointer target. The React
adapter renders ShapeLabel unconditionally, so every shape on a busy frame carries its
class name at all times. Restore the rule at the shipped metrics. Unselected shapes: the box
alone. The list panel is the full inventory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdesign-systemDESIGN.md, tokens, primitives — the shared visual contractfrontendannotator / ui-core / app packagesuxUser experience / interaction design

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions