-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Bug Description
On the Manage Columns page, entering Extend Column mode (checking the checkbox) permanently removes all annotation overlay box click listeners. Users cannot select any lines on the image — not during Extend mode, and not after unchecking it.
This also affects Merge Column mode for the same reason, though merge mode doesn't require clicking annotations so it's less visible there.
Steps to Reproduce
- Navigate to a project's Manage Columns page with annotation lines visible
- Verify you can click annotation overlay boxes (they highlight and show selection numbers)
- Check the Extend Column checkbox
- Try to click annotation overlay boxes — they no longer respond to clicks
- Uncheck the Extend Column checkbox
- Try to click annotation overlay boxes again — still no response
Expected Behavior
- Annotation overlay boxes should remain clickable in Extend mode (users need to select annotations to add to a column)
- After exiting Extend/Merge mode, annotation click behavior should be fully restored
Root Cause
PR #499 consolidated the old workspaceCleanup registry (for workspace buttons) into renderCleanup (which also manages annotation box listeners). When extendColumn() or mergeColumns() calls this.renderCleanup.run() to clear workspace buttons, it also removes all annotation box click listeners registered by renderAnnotations().
The old components/create-column/index.js used three separate registries to avoid this:
cleanup— persistent listeners (window, document, eventDispatcher)renderCleanup— annotation overlay box listenersworkspaceCleanup— workspace button listeners
The refactored interfaces/manage-columns/index.js only uses two (cleanup and renderCleanup), mixing annotation and workspace concerns.
Relevant code (interfaces/manage-columns/index.js):
extendColumn() {
this.renderCleanup.run() // ← Removes ALL renderCleanup listeners, including annotation boxes
// ... creates workspace buttons also via this.renderCleanup
}Suggested Fix
Reintroduce workspaceCleanup as a separate CleanupRegistry for workspace-specific listeners:
- Add
workspaceCleanup = new CleanupRegistry()class field - In
extendColumn()andmergeColumns(), replacethis.renderCleanup.run()withthis.workspaceCleanup.run() - Register workspace buttons on
this.workspaceCleanupinstead ofthis.renderCleanup - Add
this.workspaceCleanup.run()todisconnectedCallback()
Context
- Branch:
346-column-refresh-refactor - PR: Enable in-place column sync, caching & reload #499
- Introduced by: Consolidation of
workspaceCleanupintorenderCleanupduring refactor - Confirmed by: Manual testing — lines are unselectable after toggling extend mode