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

+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>