Stories: GEV scenes as stories on the live globe

A Stories button (top right) opens Explore: a feed of GEV scenes over
GEV's own Cesium globe, with a pin per story. Explore opens at country
level over the first story and, while idle, flies on from story to story
for a minute. A picked story is framed in the middle of the view; a pin
plays its story on a second click. The Story page plays the scene through
SceneDirector with a timeline, chapters, key moments, sources and
background, then Close (or Back) puts the person's camera, clock, layers,
style and AUTHORING selection back. Open in GEV hands the scene to the
Scenes panel at its current shot.

Stories lists the scenes GEV ships with a camera path (while they are in
the project), the scenes saved with SAVE TO STORIES in AUTHORING, and the
person's other scenes as drafts. The person's own stories live in the
project on this device, so they have no Share; a link to a story that is
not here opens Explore and says so. Each shipped story's
context comes from what GEV knows: what it shows, the place each shot goes,
and each layer's data sources as DATA_SOURCES.md lists them; the Nepal
story carries the event pack's facts and CC BY-NC sources. Card images are
a captured THUMBNAIL or drawn from the keyless Esri World Imagery.

AUTHORING has no scene picker: it starts with no scene, NEW SCENE (or
CAPTURE SHOT) makes one, and Stories' Open in GEV selects one. Before SAVE
TO STORIES it offers topic tags and THUMBNAIL. A scene's stories flag,
storyThumb and storyTags are saved with the project and kept through
export and import.

Only the closed state loads with the page; the screens, styles, story data
and controller load on first open. Stories keeps its place in the query
(one history entry per screen) and holds the share link's hash writes
while open. Keyboard input and voice tools stay with Stories while it is
open. Explore's pins move on every drawn frame without asking for frames;
the idle tour and tile settling are bounded.

All strings are translated in the 13 locales.
This commit is contained in:
Manjunath committed 2026-11-16 20:12:10 +05:30
1 parent da81cf743b
commit 5418438339
77 files changed
+14975 -260

No files matched your search

