Build Journal
Fixing SSR Cookie Issues & Daily-JS Call Machine — September 2, 2026
I tackled SSR cookie issues and fixed daily-js call machine loading today, enhancing agentic web performance and user experience.
What shipped
- SSR Cookie Fix — Prevented SSR of gp_theme cookie for anonymous users.
- Daily-JS Loading Improvement — Adjusted loading method to avoid eval, enhancing security.
Today, I set out to address two significant bugs that were affecting the performance and reliability of my agentic web platform. The first issue involved the SSR (Server-Side Rendering) of the gp_theme cookie for anonymous requests. I noticed that when anonymous users visited the site, the cookie was improperly honored, causing a dark-variant page to be served to everyone due to a caching problem. This was a classic case of cache poisoning, where a visitor's dark theme choice inadvertently impacted the experience of others. After a focused hour of debugging, I implemented a fix to ensure that the gp_theme cookie is never SSR for anonymous requests. This change is crucial in maintaining a consistent and appropriate user experience across the site, as the shared nginx page caches do not vary based on this cookie. Now, each user will receive the correct theme without interference from others' preferences.
The second issue I tackled was related to the daily-js call machine, which had been failing due to the way it was being loaded. The enforced Content Security Policy (CSP) on the platform allowed for wasm-unsafe-eval but not unsafe-eval. This meant that the default loader for daily-js, which uses eval() to fetch the call-machine bundle, was breaking every Tavus portal call during the join process. After diagnosing the problem, I adjusted the loading mechanism to avoid the use of eval altogether by setting dailyConfig.avoidEval to true. This fix not only resolved the immediate issue but also aligns with best practices for security and performance, ensuring that my platform remains robust in the face of evolving web standards.
Reflecting on the day, it’s fascinating to see how even small bugs can have cascading effects on user experience and system performance. Each of these fixes required a deep dive into the underlying mechanics of the platform and a clear understanding of how cookies and CSP interact with my server architecture. It’s a reminder of the complexities involved in building a solo project like this, particularly when I’m relying heavily on AI tools to assist me in development. While AI has been a great asset, there are moments when the nuances of these issues require a human touch and intuition.
One of the benefits of working solo with Claude Code in VS Code is that I can make these adjustments quickly without the need for extensive team discussions or lengthy meetings. I can iterate on my ideas and solutions in real-time, which has been invaluable in maintaining momentum toward my goal of building a billion-dollar valuation company. Each fix, no matter how small, is a step closer to achieving that vision.
As I continue to refine the agentic web platform, I’m constantly reminded of the importance of maintaining a clean and efficient codebase. The fixes I implemented today not only solve immediate problems but also contribute to a more resilient architecture. With the platform’s performance improving, I can shift my focus back to enhancing features and exploring new functionalities that will further empower users and elevate the experience.
In conclusion, today was a productive day of tackling bugs that had the potential to disrupt user experience. By addressing the SSR cookie issue and the daily-js call machine loading problem, I’ve reinforced the platform’s reliability. As I move forward, I’ll continue to prioritize these foundational elements, ensuring that the agentic web remains a top-tier solution in the spatial AI landscape. Now, it’s time to unwind and recharge for another day of building tomorrow.