Skip to content

Commit 85b32b0

Browse files
committed
fix(studio): start with an empty session instead of a sample project
The studio opened with a hard-coded three-part demo whose frame references did not exist on disk, so the preview showed an invented animation. Both the Tauri session and the browser fallback now start with an empty project, and the UI surfaces explicit empty states until a real project folder is opened.
1 parent 955c8d5 commit 85b32b0

5 files changed

Lines changed: 203 additions & 134 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [Unreleased]
4+
5+
### Fixed
6+
- BootAnimix Studio no longer launches with a hard-coded three-part sample animation. The Tauri session and the browser fallback now start with an empty `untitled` project, and the parts browser, preview stage, timeline, diagnostics, and export controls show an explicit empty state until a real project folder is opened. Save is disabled until a project directory is loaded.
7+
38
## [3.5.0] - 2026-10-21
49

510
### Changed

‎README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
![BootAnimix Studio showing the parts browser, live device preview, properties inspector, and filmstrip timeline](docs/images/studio.png)
1010

11-
*BootAnimix Studio: a three-part demo project with a live geometry-and-timing preview, inline fidelity warnings, and validation diagnostics.*
11+
*BootAnimix Studio with a three-part project open: parts browser, geometry-and-timing preview, properties inspector, filmstrip timeline, and inline validation diagnostics.*
12+
13+
The studio launches with an empty session. Open a project folder created with `bootanimix import` (or any directory containing `project.bootanimix.json`) to load its parts and frames; nothing is generated or bundled for you.
1214

1315
---
1416

‎apps/gui/src/App.svelte‎

Lines changed: 136 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
let exportDestination = $state('dist/bootanimation.zip');
6767
let exporting = $state(false);
6868
let buildResult = $state<{ kind: 'success' | 'error'; title: string; text: string } | null>(null);
69-
let statusBanner = $state('Ready. Archive storage mode is verified on every build.');
69+
let statusBanner = $state('No project open. Open a project folder to load parts and frames.');
7070
let newPartName = $state('');
7171
let dockTab = $state(0);
7272
@@ -79,6 +79,7 @@
7979
let activeProjectPart = $derived(snapshot?.manifest.parts[selectedPartIdx]);
8080
let activeFrame = $derived<ScheduledFrame | undefined>(snapshot?.schedule.frames[currentTick]);
8181
let totalFrames = $derived(snapshot?.validation.performance.total_frames ?? 0);
82+
let hasParts = $derived((snapshot?.manifest.parts.length ?? 0) > 0);
8283
let diagnostics = $derived(snapshot?.validation.diagnostics ?? []);
8384
let blockingCount = $derived(diagnostics.filter((d) => d.blocks_export || d.severity === 'error').length);
8485
let warningCount = $derived(diagnostics.filter((d) => d.severity === 'warning' && !d.blocks_export).length);
@@ -675,14 +676,17 @@
675676

676677
<div class="header-actions">
677678
<Button kind="ghost" size="small" disabled={!bridge.isDesktop} onclick={handleOpenProject} icon={FolderOpen}>Open</Button>
678-
<Button kind="ghost" size="small" onclick={handleSaveProject} icon={Save}>Save</Button>
679+
<Button kind="ghost" size="small" disabled={!snapshot.project_dir} onclick={handleSaveProject} icon={Save}>Save</Button>
679680
<span class="divider" aria-hidden="true"></span>
680681
<Button kind="ghost" size="small" iconDescription="Undo" disabled={!snapshot.can_undo} onclick={handleUndo} icon={Undo}></Button>
681682
<Button kind="ghost" size="small" iconDescription="Redo" disabled={!snapshot.can_redo} onclick={handleRedo} icon={Redo}></Button>
682683
<span class="divider" aria-hidden="true"></span>
683684

