Skip to content

Feature/UI polish - #255

Merged
TrevorBurgoyne merged 11 commits into
mainfrom
feature/ui-polish
Aug 18, 2026
Merged

Feature/UI polish#255
TrevorBurgoyne merged 11 commits into
mainfrom
feature/ui-polish

Conversation

@TrevorBurgoyne

@TrevorBurgoyne TrevorBurgoyne commented Aug 18, 2026

Copy link
Copy Markdown
Member

UI Polish

Description

  • Hovering a spatial annotation now draws a white outline that hugs its shape.
  • Polish and update the confidence card to include the class name and fix its positioning.
  • Fix shift-hover to properly start a new polygon complex layer
  • Fix bitmask moves to the image edge that were permanently truncating the mask. Now a translated mask bounces back to its previous position if it would be moved outside the image bounds.
  • Improve read-only subtask handling. Subtasks marked read_only: true now actually prevent edits. Additionally, all subtasks may now be read-only (the previous "at least one non-read-only subtask" error has been removed).

PR Checklist

  • Merged latest main
  • Version number in package.json has been bumped since last release
  • Version numbers match between package package.json and src/version.js
  • Updated documentation if necessary (currently just in api_spec.md)
  • Added changes to changelog.md

Breaking API Changes

Bitmasks will no longer trim to the image edge when translating outside the image boundaries
Read-only now is actually read-only

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Polishes annotation interactions, confidence display, and bitmask movement behavior.

Changes:

  • Adds hover outlines and confidence-card improvements.
  • Fixes shift-hover polygon layering and out-of-bounds bitmask moves.
  • Adds end-to-end coverage and bumps the release to 0.27.0.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
CHANGELOG.md Documents release changes.
package.json Bumps package version.
package-lock.json Synchronizes lockfile version.
src/actions.ts Records rejected-move undo state.
src/blobs.js Adjusts dialog stacking.
src/html_builder.ts Restyles confidence cards.
src/index.js Implements interaction and rendering changes.
src/subtask.ts Types hover state.
src/version.js Updates runtime version.
tests/e2e/basic-functionality.spec.js Tests hover and confidence UI.
tests/e2e/bitmask.spec.js Tests bitmask movement and history.
tests/e2e/keybind-functionality.spec.js Tests shift-hover polygon layers.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/index.js Outdated
Comment thread src/index.js Outdated
Comment thread src/index.js

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/index.js:3473

  • Annotation IDs are only unique within a subtask, so comparing only the current hover ID can outline an inactive annotation that happens to have the same ID when all subtasks are redrawn. Also verify that the drawn annotation object belongs to the current subtask.
        return this.subtasks[subtask_key]["state"]["hovered_annid"] === annotation_object["id"];

src/index.js:5913

  • At non-integer zoom levels, recording the raw delta makes undo asymmetric with ULabelMask.translate rounding: for example, 0.5 moves one pixel, while the recorded -0.5 undo rounds to zero. Translate and record the already-rounded displacement so valid bitmask moves always round-trip.
            this.translate_bitmask(annotation, diffX, diffY);

@TrevorBurgoyne TrevorBurgoyne added bug Something isn't working enhancement New feature or request labels Aug 18, 2026
@TrevorBurgoyne
TrevorBurgoyne merged commit 17c9918 into main Aug 18, 2026
4 checks passed
@TrevorBurgoyne
TrevorBurgoyne deleted the feature/ui-polish branch August 18, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants