# Vue migration The application UI moves from static templates plus imperative DOM wiring to Vue 3 components with Pinia stores. The migration keeps the experience the same: element ids, classes, the global stylesheet, translations, keyboard shortcuts, voice actions, share links and the phone layout all behave as before. The one intended change is the panel rail described below. ## Goals - Views are Vue single-file components; state that several views read lives in Pinia stores rather than in DOM classes. - The owners listed in [UI-OWNERSHIP.md](UI-OWNERSHIP.md) keep their responsibilities. A component replaces DOM construction; it does not add a second owner of the same state. - Public methods used by layers, scene playback, voice and host applications (`setPanelCollapsed`, `setContextMode`, `setStyle`, share and location subscriptions) keep their signatures. - Ids and classes used by browser QA and host applications stay stable until a host can use an explicit extension point instead. ## The panel rail Each desktop sidebar gets a floating icon rail that lists every panel available on that side. Selecting an icon opens that panel; selecting it again closes it. One panel is open per side at a time, so the rail replaces the accordion stacking. Panels that are not available in the current mode (for example Weather before a weather layer is active) are shown disabled or omitted as the panel's own availability rule dictates. The rail hides with the rest of the chrome in Cockpit, scene playback, recording and the clean view. Phones keep the existing bottom tab bar and sheets; the rail is desktop only. Voice and keyboard openings go through the same panel store, so they follow the one-panel rule too. Share links continue to record which panels are open. ## Component kit `src/ui/kit/` holds the generic components: `UiRail`, `UiTooltip`, `UiIcon`, `UiButton`, `UiCloseButton`, `UiPanel`, `UiPanelToggle` (a panel's collapse button, which `UiPanel` and `PanelCollapseButton` draw), `UiPanelEdge` (a panel header's edge switch), `UiSegmented`, `UiSlider`, `UiChip`, `UiSelect`, `UiSearchField`, `UiCheckbox`, `UiDialog`, `UiBadge` and `UiEmpty` so far, with more joining as the controls they serve are converted. One component serves every use of a control, with props for the differences (`UiPanel`'s `sideways`, `glow`, `scroll`), rather than a copy per panel. The components are styled by the existing stylesheet and custom properties, and they contain no application state. The kit's own classes wear Core's standard looks, each sharing one selector list with the Core skin it comes from, so the rules are never copied: | Kit class | Look | Rules | | --- | --- | --- | | `UiButton` `variant="ghost"` (default) | none: the caller's classes style it | — | | `UiButton` `variant="action"` | the action surface (`gev-action-button`); `tone="danger"` hovers red, `size="compact"` is the shot-row footprint (on this variant only) | `src/ui/styles/action-button.css` | | `UiButton` `variant="primary"` | the action surface with a group's main-action accent | `src/ui/styles/action-button.css` | | `UiButton` `variant="icon"` | the 22px square glyph button of a panel's collapse toggle | `src/ui/styles/controls.css` | | `UiCloseButton` | a close, dismiss or clear button: a bare glyph (× with `glyph="times"`, the Material `close` symbol with `glyph="icon"`) with no padding, border or background of its own and a pointer; the site's feature class sets size, colour, hover and any surface, and `bare` leaves the look off for a skin that sets its own padding and border | `src/ui/styles/close-button.css` | | `UiSearchField` | a search field: the Material `search` glyph and a search input in a flex row, the input bare (no border or background, free to shrink); the site's feature classes set the frame's size, surface and focus ring and the input's type and outline, and the browser's own cancel button is left to each skin | `src/ui/styles/search-field.css` | | `UiCheckbox` | a checkbox: a label wrapping a native box and its words in a centred flex row; the box keeps each site's size, margin and accent colour, and the site's feature class sets the row's gap, direction and colour | `src/ui/styles/checkbox.css` | | `UiDialog` | none: a native modal ``; the site's feature class or inline style draws it | — | | `UiChip` | the read-only chip (a pill of uppercase mono text); `selected` takes the accent | `src/ui/styles/chip.css` | | `UiEmpty` | the one-line empty state (dim mono text), its hint on a line below | `src/ui/styles/empty-state.css` | | `UiBadge` | the read-only badge (`gev-status-badge`) | `src/ui/styles/status-badge.css` | | `UiSegmented` | the segmented control (`gev-segmented`, `gev-segment`) | `src/ui/styles/segmented-control.css` | A pressed action, primary or icon button looks as a hovered regular one does (a compact action's quieter hover is for an unpressed button), and a disabled one dims and ignores hover and press. `tone` is `accent` or `danger`, and `size` styles the action variant only. Each look's resting rule selects one kit class; the button, chip and empty-state skins load before the feature stylesheets that restyle them, so a feature class still wins. The badge and segmented skins are the stylesheets their Core classes always used. A converted control keeps its own classes beside the kit's. `src/ui/kit/kitStyles.test.mjs` pins these rules. `UiPanel` takes a `title`, slots and `v-model:collapsed`, but its `collapsed` drives only the button and `ui-panel--collapsed`: the root's `collapsed` class, which hides the body, is drawn at once by `v-panel-state` from the panel chrome store, and there is no `closable`, since Core's panels collapse rather than close. `UiSegmented` adds `keyboard` (`none`, `arrows`, or `radio` with Home and End), since each of Core's groups keeps its own keyboard policy, and `itemClass`/`activeClass` for Core's segment classes. A key moves focus at once and asks for a change only when it lands on another option. Every segmented group in Core is a `UiSegmented`; the old `segmentedControl.js` adapter is gone. `UiButton` adds `pressedClass`, Core's class on a pressed toggle (most use `active`); its pressed classes toggle through `classList`, so a class other code adds (a voice highlight) survives a press. Every pressed toggle (a control with `aria-pressed`) in the views is a `UiButton` with `pressed` except Explore's story cards, which keep their own `aria-pressed` since they are `role="button"` elements, not buttons (`src/ui/kit/viewControls.test.mjs` pins it). Where the converted buttons draw Material symbols (the tilt-map button, the Context header's search and expand, the imported files' row actions and the rail chips' icons), the glyphs are `UiIcon`s with `:size="null"`, so the site rules still size them. Core's pressable chips and pills (the rail cards' chips and action chips, Recent Imagery's day chips, SWAP and ZOOM IN, map sources, cities and places, the view context's place and layer chips and the key setup chip) are `UiButton`s too. `UiChip` is a non-interactive label chip, used by the voice card. header's search and expand, Draw, Import, the imported files' and drawn shapes' row actions and the rail chips' icons), the glyphs are `UiIcon`s with `:size="null"`, so the site rules still size them. Core's pressable chips and pills (the rail cards' chips and action chips, Recent Imagery's day chips, SWAP and ZOOM IN, map sources, cities and places, and the view context's place and layer chips) are `UiButton`s too; the key setup chip is still a plain button. `UiChip` is a non-interactive label chip, used by the voice card. The welcome card's buttons (SKIP, the three start tiles, BROWSE STORIES, BACK and the main NEXT / ENTER GOD MODE action) are ghost `UiButton`s: the start tiles are pressed toggles, and all but SKIP keep `aria-disabled` rather than `disabled`, so they stay focusable while the card is busy. Its tile, tip, Stories and arrow glyphs are `UiIcon`s with `:size="null"`, so first-run.css still sizes them (`src/ui/kit/welcomeControls.test.mjs` pins it). God mode's preview globe and callouts stay inline SVG drawings, and its outbound links stay links. Every button in the Stories views (the Stories entry and its popup and toast, Explore, the Story screen, its header, rail, timeline and context panel) is a ghost `UiButton`. Explore's topic chips and map pins, the Story screen's Context button and the timeline's Expand map are pressed toggles, with no pressed class since their skins read `aria-pressed`; Explore's story cards are `role="button"` elements and keep their own `aria-pressed`. Their glyphs are inline SVG drawn for Stories, which no Material symbol the page loads draws the same, so they stay SVG; the three search fields (Explore's two and the Story context sheet's story search, a combobox) keep their own markup, since `UiSearchField`'s Material magnifier would replace their SVG one, and Explore's two clear buttons, which draw an SVG cross, are ghost `UiButton`s rather than `UiCloseButton`s (`src/ui/kit/storiesControls.test.mjs` pins it). Explore's sort is a `UiSelect`. Every button in the Cockpit HUD (`CockpitView` and its panels: the vision selector, Look ahead, the view switcher's Reset and Exit, the utility strip's launchers, collapse buttons, Radio transport and desktop rail, the briefing card's paging, Auto, collapse and page tabs, the Contact card's navigation, collapse and Weather, a signal row's target, the orbital view's TLE, Nadir, zoom and Sensor, and the bridge radar's range) is a ghost `UiButton` that keeps its id and classes, so the Cockpit controller's listeners and the cockpit stylesheets still find it. Radio's Enable (with `active`), Auto and Weather are pressed toggles; the disclosures keep `aria-expanded` and the page tabs `aria-current`. Its glyphs (the rim pointers, the reticle, the heading caret, the chevrons and panel glyphs, the contact and route arrows) are `UiIcon`s with `:size="null"`; the heading caret's rule reads `.cockpit-compass .cockpit-heading-caret`, so it still outranks the kit's `.ui-icon`, which loads after cockpit.css (`src/ui/kit/cockpitControls.test.mjs` pins it). The −, ◀ ▶ and + glyphs are text characters and stay text, and the Radio volume is a `UiSlider`. The Omnibar's mic (a pressed toggle with `active`) and its suggestion strip's chips (options, so `aria-current` rather than `pressed`) are ghost `UiButton`s, and its search, row and chip glyphs are `UiIcon`s with `:size="null"`, so its own rules still size them (`src/ui/kit/omnibarControls.test.mjs` pins it). The mic's and the chat row's glyphs stay inline SVG, since no Material symbol the page loads draws them, and its field is its own combobox rather than a `UiSearchField`. The Visual panel's buttons (its presets and map sources, HUD, Sonar, Detection, 3D, Clean UI, Celestial, Bloom, Sharpen and Reset to default) are ghost `UiButton`s. HUD, Sonar, 3D, Celestial, Bloom and Sharpen are pressed toggles with `active` as their pressed class; Detection sets its own `active` and `panoptic` classes, and Clean UI is not a pressed toggle (its owner marks it `active`). The panel's Scope, Celestial, sky, application-row and Reset glyphs are `UiIcon`s with `:size="null"`, so the panel's rules still size them (`src/ui/kit/visualControls.test.mjs` pins it). The toggles' other glyphs (◎ ▣ ✈ □ ✨ 🔍) and the presets' style glyphs are text characters, not Material symbols, and stay plain spans. The entity card's buttons are ghost `UiButton`s: its four preview buttons (Photos, Route, 3D, Cockpit view) are pressed toggles with `active`, Follow is one with `entity-card__action--on`, and the cockpit entry, Fly to and Ask GEV are plain buttons; so are the camera preview's bigger-view and More info buttons and the nearby lists' rows (`SpotConditions`, which the context view shows too). Their glyphs are `UiIcon`s with `:size="null"`, so entity-card.css and spot-conditions.css still size them (`src/ui/kit/entityCardControls.test.mjs` pins it). Ask GEV's chat bubble stays inline SVG, since no Material symbol the page loads draws it. The command dock's buttons (the six style buttons, the two tray toggles, Location's collapse and the search toggle, beside the pins and pills that already were) are ghost `UiButton`s. The style buttons are pressed toggles with `active` as their pressed class, so they now carry `aria-pressed`; Normal is the pressed one until a style is published. Their glyphs, the search 🔎 and the collapse + are text characters, not Material symbols, and stay plain text. The Context panel's buttons (its two tabs, Contacts, the cockpit entry and SEARCH NEARBY SITES, beside the header's search and expand and the TR-3B chip) are ghost `UiButton`s; the tabs and Contacts are `role="tab"` controls, chosen through `aria-selected` with their own `active` class rather than `pressed`. The view context it shows while nothing is picked (a worldwide tile that turns a layer on, an item's row, the place and layer chips and Ask GEV) is on the kit too, and the glyphs of all three are `UiIcon`s with `:size="null"`, so their site rules still size them; an item's motion glyph keeps `role="img"` and its name, with the kit's `aria-hidden` taken off (`src/ui/kit/commandDockControls.test.mjs` pins it). Ask GEV's chat bubble stays inline SVG. The Layer Finder's buttons (Search, Filter, the filter menu's Status and Category options and the bar's two clear chips) are ghost `UiButton`s. Search and the options are pressed toggles; the options' pressed class is `active`, while Search keeps its own `active` binding, which also stays on while a query is typed. The Filter button opens a disclosure and carries `aria-expanded`, not `aria-pressed`. Every glyph its own template draws is a `UiIcon` with `:size="null"`, so `layer-finder.css` still sizes them (`src/ui/kit/layerFinderControls.test.mjs` pins it); the search field's magnifier is `UiSearchField`'s own span. The Space Missions panel's buttons (a mission's roster row, FOCUS, REPLAY ASCENT, the replay's pause, PREV, NEXT and SHOW ALL / DESELECT), the Contacts panel's (PREV, FOCUS, NEXT and a contact's row), the Radio panel's (Enable, PREV, PLAY, NEXT and STOP), the RTL-SDR card's (Connect, Locate, Change device, FM, ADS-B, Tune and the two seeks) and the key setup's (the POWER UP chip, a key's REMOVE, the voice auth toggle and SAVE KEYS) are ghost `UiButton`s. Radio's Enable and the card's Connect, FM and ADS-B are pressed toggles with `active`; PLAY and Locate keep their own `active` class without `aria-pressed`, since their words say what they will do or have done. The chip's bolt is a `UiIcon` with `:size="null"`, so provider-settings.css still sizes it (`src/ui/kit/missionsRadioControls.test.mjs` pins it). The card's FM frequency stays a native number field, which the kit has no control for, and the replay's pause, the roster's chevron and the compass arrows are text characters, not Material symbols. Utilities' Draw and Import are on the kit. Draw (a pressed toggle with `active`), Clear and Import are ghost `UiButton`s, their glyphs `UiIcon`s with `pp-icon` and `:size="null"`. Draw's five colour swatches, in the toolbar and in a drawn shape's row, are ghost `UiButton`s with `role="radio"`: they say they are chosen with `aria-checked` and their own `active` class, never `aria-pressed`. A drawn shape's row (its swatch, show/hide, the application's row actions and fly to, beside its remove `UiCloseButton`) is on the kit too, its glyphs `UiIcon`s with `:size="null"`, so `controls.css` still sizes them; show/hide says what it does in its name (Show …, Hide …) rather than being pressed. The Street Level panel's controls already were kit controls; its EXPAND ⤢ ⤡ and its errors' ⚠ are text characters and stay text (`src/ui/kit/drawControls.test.mjs` pins it). The AI chat panel's and the voice control's buttons are ghost `UiButton`s: the chat's Settings, quick prompts, attachment removes, Attach layer, Attach a file, Expand conversation, command suggestions, Expand chat, Add attachment and Send (a submit button that turns into Stop reply), and the voice control's Open AI chat, Back to chat, Back to voice, its Preview and Settings tabs and the error tray's DISMISS, beside the tier button, the mic and the dock and minimize buttons, which already were. The tier button and dock are pressed toggles; the mic is one only while its owner has a state for it; the tabs keep `role="tab"` and `aria-selected`. DISMISS is a text button, not a cross, so it is not a `UiCloseButton`. The Settings and tab glyphs are `UiIcon`s with `:size="null"`, so voice-cost.css and voice-card.css still size them (`src/ui/kit/chatVoiceControls.test.mjs` pins it). The chat bubble, globe, attach, send and stop, expand and Back glyphs stay inline SVG, since no Material symbol the page loads draws them the same, and the message box, file picker and inactivity minutes stay native fields, which the kit has none of. The voice modules build no controls in script. The small surfaces' buttons are ghost `UiButton`s: the locale picker's button, the phone tab bar's tabs, the globe actions' Clear, Share, Reset and north-up compass, the imagery divider's handle, the scene sharing dialog's buttons, the layer group index's ticks, the title logo, Exit clean view, the HUD's cockpit entry, a News card's face, a rail card's header, a layer row's toggle, the credits line's Data attribution and the camera calibration chips. None is a pressed toggle; the disclosures keep `aria-expanded`. Their Material glyphs (the tabs', the globe actions', the compass needle, the cockpit entry's and the celestial ring's sun and moon) are `UiIcon`s with `:size="null"`, so the site rules still size them. The locale picker's globe, caret and check and a News card's category icon stay inline SVG. The Omnibar guide draws the extra rings of a step with several targets in its template, as many as `view.subRings` says, rather than building them in script; the Omnibar's one other `material-symbols-outlined` is a stylesheet selector, and the layer disclosure only names a button in a comment (`src/ui/kit/smallSurfacesControls.test.mjs` pins it). The Street Level photo viewer of KartaView and Panoramax (the photo, the panorama canvas and the ‹ › buttons) is `StreetLevelPhotoViewer`, drawn from what the photo viewer presents rather than built in script. Its ‹ and › are ghost `UiButton`s, not pressed toggles, whose glyphs are text characters; the viewer builds no element, and the street-level layer it belongs to needs no Vue (`src/ui/kit/streetLevelPhotoControls.test.mjs` pins it). The notice the God's Eye View panel page shows when it loses its 3D graphics (`#status`, in `src/app/globePanelRuntime.js`) stays built in script: that script is sent to the host as source text and runs in the host's panel page before the app loads, so it can import nothing. The Bhote Koshi reconstruction panel's buttons (previous and next beat, Play, Play scene, Cinematic, Full story, Open original, Lower gorge, the field reports and Open public map) are ghost `UiButton`s that keep their `data-action` hooks. Cinematic is a pressed toggle with no pressed class, since bhote-koshi.css reads its `aria-pressed`: the event layer presents its state as the record's `pressed`, which the panel passes to the button, instead of writing an `aria-pressed` attribute. The ‹ and › arrows are text characters. The event's embedded media cards (each anchored witness clip's frame, leader line, title, status and original link, and the hidden YouTube preload) are drawn by `BhoteKoshiMediaCards`, which `src/data/bhoteKoshiEmbeddedMedia.js` renders into its overlay root with `h()` and `render()` on every change, words again on a locale change, and places after each frame; they hold no control, and the original link stays a link. The script still builds the provider SDKs' script and preconnect tags, the overlay root, and the Facebook player node: that node is warmed hidden before its card exists and carried, loaded, into the card's player, where the SDK replaces its contents, so a template could only rebuild it and reload the player; the X post is likewise built by its SDK inside the player (`src/ui/kit/bhoteKoshiControls.test.mjs` pins it). `UiSelect` renders the bare native select (Core's labels sit outside it or come as an `aria-label`) with `v-model`, `options` and `disabled`; options that carry their own attributes come through the slot, a caller's `@change` still reaches the select, and `hold` works as in `UiSlider`. Without `hold`, a select takes its model back after its own change renders, so a pick its owner refuses goes back; an owner that answers later (the SDR gain) takes `hold`. A layer row's range ends are repainted on a later frame and may come back reordered (a start picked after the end swaps them), so they take a plain `value` instead of a model: a pick stays until the owner publishes a different value, which shows at once, focused or not (`src/ui/layerPanel/rowRange.test.mjs`). Every select in the views is a `UiSelect` (`src/ui/kit/viewControls.test.mjs` pins it). `UiBadge` takes a `tone` and carries Core's `gev-status-badge`; its density variants and colours stay caller classes, and it renders the CCTV source and calibration badges and the rail card badges. `UiEmpty` takes a `title` and `hint`, but Core's empty states are one line, so the title is the text itself rather than a bold heading; the News feed, Scene shot list, mission roster and imagery strip use it. The locale picker's and the mission tables' empty rows stay a paragraph and table cells. `UiCloseButton` is a `UiButton` with a fixed glyph, a required `label` and no tip unless the site passes a `title`; attributes and classes pass through, so each site keeps its id, feature class and look. Every close, dismiss and clear button in the views that draws a cross is one (`src/ui/kit/closeButtons.test.mjs` and `viewControls.test.mjs` pin it, for a bare × or one in a span) except Story Explore's two search clears, whose SVG cross is neither of its glyphs, and an imported file's Remove, one of the row's icon `UiButton`s (show or hide, fly to, remove) that draw the icon the file import names for each. The Story context sheet's Close is a text button, a plain `UiButton`. Street Level's and the space mission's (its deselect and the replay's Cancel) keep `bare`, since their skins set their own padding and border, and so does the credits list's. The Quebec CCTV overlay's close is one too, and so is the Omnibar guide's, which keeps its feature class and tip. `UiSearchField` takes `v-model`, a required `label` (the input's accessible name), `placeholder` and `tag` (`div`, given `role="search"` by the site, or `label`); attributes and classes go to the frame, and `inputId`, `inputClass`, `autocomplete` and `spellcheck` to the input. With `clearLabel` it shows a `UiCloseButton` (`clearClass`, its label as its tip) while text is typed, which empties the field and focuses the input again. Escape stops at the input and is emitted with its event, so a site that also keeps the browser from clearing the field prevents it there; `focus()` focuses the input. The Context search and the Layer Finder's are `UiSearchField`s; the locale picker's combobox, the Omnibar's location field and the Data Library's labelled search are other controls. Its kit rules hold the declarations both search skins had in common, moved rather than copied, and load before them. `UiCheckbox` is a `