Skip to content

Comments

Server-side render content of the profile and account pages#68

Merged
sergeychernyshev merged 15 commits intomainfrom
67-server-side-render-content-of-the-profile-and-account-pages
Feb 22, 2026
Merged

Server-side render content of the profile and account pages#68
sergeychernyshev merged 15 commits intomainfrom
67-server-side-render-content-of-the-profile-and-account-pages

Conversation

@sergeychernyshev
Copy link
Member

@sergeychernyshev sergeychernyshev commented Feb 22, 2026

This PR implements server-side rendering (SSR) for the User Profile and Account Settings pages.

Changes:

  • Implemented handleSSR and renderSSR in src/index.ts to perform text-based placeholder replacement.
  • Fixed a redirect loop issue by following canonical URL redirects from env.ASSETS.
  • Updated client-side scripts (profile.html, accounts.html) to use SSR data provided in data-ssr-profile, data-ssr-credentials, data-ssr-account, and data-ssr-members attributes.
  • Improved SSR: Login credentials, Team members, and Provider links are now rendered directly into the HTML on the server.
  • Dynamic Providers: Removed hard-coded provider lists from both the power-strip and the "Link another account" section. They are now dynamically injected via SSR based on Worker configuration.
  • Bug Fixes:
    • Fixed a regression in handleMyAccounts response format that broke account switching.
    • Fixed a TypeError in handleMe by safely using data from getUserFromSession.
    • Ensure SSR data is only used on initial load to allow proper client-side updates (e.g. for picture removal).
  • Architecture: Removed redundant SystemDO catalog check, trusting the encrypted cookie's doId as proof of user existence before instantiating UserDO.
  • Added an SSR verification test case to test/integration.spec.ts.

Closes #67

✨ Assisted by AI: Gemini

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 22, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
startup-api 2dbd370 Feb 22 2026, 05:36 AM

@sergeychernyshev sergeychernyshev merged commit 8fc15ac into main Feb 22, 2026
1 of 2 checks passed
@sergeychernyshev sergeychernyshev deleted the 67-server-side-render-content-of-the-profile-and-account-pages branch February 22, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server-side render content of the profile and account pages

1 participant