mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 16:59:43 +02:00
review fixes: broadcast session state on working, guard the CodemanSessionOrder global
The running group sorts on lastSubmitAt, but nothing pushed a session:updated when a turn STARTS — the browser kept whatever stamp it loaded with, so a 30-second-old turn could rank (and read) as an hour-long one. The working handler now rides the same debounced state broadcast idle already uses. And both call sites of window.CodemanSessionOrder now degrade to tab order when the global is missing (iOS Safari's documented stale-cached-JS after a deploy) instead of TypeErroring the whole home screen away. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -216,7 +216,10 @@ Object.assign(CodemanApp.prototype, {
|
||||
};
|
||||
});
|
||||
|
||||
return window.CodemanSessionOrder.sort(rows);
|
||||
// Guarded like every other constants.js consumer: a stale cached
|
||||
// constants.js (iOS Safari serves old JS after a deploy) must degrade to
|
||||
// tab order, not TypeError the whole home screen away.
|
||||
return window.CodemanSessionOrder ? window.CodemanSessionOrder.sort(rows) : rows;
|
||||
},
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user