mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
fix(street-level): a delayed photo never overrides newer navigation; retry failed mesh refreshes
- A photo takes a deferred navigation ticket when it starts opening (begin/reassert, the application's _beginDeferredNavigation and _reassertNavigationHandoff) and frames only if that ticket still owns the camera once loaded, so a slow photo no longer flies the camera back over newer navigation or clears newer aircraft tracking. - A failed mesh refresh keeps the last good sample and the distance it was taken from, and is retried after the miss cooldown, instead of recording the failed distance and never refreshing again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
f33cd54e2b
commit
8318c9def0
9 files changed
+158
-42
No files matched your search
@@ -54,7 +54,7 @@ function harness(adapter) {
|
||||
sequenceStats: () => ({ selectedId }),
|
||||
};
|
||||
state.providers.set('mapillary', { def, instance });
|
||||
const framing = { started: 0, cancelled: 0 };
|
||||
const framing = { begun: 0, started: 0, cancelled: 0 };
|
||||
const marker = [];
|
||||
const followed = { count: 0 };
|
||||
const parts = {
|
||||
@@ -65,7 +65,8 @@ function harness(adapter) {
|
||||
},
|
||||
follow: {
|
||||
followCamera: () => followed.count++,
|
||||
lookAtPosition: () => framing.started++,
|
||||
beginFraming: () => ({ generation: ++framing.begun }),
|
||||
lookAtPosition: (ticket) => ticket && framing.started++,
|
||||
cancelFraming: () => framing.cancelled++,
|
||||
},
|
||||
};
|
||||
@@ -557,3 +558,21 @@ test('back-to-back Mapillary opens download only the newer image', async () => {
|
||||
['b'],
|
||||
);
|
||||
});
|
||||
|
||||
test('a photo asks for the camera when it starts opening and frames with that ticket once loaded', async () => {
|
||||
const openGate = deferred();
|
||||
const adapter = fakeAdapter({ openGate });
|
||||
const { state, host, framing } = harness(adapter);
|
||||
const opening = host.open('mapillary', 'a');
|
||||
assert.equal(framing.begun, 1, 'claimed before the download');
|
||||
await settle();
|
||||
assert.equal(framing.started, 0);
|
||||
openGate.resolve();
|
||||
assert.equal(await opening, true);
|
||||
assert.equal(framing.started, 1);
|
||||
|
||||
// FOLLOW owns the camera already: an open neither claims nor frames.
|
||||
state.street.follow = true;
|
||||
assert.equal(await host.open('mapillary', 'b'), true);
|
||||
assert.deepEqual([framing.begun, framing.started], [1, 1]);
|
||||
});
|
||||
Reference in new issue
Block a user