Prevent stale cross-bucket rows during source-tab switches
This commit is contained in:
1 parent
52557d1137
commit
df4cdf7f9b
2 files changed
+5
-1
No files matched your search
@@ -1658,6 +1658,7 @@ function _setSessionSourceFilter(filter) {
|
||||
_selectedSessions.clear();
|
||||
_sessionSelectMode = false;
|
||||
try { localStorage.setItem('hermes-session-source-filter', next); } catch (_e) {}
|
||||
renderSessionListFromCache();
|
||||
void renderSessionList({deferWhileInteracting:false});
|
||||
}
|
||||
|
||||
|
||||
@@ -286,6 +286,9 @@ global.localStorage = {{
|
||||
this.writes.push([key, value]);
|
||||
}},
|
||||
}};
|
||||
global.renderSessionListFromCache = () => {{
|
||||
renderCalls.push('cache');
|
||||
}};
|
||||
global.renderSessionList = (opts) => {{
|
||||
renderCalls.push(opts);
|
||||
return Promise.resolve();
|
||||
@@ -308,7 +311,7 @@ console.log(JSON.stringify({{
|
||||
assert body["selectedSize"] == 0
|
||||
assert body["sessionSelectMode"] is False
|
||||
assert body["storageWrites"] == [["hermes-session-source-filter", "cli"]]
|
||||
assert body["renderCalls"] == [{"deferWhileInteracting": False}]
|
||||
assert body["renderCalls"] == ["cache", {"deferWhileInteracting": False}]
|
||||
|
||||
|
||||
@pytest.mark.skipif(NODE is None, reason="node not on PATH")
|
||||
|
||||
Reference in new issue
Block a user