Update the app link to firestar link and also add wiki links galaxy wide

This commit is contained in:
Prabhaav Pillai
2026-11-18 16:13:28 -05:00
parent 7ade6bc471
commit f22542bedf
35 changed files with 271 additions and 73 deletions
+15
View File
@@ -33,6 +33,21 @@ it labels its sample System Monitor data and cannot edit a device.
StarPort log uploads use the built-in developer Discord webhook.
## Wiki help links
Maintain wiki destinations in `web/js/wiki-links.js`: `WIKI_LINKS` uses Galaxy routes,
and `SETTINGS_WIKI_LINKS` uses settings API page IDs because toggles also navigate
without changing the URL. Values are paths relative to `https://wiki.firestar.link/`,
including optional section anchors. Only add destinations with substantial guidance for
that feature, rather than brief overview mentions. Routes match explicitly; nested settings
can inherit their mapped settings parent. Driving settings reuse the settings page mappings.
Unmapped routes and settings pages hide the link without falling back to a generic guide.
Existing page headers use the shared `<WikiHelp />` book link. For a new page, register
`WikiHelp` from `./wiki-help.js`, place it after the title/description in the page header,
and add its destination to the mapping. Settings pass their active page ID with `:page`.
No docs build, sync, or network lookup is required; update this file when a wiki URL changes.
## Pages and owners
| Page | Current source and operations |
@@ -1,5 +1,6 @@
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import { APP_DOWNLOADS as downloads } from '../web/js/app-downloads.js'
import { appDownloadPlatform, APP_DOWNLOADS, appReminderPreference, reminderHidden, reminderDismissed,
HIDE_APP_REMINDER, DISMISSED_APP_REMINDER, AppDownloadReminder } from '../web/js/app-reminder.js'
@@ -14,8 +15,7 @@ for (const userAgent of ['Macintosh Safari', 'Windows Chrome', 'Linux x86_64 Fir
assert.equal(appDownloadPlatform({ ...android, StarPilotApp: {} }), null)
assert.equal(appDownloadPlatform({ ...iphone, webkit: { messageHandlers: { galaxyDiagnostics: {} } } }), null)
assert.equal(appDownloadPlatform({ ...iphone, webkit: {} }), 'ios', 'Safari itself must not be mistaken for the native app')
assert.equal(APP_DOWNLOADS.ios.href, 'https://apps.apple.com/ca/app/starpilot-bt/id6821039119')
assert.equal(APP_DOWNLOADS.android.href, 'https://play.google.com/store/apps/details?id=com.starpilot.galaxy')
assert.equal(APP_DOWNLOADS, downloads, 'Reminders use the shared store metadata')
const values = new Map()
const target = { localStorage: { getItem: k => values.get(k), setItem: (k, v) => values.set(k, v) },
sessionStorage: { getItem: k => values.get(k), setItem: (k, v) => values.set(k, v) } }
@@ -1,4 +1,5 @@
import assert from 'node:assert/strict'
import { APP_DOWNLOADS } from '../web/js/app-downloads.js'
import { createRenderer, nextTick } from '../web/vendor/vue/vue.esm-browser.js'
import { CompanionUpdates, newerCompanionVersion } from '../web/js/companion-updates.js'
@@ -48,7 +49,7 @@ let mounted = await mount()
try {
assert.ok(banner(mounted.host))
assert.match(text(mounted.host), /Version 1.1.5 is available.*Installed: 1.1.4/s)
assert.ok(all(mounted.host).some(item => item.type === 'a' && item.props.href === 'https://play.google.com/store/apps/details?id=com.starpilot.galaxy'))
assert.ok(all(mounted.host).some(item => item.type === 'a' && item.props.href === APP_DOWNLOADS.android.href))
mounted.vm.dismissUpdate()
await nextTick()
assert.equal(banner(mounted.host), undefined)
@@ -1,10 +1,10 @@
import { APP_DOWNLOADS, AppStoreLinks } from '../web/js/app-downloads.js'
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import { installHelp, InstallApp, rememberInstallPrompt, isIosDevice, isAndroidDevice } from '../web/js/install-app.js'
assert.match(installHelp({ secure: true, agent: 'iPhone' }), /Share.*Add to Home Screen/)
assert.match(installHelp({ secure: false, agent: 'Android' }), /web app.*https:\/\/galaxy\.firestar\.link/)
assert.match(installHelp({ secure: true, agent: 'Android' }), /Install app/)
assert.equal(APP_DOWNLOADS.android.href, 'https://play.google.com/store/apps/details?id=com.starpilot.galaxy')
assert.match(installHelp({ secure: true, agent: 'Chrome' }), /Install app/)
const events = new Map()
let modeListener
@@ -46,7 +46,10 @@ assert.equal(prompted, 2)
InstallApp.beforeUnmount.call(late)
// Store metadata lives outside the web installer.
assert.equal(APP_DOWNLOADS.ios.href, 'https://apps.apple.com/ca/app/starpilot-bt/id6821039119')
const readme = readFileSync(new URL('../../../../README.md', import.meta.url), 'utf8')
for (const app of Object.values(APP_DOWNLOADS)) {
assert.ok(readme.includes(`](${app.href})`), `${app.label} download must match the README`)
}
assert.match(AppStoreLinks.template, /app.href/)
assert.doesNotMatch(InstallApp.template, /Google Play|App Store|offline app|app\.apk/)
const android = { ...InstallApp.data() }
@@ -22,7 +22,7 @@ assert.match(StarPortPage.template, /Cancel Search \/ Pairing/)
assert.equal(StarPortPage.computed.deviceChosen.call({ pairing: { ...pairing, state: "pairing" } }), true)
assert.equal(StarPortPage.computed.deviceChosen.call({ pairing: { ...pairing, state: "failed" } }), false)
assert.doesNotMatch(StarPortPage.template, /:row="wiredRow"/)
assert.match(StarPortPage.template, /Read the Android Auto troubleshooting guide/)
assert.match(StarPortPage.template, /<WikiHelp \/>/)
assert.doesNotMatch(StarPortPage.template, /v-html|autoaccept/i)
const app = readFileSync(new URL("../web/js/app.js", import.meta.url), "utf8")
assert.match(app, /StarPortPage v-else-if="route\.path === '\/starport'"/)
@@ -228,7 +228,7 @@ assert.equal(uploadCalls.length, beforeDeniedEnable, "failed enable never upload
console.log("Android Auto: APK/XAPK/APKM uploads in either road state, enable/upload sequencing, explicit blockers and feed boundaries passed")
assert.match(StarPortPage.template, /<section[^>]*:inert="busy"[^>]*:aria-busy="busy \|\| undefined"/)
assert.match(StarPortPage.template, /@click="openInstall">Update/)
assert.match(StarPortPage.template, /<header class="gx-page-header">/)
assert.match(StarPortPage.template, /<header class="gx-settings__header gx-page-header">/)
const removePage = page({ ...setup, enabled: false, parked: false })
removePage.runtime = { running: true }
removePage.feed = { async removePackage() { return true } }
@@ -0,0 +1,77 @@
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import { compile, createRenderer, nextTick } from '../web/vendor/vue/vue.esm-browser.js'
import { route } from '../web/js/route-state.js'
import { WikiHelp } from '../web/js/wiki-help.js'
import { wikiLink } from '../web/js/wiki-links.js'
assert.equal(wikiLink('/manage_models'), 'https://wiki.firestar.link/usage/model-manager/')
assert.equal(wikiLink('/navigation/maps'), 'https://wiki.firestar.link/exclusive/navigation/#offline-maps')
assert.equal(wikiLink('/settings', 'slc'), wikiLink('/driving/slc'))
assert.match(wikiLink('/settings', 'torque/developer'), /#lateral-tuning$/)
assert.match(wikiLink('/settings', 'conditional/conditions'), /#conditional-experimental-mode-recommended$/)
for (const path of ['/', '/tools', '/theme_maker', '/theme_maker/starport', '/appearance', '/logs', '/logs/help', '/networks', '/recordings', '/tuning/plots', '/driving/traffic']) {
assert.equal(wikiLink(path), null, `${path} has no substantial feature guide`)
}
for (const page of ['visual', 'display', 'vehicle', 'data', 'traffic', 'unknown']) {
assert.equal(wikiLink('/settings', page), null, `${page} must not fall back to the Toggles overview`)
}
assert.equal(wikiLink('/navigation-other'), null, 'Do not match partial path segments')
assert.equal(wikiLink('/undocumented'), null)
const node = (type = '') => ({ type, props: {}, children: [] })
const renderer = createRenderer({
createElement: node, createText: () => node(), createComment: () => node(),
setText() {}, setElementText() {},
patchProp: (item, key, _before, value) => { item.props[key] = value },
insert: (item, parent) => { item.parent = parent; parent.children.push(item) },
remove: item => { item.parent.children.splice(item.parent.children.indexOf(item), 1) },
parentNode: item => item.parent, nextSibling: () => null,
})
route.path = '/manage_models'
const host = node('host')
const app = renderer.createApp(WikiHelp)
app.mount(host)
try {
let link = host.children.find(item => item.type === 'a')
assert.equal(link.props.href, wikiLink('/manage_models'))
assert.equal(link.props.target, '_blank')
assert.equal(link.props.rel, 'noopener noreferrer')
assert.match(link.props['aria-label'], /wiki guide.*new tab/)
route.path = '/navigation/maps'
await nextTick()
assert.equal(link.props.href, wikiLink('/navigation/maps'), 'Help follows route changes')
route.path = '/undocumented'
await nextTick()
assert.equal(host.children.some(item => item.type === 'a'), false, 'Hide absent guides')
} finally { app.unmount() }
route.path = '/settings'
const nestedHost = node('host')
const nestedApp = renderer.createApp({
components: { WikiHelp }, data: () => ({ page: 'slc' }), template: '<WikiHelp :page="page" />',
})
const settings = nestedApp.mount(nestedHost)
try {
const link = nestedHost.children.find(item => item.type === 'a')
assert.equal(link.props.href, wikiLink('/settings', 'slc'))
settings.page = 'aol'
await nextTick()
assert.equal(link.props.href, wikiLink('/settings', 'aol'), 'Nested toggles update without URL changes')
settings.page = 'display'
await nextTick()
assert.equal(nestedHost.children.some(item => item.type === 'a'), false, 'Overview-only toggles hide help')
} finally { nestedApp.unmount() }
// Compile the changed page templates to catch invalid nesting or Vue directives.
for (const name of ['models', 'settings', 'navigation', 'starport', 'spotify', 'bluetooth', 'cameras',
'home', 'system-monitor', 'sentry', 'vasm', 'pip', 'galaxy', 'networks', 'tools', 'logs', 'software-status', 'driving',
'longitudinal-curves', 'flm', 'record-history', 'onroad-layout-template', 'settings-recovery', 'diagnostic-tools']) {
const source = readFileSync(new URL(`../web/js/${name}.js`, import.meta.url), 'utf8')
const templates = [...source.matchAll(/(?:template:\s*|ONROAD_LAYOUT_TEMPLATE = )`([\s\S]*?)`/g)]
assert.ok(templates.length, `${name} has a template`)
for (const [, template] of templates) {
compile(template, { decodeEntities: raw => raw, onError: error => { throw new Error(`${name}: ${error.message}`) } })
}
}
console.log('Wiki help: mapping, nested settings, reactive navigation, accessibility and page templates passed')
@@ -421,6 +421,8 @@ transition: background-color var(--motion-fast), transform var(--motion-fast);
width: var(--touch-target);
}
.gx-icon-btn:hover { background: var(--glass-bg-hover); }
.gx-home__hero.gx-page-header { flex-direction: row; }
.gx-icon-btn.gx-wiki-help { flex: none; color: var(--on-surface-variant); text-decoration: none; }
.gx-icon-btn:active { transform: scale(0.9); }
.gx-icon-btn i,
.gx-appbar .bi,
@@ -1,7 +1,7 @@
// Canonical store metadata shared by download links and reminders.
export const APP_DOWNLOADS = Object.freeze({
ios: Object.freeze({ href: 'https://apps.apple.com/ca/app/starpilot-bt/id6821039119', label: 'App Store', icon: 'bi-apple', name: 'StarPilot BT for iPhone' }),
android: Object.freeze({ href: 'https://play.google.com/store/apps/details?id=com.starpilot.galaxy', label: 'Google Play', icon: 'bi-google-play', name: 'Galaxy for Android' }),
ios: Object.freeze({ href: 'https://firestar.link/ios', label: 'App Store', icon: 'bi-apple', name: 'StarPilot BT for iPhone' }),
android: Object.freeze({ href: 'https://firestar.link/android', label: 'Google Play', icon: 'bi-google-play', name: 'Galaxy for Android' }),
})
export const AppStoreLinks = {
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxState } from "./state.js"
import { GxNotice } from "./notice.js"
import { reportSave } from "./save-feedback.js"
@@ -166,7 +167,7 @@ export class BluetoothFeed {
}
export const BluetoothPage = {
components: { GxState, GxNotice, ControllersPage, GxDialog },
components: { WikiHelp, GxState, GxNotice, ControllersPage, GxDialog },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true } },
data: () => ({ status: null, busy: false, error: "", pairValue: "", now: Date.now(), claimAt: Date.now(), forgetting: null }),
mounted() {
@@ -212,7 +213,7 @@ export const BluetoothPage = {
template: `
<section class="gx-driving" aria-label="Bluetooth" :inert="busy" :aria-busy="busy || undefined">
<header class="gx-settings__header gx-page-header"><div><h2>Bluetooth</h2>
<p>View, pair and manage nearby and saved devices.</p></div></header>
<p>View, pair and manage nearby and saved devices.</p></div><WikiHelp /></header>
<GxState v-if="mode !== 'local'">Bluetooth requires the device. No radio was checked in preview.</GxState>
<template v-else>
<GxNotice tone="danger" v-if="error">{{ error }}</GxNotice>
+3 -2
View File
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { MenuTile } from "./menu-tile.js"
import { GxNotice } from "./notice.js"
import { GalaxySelect } from "./galaxy-select.js"
@@ -66,7 +67,7 @@ export class CameraSnapshotFeed {
export const CamerasPage = {
name: "CamerasPage",
components: { GxNotice, BluetoothNotice, GalaxySelect, MenuTile, WhiteBalanceSwitch, BalancedImage },
components: { WikiHelp, GxNotice, BluetoothNotice, GalaxySelect, MenuTile, WhiteBalanceSwitch, BalancedImage },
props: { mode: { type: String, required: true }, go: { type: Function, required: true },
tools: { type: Array, required: true },
unauthorized: { type: Function, required: true } },
@@ -83,7 +84,7 @@ export const CamerasPage = {
watch: { mode() { this.snapshots.stop() } },
template: `
<div class="gx-view gx-settings" aria-label="Cameras & Monitoring">
<h2>Cameras &amp; Monitoring</h2>
<header class="gx-settings__header gx-page-header"><div><h2>Cameras &amp; Monitoring</h2></div><WikiHelp /></header>
<div class="gx-grid">
<MenuTile v-for="tool in tools" :key="tool.path" :icon="tool.icon" :title="tool.name" :description="tool.description"
:disabled="tool.availability === 'local-only' && mode !== 'local'" @select="go(tool.path)" />
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxState } from "./state.js"
import { GxIconButton } from "./icon-button.js"
import { GxNotice } from "./notice.js"
@@ -93,10 +94,10 @@ const methods = {
const link = document.createElement("a"); link.href = url; link.download = "starpilot-console.txt"; link.click(); URL.revokeObjectURL(url) },
}
export const TroubleshootPage = {
components: { GxState, GxIconButton, GxNotice }, props, ...lifecycle,
components: { WikiHelp, GxState, GxIconButton, GxNotice }, props, ...lifecycle,
setup: props => setup(props, false), methods: { ...methods, report: troubleshootReport },
template: `<section class="gx-settings"><header class="gx-settings__header gx-page-header"><div><h2>Troubleshoot</h2>
<p>Read-only device, vehicle and settings snapshot. Copy it when reporting a problem.</p></div></header>
<p>Read-only device, vehicle and settings snapshot. Copy it when reporting a problem.</p></div><WikiHelp /></header>
<GxNotice tone="danger" v-if="state.error">{{ state.error }}</GxNotice>
<GxNotice v-if="state.notice && !state.error" tone="info">{{ state.notice }}</GxNotice>
<div class="gx-settings__controls gx-actions"><button class="gx-btn gx-btn--tonal" :disabled="mode !== 'local'" @click="$emit('navigate', '/settings/recovery')">Show Non-Default Values</button><button class="gx-btn gx-btn--tonal" :disabled="mode !== 'local'" @click="$emit('navigate', '/settings/recovery')">Reset to Default</button><button class="gx-btn gx-btn--tonal" @click="$emit('navigate', '/logs/monitor')">System Monitor</button><button class="gx-btn gx-btn--tonal" @click="$emit('navigate', '/logs/crashes')">Crash Reports</button><GxIconButton label="Copy report" icon="bi-clipboard" :disabled="!state.data" @click="copyText(report(state.data))" /></div>
@@ -105,10 +106,10 @@ export const TroubleshootPage = {
<section v-for="section in state.data.sections" :key="section.title" class="gx-card gx-panel"><div class="gx-section__header"><i class="bi bi-list-check" aria-hidden="true"></i><span class="gx-section__title">{{ section.title }}</span></div><dl class="gx-details"><template v-for="row in section.rows" :key="row.label"><dt>{{ row.label }}</dt><dd>{{ row.value }}</dd></template></dl></section><p class="gx-note">{{ state.data.note }}</p></template></section>`,
}
export const TmuxPage = {
components: { GxState, GxIconButton, GxNotice }, props, ...lifecycle,
components: { WikiHelp, GxState, GxIconButton, GxNotice }, props, ...lifecycle,
setup: props => setup(props, true), methods,
template: `<section class="gx-settings"><header class="gx-settings__header gx-page-header"><div><h2>tmux Live View</h2>
<p>Live view of the launcher console, refreshed every few seconds.</p></div></header>
<p>Live view of the launcher console, refreshed every few seconds.</p></div><WikiHelp /></header>
<GxState v-if="state.loading && !state.error" loading>Loading console…</GxState><GxNotice tone="danger" v-if="state.error">{{ state.error }}</GxNotice><GxNotice v-if="state.notice && !state.error" tone="info">{{ state.notice }}</GxNotice>
<div class="gx-settings__controls gx-actions"><GxIconButton :label="state.live ? 'Pause console updates' : 'Resume console updates'" :icon="state.live ? 'bi-pause-fill' : 'bi-play-fill'" :disabled="mode !== 'local'" @click="feed.setLive(!state.live)" /><GxIconButton label="Copy console text" icon="bi-clipboard" :disabled="!state.data?.text" @click="copyText(state.data.text)" /><GxIconButton label="Download console text" icon="bi-download" :disabled="!state.data?.text" @click="saveText(state.data.text)" /></div>
<section v-if="state.data" class="gx-card gx-crash-preview gx-panel"><p v-if="!state.data.available">{{ state.data.reason }}</p><pre class="gx-pre">{{ state.data.text }}</pre></section>
+3 -2
View File
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxState } from "./state.js"
import { MenuTile } from "./menu-tile.js"
export const DRIVING_PAGES = Object.freeze({
@@ -34,13 +35,13 @@ export function drivingPage(path) {
}
export const DrivingPage = {
components: { GxState, MenuTile },
components: { WikiHelp, GxState, MenuTile },
props: { mode: { type: String, required: true }, go: { type: Function, required: true } },
data: () => ({ groups: DRIVING_GROUPS }),
template: `
<section class="gx-driving" aria-label="Driving features">
<header class="gx-settings__header gx-page-header"><div><h2>Driving Settings</h2>
<p>Choose how StarPilot steers and controls speed.</p></div></header>
<p>Choose how StarPilot steers and controls speed.</p></div><WikiHelp /></header>
<GxState v-if="mode !== 'local'">Local driving settings are unavailable in preview.</GxState>
<template v-else>
<section v-for="group in groups" :key="group.title" class="gx-driving__group">
+3 -2
View File
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxState } from "./state.js"
import { GxNotice } from "./notice.js"
import { GxDialog } from "./dialog.js"
@@ -44,7 +45,7 @@ const PARAMETER_LABELS = {
export const FlmPage = {
name: "FlmPage",
components: { GxState, GxNotice, GxDialog, PlotGraph, PlotsPage, GalaxySettingRow, FlmBackup },
components: { WikiHelp, GxState, GxNotice, GxDialog, PlotGraph, PlotsPage, GalaxySettingRow, FlmBackup },
props: { initialView: { type: String, default: "overview" }, mode: { type: String, required: true }, unauthorized: { type: Function, required: true },
go: { type: Function, default: path => { window.location.hash = path } } },
data: () => ({ report: null, error: "", loading: false, request: null, receivedAt: 0, now: 0, bluetooth: bluetoothConnection(),
@@ -348,7 +349,7 @@ export const FlmPage = {
},
},
template: `<div class="gx-view gx-tuner" :style="{ '--tuner-header-offset': headerOffset + 'px' }">
<header class="gx-page-header gx-settings__header gx-tuner__heading"><div><h2>Your steering</h2><p>{{ vehicle }}</p></div></header>
<header class="gx-page-header gx-settings__header gx-tuner__heading"><div><h2>Your steering</h2><p>{{ vehicle }}</p></div><WikiHelp /></header>
<GxState v-if="mode !== 'local'">Connect to your device to see its steering tune.</GxState>
<template v-else>
<p v-if="nonTorqueController" class="gx-tuner__caption" data-autotune-scope="torque-only">Autotune is available for torque steering only. Live plots remain available.</p>
+3 -2
View File
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { AppStoreLinks } from './app-downloads.js'
import { InstallApp } from './install-app.js'
import { RemoteAccess } from './remote-access.js'
@@ -5,12 +6,12 @@ import { CompanionUpdates } from './companion-updates.js'
export const GalaxyPage = {
name: 'GalaxyPage',
components: { AppStoreLinks, InstallApp, RemoteAccess, CompanionUpdates },
components: { WikiHelp, AppStoreLinks, InstallApp, RemoteAccess, CompanionUpdates },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true } },
data: () => ({ url: '' }),
template: `<div class="gx-settings gx-tunnel">
<header class="gx-settings__header gx-page-header"><div><h2>Galaxy Access & Install</h2>
<p>Set up your link, then choose how to open Galaxy.</p></div></header>
<p>Set up your link, then choose how to open Galaxy.</p></div><WikiHelp /></header>
<ol class="gx-steps">
<RemoteAccess title="Set up remote access" :mode="mode" :unauthorized="unauthorized" @link="url = $event" />
<li class="gx-card gx-step" aria-label="Get the app">
+4 -4
View File
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { displayLocale } from "./localization.js"
import { GxState } from "./state.js"
import { GxNotice } from "./notice.js"
@@ -146,7 +147,7 @@ export function homeSummary(monitor, model, software) {
export const Home = {
name: "Home",
components: { GxState, GxNotice, LocalAccess, WeatherVitals },
components: { WikiHelp, GxState, GxNotice, LocalAccess, WeatherVitals },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true },
go: { type: Function, required: true } },
data: () => ({
@@ -200,9 +201,8 @@ export const Home = {
},
template: `
<div class="gx-view gx-home">
<div class="gx-home__hero">
<div><h1>Dashboard</h1><p class="gx-note">Your saved drives and current device</p></div>
<div class="gx-home__hero gx-page-header">
<div><h1>Dashboard</h1><p class="gx-note">Your saved drives and current device</p></div><WikiHelp />
</div>
<GxState v-if="mode !== 'local'">Dashboard information is available on your device.</GxState>
<template v-else>
+6 -8
View File
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxState } from "./state.js"
import { GxNotice } from "./notice.js"
import { TroubleshootPage, TmuxPage } from "./diagnostic-tools.js"
@@ -11,7 +12,7 @@ import { BluetoothNotice, bluetoothConnection } from "./bluetooth-notice.js"
export const Logs = {
name: "Logs",
components: { GxState, GxNotice, BluetoothNotice, SystemMonitor, TroubleshootPage, TmuxPage, MenuTile },
components: { WikiHelp, GxState, GxNotice, BluetoothNotice, SystemMonitor, TroubleshootPage, TmuxPage, MenuTile },
props: {
path: { type: String, required: true }, mode: { type: String, required: true }, unauthorized: { type: Function, required: true },
tools: { type: Array, required: true }
@@ -61,7 +62,7 @@ export const Logs = {
},
template: `
<div class="gx-view">
<h2 v-if="path === '/logs'">Logs & Diagnostics</h2>
<header v-if="path === '/logs'" class="gx-settings__header gx-page-header"><div><h2>Logs & Diagnostics</h2></div><WikiHelp /></header>
<p v-if="path === '/logs'" class="gx-note">Logs, diagnostics, drive state, and help.</p>
<div v-if="path === '/logs'" class="gx-grid">
<MenuTile v-for="tool in tools" :key="tool.path" :icon="tool.icon" :title="tool.name"
@@ -70,10 +71,7 @@ export const Logs = {
:disabled="mode !== 'local' && tool.availability === 'local-only'" @select="go(tool.path)" />
</div>
<section v-else-if="path === '/logs/help'" class="gx-settings">
<header class="gx-settings__header gx-page-header"><div><h2>Help & Community</h2><p>Guides and help from the community.</p></div></header>
<section class="gx-card"><div class="gx-section__header"><i class="bi bi-book" aria-hidden="true"></i><span class="gx-section__title">Wiki</span></div>
<div class="gx-panel"><p class="gx-note">Find setup guides, feature explanations, and troubleshooting steps for StarPilot and Android Auto.</p>
<a class="gx-btn gx-btn--tonal" href="https://wiki.firestar.link/" target="_blank" rel="noopener noreferrer">Open the Wiki</a></div></section>
<header class="gx-settings__header gx-page-header"><div><h2>Help & Community</h2><p>Guides and help from the community.</p></div><WikiHelp path="/logs/help" /></header>
<section class="gx-card"><div class="gx-section__header"><i class="bi bi-discord" aria-hidden="true"></i><span class="gx-section__title">Discord</span></div>
<div class="gx-panel"><p class="gx-note">Ask the community for help, share what you have tried, and follow StarPilot announcements.</p>
<a class="gx-btn gx-btn--tonal" href="https://firestar.link/discord" target="_blank" rel="noopener noreferrer">Join Discord</a></div></section>
@@ -83,7 +81,7 @@ export const Logs = {
<template v-else-if="path === '/logs/monitor'"><SystemMonitor :mode="mode" :unauthorized="unauthorized" /></template>
<template v-else-if="path === '/logs/crashes' && mode === 'local'">
<h2>Crash Reports</h2>
<header class="gx-settings__header gx-page-header"><div><h2>Crash Reports</h2></div><WikiHelp /></header>
<p class="gx-note">Local reports saved when a process stops unexpectedly.</p>
<GxNotice tone="danger" v-if="crashes.error">{{ crashes.error }}</GxNotice>
<div class="gx-crash-controls"><button type="button" class="gx-btn" :disabled="crashes.deleting" @click="crashFeed.remove(null)">Delete All</button><span>{{ crashes.scanIncomplete ? 'At least ' : '' }}{{ crashes.reportCount }} reports · {{ crashes.storageIncomplete ? 'At least ' : '' }}{{ storedSize(crashes.storageBytes) }} stored</span><input class="gx-field" type="search" v-model="search" placeholder="Search report names" aria-label="Search crash reports"></div>
@@ -100,7 +98,7 @@ export const Logs = {
</template>
<section v-else-if="path === '/logs/starport' && mode === 'local'" class="gx-settings gx-starport-logs" aria-labelledby="gx-starport-logs-title">
<header class="gx-settings__header gx-page-header"><div><h2 id="gx-starport-logs-title">StarPort Logs</h2>
<p>The last 20 connection sessions, newest first. The archive includes every session, a readable report for each, StarPort settings, the car view's renderer logs, and a snapshot of the device (Wi-Fi, Bluetooth and kernel logs, build, CPU load). Hardware addresses are masked.</p></div></header>
<p>The last 20 connection sessions, newest first. The archive includes every session, a readable report for each, StarPort settings, the car view's renderer logs, and a snapshot of the device (Wi-Fi, Bluetooth and kernel logs, build, CPU load). Hardware addresses are masked.</p></div><WikiHelp /></header>
<BluetoothNotice v-if="bluetooth" feature="Log downloads">Log summaries remain available.</BluetoothNotice>
<div class="gx-settings__controls gx-actions"><a v-if="!bluetooth" class="gx-btn" :href="bundleUrl()" download><i class="bi bi-file-earmark-zip" aria-hidden="true"></i><span>Download all logs</span><span class="gx-starport-logs__format">ZIP</span></a><button type="button" class="gx-btn gx-btn--tonal" @click="starportFeed.load()"><i class="bi bi-arrow-clockwise" aria-hidden="true"></i><span>Refresh</span></button></div>
<section v-if="logSend.available" class="gx-card gx-panel gx-starport-send" aria-labelledby="gx-starport-send-title">
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxDialog } from "./dialog.js"
import { GxState } from "./state.js"
import { GxNotice } from "./notice.js"
@@ -38,7 +39,7 @@ export function curveGeometry(points) {
}
export const LongitudinalCurvesPage = {
components: { GxDialog, GxState, GxNotice, GalaxySettingRow },
components: { WikiHelp, GxDialog, GxState, GxNotice, GalaxySettingRow },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true }, go: { type: Function, required: true } },
setup(props) {
const state = reactive({ status: "idle", data: null, pending: null, error: "", profile: "standard", category: "acceleration" })
@@ -61,7 +62,7 @@ export const LongitudinalCurvesPage = {
template: `
<section class="gx-long-curves" aria-label="Longitudinal curves" :inert="busy" :aria-busy="busy || undefined">
<header class="gx-settings__header gx-page-header"><div><h2>Longitudinal Curves</h2>
<p>Adjust acceleration, braking, and following curves for each driving personality.</p></div></header>
<p>Adjust acceleration, braking, and following curves for each driving personality.</p></div><WikiHelp /></header>
<GxState v-if="mode !== 'local'">Local saved curves are unavailable in preview.</GxState>
<template v-else>
<div class="gx-long-curves__tabs gx-tabs" role="group" aria-label="Personality profile">
+4 -2
View File
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxDialog } from "./dialog.js"
import { GxState } from "./state.js"
import { GxNotice } from "./notice.js"
@@ -523,7 +524,7 @@ const ModelDownloadProgress = {
export const ModelsPage = {
name: "ModelsPage",
components: { GxDialog, GxState, GalaxySelect, GxNotice, ModelDownloadProgress },
components: { WikiHelp, GxDialog, GxState, GalaxySelect, GxNotice, ModelDownloadProgress },
props: {
mode: { type: String, required: true },
unauthorized: { type: Function, required: true },
@@ -897,7 +898,8 @@ export const ModelsPage = {
<template v-else>
<header class="gx-settings__header gx-page-header"><div><h2>Models</h2>
<p>Choose what drives your car, pair models, and manage downloads.</p></div></header>
<p>Choose what drives your car, pair models, and manage downloads.</p></div>
<WikiHelp /></header>
<GxNotice v-if="message" tone="info">{{ message }}</GxNotice>
<GxNotice v-if="error" tone="danger" title="Models">{{ error }}</GxNotice>
<GxNotice v-if="status.isOnroad" tone="warn">Selections apply next onroad cycle. Park before downloading models or changing Jetlink.</GxNotice>
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxCollapse } from './disclosure.js'
import { isMapLink } from "./share-destination.js"
import { GxNotice } from "./notice.js"
@@ -309,7 +310,7 @@ export const FavoriteChoices = {
export const NavigationPage = {
name: "NavigationPage",
components: { GxCollapse, GxNotice, BluetoothNotice, MapOperationsPanel, NavigationMap, OfflineRoadMapsPanel, FavoriteChoices, GalaxySelect, ChoiceGroup, SourceCompare },
components: { WikiHelp, GxCollapse, GxNotice, BluetoothNotice, MapOperationsPanel, NavigationMap, OfflineRoadMapsPanel, FavoriteChoices, GalaxySelect, ChoiceGroup, SourceCompare },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true },
go: { type: Function, default: null }, initialTab: { type: String, default: "route" }, tabs: { type: Array, required: true } },
data() { return { bluetooth: bluetoothConnection(), data: null, results: [], busy: false, error: "", stale: false, tab: this.initialTab, gpsGuide: "android", query: "", token: "", googleKey: "", googleTest: null, mapboxOpen: false, googleOpen: false, searched: false,
@@ -539,7 +540,7 @@ export const NavigationPage = {
template: `
<div class="gx-view gx-navigation" :inert="busy || searchPending" :aria-busy="busy || searchPending || undefined">
<header class="gx-settings__header gx-page-header"><div><h2>Navigation</h2>
<p>Pick a destination, save maps for offline use, and choose where maps, directions and position come from.</p></div></header>
<p>Pick a destination, save maps for offline use, and choose where maps, directions and position come from.</p></div><WikiHelp /></header>
<ul v-if="sources.length" class="gx-navigation__sources" aria-label="Current sources">
<li v-for="source in sources" :key="source.label"><a class="gx-navigation__chip" href="#/navigation/setup" @click.prevent="selectTab('setup')"><i class="bi" :class="source.icon" aria-hidden="true"></i><span>{{ source.label }}: {{ source.value }}</span></a></li>
</ul>
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { requestJson } from "./startup.js"
import { GxNotice } from "./notice.js"
import { GxState } from "./state.js"
@@ -27,7 +28,7 @@ export const choiceRow = (label, value, choices, reason = '') => ({ label, value
export const NetworksPage = {
name: "NetworksPage",
components: { GxNotice, GxState, GalaxySettingRow, GalaxyHotspot, GxDialog },
components: { WikiHelp, GxNotice, GxState, GalaxySettingRow, GalaxyHotspot, GxDialog },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true } },
data: () => ({ snapshot: null, busy: false, error: '', openUuid: null, adding: false, joiningSsid: '', joinPassword: '',
hiddenOpen: false, hiddenSsid: '', showJoinPassword: false, forgetUuid: null, timer: null, controller: null, generation: 0, active: false }),
@@ -174,7 +175,7 @@ export const NetworksPage = {
},
},
template: `<section class="gx-driving gx-networks" aria-label="Networks">
<header class="gx-settings__header gx-page-header"><div><h2>Networks</h2><p>Wi-Fi priority, cellular data, and local hotspot access.</p></div></header>
<header class="gx-settings__header gx-page-header"><div><h2>Networks</h2><p>Wi-Fi priority, cellular data, and local hotspot access.</p></div><WikiHelp /></header>
<GxState v-if="mode !== 'local'">Connect to your comma to manage its networks.</GxState>
<GxState v-else-if="!snapshot && !error" loading>Loading network settings…</GxState>
<template v-if="snapshot">
@@ -1,7 +1,7 @@
export const ONROAD_LAYOUT_TEMPLATE = `
<section class="gx-settings gx-layout" aria-label="Colors and layout" :aria-busy="busy || undefined" :class="{'is-shrunk': state.shrunk}">
<div class="gx-settings__header gx-page-header"><div><h2>{{ projection ? 'StarPort Layout' : 'Colors & Layout' }}</h2></div>
<button class="gx-icon-btn gx-layout__info" type="button" :aria-expanded="state.aboutOpen" aria-controls="gx-layout-about" aria-label="About this editor" title="About this editor" @click="state.aboutOpen = !state.aboutOpen"><i class="bi bi-info-circle" aria-hidden="true"></i></button>
<div class="gx-actions"><WikiHelp /><button class="gx-icon-btn gx-layout__info" type="button" :aria-expanded="state.aboutOpen" aria-controls="gx-layout-about" aria-label="About this editor" title="About this editor" @click="state.aboutOpen = !state.aboutOpen"><i class="bi bi-info-circle" aria-hidden="true"></i></button></div>
</div>
<GxNotice v-if="mode === 'local' && state.data && !state.data.editable && !(projection && state.data.reason)" tone="warn">Park the vehicle and reload to edit. If it stays unavailable, reload saved settings.</GxNotice>
<div class="gx-layout__targets">
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxCollapse } from './disclosure.js'
import { ONROAD_LAYOUT_TEMPLATE } from "./onroad-layout-template.js"
import { GxState } from "./state.js"
@@ -397,7 +398,7 @@ export const LayoutWidgetPreview = {
}
export const OnroadLayoutPage = {
components: { GxCollapse, GxState, LayoutWidgetPreview, GalaxySelect, GxNotice, GxDialog, GalaxySettingRow },
components: { WikiHelp, GxCollapse, GxState, LayoutWidgetPreview, GalaxySelect, GxNotice, GxDialog, GalaxySettingRow },
props: {
projection: { type: Boolean, default: false }, mode: { type: String, required: true }, unauthorized: { type: Function, required: true },
initialPanel: { type: String, default: "widgets" }
+3 -2
View File
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxDialog } from "./dialog.js"
import { GxState } from "./state.js"
import { GxNotice } from "./notice.js"
@@ -16,7 +17,7 @@ const SIDES = [
export const PipPage = {
name: "PipPage",
components: { GxDialog, GxState, GxNotice, BluetoothNotice, GalaxySettingRow },
components: { WikiHelp, GxDialog, GxState, GxNotice, BluetoothNotice, GalaxySettingRow },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true },
go: { type: Function, required: true } },
setup(props) {
@@ -177,7 +178,7 @@ export const PipPage = {
<section class="gx-settings gx-pip" aria-label="Blind Spot Camera & Preview saved settings" :inert="busy" :aria-busy="busy || undefined">
<header class="gx-settings__header gx-page-header"><div><h2>Blind Spot Camera & Preview</h2>
<p>Shows a close-up of the cabin window as you drive. Whether it appears on your turn signal or when a car is in your blind spot depends on your settings. Choose which window each side covers and how much to zoom in.</p></div>
<div class="gx-actions"><a class="gx-btn gx-btn--tonal" href="https://wiki.firestar.link/exclusive/cameras-and-monitoring/#pip-blind-spot-camera-preview" target="_blank" rel="noopener noreferrer"><i class="bi bi-book" aria-hidden="true"></i> PiP guide</a>
<div class="gx-actions"><WikiHelp />
<button type="button" class="gx-btn gx-btn--tonal" :disabled="bluetooth || state.cameraWarming" @click="liveCamera.refresh()"><i class="bi bi-camera" aria-hidden="true"></i> Take new snapshot</button><button type="button" class="gx-icon-btn" aria-label="Position side cameras" title="Position side cameras" @click="go('/theme_maker')"><i class="bi bi-layout-wtf" aria-hidden="true"></i></button></div></header>
<GxState v-if="mode !== 'local'">Local saved settings are unavailable in preview.</GxState>
<template v-else>
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxState } from "./state.js"
import { GxNotice } from "./notice.js"
import { BluetoothNotice, bluetoothConnection } from "./bluetooth-notice.js"
@@ -22,7 +23,7 @@ export class LocalHistoryFeed extends SnapshotFeed {
export const LocalRecordingsPage = {
name: "LocalRecordingsPage",
components: { GxState, GxNotice, BluetoothNotice, RecordingActions, GalaxySelect, RouteWorkspace },
components: { WikiHelp, GxState, GxNotice, BluetoothNotice, RecordingActions, GalaxySelect, RouteWorkspace },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true },
routePath: { type: String, default: "/recordings" }, go: { type: Function, default: () => {} } },
data: () => ({ bluetooth: bluetoothConnection(), sortOrder: "newest", query: "", preservedOnly: false, status: "idle", data: null, error: "", entryMode: "footage", exports: null }),
@@ -77,7 +78,7 @@ export const LocalRecordingsPage = {
<BluetoothNotice v-if="bluetooth" feature="Local recordings and replay" />
<RouteWorkspace v-else-if="selectedRouteId && mode === 'local'" :key="selectedRouteId" :route-id="selectedRouteId" :summary="selectedSummary" :initial-mode="entryMode" :unauthorized="unauthorized" :exports="exports" @back="go('/recordings')" @changed="refresh" />
<div v-else ref="routeList" class="gx-recordings__browse">
<header class="gx-recordings__heading"><h2>Routes</h2><span v-if="mode === 'local' && data" class="gx-note">{{ stats.count }} drives · ~{{ formatDuration(stats.minutes) }}</span></header>
<header class="gx-settings__header gx-page-header"><div class="gx-recordings__heading"><h2>Routes</h2><span v-if="mode === 'local' && data" class="gx-note">{{ stats.count }} drives · ~{{ formatDuration(stats.minutes) }}</span></div><WikiHelp /></header>
<GxState v-if="mode !== 'local'">Local recordings are unavailable in the offline preview.</GxState>
<template v-else>
<GxNotice v-if="exports?.job?.owned" tone="info">
+3 -2
View File
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxState } from "./state.js"
import { SettingsPage } from "./settings.js"
import { GxNotice } from "./notice.js"
@@ -53,7 +54,7 @@ export class SentryEventsFeed extends SnapshotFeed {
export const SentryEventsPage = {
name: "SentryEventsPage",
components: { GxState, GxNotice, BluetoothNotice, SentryNotifications, SettingsPage, BalancedImage },
components: { WikiHelp, GxState, GxNotice, BluetoothNotice, SentryNotifications, SettingsPage, BalancedImage },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true },
go: { type: Function, required: true } },
data: () => ({ bluetooth: bluetoothConnection(), status: "idle", data: null, error: "", deleting: false }),
@@ -69,7 +70,7 @@ export const SentryEventsPage = {
template: `
<div class="gx-view gx-home" aria-label="Sentry motion events">
<header class="gx-settings__header gx-page-header"><div><h2>Sentry</h2>
<p>Review motion events, configure motion monitoring, and manage notifications. Timestamps use the device clock and may be inaccurate.</p></div></header>
<p>Review motion events, configure motion monitoring, and manage notifications. Timestamps use the device clock and may be inaccurate.</p></div><WikiHelp /></header>
<SettingsPage :mode="mode" :unauthorized="unauthorized" initial-page="sentry" title="" />
<SentryNotifications :mode="mode" :unauthorized="unauthorized" />
@@ -1,9 +1,10 @@
import { WikiHelp } from './wiki-help.js'
import { GxDialog } from "./dialog.js"
import { GxNotice } from "./notice.js"
import { GxState } from "./state.js"
export const SettingsRecoveryPage = {
components: { GxDialog, GxNotice, GxState },
components: { WikiHelp, GxDialog, GxNotice, GxState },
props: { mode: { type: String, default: "local" }, unauthorized: Function },
data() { return { snapshot: null, selected: [], pending: null, busy: false, error: "", result: "", timer: null } },
mounted() { if (this.mode !== "local") return; this.refresh(); this.timer = setInterval(() => { if (!this.pending && !this.busy) this.refresh() }, 10000) },
@@ -44,7 +45,7 @@ export const SettingsRecoveryPage = {
},
template: `<section class="gx-settings" :inert="busy" :aria-busy="busy || undefined">
<header class="gx-settings__header gx-page-header"><div><h2>Show Non-Default Values</h2>
<p>Review saved settings that differ from this vehicle’s StarPilot defaults.</p></div></header>
<p>Review saved settings that differ from this vehicle’s StarPilot defaults.</p></div><WikiHelp /></header>
<GxState v-if="mode !== 'local'">Connect to local Galaxy to review saved settings.</GxState>
<template v-else>
<GxNotice v-if="snapshot && snapshot.resettableCount < snapshot.count" tone="warn">Some settings are unavailable for this vehicle. Their saved values remain unchanged.</GxNotice>
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxCollapse } from './disclosure.js'
import { requestJson } from "./startup.js"
import { GxDialog } from "./dialog.js"
@@ -294,7 +295,7 @@ export class SettingsFeed {
export const SettingsPage = {
emits: ["nested"],
components: { GxCollapse, AppReminderSettings, GxDialog, GxState, GalaxySettingRow, OnroadLayoutPage, FavoritesPage, SoundPacks, CloudProviderPage, ReverseProxySettings, GxNotice, VehicleControlsPage },
components: { WikiHelp, GxCollapse, AppReminderSettings, GxDialog, GxState, GalaxySettingRow, OnroadLayoutPage, FavoritesPage, SoundPacks, CloudProviderPage, ReverseProxySettings, GxNotice, VehicleControlsPage },
props: {
mode: { type: String, required: true }, unauthorized: { type: Function, required: true },
initialPage: { type: String, default: "hub" }, title: { type: String, default: "Toggles" },
@@ -477,7 +478,7 @@ export const SettingsPage = {
<OnroadLayoutPage ref="layoutEditor" v-if="state.layoutOpen" :mode="mode" :unauthorized="unauthorized" :initial-panel="state.layoutPanel" @target="openLayoutTarget" @close="closeLayout" />
<FavoritesPage ref="favoritesEditor" v-else-if="state.favoritesOpen" :mode="mode" :unauthorized="unauthorized" @close="closeFavorites" />
<section v-else class="gx-settings" :aria-label="title || state.data?.title || 'Settings'" :inert="busy" :aria-busy="busy || undefined">
<div v-if="title && (initialPage !== 'hub' || atSectionRoot)" class="gx-settings__header gx-page-header"><h2>{{ title }}</h2></div>
<div v-if="title && (initialPage !== 'hub' || atSectionRoot)" class="gx-settings__header gx-page-header"><h2>{{ title }}</h2><WikiHelp :page="state.data?.page === 'hub' ? activeSection.id : (state.data?.page || initialPage)" /></div>
<div v-if="mode === 'local' && initialPage === 'hub' && atSectionRoot" class="gx-settings-tabs" aria-label="Settings sections">
<button v-for="section in sections" :key="section.id" type="button" class="gx-chip" :aria-pressed="section.id === activeSection.id" @click="selectSection(section)">{{ section.label }}</button>
</div>
@@ -494,8 +495,7 @@ export const SettingsPage = {
<p class="gx-page-description" v-else-if="state.data?.page === 'torque/developer'">Adjust supported steering parameters.</p>
<p class="gx-page-description" v-else-if="state.data?.page === 'lane'">Choose lane-centering behavior and alerts.</p>
<p class="gx-page-description" v-else-if="state.data?.page === 'curve'">Set how the vehicle slows for curves ahead.</p>
<div v-else-if="state.data?.page === 'slc'"><p class="gx-page-description">Control how speed limits change your set speed.</p>
<a class="gx-btn gx-btn--tonal" href="https://wiki.firestar.link/exclusive/speed-limit-controller/#vision-speed-limits" target="_blank" rel="noopener noreferrer"><i class="bi bi-book" aria-hidden="true"></i> Vision speed limits guide</a></div>
<p class="gx-page-description" v-else-if="state.data?.page === 'slc'">Control how speed limits change your set speed.</p>
<p class="gx-page-description" v-else-if="state.data?.page === 'wheel'">Assign what the steering-wheel controls do.</p>
<p class="gx-page-description" v-else-if="['aggressive','standard','relaxed'].includes(state.data?.page)">Adjust acceleration, braking and following for this driving style.</p>
<GxState v-if="mode !== 'local'">Local settings are unavailable in preview.</GxState>
@@ -524,6 +524,7 @@ export const SettingsPage = {
<strong class="gx-sentry-status__label"><span class="gx-status-dot" aria-hidden="true"></span>{{ sentryStatus.label }}</strong>
<span class="gx-sentry-status__detail">{{ sentryStatus.detail }}</span>
</div>
<WikiHelp v-if="title && initialPage === 'hub' && !atSectionRoot" :page="state.data.page" />
<button v-if="state.data.page !== 'hub' && state.data.rows.length" type="button" class="gx-icon-btn" :aria-label="state.searchOpen ? 'Close page search' : 'Search within this page'" :aria-pressed="state.searchOpen" @click="togglePageSearch"><i class="bi" :class="state.searchOpen ? 'bi-x-lg' : 'bi-search'" aria-hidden="true"></i></button>
</div>
<div v-if="state.searchOpen && !cardIndex" class="gx-settings__search"><input ref="pageSearch" v-model="state.query" class="gx-field" type="search" aria-label="Search within this page" placeholder="Search within…"></div>
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { SystemMaintenance } from "./system-maintenance.js"
import { DriveStatePanel } from "./drive-state.js"
import { GxDialog } from "./dialog.js"
@@ -364,7 +365,7 @@ export class SoftwareStatusFeed {
}
export const SoftwarePage = {
components: { DriveStatePanel, GxDialog, GxState, GxNotice, GalaxySelect, GalaxySettingRow, SystemMaintenance },
components: { WikiHelp, DriveStatePanel, GxDialog, GxState, GxNotice, GalaxySelect, GalaxySettingRow, SystemMaintenance },
name: "SoftwarePage",
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true }, restarting: { type: Function, default: () => {} },
preparing: { type: Function, default: () => {} }, cancelPreparation: { type: Function, default: () => {} } },
@@ -678,7 +679,7 @@ export const SoftwarePage = {
},
template: `
<div class="gx-view gx-stack" :inert="busy" :aria-busy="busy || undefined">
<h2>Software &amp; Updates</h2>
<header class="gx-settings__header gx-page-header"><div><h2>Software &amp; Updates</h2></div><WikiHelp /></header>
<GxState v-if="mode !== 'local'">Software updates are unavailable in preview.</GxState>
<template v-else>
<section class="gx-card gx-panel gx-stack gx-software-card">
+4 -3
View File
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxDialog } from "./dialog.js"
import { requestJson } from "./startup.js"
import { GxNotice } from "./notice.js"
@@ -252,7 +253,7 @@ export class SpotifyFeed {
}
export const SpotifyPage = {
components: { GxNotice, GxDialog, GalaxySettingRow },
components: { WikiHelp, GxNotice, GxDialog, GalaxySettingRow },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true } },
data: () => ({
setup: null, busy: false, error: "", uploadProgress: null, now: Date.now(),
@@ -418,10 +419,10 @@ export const SpotifyPage = {
},
template: `
<section class="gx-driving gx-spotify" aria-label="Spotify" :aria-busy="busy || undefined">
<header class="gx-page-header">
<header class="gx-settings__header gx-page-header"><div>
<h2>Spotify & Phone Audio</h2>
<p>Play Spotify on your comma, or send music from your phone through the comma to your car.</p>
</header>
</div><WikiHelp /></header>
<GxNotice tone="danger" v-if="error && setup">{{ error }}</GxNotice>
<GxNotice v-if="!setup" :busy="!error" :tone="error ? 'danger' : 'info'">{{ error || "Checking Spotify setup… Reconnecting automatically…" }}</GxNotice>
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxCollapse } from './disclosure.js'
import { GxState } from "./state.js"
import { GxDialog } from "./dialog.js"
@@ -559,7 +560,7 @@ export function connectionProgress(runtime, { wired = false, app = "", selected
}
export const StarPortPage = {
components: { GxCollapse, GxState, GxIconButton, GxNotice, BluetoothNotice, GxDialog, GalaxySettingRow, StarPortGuidedSetup },
components: { WikiHelp, GxCollapse, GxState, GxIconButton, GxNotice, BluetoothNotice, GxDialog, GalaxySettingRow, StarPortGuidedSetup },
props: {
mode: { type: String, required: true }, localAccess: { type: Boolean, required: true },
unauthorized: { type: Function, required: true }
@@ -893,10 +894,10 @@ export const StarPortPage = {
},
template: `
<section class="gx-driving" aria-label="StarPort setup" :inert="busy" :aria-busy="busy || undefined">
<header class="gx-page-header">
<header class="gx-settings__header gx-page-header"><div>
<h2>StarPort</h2>
<p>Show the StarPilot driving view on your car’s screen. Choose your device, follow the setup steps, then connect.</p>
</header>
</div><WikiHelp /></header>
<GxNotice tone="info" title="Supported setups">StarPort officially supports your car’s built-in Android Auto, the AAWireless and Motorola MA1 wireless adapters, and the Open Headunit and HeadunitPad tablet apps. Other adapters and apps may work, but they aren’t tested and may not connect reliably.</GxNotice>
<GxNotice tone="warn" v-if="!wired && !app && runtime?.dedicated_wifi_interface === false">StarPort uses the comma’s Wi-Fi to connect to your car and disconnects it from your current Wi-Fi network. Use the Galaxy hotspot for local access during projection. Remote Galaxy access requires Internet on the comma.</GxNotice>
<GxNotice tone="danger" v-if="error && setup">{{ error }}</GxNotice>
@@ -1013,11 +1014,10 @@ export const StarPortPage = {
<section v-if="setup" class="gx-card gx-step" aria-labelledby="gx-starport-help-title">
<div class="gx-step__head">
<span class="gx-step__num" aria-hidden="true"><i class="bi bi-question-circle"></i></span>
<div><h3 id="gx-starport-help-title">Still having trouble?</h3><p>Our wiki has detailed help for pairing, connection status, other phones, wireless adapters, and screen problems.</p></div>
<div><h3 id="gx-starport-help-title">Still having trouble?</h3><p>Our wiki (click book icon at the top right corner) has detailed help for pairing, connection status, other phones, wireless adapters, and screen problems.</p></div>
</div>
<div class="gx-step__body">
<div class="gx-driving__actions gx-actions">
<a class="gx-btn" href="https://wiki.firestar.link/exclusive/android-auto/" target="_blank" rel="noopener noreferrer">Read the Android Auto troubleshooting guide</a>
<a class="gx-btn gx-btn--tonal" href="#/logs/starport"><i class="bi bi-journal-text"></i> Connection Logs</a>
</div>
</div>
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxState } from "./state.js"
import { GxNotice } from "./notice.js"
import { displayNumber, processFeature, processRows, processState, vital } from "./system-monitor-data.js"
@@ -6,7 +7,7 @@ import { GalaxySelect } from "./galaxy-select.js"
export const SystemMonitor = {
name: "SystemMonitor",
components: { GxState, GxNotice, GalaxySelect },
components: { WikiHelp, GxState, GxNotice, GalaxySelect },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true } },
data: () => ({ snapshot: null, status: "loading", error: "", query: "", scope: "comma", sort: "cpu", descending: true }),
mounted() {
@@ -35,7 +36,7 @@ export const SystemMonitor = {
},
template: `
<div class="gx-monitor">
<div class="gx-monitor__toolbar gx-page-header"><div><h2>System Monitor</h2><div class="gx-note">{{ mode === 'sample' ? 'Synthetic sample' : 'Local system' }} · Captured {{ captured }}</div></div><span class="gx-chip">{{ mode === 'sample' ? 'Offline preview' : status === 'current' ? 'Live' : 'Unavailable' }}</span></div>
<div class="gx-monitor__toolbar gx-page-header"><div><h2>System Monitor</h2><div class="gx-note">{{ mode === 'sample' ? 'Synthetic sample' : 'Local system' }} · Captured {{ captured }}</div></div><span class="gx-chip">{{ mode === 'sample' ? 'Offline preview' : status === 'current' ? 'Live' : 'Unavailable' }}</span><WikiHelp /></div>
<p v-if="mode === 'sample'" class="gx-note">Illustrative values only. No device was read.</p>
<p v-else class="gx-note">Read-only system activity. Updates every few seconds.</p>
<GxNotice tone="danger" v-if="error">{{ error }}</GxNotice>
+3 -2
View File
@@ -1,9 +1,10 @@
import { WikiHelp } from './wiki-help.js'
import { navigate } from "./router.js"
import { MenuTile } from "./menu-tile.js"
export const Tools = {
name: "Tools",
components: { MenuTile },
components: { WikiHelp, MenuTile },
props: { tools: { type: Array, required: true }, mode: { type: String, required: true } },
methods: {
open(tool) { navigate(tool.path) },
@@ -14,7 +15,7 @@ export const Tools = {
},
template: `
<div class="gx-view">
<h2>Tools</h2>
<header class="gx-settings__header gx-page-header"><div><h2>Tools</h2></div><WikiHelp /></header>
<div class="gx-grid">
<MenuTile v-for="tool in tools" :key="tool.path" :icon="tool.icon" :title="tool.name"
:description="tool.description" :availability="availability(tool)" @select="open(tool)" />
+3 -2
View File
@@ -1,3 +1,4 @@
import { WikiHelp } from './wiki-help.js'
import { GxDialog } from "./dialog.js"
import { GxState } from "./state.js"
import { reactive } from "../vendor/vue/vue.esm-browser.js"
@@ -11,7 +12,7 @@ import { FORMATS, annotationDraft, displaySide, sourcePoint } from "./vasm-geome
export const VasmPage = {
name: "VasmPage",
components: { GxDialog, GxState, GalaxySettingRow, GxNotice, BluetoothNotice },
components: { WikiHelp, GxDialog, GxState, GalaxySettingRow, GxNotice, BluetoothNotice },
props: { mode: { type: String, required: true }, unauthorized: { type: Function, required: true },
go: { type: Function, required: true } },
setup(props) {
@@ -169,7 +170,7 @@ export const VasmPage = {
<section class="gx-settings gx-vasm" aria-label="V-ASM saved settings" :inert="busy" :aria-busy="busy || undefined">
<header class="gx-settings__header gx-page-header"><div><h2>V-ASM Spot Monitoring</h2>
<p>Highlight the side windows a driver would check in the cabin camera, and tune visual spot-monitoring options.</p></div>
<div class="gx-actions"><a class="gx-btn gx-btn--tonal" href="https://wiki.firestar.link/exclusive/cameras-and-monitoring/" target="_blank" rel="noopener noreferrer"><i class="bi bi-book" aria-hidden="true"></i> Cameras &amp; Monitoring guide</a>
<div class="gx-actions"><WikiHelp />
<button type="button" class="gx-btn gx-btn--tonal" :disabled="bluetooth || state.cameraWarming" @click="liveCamera.refresh()"><i class="bi bi-camera" aria-hidden="true"></i> Take new snapshot</button></div></header>
<GxNotice v-if="mode === 'local' && state.data && !state.data.parked" tone="warn">Turn the vehicle off to change these settings.</GxNotice>
<GxState v-if="mode !== 'local'">Local saved settings are unavailable in preview.</GxState>
@@ -0,0 +1,9 @@
import { route } from './route-state.js'
import { wikiLink } from './wiki-links.js'
export const WikiHelp = {
props: { path: { type: String, default: '' }, page: { type: String, default: '' } },
computed: { href() { return wikiLink(this.path || route.path, this.page) } },
template: `<a v-if="href" class="gx-icon-btn gx-wiki-help" :href="href" target="_blank" rel="noopener noreferrer"
aria-label="Open wiki guide (opens in a new tab)" title="Open wiki guide"><i class="bi bi-book" aria-hidden="true"></i></a>`,
}
@@ -0,0 +1,71 @@
// Only map pages with substantial, relevant guidance. Omit overview-only destinations.
// Paths are relative to the wiki root; unmapped pages hide the help link.
const settings = 'usage/settings/'
const galaxy = 'usage/galaxy/'
const cameras = 'exclusive/cameras-and-monitoring/'
const starport = 'exclusive/starport/'
export const WIKI_LINKS = Object.freeze({
'/settings': settings,
'/manage_models': 'usage/model-manager/',
'/model_laboratory': 'usage/model-manager/#model-pair',
'/navigation': 'exclusive/navigation/',
'/navigation/maps': 'exclusive/navigation/#offline-maps',
'/navigation/setup': 'exclusive/navigation/#set-up',
'/cameras': cameras,
'/cameras/pip': cameras + '#pip-blind-spot-camera-preview',
'/cameras/vasm': cameras + '#v-asm-adjacent-spot-monitoring',
'/cameras/events': 'exclusive/sentry-mode/',
'/cameras/sentry-settings': 'exclusive/sentry-mode/#settings',
'/bluetooth': 'exclusive/bluetooth-controls/',
'/starport': starport,
'/starport/audio': starport + '#other-phones-and-audio',
'/spotify': starport + '#set-up-spotify-connect',
'/galaxy': galaxy + '#access-galaxy',
'/system': 'software/starpilot/#changing-branches',
'/logs/starport': starport + '#connection-logs',
'/driving': settings + '#driving-controls',
'/tuning': settings + '#lateral-tuning',
'/tuning/flm': settings + '#lateral-tuning',
})
// Settings navigate internally without changing the URL. These keys follow the API's page IDs.
export const SETTINGS_WIKI_LINKS = Object.freeze({
hub: settings,
lateral: settings + '#steering',
longitudinal: settings + '#driving-controls',
driving_options: settings + '#driving-controls',
personalities: settings + '#customize-driving-personalities',
starport_options: starport,
aol: settings + '#always-on-lateral',
conditional: settings + '#conditional-experimental-mode-recommended',
curve: 'usage/operation/#curve-speed-controller',
slc: 'exclusive/speed-limit-controller/#vision-speed-limits',
torque: settings + '#lateral-tuning',
profiles: settings + '#customize-driving-personalities',
aggressive: settings + '#customize-driving-personalities',
standard: settings + '#customize-driving-personalities',
relaxed: settings + '#customize-driving-personalities',
lane: 'exclusive/lane-centering/',
lane_change: settings + '#lane-changes',
wheel: settings + '#wheel-controls',
sounds: settings + '#alerts-and-sounds',
sentry: 'exclusive/sentry-mode/#settings',
pip: cameras + '#pip-blind-spot-camera-preview',
})
function lookup(links, key) {
// Inherit only at slash boundaries, so /navigation/setup matches /navigation, not /nav.
while (key) {
if (Object.hasOwn(links, key)) return links[key]
key = key.slice(0, key.lastIndexOf('/') < 0 ? 0 : key.lastIndexOf('/'))
}
return undefined
}
export function wikiLink(path, page = '') {
const settingsPage = page || (path.startsWith('/driving/') ? path.slice('/driving/'.length) : '')
// A settings page must have its own guide; never fall back to the generic Toggles guide.
const target = settingsPage ? lookup(SETTINGS_WIKI_LINKS, settingsPage) : WIKI_LINKS[path]
return target === undefined ? null : 'https://wiki.firestar.link/' + target
}