diff --git a/README.md b/README.md index 0fa5cb2654..cfae94df9c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [](https://deepwiki.com/StarPilotHQ/StarPilot) [](https://firestar.link/discord) -[](https://github.com/StarPilotHQ/StarPilot) +[](https://github.com/StarPilotHQ/StarPilot) [](https://wiki.firestar.link) [](https://firestar.link/ios) [](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 diff --git a/openpilot/starpilot/galaxy/tests/test_software_status.mjs b/openpilot/starpilot/galaxy/tests/test_software_status.mjs index b20951564a..0392bea32f 100644 --- a/openpilot/starpilot/galaxy/tests/test_software_status.mjs +++ b/openpilot/starpilot/galaxy/tests/test_software_status.mjs @@ -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:') diff --git a/openpilot/starpilot/galaxy/web/js/models.js b/openpilot/starpilot/galaxy/web/js/models.js index a2e89d0f56..3544c57793 100644 --- a/openpilot/starpilot/galaxy/web/js/models.js +++ b/openpilot/starpilot/galaxy/web/js/models.js @@ -1008,7 +1008,7 @@ export const ModelsPage = {
Set up parked with a USB 3 data cable and separate power. Keep the computer awake; keep the iPhone app open and unlocked.
- + diff --git a/openpilot/starpilot/galaxy/web/js/software-status.js b/openpilot/starpilot/galaxy/web/js/software-status.js index 426b348b74..6db6137575 100644 --- a/openpilot/starpilot/galaxy/web/js/software-status.js +++ b/openpilot/starpilot/galaxy/web/js/software-status.js @@ -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 = {