Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
bc34626
copilot instructions
TrevorBurgoyne Aug 13, 2025
0c14ddb
Fix zero-len polylines
TrevorBurgoyne Aug 13, 2025
fb6f2d3
Start actions refactor
TrevorBurgoyne Aug 13, 2025
ccecf73
Move undo/redo to actions file
TrevorBurgoyne Aug 13, 2025
d58f517
add first action listener
TrevorBurgoyne Aug 13, 2025
38ff212
Move annotation id out of undo/redo payloads. Verified that all undo/…
TrevorBurgoyne Aug 14, 2025
d55de30
Separate out begin vs continue edit
TrevorBurgoyne Aug 14, 2025
cdbcfda
same for move actions
TrevorBurgoyne Aug 14, 2025
97b5a66
update during move/edit
TrevorBurgoyne Aug 14, 2025
831c5c1
Add continue_annotation
TrevorBurgoyne Aug 14, 2025
d85d9e5
Refactor suggest_edits to be the main controller of dialog visibility
TrevorBurgoyne Aug 14, 2025
3091ec6
add finish annotation
TrevorBurgoyne Aug 14, 2025
abbf3ae
add deletion handle
TrevorBurgoyne Aug 15, 2025
8cfc9ab
Fix docstrings
TrevorBurgoyne Aug 18, 2025
e51c94d
Rmv redundant calls for finish annotation
TrevorBurgoyne Aug 18, 2025
324b710
handler for id change
TrevorBurgoyne Aug 18, 2025
6bff442
Fix non-recorded actions clearing undo stack
TrevorBurgoyne Aug 18, 2025
c1077af
Rmv redundant delete calls
TrevorBurgoyne Aug 18, 2025
4ca31e5
Start anno listener, and fix duplicate redo listener triggers
TrevorBurgoyne Aug 18, 2025
2c964fa
Listen for create annotation
TrevorBurgoyne Aug 18, 2025
1469cc9
refactor undo/redo
TrevorBurgoyne Aug 18, 2025
48ddd73
Dont use begin annotation for point create keybind
TrevorBurgoyne Aug 18, 2025
1632a21
Fix edits
TrevorBurgoyne Aug 18, 2025
f143d84
listen to non-spatial annotation creation, and fix some bugs related …
TrevorBurgoyne Aug 18, 2025
2198c76
add cancel and complex polygon start listeners
TrevorBurgoyne Aug 19, 2025
ca3fa1b
fix finish complex undo/redo, and start listening for begin brush
TrevorBurgoyne Aug 19, 2025
ee6caa1
listen for continue brush and fix undo
TrevorBurgoyne Aug 19, 2025
74515d9
handle internal polygon action undos
TrevorBurgoyne Aug 19, 2025
c21245a
remove redundant draws for polygon layer merging
TrevorBurgoyne Aug 19, 2025
2021fa0
fix edit bugs, ie not rendering polygon merge
TrevorBurgoyne Aug 19, 2025
9517dec
fix edit undo/redo bugs by replacing whole annotation
TrevorBurgoyne Aug 19, 2025
a8423b5
fix move polyline tweaking during filter
TrevorBurgoyne Aug 19, 2025
662a538
Finally actually add lineage tracking, and fix bug with resume_from n…
TrevorBurgoyne Aug 19, 2025
6c74c18
clean up logging
TrevorBurgoyne Aug 19, 2025
335f695
Bump version and rebuild.
TrevorBurgoyne Aug 19, 2025
2cefdc4
update docs
TrevorBurgoyne Aug 19, 2025
79ab3da
Don't init loaded annotations with the current time
TrevorBurgoyne Sep 8, 2025
ef87dd0
refactor action listeners
TrevorBurgoyne Sep 8, 2025
cf27c19
build
TrevorBurgoyne Sep 10, 2025
e4f6350
use log message instead of console.error
TrevorBurgoyne Oct 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## General Instructions
- Keep it simple.
- Work in small, incremental changes.
- Whenever you run a command in the terminal, pipe the output to a file, output.txt, that you can read from. Make sure to overwrite each time so that it doesn't grow too big. There is a bug in the current version of Copilot that causes it to not read the output of commands correctly. This workaround allows you to read the output from the temporary file instead.
- Ensure changes pass linting checks by running `npm run lint` and waiting for it to complete. Read the linting errors and resolve them manually.
- Ensure changes build successfully by running `npm run build`.
- Do not add new dependencies unless given explicit permission.
- Do not modify the `package.json` or `package-lock.json` files unless instructed.


