feat(ui): image map cluster selection mode - #42
Open
lstein wants to merge 1 commit into
Open
Conversation
lstein
marked this pull request as draft
August 2, 2026 22:24
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
from
August 2, 2026 22:38
aa21512 to
32045e9
Compare
lstein
force-pushed
the
feat/image-map-09-cluster-select
branch
from
August 2, 2026 22:38
3990b04 to
5784c6a
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
from
August 3, 2026 01:38
32045e9 to
bf26409
Compare
lstein
force-pushed
the
feat/image-map-09-cluster-select
branch
2 times, most recently
from
August 3, 2026 02:26
1966859 to
238768f
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
2 times, most recently
from
August 3, 2026 18:20
0015963 to
32b12f4
Compare
lstein
force-pushed
the
feat/image-map-09-cluster-select
branch
from
August 3, 2026 18:21
238768f to
0fca217
Compare
lstein
marked this pull request as ready for review
August 3, 2026 18:28
lstein
force-pushed
the
feat/image-map-09-cluster-select
branch
from
August 4, 2026 01:43
0fca217 to
f204e11
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
from
August 4, 2026 01:43
32b12f4 to
2d68eb8
Compare
lstein
force-pushed
the
feat/image-map-09-cluster-select
branch
from
August 4, 2026 05:37
f204e11 to
d0c4e2e
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
2 times, most recently
from
August 4, 2026 14:58
312156e to
8a2e9a2
Compare
lstein
force-pushed
the
feat/image-map-09-cluster-select
branch
from
August 4, 2026 14:58
d0c4e2e to
6c2d8df
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
from
August 4, 2026 22:32
8a2e9a2 to
c47f5ae
Compare
lstein
force-pushed
the
feat/image-map-09-cluster-select
branch
from
August 4, 2026 22:32
6c2d8df to
a423504
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
from
August 5, 2026 00:31
c47f5ae to
e239eca
Compare
lstein
force-pushed
the
feat/image-map-09-cluster-select
branch
2 times, most recently
from
August 5, 2026 00:38
3374c16 to
ce5c18d
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
2 times, most recently
from
August 5, 2026 01:18
78b62a5 to
a43f464
Compare
lstein
force-pushed
the
feat/image-map-09-cluster-select
branch
from
August 5, 2026 01:18
ce5c18d to
69fa638
Compare
Adds PhotoMapAI's cluster-click behavior as an opt-in mode:
- A header toggle (persisted in the widget's values) switches map clicks
between selecting one image and selecting the clicked point's whole
DBSCAN cluster.
- Cluster clicks multi-select the cluster in the gallery via
setGalleryMultiSelection, ordered by distance from the clicked point
(proximity ordering) and capped at 5000 members; the clicked image
becomes the primary selection, so Preview follows it. Noise points fall
back to single selection.
- The gallery's multi-selection renders on the map as a "Highlighted
Points" trace — larger, white-outlined, between the base points and the
gold current-image marker — regardless of where the selection was made.
Amended during the rebase onto the re-architected webv2:
- The header toggle ships through the widget implementation's
`headerActions` slot (the old single-manifest index.ts is gone) and
patches its persisted value via `useWorkbenchCommands().widgets
.patchValues('image-map', ...)` instead of dispatching
`patchWidgetValues`; IconButton/Tooltip come from `@platform/ui` and
`WidgetViewProps` from `@workbench/widgetContracts`.
- Cluster clicks now go through `useWorkbenchCommands().gallery
.setItemMultiSelection(itemKeys, primaryItem)`: the ordered names are
wrapped as kind-tagged keys with `toGalleryItemKey({ kind: 'image',
name })` (map points are always images) and the clicked image is
hydrated through `galleryImages.resolveMany` +
`legacyGeneratedImageToGalleryItem`, sharing the single-select path's
monotonic click sequence. Single select (the plain-click clear) is
unchanged: `gallery.selectItem` already collapses the multi-selection.
- The highlight overlay reads the persisted selection with
`getPersistedSelectedGalleryItemKeys` and parses the kind-tagged keys
back to bare image names (`parseGalleryItemKey`, images only) — on this
architecture `selectedImageNames` stores GalleryItemKeys, not names.
- Performance baselines recaptured (build + browser, browser verified
passing twice): the image-map implementation chunk loads at editor boot
via the singleton host, so the header toggle and cluster wiring grow
editor owned bytes by 65 (launchpad owned -3 minifier drift).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lstein
force-pushed
the
feat/image-map-09-cluster-select
branch
from
August 5, 2026 01:21
69fa638 to
f717ca1
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
from
August 5, 2026 01:21
a43f464 to
311ecaa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR 9 of the Image Map stack — PhotoMapAI's cluster-click behavior:
setGalleryMultiSelectionwith the members ordered by distance from the click (proximity ordering, capped at 5000); the clicked image becomes primary so Preview follows. Noise points fall back to single selection.hoverinfo: 'skip'so it never shadows the base points.Known accepted gap (also noted in the floating-windows PR): floating windows render widgets without header/footer chrome, so the mode toggle is only reachable while docked.
Testing
Cluster collection (proximity order, noise/unknown handling, cap keeps nearest incl. the clicked point), highlight trace builder (multi-only, outline), full suite + lint + build green at the stack top.
🤖 Generated with Claude Code