684-
<span class="validation-chip {snapshot.validation.outcome}">
685-
{#if snapshot.validation.outcome === 'valid'}
685+
<span class="validation-chip {hasParts ? snapshot.validation.outcome : 'empty'}">
686+
{#if !hasParts}
687+
<Information size={16} />
688+
<span>No project</span>
689+
{:else if snapshot.validation.outcome === 'valid'}
686690
<CheckmarkFilled size={16} />
687691
<span>Valid</span>
688692
{:else if snapshot.validation.outcome === 'valid_with_warnings'}
@@ -694,7 +698,15 @@
694698
{/if}
695699
</span>
696700

697-
<Button kind="primary" size="small" onclick={openExport} icon={DocumentExport}>Build &amp; export</Button>
701+
<Button
702+
kind="primary"
703+
size="small"
704+
disabled={totalFrames === 0}
705+
onclick={openExport}
706+
icon={DocumentExport}
707+
>
708+
Build &amp; export
709+
</Button>
698710
</div>
699711
</header>
700712

@@ -708,6 +720,9 @@
708720
</div>
709721

710722
<div class="part-list">
723+
{#if !hasParts}
724+
<p class="empty">No parts yet. Open a project folder to load its animation.</p>
725+
{/if}
711726
{#each snapshot.manifest.descriptor.parts as part, idx (part.path + idx)}
712727
{@const frames = snapshot.manifest.parts[idx]?.frames.length ?? 0}
713728
<button
@@ -767,8 +782,12 @@
767782
</div>
768783

769784
<div class="frame-list">
770-
{#if filteredFrames.length === 0}
771-
<p class="empty">No frames match “{assetFilter}”.</p>
785+
{#if !activeProjectPart}
786+
<p class="empty">No part selected.</p>
787+
{:else if filteredFrames.length === 0}
788+
<p class="empty">
789+
{partFrameCount === 0 ? 'This part has no frames yet.' : `No frames match “${assetFilter}”.`}
790+
</p>
772791
{:else}
773792
{#each filteredFrames as { frame, index } (frame.relative_path + index)}
774793
<button
@@ -833,18 +852,39 @@
833852
</div>
834853

835854
<div class="stage" bind:this={stageEl}>
836-
<div class="device" style="width: {displayWidth + 24}px">
837-
<canvas
838-
bind:this={canvasEl}
839-
width={canvasWidth}
840-
height={CANVAS_HEIGHT}
841-
style="width: {displayWidth}px; height: {displayHeight}px"
842-
></canvas>
843-
</div>
844-
<p class="stage-note">
845-
<Information size={14} />
846-
Geometry and timing preview. Frame pixels stay on disk until export.
847-
</p>
855+
{#if scheduleLength === 0}
856+
<div class="stage-empty">
857+
<span class="stage-empty-icon"><ImageIcon size={24} /></span>
858+
<p class="stage-empty-title">Nothing to preview</p>
859+
<p class="stage-empty-body">
860+
{hasParts
861+
? 'This project has no frames yet.'
862+
: 'Open a project folder containing project.bootanimix.json to load its parts and frames.'}
863+
</p>
864+
{#if bridge.isDesktop}
865+
<Button kind="tertiary" size="small" icon={FolderOpen} onclick={handleOpenProject}>
866+
Open project
867+
</Button>
868+
{:else}
869+
<p class="hint stage-empty-hint">
870+
Opening a project from disk requires the desktop app.
871+
</p>
872+
{/if}
873+
</div>
874+
{:else}
875+
<div class="device" style="width: {displayWidth + 24}px">
876+
<canvas
877+
bind:this={canvasEl}
878+
width={canvasWidth}
879+
height={CANVAS_HEIGHT}
880+
style="width: {displayWidth}px; height: {displayHeight}px"
881+
></canvas>
882+
</div>
883+
<p class="stage-note">
884+
<Information size={14} />
885+
Geometry and timing preview. Frame pixels stay on disk until export.
886+
</p>
887+
{/if}
848888
</div>
849889

850890
<div class="transport">
@@ -853,20 +893,23 @@
853893
size="small"
854894
icon={ChevronLeft}
855895
iconDescription="Previous frame"
896+
disabled={scheduleLength === 0}
856897
onclick={() => stepFrame(-1)}
857898
></Button>
858899
<Button
859900
kind="primary"
860901
size="small"
861902
icon={isPlaying ? Pause : Play}
862903
iconDescription={isPlaying ? 'Pause preview' : 'Play preview'}
904+
disabled={scheduleLength === 0}
863905
onclick={togglePlayback}
864906
></Button>
865907
<Button
866908
kind="ghost"
867909
size="small"
868910
icon={ChevronRight}
869911
iconDescription="Next frame"
912+
disabled={scheduleLength === 0}
870913
onclick={() => stepFrame(1)}
871914
></Button>
872915

@@ -1091,7 +1134,15 @@
10911134
disabled={selectedFrameIdx >= Math.max(0, partFrameCount - 1)}
10921135
onclick={() => moveSelectedFrame(1)}
10931136
></Button>
1094-
<Button kind="ghost" size="small" onclick={duplicateSelectedFrame} icon={Copy}>Duplicate</Button>
1137+
<Button
1138+
kind="ghost"
1139+
size="small"
1140+
disabled={partFrameCount === 0}
1141+
onclick={duplicateSelectedFrame}
1142+
icon={Copy}
1143+
>
1144+
Duplicate
1145+
</Button>
10951146
<Button kind="ghost" size="small" disabled={partFrameCount <= 1} onclick={removeSelectedFrame} icon={TrashCan}>Remove</Button>
10961147
</div>
10971148

@@ -1118,7 +1169,17 @@
11181169

11191170
<TabContent>
11201171
<div class="diagnostics">
1121-
{#if diagnostics.length === 0}
1172+
{#if totalFrames === 0}
1173+
<div class="clean-state neutral">
1174+
<Information size={20} />
1175+
<div>
1176+
<p class="clean-title">Nothing to validate yet</p>
1177+
<p class="hint">
1178+
Open a project folder to check its archive structure and desc.txt semantics.
1179+
</p>
1180+
</div>
1181+
</div>
1182+
{:else if diagnostics.length === 0}
11221183
<div class="clean-state">
11231184
<CheckmarkFilled size={20} />
11241185
<div>
@@ -1181,7 +1242,7 @@
11811242
modalLabel="Artifact"
11821243
primaryButtonText="Verify and write"
11831244
secondaryButtonText="Cancel"
1184-
primaryButtonDisabled={snapshot.validation.outcome === 'invalid'}
1245+
primaryButtonDisabled={snapshot.validation.outcome === 'invalid' || totalFrames === 0}
11851246
primaryButtonLoading={exporting}
11861247
on:click:button--primary={executeReviewedExport}
11871248
on:click:button--secondary={() => (showExportModal = false)}
@@ -1423,6 +1484,12 @@
14231484
border-color: rgba(250, 77, 86, 0.3);
14241485
}
14251486
1487+
.validation-chip.empty {
1488+
color: var(--cds-text-04, #a8a8a8);
1489+
background: #262626;
1490+
border-color: #393939;
1491+
}
1492+
14261493
/* ------------------------------------------------------------- workspace */
14271494
14281495
.workspace {
@@ -1716,6 +1783,45 @@
17161783
color: var(--cds-text-03, #6f6f6f);
17171784
}
17181785
1786+
.stage-empty {
1787+
display: flex;
1788+
flex-direction: column;
1789+
align-items: center;
1790+
gap: 6px;
1791+
max-width: 320px;
1792+
padding: 20px 24px;
1793+
text-align: center;
1794+
border: 1px dashed #393939;
1795+
background: rgba(22, 22, 22, 0.72);
1796+
}
1797+
1798+
.stage-empty-icon {
1799+
display: inline-flex;
1800+
align-items: center;
1801+
justify-content: center;
1802+
width: 40px;
1803+
height: 40px;
1804+
margin-bottom: 2px;
1805+
color: var(--cds-text-04, #a8a8a8);
1806+
border: 1px solid #393939;
1807+
}
1808+
1809+
.stage-empty-title {
1810+
font-size: 13px;
1811+
font-weight: 600;
1812+
color: var(--cds-text-01, #f4f4f4);
1813+
}
1814+
1815+
.stage-empty-body {
1816+
font-size: 11px;
1817+
line-height: 1.6;
1818+
color: var(--cds-text-05, #8d8d8d);
1819+
}
1820+
1821+
.stage-empty-hint {
1822+
margin-top: 2px;
1823+
}
1824+
17191825
@media (max-width: 1180px) {
17201826
.stage-head {
17211827
flex-wrap: wrap;
@@ -2067,11 +2173,19 @@
20672173
color: #42be65;
20682174
}
20692175
2176+
.clean-state.neutral {
2177+
color: var(--cds-text-04, #a8a8a8);
2178+
}
2179+
20702180
.clean-title {
20712181
font-size: 12px;
20722182
color: #42be65;
20732183
}
20742184
2185+
.clean-state.neutral .clean-title {
2186+
color: var(--cds-text-02, #c6c6c6);
2187+
}
2188+
20752189
.finding {
20762190
display: flex;
20772191
align-items: flex-start;

0 commit comments

Comments
 (0)