feat(ui): image map live refresh, status footer, hover thumbnails - #41
Open
lstein wants to merge 1 commit into
Open
feat(ui): image map live refresh, status footer, hover thumbnails#41lstein wants to merge 1 commit into
lstein wants to merge 1 commit into
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-07-marker-zoom
branch
2 times, most recently
from
August 3, 2026 01:38
3a5662d to
84be196
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-07-marker-zoom
branch
from
August 3, 2026 02:26
84be196 to
7960b81
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
from
August 3, 2026 02:26
bf26409 to
0015963
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 3, 2026 18:19
7960b81 to
f15c9c5
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
from
August 3, 2026 18:20
0015963 to
32b12f4
Compare
lstein
marked this pull request as ready for review
August 3, 2026 18:28
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 4, 2026 01:43
f15c9c5 to
e55f4db
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-07-marker-zoom
branch
from
August 4, 2026 05:37
e55f4db to
3545b1f
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-07-marker-zoom
branch
2 times, most recently
from
August 4, 2026 22:32
343998e to
cc30d46
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
2 times, most recently
from
August 5, 2026 00:31
c47f5ae to
e239eca
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 5, 2026 00:31
cc30d46 to
16273bb
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
from
August 5, 2026 00:38
e239eca to
78b62a5
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 5, 2026 00:38
16273bb to
aae9670
Compare
lstein
force-pushed
the
feat/image-map-08-live-theme
branch
from
August 5, 2026 01:18
78b62a5 to
a43f464
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 5, 2026 01:18
aae9670 to
640ce5a
Compare
- Socket-driven refresh replaces polling: an `image_map_projection_ready` event (routed by the backend to the owning user) or a socket reconnect refetches the point set — but only once the widget has loaded the map, so users who never open it pay nothing. Contracts for the two new backend events are added to the typed socket event map. - New widget footer: point count, an "updating…" hint while the served projection is stale, embedding-index progress (admins are the only recipients of those events), and a manual refresh button. - Hover previews: dwelling on a point for 150ms shows its thumbnail beside the cursor (PhotoMapAI behavior). Thumbnail URLs are cached per session — unlike full DTOs they derive from the immutable image name. The plot needs no explicit theming work: its background is transparent and axes are hidden, so it inherits every workbench theme for free. Amended during the rebase onto the re-architected webv2: - The socket event contracts moved out of the deleted shared event map (`workbench/backend/events.ts`): the two image-map events are domain contracts, so they now live in `workbench/image-map/events.ts` as plain interfaces (the queue feature's `data/events.ts` is not a public queue module, and `socketHub.on` is stringly-typed, so no shared map is needed). The hub itself is imported from `@platform/transport/socketHub` (same on/onConnectionChange surface as the old workbench hub). - The data runtime moved to main's host slot: `hasHost: true` on the eager manifest with `host: ImageMapDataRuntime` returned from the deferred implementation (queue/workflow pattern); the component wraps `attachImageMapDataRuntime` in `useMountEffect`. The footer likewise ships through the implementation's `footer` slot instead of the old single-manifest module. - The thumbnail cache resolves names through the gallery feature's public interface (`galleryImages.resolveMany`) instead of the deleted `workbench/gallery/api`; the footer's IconButton/Tooltip come from `@platform/ui`, and `WidgetViewProps` from `@workbench/widgetContracts`. - The runtime test mocks `@platform/transport/socketHub` at its new path; the store and its tests were otherwise untouched by the move. - Performance baselines recaptured (build + browser, browser verified passing twice): mounting the singleton host at editor boot fetches the image-map implementation chunk on every editor route (+2 script requests, editor owned bytes +34 for the eager `hasHost` flag). Plotly itself stays behind the lazy plot import and no map data is fetched at boot — the runtime only refreshes a map the user has already opened. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Review fix: the thumbnail cache and index-count state are account-owned resources — cleared on account invalidation, with scope-guarded caching.
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 5, 2026 01:21
640ce5a to
d36dbbb
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 8 of the Image Map stack:
image_map_projection_ready(routed by the backend to the owning user) or a socket reconnect refetches the points — but only once the widget has loaded the map, so users who never open it pay nothing. A refresh requested mid-flight is queued and runs when the current fetch settles (the projection-ready-during-initial-GET window is exactly when the event matters most). Typed contracts for both new events are added to the socket event map.An adversarial review covering this diff was run; its findings (swallowed mid-flight refresh, hover race) are fixed above. Accepted trade-offs it confirmed: after first load, projection-ready events refetch for the session even with the widget closed (host runtimes are always mounted; admin scope makes any user's activity relevant); the thumbnail-URL cache grows by name→string entries only.
Testing
Runtime attach/detach with mocked socketHub (gating on load state, reconnect refresh, index-count storage), store chaining semantics. Full suite green at the stack top.
🤖 Generated with Claude Code