Compare commits

..

No commits in common. "6b924a4757c1bff35a6579fe1b316b2932e0c7a6" and "d28140bbd12fff6ed444843376812057ca677bd2" have entirely different histories.

2 changed files with 0 additions and 30 deletions

View File

@ -36,7 +36,6 @@
root.fetch = boundary.fetch;
const attach = () => {
boundary.startActivityHeartbeat();
boundary.startReconnectResume();
const button = root.document.getElementById('sign-out');
if (button) button.addEventListener('click', () => boundary.signOut());
const allDevicesButton = root.document.getElementById('sign-out-all');
@ -388,12 +387,6 @@
});
}
function startReconnectResume() {
addActivityListener?.('online', async () => {
if (await refreshOfflineLease()) await resumeQueuedWork();
});
}
async function refreshOfflineLease() {
try {
const response = await sessionFetch(base + 'api/v1/session');
@ -624,7 +617,6 @@
handleServiceWorkerMessage,
refreshOfflineLease,
resumeQueuedWork,
startReconnectResume,
recordActivity,
startActivityHeartbeat,
};

View File

@ -809,28 +809,6 @@ process.stdout.write(JSON.stringify(state));
assert result["workerMessages"] == [{"type": "stackchain-resume-outbox"}]
def test_reconnect_requests_queued_delivery_resume_after_offline_reload():
result = run_session_scenario(
"""
boundary.startReconnectResume();
state.responsePayload = {authenticated:true, expires_at:200000, idle_expires_at:150000};
await state.activityListeners.online();
await new Promise(resolve => setTimeout(resolve, 0));
process.stdout.write(JSON.stringify(state));
"""
)
assert result["requests"][0]["url"] == "/dashboard/api/v1/session"
assert result["workerMessages"] == [
{
"type": "stackchain-session-lease",
"expiresAt": 200000,
"idleExpiresAt": 150000,
},
{"type": "stackchain-resume-outbox"},
]
@pytest.mark.anyio
async def test_dashboard_loads_session_boundary_first_and_offers_sign_out():
html = await dashboard()