mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(street-level): a new sequence load drops the last one's error; framing survives a detached navigation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
bd57cf5f43
commit
4682757e71
4 files changed
+15
-2
No files matched your search
@@ -131,6 +131,8 @@ export function createSequences({ state, source, parts }) {
|
||||
const controller = new AbortController();
|
||||
state.sequence.abort = controller;
|
||||
state.sequence.loading = true;
|
||||
// An earlier sequence's error does not belong to this one.
|
||||
state.sequence.error = null;
|
||||
notify();
|
||||
try {
|
||||
const records = await source.getSequenceImages(sequenceId, {
|
||||
|
||||
@@ -101,9 +101,10 @@ test('a failed sequence load leaves no stale cones and can be retried', async ()
|
||||
assert.equal(highlights.at(-1), null);
|
||||
assert.equal(state.sequence.error, 'Sequence images unavailable');
|
||||
|
||||
// Clicking B again asks again.
|
||||
// Clicking B again asks again, without the old error.
|
||||
sequences.select('B');
|
||||
assert.equal(source.calls.filter((c) => c.sequenceId === 'B').length, 2);
|
||||
assert.equal(state.sequence.error, null, 'not shown while B loads again');
|
||||
source.last('B').resolve(records('B'));
|
||||
await settle();
|
||||
assert.deepEqual(drawn(), ['B-0', 'B-1']);
|
||||
|
||||
Reference in new issue
Block a user