perf: defer mobile workspace bootstrap (Closes #996)
CI / lint (pull_request) Successful in 2m49s
CI / build-release (pull_request) Successful in 6s
CI / browser-journey (pull_request) Failing after 2m43s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy committed 2026-08-17 01:04:20 +00:00
1 parent 5470e48e26
commit 49bbeadc48
11 files changed
+186 -21

No files matched your search

+1
View File
@@ -1,4 +1,5 @@
(async function(){
await loadWorkspace({ document });
const qs = (s, el=document) => el.querySelector(s);
const fmt = (d) => new Date(d).toLocaleString();
const cardPlanning = createCardPlanning(document);
+1
View File
@@ -1650,6 +1650,7 @@
<script src="static/mobile-search-preview-nav.js"></script>
<script src="static/mobile-plan-today-nav.js"></script>
<script src="static/mobile-find-work-nav.js"></script>
<script src="static/workspace-bootstrap.js"></script>
<script src="static/dashboard.js"></script>
</body>
</html>
+1
View File
@@ -16,6 +16,7 @@ const SHELL = [
BASE + 'static/icons/stackchain-512.png',
BASE + 'static/session.js',
BASE + 'static/feature-loader.js',
BASE + 'static/workspace-bootstrap.js',
BASE + 'static/conversation-action-hydrator.js',
BASE + 'static/security-center.js',
BASE + 'static/markdown.js',
+23
View File
@@ -0,0 +1,23 @@
async function loadWorkspace({ document, createLoader = createFeatureLoader }) {
const status = document.querySelector('#my-work-action-status');
const url = document.querySelector(
'meta[name="stackchain-feature-today-timer"]'
)?.content || '';
const loader = createLoader({
document,
urls: { 'today-timer': url },
});
if (status) status.textContent = 'Starting workspace…';
try {
await loader.load('today-timer');
if (status) status.textContent = '';
} catch (error) {
if (status) {
status.textContent =
'Workspace could not load. Check your connection, then reload to retry.';
}
throw error;
}
}
if (typeof module !== 'undefined' && module.exports) module.exports = loadWorkspace;