diff --git a/changelog/2026-12-04-digitakt-ii-trial-preview.md b/changelog/2026-12-04-digitakt-ii-trial-preview.md new file mode 100644 index 0000000000..cb3857a3e3 --- /dev/null +++ b/changelog/2026-12-04-digitakt-ii-trial-preview.md @@ -0,0 +1 @@ +Digitakt II: the local beta Status page shows the mock box’s build and running modules. Try starts a RAM trial and Undo restores the previous set. If USB drops during Undo, the page shows the last confirmed set and reads the active modules again on reconnect. Keep stays disabled. diff --git a/src/App.tsx b/src/App.tsx index 58a56785dc..5032831cf0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -84,7 +84,7 @@ import { ZoomEffectDetail } from './devices/ZoomEffectDetail' import { ZOOM_EFFECTS, isZoomSetDevice } from './devices/zoom-effects' import { LibraryDock } from './components/LibraryDock' import { LibrarySelection } from './components/LibrarySelection' -import { ALL_MACHINES, DEVICES, DEVICES_BY_ID, MC_UNIT_ROUTE, RYTM_UNIT_ROUTE, deviceHref, lastMachine, parseDeviceRoute, rememberDevice, rememberedDevice, type DeviceProfile } from './devices/registry' +import { ALL_MACHINES, DEVICES, DEVICES_BY_ID, DT2_UNIT_ROUTE, MC_UNIT_ROUTE, RYTM_UNIT_ROUTE, deviceHref, lastMachine, parseDeviceRoute, rememberDevice, rememberedDevice, type DeviceProfile } from './devices/registry' import { sidebarMachine } from './devices/sidebar-machine' import { parseZoomHubRoute, zoomHubHref } from './devices/zoom-hub-route' import type { ZoomLink } from './engine/zoom/zoom-link' @@ -116,6 +116,7 @@ const OctatrackHub = lazy(() => beta().then(module => ({ default: module.Octatra const ZoomHub = lazy(() => beta().then(module => ({ default: module.ZoomHub }))) const ModelCyclesUnit = lazy(() => beta().then(module => ({ default: module.ModelCyclesUnit }))) const RytmUnit = lazy(() => beta().then(module => ({ default: module.RytmUnit }))) +const Dt2TrialUnit = import.meta.env.DEV ? lazy(() => import('./dev/Dt2TrialPreview')) : () => null const ZoomSidebarStatus = lazy(() => beta().then(module => ({ default: module.ZoomSidebarStatus }))) const ZoomBaseDialog = lazy(() => beta().then(module => ({ default: module.ZoomBaseDialog }))) const LoadDialog = lazy(() => beta().then(module => ({ default: module.LoadDialog }))) @@ -185,6 +186,7 @@ export default function App() { const presence = useMembersOnline(), online = presence?.online ?? null const { session, loading: sessionLoading, developer, catalog } = useCommunity() const betaAccess = hasBetaAccess(session), accessibleModules = listedModules(betaAccess), betaUi = hasBetaUi(session) + const dt2MockUnit = import.meta.env.DEV && betaUi && moduleRoute === DT2_UNIT_ROUTE const detailModule = moduleRoute.startsWith('module/') ? accessibleModules.find((module) => module.id === moduleRoute.slice(7)) : undefined const pausedModule = MODULES.find(module => isModulePaused(module.id) && !isModuleAvailable(module.id, betaAccess) && !isModuleListedPaused(module.id, betaAccess) && (moduleRoute === 'module/' + module.id || moduleRoute === 'community-module/' + module.id)) const configuration = route === 'octatrack/set' @@ -210,7 +212,7 @@ export default function App() { // The Octatrack base path's interface (module sets, the hub, sync, base install; one switch releases it) and the rest // of the beta (the beta-only Zoom pedal pages): beta testers, verified administrators and dev builds; else main's. const octatrackUi = hasOctatrackBase(session), w = setWords(octatrackUi) - const usbAllowed = !mobileWorkspace && hasUsbLinkAccess(session, touchOnly) && !usbLinkPreview && usbPreview !== 'diagnostics' + const usbAllowed = !dt2MockUnit && !mobileWorkspace && hasUsbLinkAccess(session, touchOnly) && !usbLinkPreview && usbPreview !== 'diagnostics' // This member can sync over USB here: the base path is open to them and this browser reaches the unit (not Firefox, // Safari or a phone). Without it the module set goes onto the unit as the card file. const usbBrowser = browserHasUsb(touchOnly, mobileWorkspace) @@ -279,9 +281,12 @@ export default function App() { // A Zoom pedal's page (ZoomHub.tsx): #/pedal, over its own Web MIDI link; who may open it is zoomHub's below. // A pedal page: open to everyone for a pedal whose effects the library lists (the MS-70CDR), beta for the others. const zoomRoute = parseZoomHubRoute(moduleRoute), zoomHub = zoomRoute && (betaUi || isZoomSetDevice(zoomRoute.device.id)) ? zoomRoute : undefined - // The Model:Cycles' and the Analog Rytm MKII's page (ModelCyclesUnit.tsx): Status over their link, beta only. A Rytm - // module is never called "unit", so #analog-rytm-mkii/unit reaches no module page first. - const unitDevice = !betaUi ? undefined : moduleRoute === MC_UNIT_ROUTE ? 'model-cycles' : moduleRoute === RYTM_UNIT_ROUTE ? 'analog-rytm-mkii' : undefined + // The shared Elektron Status page (ModelCyclesUnit.tsx), beta only. The DT2 route is a local mock. + const unitDevice = !betaUi ? undefined : dt2MockUnit ? 'digitakt-ii' + : moduleRoute === MC_UNIT_ROUTE ? 'model-cycles' : moduleRoute === RYTM_UNIT_ROUTE ? 'analog-rytm-mkii' : undefined + const elektronUnit = unitDevice === 'digitakt-ii' ? + : unitDevice === 'analog-rytm-mkii' ? + : unitDevice === 'model-cycles' ? : null const mcUnit = !!unitDevice const unitPageName = zoomHub?.device.name ?? (unitDevice ? DEVICES_BY_ID[unitDevice].name : undefined) useEffect(() => { if (zoomHub && !mobileWorkspace) void beta().then(module => setZoomLink(link => link ?? module.createZoomLink())).catch(console.error) }, [!!zoomHub, mobileWorkspace]) // eslint-disable-line react-hooks/exhaustive-deps @@ -727,7 +732,7 @@ export default function App() { {projectsRoute ? : faqRoute ? : route === 'credits' ? : stabilityViewRoute ? Loading the Stability view…

}>
: route === 'support' ? : route === 'base' ? : overviewRoute ? : !ready ?
Opening your workspace…
: <> {onLibrary ? setQuery('')} onBrowse={rememberBrowse} device={allMachines ? undefined : currentDevice} machinePicker={phoneLayout ? undefined : machinePicker} phone={phoneLayout} resultsSlot={resultsSlot} query={query} category={libraryCategory as ModuleCategory | undefined} octatrackModules={visibleModules} family={family} onFamilyChange={setFamily} liveOnly={liveOnly} onLiveOnlyChange={setLiveOnly} sort={sort} onSortChange={setSort} statistics={statistics} octatrackBlocks={addBlockMap} onSwapOctatrack={swapModule} comparison={comparison} onCompare={toggleComparison} onOpenComparison={() => setCompareOpen(true)} viewedModuleVersions={viewedModuleVersions} moduleBaseline={moduleBaseline} octatrackSelected={selectedIds} onToggleOctatrack={toggleModule} digiSelected={digiSelected} onToggleDigi={(device, id) => workspace.toggleModule(id, device)} zoomSelected={zoomSelected} onToggleZoom={(device, id) => workspace.toggleModule(id, device)} onClearSearch={() => { setQuery(''); setFamily('all'); setLiveOnly(false) }}> {!allMachines && currentDevice.id === 'octatrack' && !!catalog.filter((item,index,items)=>!MODULES.some(module=>module.id===item.module_id)&&items.findIndex(other=>other.module_id===item.module_id)===index).length &&

Community modules

{catalog.filter((item,index,items)=>!MODULES.some(module=>module.id===item.module_id)&&items.findIndex(other=>other.module_id===item.module_id)===index).sort((a,b)=>compareModules({id:a.module_id,name:a.title,authorName:a.author,addedAt:a.added_at??undefined,updatedAt:a.updated_at??undefined},{id:b.module_id,name:b.title,authorName:b.author,addedAt:b.added_at??undefined,updatedAt:b.updated_at??undefined},sort,statistics)).map(item=>)}
} -
: digiDevice && digiMod ? toggleMachineModule(digiMod.id)} /> : zoomEffect ? toggleMachineModule(zoomEffect.id)} /> : digiDevice && machineView === 'configuration' ? machineActive && setReportingConfiguration({ machine: digiDevice.id, id: machineActive.id })} device={digiDevice} configuration={machineActive} configurations={machineConfigurations} onSelect={id => { workspace.selectConfiguration(id) }} onDialog={setConfigDialog} onToggle={toggleMachineModule} onImport={item => workspace.importConfiguration(item.name,item.moduleIds,false,item.moduleVersions,digiDevice.id,undefined,undefined,undefined,item.storageLock)} onStorageLock={workspace.saveStorageLock} /> : missingRoute?

{pausedModule ? 'Module temporarily unavailable' : 'Page not found'}

{pausedModule ? pausedModule.name + ' is temporarily unavailable.' : 'This module or page is not in the current catalog.'}

Open module library
:unitDevice?{unitDevice === 'analog-rytm-mkii' ? : }:zoomHub? setZoomInstall(true)} {...isZoomSetDevice(zoomHub.device.id) ? { sets: configurationsFor(zoomHub.device.id), selectedId: activeFor(zoomHub.device.id)?.id, onSelect: (id: string) => { workspace.selectConfiguration(id); window.location.assign(zoomHubHref(zoomHub.device.id, 'set')) }, onNew: () => newConfiguration(zoomHub.device.id), onSetAction: setAction, onToggle: (effect: string) => workspace.toggleModule(effect, zoomHub.device.id) } : {}} />:hubRoute?hubPage:route==='module-sets'||route.startsWith('module-set/')?(octatrackUi ? : {workspace.importConfiguration(name,ids);openEditedSet('octatrack')}}/>):forumRoute ? {const device=config.device??'octatrack';workspace.importConfiguration(config.name,config.moduleIds,config.keepStockFx2,config.moduleVersions,device,config.usbAudio);openEditedSet(device)}}/> : developerRoute ? : accountRoute ? betaInvitationRoute ? : : route === 'privacy' ? : ['impressum','community-rules','modding-guidelines','report-content'].includes(route) ? : route.startsWith('submit') ? : adminRoute ? : communityModule ? : detailModule ? item.module_id === detailModule.id)} selected={selectedIds.includes(detailModule.id)} addBlock={addBlockMap[detailModule.id]} onSwap={removeIds => swapModule(detailModule.id, removeIds)} usbAudio={active?.usbAudio} configurationName={active?.name} configurationId={active?.id} onConfigureUsbAudio={configureUsbAudio} onToggle={() => toggleModule(detailModule.id)} /> : null} + : digiDevice && digiMod ? toggleMachineModule(digiMod.id)} /> : zoomEffect ? toggleMachineModule(zoomEffect.id)} /> : digiDevice && machineView === 'configuration' ? machineActive && setReportingConfiguration({ machine: digiDevice.id, id: machineActive.id })} device={digiDevice} configuration={machineActive} configurations={machineConfigurations} onSelect={id => { workspace.selectConfiguration(id) }} onDialog={setConfigDialog} onToggle={toggleMachineModule} onImport={item => workspace.importConfiguration(item.name,item.moduleIds,false,item.moduleVersions,digiDevice.id,undefined,undefined,undefined,item.storageLock)} onStorageLock={workspace.saveStorageLock} /> : missingRoute?