## Task Tracking
- Always start each step by referencing and updating your tasks in `.github/tasks.md`.
- Use checkboxes to track progress.
- Work on one task at a time.
- Do not mark tasks as complete until they are fully done. Ask for confirmation if unsure.
5 changes: 5 additions & 0 deletions .github/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Tasks
- [x] Read the discussion in [#209](https://github.com/SenteraLLC/ulabel/issues/209) and understand the requirements.
- [x] Implement the fix requested in [#209](https://github.com/SenteraLLC/ulabel/issues/209).
- [x] Build the fix and ensure the build succeeds by running `npm run build`.
- [x] Receive confirmation that the fix works as expected.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
ulabel_local/py-dbapi/dbapi/__pycache__
build
build/*
build/*
output.txt
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ All notable changes to this project will be documented here.

Nothing yet.

## [0.19.0] - Aug 19th, 2025

- Add minimal lineage tracking via `last_edited_by` and `last_edited_at` annotation fields
- Prevent creation of zero-length polylines
- Fixed `process_resume_from` not actually populating missing annotation fields on load
- Misc bug/QOL fixes
- Simplified/fixed non-spatial annotation creation/deletion
- Replaced `alert`, `throw`, and `console` calls with `log_message()`
- Cleanup of `suggest_edits()` and other functions related to toggling dialogs
- Refactor action stream management and undo/redo flow into `actions.ts`
- Move a lot of repeated rendering/cleanup steps after actions into general action listeners that trigger on similar actions
- Move `annotation_id` out of undo/redo payloads and into the action itself

## [0.18.2] - July 28th, 2025

- Fix special characters in submit buttons breaking tool
Expand Down
19 changes: 14 additions & 5 deletions api_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,24 @@ As you can see, each subtask will have a corresponding list of annotation object

// timestamp when annotation was created
"created_at": "<ISO datetime string>",

// the username associated with the most recent modification to the annotation
"last_edited_by": "<string>",

// timestamp of the most recent modification to the annotation
"last_edited_at": "<ISO datetime string>",

// true if annotation was deleted
"deprecated": <bool>,
"deprecated": "<bool>",

// indicates what/who deprecated the annotation, eg { human: false }
"deprecated_by": "<object>",

// which type of annotation
"spatial_type": "<string>",

// (nullable) e.g. [[x1, y1], [x2, y2], ...]
"spatial_payload": <array>,
"spatial_payload": "<array>",

// The class associated with the annotation
"classification_payloads": [
Expand All @@ -186,16 +195,16 @@ As you can see, each subtask will have a corresponding list of annotation object
],

// size in underlying image pixels
"line_size": <number>,
"line_size": "<number>",

// (nullable) frame ann was created for
"frame": <int>,
"frame": "<int>",

// certain spatial types allow text
"text_payload": "<string>",

// as provided to constructor
"annotation_meta": <object>
"annotation_meta": "<object>"
}
```

Expand Down
2 changes: 1 addition & 1 deletion demo/multi-class.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"toggle_brush_mode_keybind": "f",
"create_bbox_on_initial_crop": "|",
"click_and_drag_poly_annotations": false,
"anno_scaling_mode": "match-zoom",
"anno_scaling_mode": "fixed",
"allow_annotations_outside_image": false,
});
// Wait for ULabel instance to finish initialization
Expand Down
18 changes: 9 additions & 9 deletions demo/resume-from.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,29 @@
"spatial_type": "point",
"spatial_payload": [[300, 300]],
"classification_payloads": [
{"id": "c72ea9a1-79f9-444c-a01a-7983f0697b4a", "class_id": 12, "confidence": 0.0},
{"id": "c72ea9a1-79f9-444c-a01a-7983f0697b4a", "class_id": 11, "confidence": 1.0},
{"id": "c72ea9a1-79f9-444c-a01a-7983f0697b4a", "class_id": 10, "confidence": 0.0},
{"class_id": 12, "confidence": 0.0},
{"class_id": 11, "confidence": 1.0},
{"class_id": 10, "confidence": 0.0},
],
"line_width": 4
"line_size": 4
},
{
"id": "4a586dc4-0efa-4563-a42b-8eea3dd5b04b",
"spatial_type": "point",
"spatial_payload": [[400, 300]],
"classification_payloads": [
{"id": "c72ea9a1-79f9-444c-a01a-7983f0697b4a", "class_id": 10}
{"class_id": 10, "confidence": 1.0},
],
"line_width": 4
"line_size": 4
},
{
"id": "4a686dc4-0efa-4563-a42b-8eea3dd5b04b",
"spatial_type": "point",
"spatial_payload": [[300, 400]],
"classification_payloads": [
{"id": "c72ea9a1-79f9-444c-a01a-7983f0697b4a", "class_id": 12}
{"class_id": 12, "confidence": 1.0},
],
"line_width": 4
"line_size": 4
},
{
"id": "4a186dc4-0efa-4563-a42b-8eea3dd5b04b",
Expand Down Expand Up @@ -105,7 +105,7 @@
]
],
"classification_payloads": [
{"id": "c72ea9a1-79f9-444c-a01a-7983f0697b4a", "class_id": 11},
{"class_id": 11, "confidence": 1.0},
{"class_id": -1, "confidence": 0.0}
],
},
Expand Down
2 changes: 1 addition & 1 deletion dist/ulabel.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/ulabel.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ object-assign
and limitations under the License.
***************************************************************************** */

/*! For license information please see ulabel.js.LICENSE.txt */

Comment on lines +71 to +72
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this referring to itself?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah idk how this got added

Copy link
Member Author

Choose a reason for hiding this comment

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

looks like its getting auto inserted by the build and I dont feel like tracking down why rn lol

/**
* splaytree v3.1.2
* Fast Splay tree for Node and browser
Expand Down
2 changes: 1 addition & 1 deletion dist/ulabel.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/ulabel.min.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ object-assign
and limitations under the License.
***************************************************************************** */

/*! For license information please see ulabel.js.LICENSE.txt */

/**
* splaytree v3.1.2
* Fast Splay tree for Node and browser
Expand Down
Loading