+154 -8
View File
@@ -658,6 +658,106 @@ owner (open state, filters, the rows they show, Remove all) and the text
helpers the view renders, so every label follows the locale. Only the modal
open/close and focus moves are imperative.
## Stories — November 13, 2026
A Stories button (top right, `#hStories`) opens Explore: a feed of stories
over GEV's own Cesium globe with their pins, then a Story screen with a
timeline, chapters and context. Every GEV page loads only what the
closed state needs: the boot shell (`src/stories/boot.js`), the store,
`StoriesView.vue` with the Stories button, first-visit popup and
back-to-story toast, and their styles (`stories-entry.css`). The screens
(`ExploreScreen.vue`, `StoryScreen.vue` and their parts), their styles
(`stories.css`), the story data (`storyMeta.js`, `catalog.js`) and the
controller are separate chunks fetched together on first open, on a
`?stories=` / `?story=` link, or on Back or Forward into Stories; a failed
fetch is reported and the next attempt tries again. Stories keeps its place
in the query, not the share-state hash, with one history entry per screen;
Close steps back over those entries, so Back afterwards does not reopen it,
and share links carry only the Stories place (`stories` / `story`), not the
sender's camera, layers or other settings. GEV's share link keeps
`history.state` when it rewrites the hash, so Stories' entries survive.
Every story is a GEV scene, played on the person's own Cesium globe through
`SceneDirector`, with its labels, embedded media, A/B imagery split (marked
`data-globe-overlay`) and data-pack cards kept while the rest of GEV is
hidden. Explore lists the scenes the person saved to Stories from AUTHORING
first (`SceneDirector.storyScenes()`, refreshed on every `stories-changed`),
then the person's other scenes with a shot as drafts
(`SceneDirector.draftScenes()`, marked DRAFT), then the
scenes GEV ships with a camera path while they are in the project
(`SceneDirector.hasScene`). A saved scene brings the card image and topics
picked for it in AUTHORING; the topic chips use AUTHORING's tag names and
order. Explore opens at country level
(2,500 km) over the first story and, while idle, flies on to the next story
every few seconds, for a minute after the last touch (never with a story
picked or with reduced motion). A picked story's place is framed in the
middle of the view at an angle. After each landing the globe keeps drawing
only until its tiles have loaded (at most 10 s). Each story's pin, in the
world overlay's label style (`src/overlays/worldOverlayTokens.js`), is placed
from Cesium's own projection on every drawn frame, written straight to the
pin's transform, and hidden behind the globe; the pins ask for no frames of
their own. Card images are drawn from the keyless Esri World Imagery tiles
around the story's place (`src/stories/thumbs.js`) unless the scene has its
own; with any other base imagery the card shows its placeholder, and a card
drawn from Esri earlier is dropped. A shot
tied to an anchor rather than a place pins the whole-globe view.
A shipped story's context comes from what GEV knows about it
(`src/stories/catalog.js`): what it shows, the place each shot goes, and,
for each layer it turns on, what the layer shows and the data sources
DATA_SOURCES.md lists for it. The Nepal story carries the event pack's own
facts and sources (Vantor imagery and the GeoPera reconstruction, CC BY-NC
4.0), and its key moments are the chapters that show them. Topic chips and
region choices are the ones the listed stories carry. Closing Stories after
a story played puts AUTHORING's own selection back (usually none);
Open in GEV leaves the story's scene selected there.
Opening Stories claims the camera through the shared navigation policy, so
orbit, a tracked contact or a flight end, and Cockpit refuses with the
policy's own toast ("Exit cockpit to open Stories"). Those owners are not
started again on Close: the camera and clock come back, a follow or orbit
does not. While Stories is open it owns the keyboard (`src/stories/keyboard.js`):
a key pressed in Stories stops at its root, and a key pressed anywhere else
stops at the window, so none of GEV's document-level shortcuts act behind it,
except on a playing GEV scene's own on-globe controls (`data-globe-overlay`);
the capture-phase listeners (hold Space to talk, a surface's Tab trap, the
wildlife card's Escape) check `body.stories-mode` themselves. Voice tool calls
are refused while `stories-mode` is set ("Close Stories first").
The address bar names only the story while Stories is open: the share link
holds its hash writes (`ShareLinkManager.holdWrites`, which first writes a
change still waiting for its debounce, so the view Stories saves is current).
Close works in this order. Stories' screens go and GEV is back on screen, but
`stories-mode` (keyboard guard, voice refusal) stays. The director is waited
on until idle (`SceneDirector.whenIdle`: no run and no pending LOAD, seek or
interaction; at most 15 s). The camera and clock are put back, unless a
camera owner took over during the wait (a drag on the globe, a layer's
focus). History steps back over Stories' entries; once that lands (or after
2 s if it never does), the saved share state is re-applied directly
(`ShareLinkManager.restore`, since the share link skips a hash it already
knows) and the share link writes the live view again. Back out of Stories
re-applies it the same way, and Back to Explore from a story re-applies it
once the scene has torn down, with the address still naming only Stories.
"Open in GEV" (GEV scene stories only) closes the
same way but keeps the place and look: nothing is put back, the scene and its
current shot are selected (`SceneDirector.selectShot`) and the Scenes panel
opens for authoring; Back then goes to the page before Stories. A Close or
open made while a traversal is landing runs once it has landed; a second Back
to Explore is ignored. Reopening Stories while a closed GEV scene is still
tearing down keeps the view from before Stories as the one Close restores.
Inside an inline embed Stories is not offered: the URL and history are the
host's.
The Stories button sits left of whatever holds GEV's top-right corner: the
ACTIVE STYLE readout, or GEV Hosted's account avatar. The first-visit popup
is a labelled region that does not take focus. The story page's rail offers
Open in GEV and Share only. A scene of the person's own (saved or draft)
shows as theirs ("You") and has no Share: the project lives on this device,
so a link to it would open nothing elsewhere; a link to a story that is not
here opens Explore and says so. GEV's own credit line stays on screen throughout, inside the
Stories map while a scene plays (`creditPlacement` in
`src/stories/format.js`).
## Utilities panel — October 29, 2026
UTILITIES is its own left-side panel, between Data Layers and Scenes, with
@@ -1271,7 +1371,7 @@ Native `<select>` controls declare a dark colour scheme and explicit option
colours, so the browser-painted option list matches the panel it drops out of.
The scheme is declared on the controls rather than on the document root, so
hand-tuned scrollbar and text-input skins are unchanged. Applies to the HUD
layout, Authoring, CCTV camera, Radio filter and Draw colour menus.
layout, CCTV camera, Radio filter and Draw colour menus.
Vessel snapshot completeness is separate from freshness. A current snapshot with
rejected or duplicate records shows PARTIAL with accepted/received counts; stale
@@ -2158,14 +2258,60 @@ native double-click rename. Replacing rows revokes their old listeners. Disposal
late file and failed-action completions cannot update removed presentation.
The panel is titled Authoring and is laid out in four labelled steps: SCENE
(picker on its own row, NEW SCENE, DELETE), SHOTS (+ CAPTURE SHOT, UPDATE SHOT,
the numbered shot list and a select/rename hint), PREVIEW (PLAY, STOP, NEXT) and
SAVE & SHARE (EXPORT, IMPORT, RUN LOG, then the EDIT DETAILS / SHARE SCENE row).
(the name of the scene being edited, read-only on its own row, or "No scene
yet"; then NEW SCENE and DELETE), SHOTS (+ CAPTURE SHOT, UPDATE SHOT, the
numbered shot list and a select/rename hint), PREVIEW (PLAY, STOP, NEXT) and
SAVE & SHARE (a row of Stories tag chips; the thumbnail preview, CAPTURE
THUMBNAIL and SAVE TO STORIES on one row; then EXPORT, IMPORT, RUN LOG, then
the EDIT DETAILS / SHARE SCENE row). There is no scene picker, and on load no
scene is selected: the panel reads "No scene yet" with an empty shot list. The
built-in scenes stay in the project, where Stories plays them, but are never
selected on their own. A scene becomes current through NEW SCENE, through
CAPTURE SHOT with no scene (which asks for a name as NEW SCENE does, creates
the scene and captures into it; the director's `captureShot()` names it
"Scene N" itself), or when it is selected elsewhere (Stories' "Open in GEV"
calls `SceneDirector.selectShot`), and the name follows that selection.
Deleting the current scene goes back to no scene. An IMPORT keeps the scene
being edited when the file still has it, else selects the file's first scene
that is not a built-in one, else none. Playback still moves the selection to
the shot it plays, as before.
SAVE TO STORIES marks the scene as published to the Stories page and then reads
REMOVE FROM STORIES, which clears the mark; the status line confirms either.
The mark is the scene's `stories: true` field, saved with the project and kept
through reload, EXPORT and IMPORT; projects without it load unchanged. The
director's `setSceneInStories(sceneId, on)` sets or clears it (refusing a scene
without shots) and `storyScenes()` lists the marked scenes that have shots, in
project order, as `{ id, title, camera, shotCount, thumb, tags }` with the
first shot's camera. Every change to that list (the mark, a scene or its last
shot deleted, a shot captured into a marked scene or its first shot updated, a
marked scene's thumbnail or tags changed, an import) publishes
`stories-changed`.
Deleting a marked scene's last shot clears its mark.
THUMBNAIL keeps the globe as it is drawn now as the scene's Stories
card image: it requests a render and reads the Cesium canvas inside that
frame's `postRender` (the WebGL canvas does not preserve its drawing buffer),
centre-crops it to 16:9, scales it to 320 × 180 and stores a JPEG data URL
(quality 0.82, lowered only if the image would pass the limit) as the scene's
`storyThumb`, shown as a 64 × 36 preview beside the button; the status line
reads "Thumbnail captured". The tag chips (Floods, Wildfires, Storms,
Earthquakes, Flights, Maritime, Space, Conflict, Infrastructure, Climate,
from `STORY_TAGS` in `src/scenes/storyTags.js`, shown translated) are toggle
buttons with `aria-pressed`; a scene keeps up to five as `storyTags` (English
keys), and once it has five the other chips are disabled. Both fields are
optional and validated by the scene document (`storyThumb` a base64 JPEG or
PNG data URL of at most 300,000 characters, the one text allowed past the
usual 65,536 characters; `storyTags` up to five different keys from `STORY_TAGS`), and
are kept through save, reload, EXPORT, IMPORT and the shared scene JSON. Share
links never carry scene documents, so neither reaches a URL. `storyScenes()`
reports them as `thumb` (`''` when none was captured) and `tags`.
Every button in the step rows has a tooltip, and the status line is a polite
live region. Outside playback a button that would do nothing is disabled:
DELETE and CAPTURE SHOT without a scene, UPDATE SHOT without a selected shot,
PLAY and NEXT when no scene in the project has a shot (both continue into the
following scenes). During playback the authoring and file actions stay disabled
DELETE, THUMBNAIL, the tag chips and SAVE TO STORIES without a scene,
UPDATE SHOT without a selected shot, SAVE TO STORIES when the scene has no
shots, PLAY and NEXT without a scene or when no scene in the project has a shot
(both continue into the following scenes), EDIT DETAILS without a selected shot
and SHARE SCENE without a scene. EXPORT stays available, since it writes the
whole project. During playback the authoring and file actions stay disabled
and STOP is enabled, as before; RUN LOG follows the last run, and EDIT DETAILS /
SHARE SCENE keep their own checks. PLAY uses the `scene|PLAY` catalog entry,
apart from the radio's PLAY.
@@ -8925,7 +9071,7 @@ when their footprints touch or contain one another, never across a seam toleranc
### Shared native dropdowns and numeric fields
- Scene and CCTV selects share the default `gev-field` surface. HUD layout
- CCTV selects use the default `gev-field` surface. HUD layout
retains compact density; Draw's colour is a row of swatches, not a select. Radio filter, tuner gain and FM frequency
use the same base while retaining their feature-specific skins and layout.
- The CCTV inline number editor is rendered by its pose chip component with