Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: address review (claude): LoomPlayPanel mislabeled never-rendered scenes as failed

[._.]/ Adam Eivy9b61ed2433fe
diff --git a/client/src/components/fableloom/LoomPlayPanel.jsx b/client/src/components/fableloom/LoomPlayPanel.jsx
index b6fca8ad78..514676c9e7 100644
--- a/client/src/components/fableloom/LoomPlayPanel.jsx
+++ b/client/src/components/fableloom/LoomPlayPanel.jsx
@@ -213,7 +213,7 @@ export default function LoomPlayPanel({ loom, episode: initialEpisode }) {
onCutEnded={advanceCut}
automaticCut={automaticCut}
helperMode={loom.participationMode === 'helper'}
- videoFailed={failedVideoId === scene.videoHistoryId}
+ videoFailed={!!scene.videoHistoryId && failedVideoId === scene.videoHistoryId}
onVideoError={() => setFailedVideoId(scene.videoHistoryId)}
/>
{ended && (
diff --git a/client/src/components/fableloom/LoomPlayPanel.test.jsx b/client/src/components/fableloom/LoomPlayPanel.test.jsx
index ef7c5c1576..7838d65ff8 100644
--- a/client/src/components/fableloom/LoomPlayPanel.test.jsx
+++ b/client/src/components/fableloom/LoomPlayPanel.test.jsx
@@ -224,6 +224,25 @@ describe('LoomPlayPanel', () => {
expect(screen.getByRole('button', { name: 'Restart' })).toBeEnabled();
});
+ it('shows "not rendered yet" rather than "unavailable" for a scene that was never rendered', async () => {
+ // Regression: failedVideoId starts at null and the server also sends
+ // videoHistoryId: null for an unrendered scene, so a naive
+ // `failedVideoId === scene.videoHistoryId` comparison was `null === null`
+ // -> true, mislabeling every never-rendered scene as a failed render.
+ const cutEpisode = {
+ id: 'ep-cut-none', startNodeId: 'cut-1', nodes: [{
+ id: 'cut-1', title: 'Setup', prose: 'A door opens.', playbackMode: 'cut', videoHistoryId: null,
+ transitions: [{ id: 'continue-1', targetNodeId: 'next', intent: 'Continue' }],
+ }, { id: 'next', isEnding: true, transitions: [] }],
+ };
+ const user = userEvent.setup();
+ render(<LoomPlayPanel loom={{ ...loom, episodes: [cutEpisode] }} episode={cutEpisode} />);
+ await user.selectOptions(screen.getByLabelText('Preview stage'), 'video');
+
+ expect(screen.getByText('No video rendered for this cut yet.')).toBeInTheDocument();
+ expect(screen.queryByText('The rendered video is unavailable; advance manually or retry after rendering.')).not.toBeInTheDocument();
+ });
+
it('continues to the next playable episode and resets the transcript', async () => {
const first = {
id: 'ep-1', number: 1, title: 'One', startNodeId: 'end-1',