Keep existing channels usable before migration activation

This commit is contained in:
firestar5683
2026-11-17 17:59:45 -06:00
parent 702a1cc552
commit 91241e6183
5 changed files with 19 additions and 11 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
[![Ask DeepWiki](https://img.shields.io/badge/Ask-DeepWiki-blue?logo=readthedocs&logoColor=white)](https://deepwiki.com/StarPilotHQ/StarPilot)
[![Discord](https://img.shields.io/discord/1387432184121393333?label=Discord)](https://firestar.link/discord)
[![Last Updated](https://img.shields.io/github/last-commit/StarPilotHQ/StarPilot/testing)](https://github.com/StarPilotHQ/StarPilot)
[![Last Updated](https://img.shields.io/github/last-commit/StarPilotHQ/StarPilot)](https://github.com/StarPilotHQ/StarPilot)
[![Wiki](https://img.shields.io/badge/Wiki-StarPilot-blue?logo=wiki)](https://wiki.firestar.link)
[![App Store](https://img.shields.io/badge/App_Store-black?logo=apple&logoColor=white)](https://firestar.link/ios)
[![Google Play](https://img.shields.io/badge/Google_Play-green?logo=googleplay&logoColor=white)](https://firestar.link/android)
@@ -11,7 +11,7 @@
**StarPilot** is a custom fork of [comma.ai's openpilot](https://comma.ai/openpilot),
an open source driver assistance system.
**This is the StarPilot 7.0 testing channel (`testing`, formerly `Dom`). Feature migration,
**This is the StarPilot 7.0 testing channel (`Dom`, planned name `testing`). Feature migration,
vehicle qualification, and Auto Learn validation are still in progress.**
Openpilot provides
@@ -318,7 +318,7 @@ const page = (selectedTarget = 'Dom', availableBranches = ['StarPilot', 'Dom', '
data: { installed: { ...installed, branch: installedBranch } }, actionDisabled: false,
draftBranch: '', draftTouched: false, dialog: null, version: '', calls: [],
async loadVersions() { this.calls.push(this.draftBranch) } }
for (const key of ['branchOptions', 'previousVersion', 'otherBranches'])
for (const key of ['branchOptions', 'previousVersion', 'primaryBranches', 'otherBranches'])
Object.defineProperty(state, key, {get:()=>SoftwarePage.computed[key].call(state)})
return state
}
@@ -748,6 +748,11 @@ await SoftwarePage.methods.onPrimaryBranchChange.call(branchLayout)
assert.equal(branchLayout.draftBranch, '')
assert.deepEqual(branchLayout.calls, [], 'opening Other does not refresh metadata without a branch')
assert.deepEqual(branchLayout.otherBranches.map(branch => branch.name), ['beta'])
const pendingChannels = page('Dom', ['Dom', 'StarPilot', 'dev'])
SoftwarePage.methods.syncDraftBranch.call(pendingChannels, 'Dom')
assert.deepEqual(pendingChannels.primaryBranches, ['StarPilot', 'Dom'])
assert.equal(pendingChannels.primaryChoice, 'Dom', 'unpublished channel names do not displace working primary choices')
assert.deepEqual(pendingChannels.otherBranches.map(branch => branch.name), ['dev'])
const legacyChannels = page('Dom', ['Dom', 'StarPilot', 'dev', 'testing', 'stable'])
SoftwarePage.methods.syncDraftBranch.call(legacyChannels, 'Dom')
assert.equal(legacyChannels.primaryChoice, 'other:')
+1 -1
View File
@@ -1008,7 +1008,7 @@ export const ModelsPage = {
<label class="gx-switch"><input type="checkbox" role="switch" aria-label="Charge phone over USB" :checked="status.jetlink.chargePhone === true" :disabled="!actionAvailable('jetlink')" @change="toggleJetlinkCharge($event)"><span class="gx-switch__track"></span><span class="gx-switch__thumb"></span></label>
</div>
<p class="gx-model-reason">Set up parked with a USB 3 data cable and separate power. Keep the computer awake; keep the iPhone app open and unlocked.</p>
<div class="gx-actions"><a class="gx-btn gx-btn--tonal" href="https://github.com/StarPilotHQ/StarPilot/blob/testing/openpilot/starpilot/models/JETLINK.md" target="_blank" rel="noopener noreferrer"><i class="bi bi-box-arrow-up-right" aria-hidden="true"></i> Open Jetlink setup guide</a></div>
<div class="gx-actions"><a class="gx-btn gx-btn--tonal" href="https://github.com/StarPilotHQ/StarPilot/blob/Dom/openpilot/starpilot/models/JETLINK.md" target="_blank" rel="noopener noreferrer"><i class="bi bi-box-arrow-up-right" aria-hidden="true"></i> Open Jetlink setup guide</a></div>
</div>
</details>
</section>
@@ -461,7 +461,11 @@ export const SoftwarePage = {
return [...new Set([this.operations?.selectedTarget, this.data?.installed.branch, this.previousVersion?.branch, ...available].filter(branch => branch && branch !== "other:"))]
.map(name => ({ name, available: available.includes(name) || name === this.data?.installed.branch }))
},
otherBranches() { return this.branchOptions.filter(branch => !['stable', 'testing'].includes(branch.name)) },
primaryBranches() {
const available = name => this.branchOptions.some(branch => branch.name === name && branch.available)
return [['stable', 'StarPilot'], ['testing', 'Dom']].map(([name, legacy]) => available(name) ? name : available(legacy) ? legacy : name)
},
otherBranches() { return this.branchOptions.filter(branch => !this.primaryBranches.includes(branch.name)) },
hasInstalledVersion() {
const recent = this.operations?.history?.recent
return this.draftBranch === this.data?.installed.branch ||
@@ -573,19 +577,19 @@ export const SoftwarePage = {
},
syncDraftBranch(branch) {
this.draftBranch = branch || this.data?.installed.branch || ""
this.primaryChoice = ['stable', 'testing'].includes(this.draftBranch) ? this.draftBranch : this.draftBranch ? 'other:' : ''
this.primaryChoice = this.primaryBranches.includes(this.draftBranch) ? this.draftBranch : this.draftBranch ? 'other:' : ''
},
onPrimaryBranchChange() {
this.draftTouched = true
if (this.primaryChoice === 'other:') {
if (['stable', 'testing'].includes(this.draftBranch)) this.draftBranch = ''
if (this.primaryBranches.includes(this.draftBranch)) this.draftBranch = ''
return
}
this.draftBranch = this.primaryChoice
return this.changeBranch()
},
async changeBranch() {
this.primaryChoice = ['stable', 'testing'].includes(this.draftBranch) ? this.draftBranch : 'other:'
this.primaryChoice = this.primaryBranches.includes(this.draftBranch) ? this.draftBranch : 'other:'
this.draftTouched = true
this.version = ""
this.newerVersionLimit = 2; this.olderVersionLimit = 1; this.collapsedOlderLimit = 0
@@ -728,8 +732,7 @@ export const SoftwarePage = {
<DriveStatePanel offroad-only :lockout="operations?.parked === false" />
<label class="gx-field-group"><span class="gx-row__label">Branch</span>
<GalaxySelect show-description v-model="primaryChoice" class="gx-field gx-field--full" aria-label="Version branch" :disabled="metadataActionDisabled || !operations.canCheck" @change="onPrimaryBranchChange">
<option value="stable" :data-description="primaryBranchHelpFor('stable')" :disabled="!branchOptions.some(branch => branch.name === 'stable' && branch.available)">Stable</option>
<option value="testing" :data-description="primaryBranchHelpFor('testing')" :disabled="!branchOptions.some(branch => branch.name === 'testing' && branch.available)">Testing</option>
<option v-for="branch in primaryBranches" :key="branch" :value="branch" :data-description="primaryBranchHelpFor(branch)" :disabled="!branchOptions.some(option => option.name === branch && option.available)">{{ branchLabel(branch) }}</option>
<option value="other:">Other branches…</option>
</GalaxySelect>
</label>
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "2e37282639b9825fd60b64af4dd82ab5eea9290ba7f0706bb64e1988543c6c51", "schema_version": 1}
{"protected_inventory_sha256": "e50af3c3ccbc4df5d97292180f6972f63009659ab1a5e6e020f1bad9857e64e9", "schema_version": 1}