{pausedModule ? 'Module temporarily unavailable' : 'Page not found'}

{pausedModule ? pausedModule.name + ' is temporarily unavailable.' : 'This module or page is not in the current catalog.'}

Open module library
:elektronUnit?{elektronUnit}:zoomHub? setZoomInstall(true)} {...isZoomSetDevice(zoomHub.device.id) ? { sets: configurationsFor(zoomHub.device.id), selectedId: activeFor(zoomHub.device.id)?.id, onSelect: (id: string) => { workspace.selectConfiguration(id); window.location.assign(zoomHubHref(zoomHub.device.id, 'set')) }, onNew: () => newConfiguration(zoomHub.device.id), onSetAction: setAction, onToggle: (effect: string) => workspace.toggleModule(effect, zoomHub.device.id) } : {}} />:hubRoute?hubPage:route==='module-sets'||route.startsWith('module-set/')?(octatrackUi ? : {workspace.importConfiguration(name,ids);openEditedSet('octatrack')}}/>):forumRoute ? {const device=config.device??'octatrack';workspace.importConfiguration(config.name,config.moduleIds,config.keepStockFx2,config.moduleVersions,device,config.usbAudio);openEditedSet(device)}}/> : developerRoute ? : accountRoute ? betaInvitationRoute ? : : route === 'privacy' ? : ['impressum','community-rules','modding-guidelines','report-content'].includes(route) ? : route.startsWith('submit') ? : adminRoute ? : communityModule ? : detailModule ? item.module_id === detailModule.id)} selected={selectedIds.includes(detailModule.id)} addBlock={addBlockMap[detailModule.id]} onSwap={removeIds => swapModule(detailModule.id, removeIds)} usbAudio={active?.usbAudio} configurationName={active?.name} configurationId={active?.id} onConfigureUsbAudio={configureUsbAudio} onToggle={() => toggleModule(detailModule.id)} /> : null} } diff --git a/src/components/ModelCyclesUnit.tsx b/src/components/ModelCyclesUnit.tsx index 1fd745aedb..4154fd8a39 100644 --- a/src/components/ModelCyclesUnit.tsx +++ b/src/components/ModelCyclesUnit.tsx @@ -1,6 +1,5 @@ import { useEffect, useState, useSyncExternalStore, type ReactNode } from 'react' -import { DeviceImage } from '../devices/DeviceImage' -import { MC_UNIT_ROUTE, RYTM_UNIT_ROUTE, deviceHref, type DeviceProfile } from '../devices/registry' +import { DT2_UNIT_ROUTE, MC_UNIT_ROUTE, RYTM_UNIT_ROUTE, deviceHref, type DeviceProfile } from '../devices/registry' import { findUnit, type MidiAccessLike } from '../engine/elektron/os-upgrade-midi' import { readMcLog, readMcStatus, type McLoad, type McModules } from '../engine/elektron/mc-link' import { RYTM_PORT, readRytmLog, readRytmStatus } from '../engine/elektron/rytm-link' @@ -12,6 +11,7 @@ import { browserMidi } from '../engine/elektron/usb-upgrade' import { useMobileWorkspace } from '../hooks/useMobileWorkspace' import { Icon } from './Icon' import { LoadChart, Meter } from './OctatrackLoad' +import { UnitStatusHero } from './UnitStatusHero' import './octatrack-link.css' import './octatrack-load.css' @@ -24,13 +24,16 @@ export type UnitStatus = { } /** A machine the page reads over its link: the model name its USB MIDI port carries, its reader, its route, and how * its audio note reads. */ -export type UnitKind = { port: string; route: string; read: (access: MidiAccessLike) => Promise; audio: string +type MidiUnitKind = { port: string; route: string; read: (access: MidiAccessLike) => Promise; audio: string /** The unit's own log, shared with the member's diagnostics (octatrack-diagnostics.ts reportDeviceLog). */ log?: { machine: DiagnosticLogMachine; read: (access: MidiAccessLike, stop: () => boolean) => Promise<{ log: DeviceLog | undefined } | 'unsupported' | null> } } -export const MC_UNIT: UnitKind = { port: 'Model:Cycles', route: MC_UNIT_ROUTE, read: access => readMcStatus(access), audio: 'the six tracks’ sound takes', +type MockUnitKind = { route: string; source: 'mock' } +export type UnitKind = MidiUnitKind | MockUnitKind +export const MC_UNIT: MidiUnitKind = { port: 'Model:Cycles', route: MC_UNIT_ROUTE, read: access => readMcStatus(access), audio: 'the six tracks’ sound takes', log: { machine: 'model-cycles', read: (access, stop) => readMcLog(access, 2000, stop) } } -export const RYTM_UNIT: UnitKind = { port: RYTM_PORT, route: RYTM_UNIT_ROUTE, read: access => readRytmStatus(access), audio: 'the voices, the sample playback and the FX take', +export const RYTM_UNIT: MidiUnitKind = { port: RYTM_PORT, route: RYTM_UNIT_ROUTE, read: access => readRytmStatus(access), audio: 'the voices, the sample playback and the FX take', log: { machine: 'analog-rytm-mkii', read: (access, stop) => readRytmLog(access, 2000, stop) } } +export const DT2_UNIT: MockUnitKind = { route: DT2_UNIT_ROUTE, source: 'mock' } const INTERVAL = 2000, HISTORY = 150 const SERIES: { key: 'audio' | 'block'; title: string; className: string }[] = [{ key: 'audio', title: 'Audio', className: 'load-core1' }, { key: 'block', title: 'Busiest block', className: 'load-cpu' }] @@ -44,7 +47,7 @@ const kb = (bytes: number) => (bytes / 1024).toFixed(1) + ' KB' /** Reads the unit every two seconds once MIDI is allowed: identity, live modules and load over one line each time. * A load window that hasn't moved is a gap. shortcut: kept while this page is open, not app-wide as the Octatrack's; * record it across pages when someone needs that. */ -function useUnit(kind: UnitKind, request: (() => Promise) | null) { +function useUnit(kind: MidiUnitKind, request: (() => Promise) | null) { const [access, setAccess] = useState() const [state, setState] = useState<{ status: Status; read?: UnitStatus; points: Point[]; now: number; error?: string }>({ status: request ? 'idle' : 'unsupported', points: [], now: 0 }) useEffect(() => { @@ -85,6 +88,7 @@ function useUnit(kind: UnitKind, request: (() => Promise) | null } type UnitProps = { device: DeviceProfile; header?: ReactNode; request?: (() => Promise) | null } +type UnitConnection = { line: ReactNode; led: string; details?: ReactNode; action?: ReactNode } /** Your Model:Cycles (mc-link.ts). */ export const ModelCyclesUnit = (props: UnitProps) => /** Your Analog Rytm MKII (rytm-link.ts). */ @@ -92,10 +96,39 @@ export const RytmUnit = (props: UnitProps) => & { kind: MockUnitKind; connection: UnitConnection; children: ReactNode })) { + if ('connection' in props) return + {props.children} + + return +} + +function UnitFrame({ device, header, route, connection, children }: { + device: DeviceProfile; header?: ReactNode; route: string; connection: UnitConnection; children: ReactNode +}) { + return
+ {header ??

Your {device.name}

} +
+ {connection.details} + +
{children}
+
+
+} + +function MidiUnit({ device, header, request = browserMidi(), kind }: UnitProps & { kind: MidiUnitKind }) { const mobile = useMobileWorkspace() const { status, read, points, now, error, connect, clear } = useUnit(kind, request) const sharing = useSyncExternalStore(subscribeDiagnosticPreference, diagnosticPreference, diagnosticPreference).enabled, privacy = browserRequestsPrivacy() @@ -117,28 +150,12 @@ export function ElektronUnit({ device, header, request = browserMidi(), kind }:

Your {device.name}

Connecting your {device.name} needs Chrome or Edge on a computer.

Open {device.name} page - return
- {header ??

Your {device.name}

} -
-
- -

{device.name}

-

- {error &&

{error}

} -
- {status === 'idle' && } -
- -
-
+ return {error}

, + action: status === 'idle' && , + }}> +
@@ -165,8 +182,6 @@ export function ElektronUnit({ device, header, request = browserMidi(), kind }: {!ready ? offCell : !modules?.modules.length ?

{modules ? 'No modules loaded. Modules kept over USB show here until the next power cycle.' : 'This base loads no modules over USB.'}

:
    {modules.modules.map(module =>
  • )}
}
-
-
-
- + + } diff --git a/src/components/OctatrackHub.tsx b/src/components/OctatrackHub.tsx index a0bb0a260d..483ef09589 100644 --- a/src/components/OctatrackHub.tsx +++ b/src/components/OctatrackHub.tsx @@ -8,7 +8,6 @@ import { BaseLayoutRequired, BaseUpdateRequired, baseOutdated, moduleSetReview, import { baseLayout, baseVersion, type BaseLayout } from '../engine/elekloader/base-variants' import { comesWithBase } from '../config/usb-audio' import type { Configuration } from '../config/workspace' -import { DeviceImage } from '../devices/DeviceImage' import { DEVICES_BY_ID } from '../devices/registry' import { LINK_BUSY, type OctatrackLink } from '../engine/elekloader/octatrack-link' import { useOctatrackHealth } from '../hooks/useOctatrackHealth' @@ -18,6 +17,7 @@ import { HubSetHead, HubSetList, SetMenu, type SetAction } from './HubSets' import { Icon, type IconName } from './Icon' import { OctatrackBackups } from './OctatrackBackups' import { CardSetButton } from './UnitPanel' +import { UnitStatusHero } from './UnitStatusHero' import { OctatrackDiagnosticsSettings } from './OctatrackDiagnostics' import { SupportActions } from './SupportActions' import { OctatrackOverview } from './OctatrackOverview' @@ -158,19 +158,16 @@ function DesktopOctatrackHub({ view, link, inventory, sets, selectedId, needs, u return
{header}
-
- -

{model}

- {/* While not connected, Screen gives its own detail beside the preview, so the hint stays off it. */} -

+ {/* While not connected, Screen gives its own detail beside the preview, so the hint stays off it. */} + {line}{hint && (!screenView || connected) && {hint}}} + action={!screenView && action}> {state.notice?.tone === 'error' && hint === state.notice.text && } {connected &&
Base
{baseVersion(identity!.base) ?? {identity!.base.slice(0, 8)}}
{lastSync &&
Last sync here
{lastSync.name} ·
}
} -
- {!screenView && action} -
+