Add the Omnibar: one field above the footer for places, layers and commands

On desktop the dock becomes one search bar (Omnibar.vue) that shows the
rows the line-reading pipeline makes: places with nearby suggestions,
coordinates, map items, layers, commands, plans such as "go to Austin and
show flights", guided walks through the real controls, and Ask GEV for
questions. Enter runs only what the line asks for outright. The map
credits move below the bar onto the Power Up row, the voice waveform
shows in the bar while voice is on, and the dock's Location and Visual
trays are hidden in this layout. The phone layout is unchanged. Long
place names are kept out of automatic Ask GEV.

Co-authored-by: Sameh Khamis <[email protected]>
This commit is contained in:
Manjunath PaparajuandSameh Khamis authored and Sameh Khamis committed 2026-11-18 15:00:06 -08:00
1 parent 6e0baacd57
commit a3f4af91f8
36 files changed
+4741 -75

No files matched your search

+14
View File
@@ -78,6 +78,12 @@ import { useCockpitStore } from './stores/cockpit.js';
import { useGlobeActionsStore } from './stores/globeActions.js';
import { useRecordingStore } from './stores/recording.js';
import { onPlacePacksLoadingChange } from '../data/placeBelow.js';
import {
hideOsmCredit,
registerDynamicCredit,
showOsmCredit,
WIKIDATA_PLACES_CREDIT,
} from '../data/dataCredits.js';
import { withPlacePacks } from './placePacksLoading.js';
import { preloadOwnerFlags } from './ownerFlag.js';
@@ -182,6 +188,14 @@ export class StyleManager extends ShellFacade {
layers: () => this._dataManager?.getAll?.() || [],
setLayer: (id, enabled) =>
this._dataManager?.setEnabled(id, enabled, { origin: 'user' }),
// The Omnibar shows names from the bundled Wikidata packs.
creditPlaces: () =>
registerDynamicCredit(this.viewer, WIKIDATA_PLACES_CREDIT),
// Photon's suggestions are OpenStreetMap data: credited while shown.
creditSuggestions: (shown) =>
shown
? showOsmCredit(this.viewer, 'omnibar')
: hideOsmCredit(this.viewer, 'omnibar'),
});
// Scrolling at a screen edge steps through that side's rail panels.
this._removeRailEdgeScroll = installRailEdgeScroll();
File diff suppressed because it is too large. Load diff
+10 -2
View File
@@ -62,7 +62,7 @@ export function installEntityContext({
const voice = useVoiceStore(pinia);
const cockpitStore = useCockpitStore(pinia);
const chrome = usePanelChromeStore(pinia);
/** Whether Context is open; a closed panel reads nothing. */
/** Whether Context is open. (readView also reads while the Omnibar is focused.) */
const isOpen = () =>
chrome.panels['global-context-panel']?.collapsed === false;
const doc = globalThis.document;
@@ -223,7 +223,8 @@ export function installEntityContext({
// the height. Read when the camera settles, not every frame.
const readView = () => {
const port = camera();
if (!port || !isOpen()) return;
if (!port || (!isOpen() && doc?.activeElement?.id !== 'gev-omnibar-input'))
return;
const pose = port.pose();
if (![pose.lat, pose.lon, pose.height].every(Number.isFinite)) return;
const middle = pickWorld?.(viewer, 0.5, 0.5);
@@ -272,6 +273,12 @@ export function installEntityContext({
listen();
readView();
}, 0);
// The Omnibar's nearby suggestions also need a fresh center even with
// Context closed. Its focus event requests one camera read.
const onSearchFocus = (event) => {
if (event.target?.id === 'gev-omnibar-input') readView();
};
doc?.addEventListener('focusin', onSearchFocus);
// Opening the panel describes the view as it is now.
let wasOpen = isOpen();
const offChrome = chrome.$subscribe(() => {
@@ -356,6 +363,7 @@ export function installEntityContext({
clearTimeout(trailing);
offFollow();
offChrome();
doc?.removeEventListener('focusin', onSearchFocus);
clearTimeout(followCheck);
globalThis.removeEventListener?.('gev:entity-selected', onSelected);
store.connect(null);
+25 -7
View File
@@ -115,8 +115,15 @@ export function layoutLeftPanelRail({
if (hiddenByAncestor) continue;
const rect = obstacle.getBoundingClientRect();
if (rect.width <= 0 || rect.height <= 0) continue;
const overlapsHorizontally =
rect.right > stackRect.left && rect.left < stackRect.right;
// The centered controls can enter the stack's transparent outer gutter.
// Only constrain the lane if they reach an expanded panel itself, whose
// actual bounds also include the edge-rail offset.
const lanes = ['world-timeline', 'gev-voice-control'].includes(obstacle.id)
? laidOutPanels.map((panel) => panel.getBoundingClientRect())
: [stackRect];
const overlapsHorizontally = lanes.some(
(lane) => rect.right > lane.left && rect.left < lane.right,
);
if (!overlapsHorizontally) continue;
if (rect.top < baseTop && rect.bottom <= viewportHeight * 0.5) {
@@ -220,11 +227,20 @@ export function layoutLeftPanelRail({
const tailLayoutBottom = tailLayoutTop + tailRequiredHeight;
const tailAvailableHeight = Math.max(0, obstacleSafeBottom - obstacleSafeTop);
const tailTolerance = wasTail ? stabilityBand : -stabilityBand;
// Data Layers has a scrollable list and a fixed footer. Give it the full
// desktop lane while short control panels keep their natural height.
const fillDataLayers =
exclusive &&
expandedPanels.length === 1 &&
expandedPanels[0].id === 'data-panel' &&
Boolean(documentRef?.getElementById?.('gev-omnibar'));
const shouldTail =
!fillDataLayers &&
expandedPanels.length > 0 &&
tailLayoutTop >= obstacleSafeTop - tailTolerance &&
tailLayoutBottom <= obstacleSafeBottom + tailTolerance;
const shouldFocus = exceedsCenteredCorridor && !shouldTail;
const shouldFocus =
fillDataLayers || (exceedsCenteredCorridor && !shouldTail);
// Focus mode owns the lane, so let every expanded panel share the full
// obstacle-safe corridor. Tail/normal layouts keep the balanced
// viewport centering used for compact accordion stacks.
@@ -250,10 +266,12 @@ export function layoutLeftPanelRail({
rowGap * Math.max(0, expandedPanels.length - 1),
)
: naturalExpandedHeight;
const allocatedExpandedHeights = allocatePanelStackHeights({
naturalHeights: naturalExpandedHeights,
availableHeight: expandedAvailableHeight,
});
const allocatedExpandedHeights = fillDataLayers
? [expandedAvailableHeight]
: allocatePanelStackHeights({
naturalHeights: naturalExpandedHeights,
availableHeight: expandedAvailableHeight,
});
const autoCollapseIndices = hud.visible
? panelStackAutoCollapseIndices({
naturalHeights: naturalExpandedHeights,
+35 -3
View File
@@ -46,6 +46,7 @@ export class LocationControls {
onCity,
onPoi,
onSearch,
onSearchEdit,
onReset,
publish,
doc,
@@ -74,6 +75,7 @@ export class LocationControls {
poi: t('Landmark: --'),
};
this.searchError = null;
this.searchOrigin = 'dock';
// The search field: whether it is open, and whether a lookup runs.
this.searchExpanded = Boolean(searchExpanded);
this.searching = false;
@@ -96,12 +98,16 @@ export class LocationControls {
onPoi(cityId, index);
});
this.bind(elements.search, 'keydown', (event) => {
if (event.key === 'Enter') void onSearch(elements.search.value);
if (event.key === 'Enter')
void this.search(elements.search.value, { origin: 'dock' });
});
// Typing corrects a failed query; closing the field (which empties it) drops its error.
this.bind(elements.search, 'input', () => onSearchEdit?.());
this.bind(elements.search, 'input', () => {
if (this.searchOrigin === 'dock') onSearchEdit?.();
});
this.bind(elements.search, 'blur', () => {
if (!elements.search.value) onSearchEdit?.();
if (this.searchOrigin === 'dock' && !elements.search.value)
onSearchEdit?.();
});
this.present();
}
@@ -138,9 +144,29 @@ export class LocationControls {
searchError: this.searchError,
searchExpanded: this.searchExpanded,
searching: this.searching,
searchOrigin: this.searchOrigin,
orbit: this.orbit && { ...this.orbit },
};
}
/** Search through the same lifecycle as the location field. */
search(query, { origin = 'omnibar' } = {}) {
if (this.destroyed || !String(query || '').trim()) return false;
this._requestedSearchOrigin = origin;
// Beginning navigation synchronously settles the previous lookup. That
// handoff must not clear or blur the draft just submitted by either field.
this._startingSearch = true;
try {
return this.onSearch(query);
} finally {
this._startingSearch = false;
this._requestedSearchOrigin = null;
}
}
/** Editing an external query clears its prior lookup error. */
editSearch() {
if (!this.destroyed && this.searchOrigin === 'omnibar')
this.onSearchEdit?.();
}
/** A city pill was clicked. */
chooseCity(id) {
if (!this.destroyed) this.onCity(id);
@@ -233,6 +259,8 @@ export class LocationControls {
/** Mark the search field while a lookup runs. */
setSearching(active) {
if (this.destroyed) return;
if (active && this._requestedSearchOrigin)
this.searchOrigin = this._requestedSearchOrigin;
this.searching = Boolean(active);
this.present();
}
@@ -243,6 +271,10 @@ export class LocationControls {
settleSearch({ keepQuery = false } = {}) {
if (this.destroyed) return;
this.searching = false;
if (this._startingSearch || this.searchOrigin === 'omnibar') {
this.present();
return;
}
if (!keepQuery) {
this.closeSearch();
return;
+1
View File
@@ -108,6 +108,7 @@ test('the tray presents its cities, empty status and no landmarks at first', ()
searchError: null,
searchExpanded: false,
searching: false,
searchOrigin: 'dock',
orbit: null,
});
f.controls.highlightCity('b');
+2
View File
@@ -101,6 +101,8 @@ export class LocationSearch {
destination: { ...destination },
};
this.channel.publish(change('found'));
// Found and still the current search: a plan may go on.
return current() && !controller.signal.aborted;
} else {
this.onMissing?.();
if (!current() || controller.signal.aborted) return;
+5 -6
View File
@@ -185,8 +185,8 @@ const AUX_FORM =
/**
* Whether a line is a real question, which Ask GEV may answer on Enter (a
* billed call):
* - one ending with "?" that has two words and two letters or more (or
* three Han, Kana or Hangul characters);
* - one ending with "?" that has a question form or two non-Latin words
* with a word of two letters or more, or five Han, Kana or Hangul characters;
* - without "?", only a question word's form ("what is here", "how far is
* paris") with a word about something after it, and not written as a
* name ("Where Is My Mind").
@@ -209,13 +209,12 @@ export function isRealQuestion(text) {
const words = line.replace(/\?+$/, '').split(/\s+/).filter(Boolean);
if (line.endsWith('?'))
// A name with "?" ("New York?", "Truth or Consequences?", "東京都?") is
// offered to GEV, not sent: a question's form, or four words or more
// (five Han, Kana or Hangul characters, written without spaces; two
// words in other non-Latin scripts).
// offered to GEV, not sent: a question's form, or five Han, Kana or
// Hangul characters written without spaces, or two words in other
// non-Latin scripts.
return (
((WH_FORM.test(line) ||
AUX_FORM.test(line) ||
words.length >= 4 ||
// Question words in other scripts are not read: two words do.
(words.length >= 2 && !/\p{Script=Latin}/u.test(line))) &&
words.some((word) => (word.match(/\p{L}/gu) || []).length >= 2)) ||
+1
View File
@@ -252,6 +252,7 @@ test('ar and he mark every Omnibar string alike with a right-to-left mark', asyn
// U+200F, so the punctuation stays with the right-to-left text before it.
const sources = await Promise.all(
[
'./views/panels/Omnibar.vue',
'./views/panels/VoiceVisualizer.vue',
'./omnibarIntent.js',
'./omnibarRows.js',
+4 -5
View File
@@ -148,16 +148,15 @@ const OUTCOMES = [
['remove island', 'nothing'],
['show noir and show cctv', 'style(noir) + layer(cctv,on)'],
// a name with "?" is offered to GEV,
// never sent; a question's form or four words are.
// never sent; a question's form is.
['New York?', 'nothing'],
['Truth or Consequences?', 'nothing'],
['Ho Chi Minh City?', 'nothing'],
['Santa Cruz de la Sierra?', 'nothing'],
['東京都?', 'nothing'],
['東京はどこ?', 'ask(東京はどこ?)'],
['is it far?', 'ask(is it far?)'],
[
'how about the weather in paris today?',
'ask(how about the weather in paris today?)',
],
['how about the weather in paris today?', 'nothing'],
['123–45–6789', 'nothing'],
['what is 4111–1111–1111–1111?', 'nothing'],
// a switch with its place after "in" asks;
+32
View File
@@ -232,6 +232,38 @@ test('left corridor respects a lower obstacle but ignores an obstacle hidden by
assert.equal(Number(f.stack.dataset.safeBottomPct), 65.47);
});
test('a centered timeline only shortens the corridor when it reaches the visible panel', () => {
const f = fixture('left');
f.stack.rect.width = 360;
f.stack.rect.right = f.stack.rect.left + 360;
f.expand(f.first, 850);
const timeline = element('world-timeline', { top: 650, left: 320 });
f.options.obstacles = [timeline];
f.run();
const clear = Number(f.stack.dataset.safeBottomPct);
timeline.rect.left = 280;
f.run();
assert(clear > 85);
assert(Number(f.stack.dataset.safeBottomPct) < 73);
});
test('Data Layers extends to the HUD even if its list is currently short', () => {
const f = fixture('left');
f.first.id = 'data-panel';
f.options.documentRef.getElementById = (id) =>
id === 'gev-omnibar' ? {} : null;
f.expand(f.first, 250);
f.options.obstacles = [element('hud', { top: 760, height: 45 })];
f.run();
assert.equal(f.stack.dataset.layoutMode, 'focus');
assert(Number(f.stack.dataset.safeBottomPct) > 80);
assert(
parseFloat(
f.first.style.getPropertyValue('--left-panel-allocated-height'),
) > 500,
);
});
for (const side of ['left', 'right']) {
test(`${side} mobile layout releases desktop height/position styles and labels`, () => {
const f = fixture(side, { mobile: true });
+6
View File
@@ -6,6 +6,7 @@ import {
describeEntity,
layerBreakdown,
nearbyByKind,
nearbyEntities,
layerMatches,
searchEntities,
viewSummary,
@@ -204,6 +205,10 @@ export const useEntityCardStore = defineStore('gev-entity-card', () => {
return nearbyByKind(shell.value?.dataManager?.(), { lat, lon }, options);
}
function nearbySelected() {
return nearbyEntities(dataManager(), card.value);
}
/** Whether a card's layer is known to the layer manager and switched off. */
function layerOff(layerId) {
const dm = dataManager();
@@ -333,6 +338,7 @@ export const useEntityCardStore = defineStore('gev-entity-card', () => {
following,
search,
nearbyGroups,
nearbySelected,
alertsAt,
liveLayers,
breakdown,
+3
View File
@@ -79,6 +79,8 @@ export const useGlobeActionsStore = defineStore('gev-globe-actions', () => {
}
const { act, owns } = owners;
/** Whether a connected owner answers this action at all. */
const answers = (name) => Boolean(owners.ownerOf(name));
return {
clearBusy,
@@ -91,5 +93,6 @@ export const useGlobeActionsStore = defineStore('gev-globe-actions', () => {
detach,
act,
owns,
answers,
};
});
+6 -3
View File
@@ -5,11 +5,14 @@ import { markRaw, shallowRef } from 'vue';
* The top-bar omnibar's link to the shell. The shell connects the actions
* the omnibar offers: `layers()` lists the data layers as `{id, name,
* enabled}`, and `setLayer(id, enabled)` turns one on or off as a user click
* would. Place search runs through the location controls and Ask GEV through
* the voice controls, so neither is repeated here.
* would. `creditPlaces()`, optional, credits the bundled Wikidata place
* packs once a name from them is shown, and `creditSuggestions(shown)`,
* optional, shows the OpenStreetMap credit while Photon's suggestions are. Place search runs through the
* location controls and Ask GEV through the voice controls, so neither is
* repeated here.
*/
export const useOmnibarStore = defineStore('gev-omnibar', () => {
/** `{layers(), setLayer(id, enabled)}`, or null while disconnected. */
/** `{layers(), setLayer(id, enabled), creditPlaces?()}`, or null while disconnected. */
const controls = shallowRef(null);
/** @param {?object} next The shell's omnibar actions, or null. */
+413
View File
@@ -0,0 +1,413 @@
/* ── "Show me how" guide ───────────────────────────────────────────────
A spotlight dims everything but the control to press and frames it with
tactical corner brackets; a second frame marks a part of it (a layer's
switch). A glass callout beside it, with an arrow to the target, says
what to do and how far along the walk is. Clicks pass through to the
app: the guide only points. */
.gev-guide {
--gev-guide-accent: #ff9f43;
--gev-guide-accent-soft: rgba(255, 159, 67, 0.5);
position: fixed;
z-index: 400;
inset: 0;
pointer-events: none;
}
/* ── Spotlight ── */
.gev-guide-ring {
position: fixed;
border: 1px solid rgba(255, 159, 67, 0.28);
border-radius: 8px;
box-shadow: 0 0 0 200vmax rgba(3, 8, 14, 0.55);
opacity: 0;
transition:
left 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
top 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
width 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
height 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
opacity 160ms ease;
}
/* Corner brackets, drawn as eight short gradient strokes. */
.gev-guide-ring::before {
position: absolute;
inset: -3px;
background:
linear-gradient(var(--gev-guide-accent) 0 0) top left / 12px 2px,
linear-gradient(var(--gev-guide-accent) 0 0) top left / 2px 12px,
linear-gradient(var(--gev-guide-accent) 0 0) top right / 12px 2px,
linear-gradient(var(--gev-guide-accent) 0 0) top right / 2px 12px,
linear-gradient(var(--gev-guide-accent) 0 0) bottom left / 12px 2px,
linear-gradient(var(--gev-guide-accent) 0 0) bottom left / 2px 12px,
linear-gradient(var(--gev-guide-accent) 0 0) bottom right / 12px 2px,
linear-gradient(var(--gev-guide-accent) 0 0) bottom right / 2px 12px;
background-repeat: no-repeat;
content: '';
filter: drop-shadow(0 0 4px rgba(255, 159, 67, 0.6));
}
/* A soft ping that grows out of the frame: "press here". */
.gev-guide-ring > i {
position: absolute;
inset: 0;
border: 1px solid var(--gev-guide-accent-soft);
border-radius: inherit;
animation: gev-guide-ping 1.8s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}
/* A second frame inside the spotlight does not dim the screen again. */
.gev-guide-ring--sub {
border-color: rgba(255, 159, 67, 0.4);
border-radius: 6px;
box-shadow: none;
}
.gev-guide-ring--sub::before {
inset: -2px;
background-size:
8px 2px,
2px 8px,
8px 2px,
2px 8px,
8px 2px,
2px 8px,
8px 2px,
2px 8px;
}
/* ── Callout ── */
.gev-guide-callout {
position: fixed;
width: 280px;
padding: 0.7rem 0.8rem 0.65rem;
color: rgba(232, 238, 242, 0.95);
background: rgba(40, 44, 52, 0.9);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 12px;
box-shadow:
0 16px 40px rgba(0, 0, 0, 0.55),
inset 0 1px 0 rgba(255, 255, 255, 0.06);
backdrop-filter: blur(22px) saturate(1.3);
-webkit-backdrop-filter: blur(22px) saturate(1.3);
opacity: 0;
transform: translateY(4px);
transition:
left 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
top 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
opacity 180ms ease,
transform 180ms ease;
pointer-events: auto;
}
.gev-guide.visible .gev-guide-callout {
opacity: 1;
transform: none;
}
/* A leader line from the callout to the target's frame, ending in a dot. */
.gev-guide-callout::before,
.gev-guide-callout::after {
position: absolute;
top: var(--gev-guide-arrow-y, 50%);
content: '';
transition: top 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gev-guide-callout::before {
width: 18px;
height: 1px;
background: var(--gev-guide-accent);
box-shadow: 0 0 6px rgba(255, 159, 67, 0.7);
}
.gev-guide-callout::after {
width: 5px;
height: 5px;
margin-top: -2px;
background: var(--gev-guide-accent);
border-radius: 50%;
box-shadow: 0 0 6px rgba(255, 159, 67, 0.9);
}
.gev-guide-callout[data-side='right']::before {
right: 100%;
}
.gev-guide-callout[data-side='right']::after {
right: calc(100% + 15px);
}
.gev-guide-callout[data-side='left']::before {
left: 100%;
}
.gev-guide-callout[data-side='left']::after {
left: calc(100% + 15px);
}
.gev-guide-callout[data-side='none']::before,
.gev-guide-callout[data-side='none']::after {
display: none;
}
/* The edge the line leaves from picks up the accent. */
.gev-guide-callout[data-side='right'] {
border-left-color: rgba(255, 159, 67, 0.55);
}
.gev-guide-callout[data-side='left'] {
border-right-color: rgba(255, 159, 67, 0.55);
}
/* Header: what this walk is about, how far along, and a close. */
.gev-guide-head {
display: flex;
align-items: center;
gap: 0.5rem;
}
.gev-guide-title,
.gev-guide-count {
margin: 0;
font-family: var(--font-mono);
font-size: 0.56rem;
letter-spacing: 0.12rem;
text-transform: uppercase;
}
.gev-guide-title {
flex: 1;
min-width: 0;
overflow: hidden;
color: var(--gev-guide-accent);
text-overflow: ellipsis;
white-space: nowrap;
}
.gev-guide-count {
color: rgba(214, 220, 226, 0.55);
font-variant-numeric: tabular-nums;
letter-spacing: 0.06rem;
}
.gev-guide-close {
display: grid;
place-items: center;
width: 20px;
height: 20px;
margin: -2px -4px 0 0;
padding: 0;
color: rgba(214, 220, 226, 0.55);
font-size: 0.95rem;
line-height: 1;
background: none;
border: 0;
border-radius: 5px;
cursor: pointer;
}
.gev-guide-close:hover,
.gev-guide-close:focus-visible {
color: #fff;
background: rgba(255, 255, 255, 0.08);
}
/* Progress: one segment per step. */
.gev-guide-progress {
display: flex;
gap: 3px;
margin: 0.45rem 0 0.6rem;
padding: 0;
list-style: none;
}
.gev-guide-progress li {
flex: 1;
height: 2px;
background: rgba(214, 220, 226, 0.16);
border-radius: 2px;
transition: background 220ms ease;
}
.gev-guide-progress li.done {
background: rgba(255, 159, 67, 0.55);
}
.gev-guide-progress li.current {
background: var(--gev-guide-accent);
box-shadow: 0 0 6px rgba(255, 159, 67, 0.6);
}
.gev-guide-callout.swap .gev-guide-body {
animation: gev-guide-swap 260ms ease both;
}
.gev-guide-text {
margin: 0;
font-size: 0.84rem;
line-height: 1.45;
}
/* "Press the highlighted control", with a live dot. */
.gev-guide-hint {
display: flex;
align-items: center;
gap: 0.45rem;
margin: 0.4rem 0 0;
color: rgba(214, 220, 226, 0.6);
font-size: 0.68rem;
}
.gev-guide-hint[hidden] {
display: none;
}
.gev-guide-hint-dot {
width: 6px;
height: 6px;
flex: none;
background: var(--gev-guide-accent);
border-radius: 50%;
animation: gev-guide-blink 1.4s ease-in-out infinite;
}
/* Footer: the Esc hint on the left, the buttons on the right. */
.gev-guide-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.4rem;
margin-top: 0.7rem;
padding-top: 0.55rem;
border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.gev-guide-actions > span {
display: flex;
gap: 0.4rem;
}
.gev-guide-keys {
display: flex;
align-items: center;
gap: 0.35rem;
margin: 0;
color: rgba(214, 220, 226, 0.45);
font-size: 0.62rem;
}
.gev-guide-keys[hidden] {
display: none;
}
/* With the Esc hint gone, the offer's buttons sit on the right. */
.gev-guide-actions > span:only-of-type {
margin-left: auto;
}
.gev-guide-keys kbd {
padding: 0.05rem 0.3rem;
font-family: var(--font-mono);
font-size: 0.54rem;
border: 1px solid rgba(214, 220, 226, 0.22);
border-radius: 4px;
}
.gev-guide-actions button {
padding: 0.28rem 0.6rem;
color: #1a1206;
font-family: var(--font-mono);
font-size: 0.58rem;
font-weight: 600;
letter-spacing: 0.1rem;
text-transform: uppercase;
white-space: nowrap;
background: var(--gev-guide-accent);
border: 1px solid var(--gev-guide-accent);
border-radius: 6px;
cursor: pointer;
transition:
background 140ms ease,
color 140ms ease,
border-color 140ms ease;
}
.gev-guide-actions button[hidden] {
display: none;
}
.gev-guide-actions button:hover,
.gev-guide-actions button:focus-visible {
background: #ffb36b;
border-color: #ffb36b;
}
/* Secondary buttons: skip a step that waits, or decline the offer. */
.gev-guide-actions button.quiet,
.gev-guide-actions .gev-guide-skip {
color: rgba(214, 220, 226, 0.75);
font-weight: 400;
background: none;
border-color: rgba(214, 220, 226, 0.2);
}
.gev-guide-actions button.quiet:hover,
.gev-guide-actions button.quiet:focus-visible,
.gev-guide-actions .gev-guide-skip:hover,
.gev-guide-actions .gev-guide-skip:focus-visible {
color: #fff;
background: rgba(255, 255, 255, 0.06);
border-color: rgba(255, 159, 67, 0.6);
}
@keyframes gev-guide-ping {
0% {
opacity: 0.9;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(1.12);
}
}
@keyframes gev-guide-blink {
50% {
opacity: 0.3;
}
}
@keyframes gev-guide-swap {
from {
opacity: 0;
transform: translateY(3px);
}
}
@media (prefers-reduced-motion: reduce) {
.gev-guide-ring,
.gev-guide-callout,
.gev-guide-callout::before {
transition: none;
}
.gev-guide-ring > i,
.gev-guide-hint-dot,
.gev-guide-callout.swap .gev-guide-body {
animation: none;
}
}
/* The guide's live status: read by screen readers, not shown. */
.gev-guide-status {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
+360
View File
@@ -0,0 +1,360 @@
/* Shared desktop command surface. Mobile and exclusive owners keep their layout. */
body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
.ui-clean-view
):not(.recording-mode):where(
:has(#gev-omnibar):has(#command-dock > #gev-voice-control)
) {
--omnibar-dock-width: clamp(400px, 32vw, 460px);
--omnibar-dock-bottom: 74px;
--omnibar-coordinates-bottom: 4.25rem;
--world-timeline-lift: 0px;
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
:is(.hud-top-left, .hud-top-right) {
top: clamp(92px, 10vh, 112px);
}
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
.hud-top-left
.hud-readout:has(> #hud-mode) {
display: none;
}
#top-center-actions {
top: clamp(86px, 9.55vh, 108px);
}
#left-panel-stack.layout-focus {
bottom: var(--left-stack-safe-bottom, 4vh);
}
#world-timeline {
bottom: calc(var(--omnibar-dock-bottom) + 66px);
width: var(--omnibar-dock-width);
}
&:has(#gev-chat-panel:not([hidden]), #gev-voice-panel:not([hidden]))
#world-timeline,
&:has(#gev-omnibar.has-results):not(
:has(#gev-voice-control[data-assistant-mode='voice'])
)
#world-timeline {
visibility: hidden;
}
#command-dock {
--dock-voice-width: var(--omnibar-dock-width);
top: auto;
bottom: var(--omnibar-dock-bottom);
z-index: 149;
width: var(--omnibar-dock-width);
max-width: none;
height: 56px;
min-height: 0;
overflow: visible;
align-items: center;
padding: 0;
}
#command-dock > #gev-voice-control {
box-sizing: border-box;
flex: none;
width: 100%;
min-width: 0;
max-width: none;
height: 56px;
margin: 0;
padding: 0 8px;
gap: 0;
align-items: center;
justify-content: space-between;
border: 1px solid rgba(120, 220, 255, 0.16);
border-radius: 18px;
background: linear-gradient(
180deg,
rgba(16, 28, 36, 0.9),
rgba(6, 14, 20, 0.94)
);
box-shadow:
inset 0 1px 0 rgba(200, 245, 255, 0.07),
0 12px 32px rgba(0, 0, 0, 0.45);
backdrop-filter: none;
}
&:has(#gev-omnibar:focus-within) #command-dock > #gev-voice-control {
border-color: rgba(54, 220, 255, 0.5);
box-shadow:
0 12px 32px rgba(0, 0, 0, 0.45),
0 0 0 3px rgba(54, 220, 255, 0.1);
}
#command-dock > #gev-voice-control::before,
#command-dock > #gev-voice-control::after {
content: '';
position: absolute;
top: 16px;
bottom: 16px;
width: 1px;
height: auto;
transform: none;
background: rgba(120, 220, 255, 0.12);
pointer-events: none;
}
#command-dock > #gev-voice-control::before {
inset-inline-start: 54px;
inset-inline-end: auto;
}
#command-dock > #gev-voice-control::after {
inset-inline-start: auto;
inset-inline-end: 54px;
}
#gev-voice-control > :is(#gev-voice-button, #gev-chat-button):focus-visible {
outline: 2px solid #7bd3ef;
outline-offset: 2px;
}
#gev-voice-control > :is(#gev-voice-button, #gev-chat-button) {
display: grid;
place-items: center;
flex: none;
width: 40px;
height: 40px;
min-width: 0;
margin: 0;
padding: 0;
border: 1px solid rgba(120, 220, 255, 0.18);
border-radius: 50%;
background: rgba(5, 17, 24, 0.48);
box-shadow:
inset 0 2px 4px rgba(0, 0, 0, 0.58),
inset 0 -1px 0 rgba(169, 226, 245, 0.12),
0 1px 0 rgba(169, 226, 245, 0.1);
transform: none;
}
#gev-voice-control
> :is(#gev-voice-button, #gev-chat-button):is(
:hover,
[aria-pressed='true'],
[aria-expanded='true']
) {
background: rgba(54, 220, 255, 0.14);
border-color: rgba(54, 220, 255, 0.6);
}
#command-dock #gev-voice-control .gev-mic-orbit,
#command-dock #gev-chat-button > svg {
box-sizing: border-box;
width: 19px;
height: 19px;
padding: 0;
background: none;
border: 0;
box-shadow: none;
}
#gev-voice-button .gev-mic-orbit img {
width: 19px;
height: 19px;
filter: saturate(0.35) brightness(1.25);
}
#gev-voice-button .gev-mic-orbit::before,
#gev-voice-button .gev-mic-orbit::after {
display: none;
}
#gev-voice-control :is(.gev-mic-label, .gev-chat-label) {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
/* Status remains readable while live; idle meter is decorative. */
#command-dock
#gev-voice-control:not([data-assistant-mode='voice'])
> .gev-voice-visualizer,
#command-dock
#gev-voice-control:not([data-chat-busy='true'])
> .gev-chat-thinking {
display: none;
}
#command-dock #gev-voice-control[data-chat-busy='true'] > .gev-chat-thinking {
position: absolute;
top: 10px;
left: 50%;
height: 0;
transform: translateX(-50%);
pointer-events: none;
z-index: 151;
}
#gev-voice-control > .gev-voice-readout {
position: absolute;
inset-inline: 0;
top: auto;
bottom: calc(100% + 8px);
pointer-events: none;
}
#gev-voice-control[data-assistant-mode='idle'] > .gev-voice-readout {
visibility: hidden;
}
#gev-omnibar {
top: auto;
bottom: calc(var(--omnibar-dock-bottom) + 11px);
left: 50%;
width: calc(var(--omnibar-dock-width) - 120px);
transform: translateX(-50%);
}
#gev-omnibar .omnibar-field {
height: 34px;
padding-inline: 9px 6px;
border: 1px solid rgba(151, 213, 231, 0.27);
border-radius: 9px;
background: rgba(172, 219, 239, 0.07);
box-shadow: none;
backdrop-filter: none;
}
#gev-omnibar-input {
font-size: 0.86rem;
text-overflow: ellipsis;
}
#gev-omnibar-input::placeholder {
color: #b6cbd4;
}
#gev-omnibar .omnibar-field:focus-within {
border-color: rgba(95, 230, 255, 0.66);
background: rgba(109, 206, 232, 0.1);
}
#gev-omnibar .omnibar-search-icon {
color: #a9cfda;
}
#gev-omnibar :is(.omnibar-mic, .omnibar-edge) {
display: none;
}
#gev-omnibar .omnibar-results {
position: absolute;
inset-inline: -60px;
top: auto;
bottom: calc(100% + 11px);
max-height: min(
360px,
max(0px, calc(100dvh - var(--omnibar-dock-bottom) - 144px))
);
overflow: auto;
border-radius: 18px 18px 0 0;
border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(50, 54, 62, 0.86);
backdrop-filter: blur(26px) saturate(1.2);
-webkit-backdrop-filter: blur(26px) saturate(1.2);
box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}
&:has(#gev-omnibar.has-results):not(
:has(#gev-voice-control[data-assistant-mode='voice'])
)
#command-dock
> #gev-voice-control {
border-start-start-radius: 0;
border-start-end-radius: 0;
}
#command-dock
#gev-voice-control[data-assistant-mode='voice']
> .gev-voice-visualizer {
position: absolute;
display: block;
inset: auto 64px 10px;
width: auto;
height: 28px;
opacity: 1;
transform: none;
pointer-events: none;
}
#gev-voice-control > .gev-voice-visualizer > span {
display: none;
}
#gev-voice-control > .gev-voice-visualizer > .gev-voice-wave {
display: block;
width: 100%;
height: 100%;
overflow: visible;
mask-image: linear-gradient(
90deg,
transparent,
#000 16%,
#000 84%,
transparent
);
}
.gev-voice-wave path {
fill: none;
stroke-linecap: round;
stroke-linejoin: round;
}
.gev-voice-wave__main {
stroke: #5fe6ff;
stroke-width: 2;
filter: drop-shadow(0 0 4px rgba(54, 220, 255, 0.55));
}
.gev-voice-wave__echo {
stroke: #36dcff;
stroke-width: 1.2;
opacity: 0.35;
}
.gev-voice-wave__soft {
stroke: #9ff1ff;
stroke-width: 1;
opacity: 0.6;
}
&:has(#gev-voice-control[data-assistant-mode='voice']) #gev-omnibar {
.omnibar-field {
background: transparent;
}
:is(input, .omnibar-kbd, .omnibar-search-icon) {
visibility: hidden;
}
/* Suggestions give way to the waveform; an error stays in view. */
.omnibar-results:not(.has-feedback),
.omnibar-results .omnibar-list {
display: none;
}
}
@media (prefers-reduced-motion: no-preference) {
#command-dock #gev-voice-control[data-assistant-mode='voice'] {
animation: omnibar-listening 2.4s ease-in-out infinite;
}
}
/* Desktop uses Omnibar for search and the Visual rail for presets. */
#command-dock > :is(#location-bar, #control-panel) {
display: none;
}
/* Align the plain credits with Power Up. */
:is(#cesium-credits, #gev-credits),
&:has(#intel-hud[data-variant='minimal'].active)
:is(#cesium-credits, #gev-credits) {
bottom: 1rem;
}
#intel-hud[data-variant='tactical'] .hud-bottom-right {
bottom: calc(4.2rem - 26px);
}
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
.hud-bottom-left {
bottom: var(--omnibar-coordinates-bottom);
}
&:not(.context-docked):has(#intel-hud[data-variant='minimal'].active)
#right-context-rail {
--omnibar-minimal-rail-height: min(
var(--right-stack-max-height, 70vh),
calc(
100dvh - var(--right-stack-safe-top, 26vh) -
var(--omnibar-coordinates-bottom) - 3.1rem - 1.2vh
)
);
max-height: var(--omnibar-minimal-rail-height);
> [data-panel-id]:not(.collapsed) {
max-height: var(--omnibar-minimal-rail-height);
}
}
}
@keyframes omnibar-listening {
0%,
100% {
border-color: rgba(54, 220, 255, 0.35);
}
50% {
border-color: rgba(54, 220, 255, 0.75);
}
}
+2 -2
View File
@@ -153,10 +153,10 @@ function selectMapSource(chip) {
<button id="search-toggle" class="search-toggle-btn" :title="t('Search any location')" @click="locationControls?.toggleSearch()">
<span>&#x1F50E;</span>
</button>
<input type="text" id="location-search" v-class-toggle="{ expanded: !!loc?.searchExpanded, searching: !!loc?.searching }" :placeholder="t('Search any location...')" autocomplete="off" spellcheck="false" :aria-label="t('Search location by name or coordinates')" :aria-invalid="loc?.searchError ? 'true' : null" :aria-describedby="loc?.searchError ? 'location-search-error' : null" />
<input type="text" id="location-search" v-class-toggle="{ expanded: !!loc?.searchExpanded, searching: !!loc?.searching }" :placeholder="t('Search any location...')" autocomplete="off" spellcheck="false" :aria-label="t('Search location by name or coordinates')" :aria-invalid="loc?.searchOrigin !== 'omnibar' && loc?.searchError ? 'true' : null" :aria-describedby="loc?.searchOrigin !== 'omnibar' && loc?.searchError ? 'location-search-error' : null" />
</div>
</div>
<p id="location-search-error" class="location-search-error" role="alert">{{ loc?.searchError }}</p>
<p id="location-search-error" class="location-search-error" role="alert">{{ loc?.searchOrigin === 'omnibar' ? '' : loc?.searchError }}</p>
</div>
</div>
</div>
+2
View File
@@ -19,6 +19,7 @@ import AwarenessDirection from './panels/AwarenessDirection.vue';
import UiButton from '../kit/UiButton.vue';
import GlobeActions from './panels/GlobeActions.vue';
import { useGlobeActionsStore } from '../stores/globeActions.js';
import Omnibar from './panels/Omnibar.vue';
import RenderFailure from './panels/RenderFailure.vue';
import WorldTimeline from './panels/WorldTimeline.vue';
@@ -90,6 +91,7 @@ const vToastText = {
<!-- Top-center camera and share actions -->
<GlobeActions />
<Omnibar />
<div id="global-loading-status" role="status" aria-live="polite" aria-atomic="true" :hidden="loading ? loading.hidden : true" :data-state="loading?.state ?? undefined">
<SplitFlapText id="global-loading-label" :text="loading ? loading.label : t('LOADING LIVE DATA')" :stopped="!!loading?.stopped" />
<span id="global-loading-detail">{{ loading ? loading.detail : '' }}</span>
File diff suppressed because it is too large. Load diff
+65 -1
View File
@@ -1,11 +1,12 @@
<script setup>
import { computed, onBeforeUnmount, ref, watch } from 'vue';
import { storeToRefs } from 'pinia';
import { VOICE_VISUALIZER_BARS } from '../../../voice/control.js';
import { useVoiceStore } from '../../stores/voice.js';
// The dock waveform. Its bars change every animation frame while voice is
// live, so they render here alone, not with the rest of the control.
const { bars } = storeToRefs(useVoiceStore());
const { bars, view } = storeToRefs(useVoiceStore());
const barStyle = (index) => ({
'--bar': index,
...(bars.value?.[index] && {
@@ -13,10 +14,73 @@ const barStyle = (index) => ({
'--audio-opacity': bars.value[index].opacity,
}),
});
// The same levels drawn as a wave: a smooth line through the bars, swinging
// above and below the middle by each bar's height, with two fainter traces
// at different amplitudes. Layouts that want bars hide it; the command bar
// shows the wave instead. While it is hidden (it then has no size) no path
// is computed, though the bars still change every frame.
const voiceMode = computed(() => view.value?.root?.assistantMode === 'voice');
const waveEl = ref(null);
const waveShown = ref(false);
let sizeObserver = null;
watch(waveEl, (element) => {
sizeObserver?.disconnect();
sizeObserver = null;
waveShown.value = false;
if (!element || typeof ResizeObserver !== 'function') return;
sizeObserver = new ResizeObserver(([entry]) => {
waveShown.value = entry.contentRect.width > 0 && entry.contentRect.height > 0;
});
sizeObserver.observe(element);
});
onBeforeUnmount(() => sizeObserver?.disconnect());
const W = 300;
const H = 40;
const MID = H / 2;
const levelPx = (index) => {
const raw = Number.parseFloat(bars.value?.[index]?.level);
return Number.isFinite(raw) ? raw : 5;
};
function wavePath(phase, amplitude = 1) {
const n = VOICE_VISUALIZER_BARS;
const step = W / (n + 1);
const points = [{ x: 0, y: MID }];
for (let i = 0; i < n; i++) {
// A 5px standby bar is a flat line; louder bars swing further.
const swing = Math.min(MID - 2, Math.max(0, levelPx(i) - 5) * 0.6 + 1.2);
const sign = (i + phase) % 2 === 0 ? -1 : 1;
points.push({ x: step * (i + 1), y: MID + sign * swing * amplitude });
}
points.push({ x: W, y: MID });
// Smooth through the points with quadratic curves via their midpoints.
let d = `M ${points[0].x} ${points[0].y}`;
for (let i = 1; i < points.length - 1; i++) {
const mx = (points[i].x + points[i + 1].x) / 2;
const my = (points[i].y + points[i + 1].y) / 2;
d += ` Q ${points[i].x.toFixed(1)} ${points[i].y.toFixed(1)} ${mx.toFixed(1)} ${my.toFixed(1)}`;
}
return `${d} L ${W} ${MID}`;
}
const FLAT = `M 0 ${MID} L ${W} ${MID}`;
const wave = computed(() =>
waveShown.value
? { main: wavePath(0), echo: wavePath(1), soft: wavePath(0, 0.45) }
: { main: FLAT, echo: FLAT, soft: FLAT },
);
</script>
<template>
<div class="gev-voice-visualizer" aria-hidden="true">
<span v-for="index in VOICE_VISUALIZER_BARS" :key="index" :style="barStyle(index - 1)"></span>
<svg v-if="voiceMode" ref="waveEl" class="gev-voice-wave" :viewBox="`0 0 ${W} ${H}`" preserveAspectRatio="none">
<path class="gev-voice-wave__soft" :d="wave.soft" />
<path class="gev-voice-wave__echo" :d="wave.echo" />
<path class="gev-voice-wave__main" :d="wave.main" />
</svg>
</div>
</template>
<style scoped>
.gev-voice-wave { display: none; }
</style>