# 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`, `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 in the views is a `UiButton` except Bhote Koshi's cinematic button and the tilt-map button, whose owners still write their state into the DOM. Core's pressable chips and pills (rail card chips, map sources, cities and places) are `UiButton`s too; `UiChip` is a non-interactive label chip, used by the voice card. 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`. `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`. Every select in the views is a `UiSelect`. `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 is one (`src/ui/kit/closeButtons.test.mjs` pins it); Street Level's and the space mission's 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 `