Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 0 additions & 49 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -316,54 +316,5 @@ <h2 style="font-size:1.5rem;margin:2rem 0 1rem;">Explore the curriculum</h2>
</noscript>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script>
// The shared footer belongs to an interactive app, not to a loading
// screen. Loading its cross-origin bundles late keeps them from
// competing with the dashboard module on slow links.
//
// `load` alone is not late enough: it fires when the initial response's
// subresources are done, which on a cold start is well before the lazy
// route chunk has committed. The footer then painted while the LCP
// shell was still up, so a loading screen grew a fully-rendered footer.
// #lcp-shell is removed the moment the real route commits (or the error
// boundary trips), which is the actual signal we want.
function mountFooterSurfaces() {
const newsletterCapture = document.createElement('script');
newsletterCapture.type = 'module';
newsletterCapture.src = 'https://sassmaker.com/newsletter-capture.js';
document.body.append(newsletterCapture);

const projectStrip = document.createElement('script');
projectStrip.src = 'https://sassmaker.com/project-strip.js?v=precise-b0adaa67';
projectStrip.dataset.project = 'swe-interview-prep';
projectStrip.dataset.theme = 'dark';
projectStrip.dataset.hostOnly = 'true';
document.body.append(projectStrip);

const askAi = document.createElement('script');
askAi.src = 'https://sassmaker.com/ai-chat-footer.js?v=precise-b0adaa67';
askAi.dataset.name = 'SWE Interview Prep';
askAi.dataset.project = 'swe-interview-prep';
askAi.dataset.hostOnly = 'true';
askAi.dataset.surface = 'app';
askAi.dataset.theme = 'dark';
// The app keeps its native floating feedback launcher (SaaSMakerFeedback),
// so the shared footer must not mount a second feedback entry point.
askAi.dataset.feedback = 'false';
document.body.append(askAi);
}

function whenAppPainted(run) {
if (!document.getElementById('lcp-shell')) return run();
const observer = new MutationObserver(() => {
if (document.getElementById('lcp-shell')) return;
observer.disconnect();
run();
});
observer.observe(document.body, { childList: true, subtree: true });
}

window.addEventListener('load', () => whenAppPainted(mountFooterSurfaces));
</script>
</body>
</html>
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@
"quality": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm test:coverage && pnpm quality:unused && pnpm quality:complexity && pnpm quality:duplication && pnpm quality:cycles && pnpm quality:dependencies && pnpm quality:suppressions && pnpm docs:validate && pnpm build && pnpm size && pnpm quality:hygiene"
},
"dependencies": {
"@saas-maker/app-health": "https://github.com/sass-maker/app-health/releases/download/node-v0.4.0/saas-maker-app-health-0.4.0.tgz",
"@ai-sdk/openai-compatible": "2.0.41",
"@cloudflare/realtimekit": "2.0.1",
"@cloudflare/realtimekit-react": "2.0.1",
"@excalidraw/excalidraw": "0.18.1",
"@monaco-editor/react": "4.7.0",
"@radix-ui/react-tooltip": "^1.2.16",
"@saas-maker/app-health": "https://github.com/sass-maker/app-health/releases/download/node-v0.4.0/saas-maker-app-health-0.4.0.tgz",
"@saas-maker/ui": "github:sass-maker/ui-library#v0.1.15&path:/packages/ui",
"ai": "6.0.168",
"clsx": "^2.1.1",
"fflate": "^0.8.3",
Expand Down
Loading
Loading