Skip to content
This repository was archived by the owner on Nov 29, 2026. It is now read-only.

Load shared Reader modules earlier on cold inbox visits - #97

Merged
sarthakagrawal927 merged 2 commits into
mainfrom
agent/reader-244-earlier-inbox-1123
Nov 23, 2026
Merged

sarthakagrawal927 merged 2 commits into
mainfrom
agent/reader-244-earlier-inbox-1123

Conversation

@sarthakagrawal927

@sarthakagrawal927 sarthakagrawal927 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Change

Reader now lets Vite preload the dependencies of a requested module and imports the shared router when the app boots. The initial document can still paint its session check before loading the application stylesheet. Each page and the authentication client retain their lazy boundaries.

The pre-existing Better Auth 1.6.27 pin failed this repository's security gate with one critical and two high advisories. This PR also updates it to stable 1.7.27. Reader uses Google's client ID with One Tap and its existing provider/account key. The published 1.7 upgrade guide documents compatibility with the 1.6 account schema. Aggregate production preflight found zero duplicate account keys and no legacy issuer column. No migration is required.

Verification

Using identical production builds and paired cold Chromium sessions on loopback, the median time from document response to visible authenticated inbox rows improved from 2,826 to 2,053 ms at 390 px, 2,824 to 2,032 ms at 768 px and 2,844 to 1,998 ms at 1440 px. Each width had three pairs with alternating order, a 150 ms network delay, 1.6 Mbps download, 4× CPU slowdown and a synthetic authorized session. First contentful paint in these runs was 200–212 ms before and 202–214 ms after, measured from document response. The 300 ms inbox target remains open.

The complete Cloudflare build and all 30 Chromium/WebKit browser checks passed. The checks cover pending and signed-out access, five reserved inbox rows, link arrival, the extension route and the public landing. Reviewed pending and populated renders at all three widths. CodeVetter's packaged performance checker declined the config-relative browser fixture. The timings above are from Chromium.

On an isolated migrated D1 database, Better Auth 1.6.27 created a synthetic account and session through its test utilities. The actual Reader auth handlers from both revisions returned the same user and session IDs. The updated local Worker returned a null anonymous session, denied a private inbox request, and started a Google sign-in with state and the correct callback. Google credential consent and a real One Tap completion were not exercised. Independent CodeVetter review identified the minor-version upgrade and the need to distinguish synthetic session continuity from real-provider sign-in. Exact CI, the hosted preview build and dependency audit pass, with zero high or critical advisories remaining.

Tracks sass-maker/saas-maker#244.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

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
reader 3e7eb0f Nov 23 2026, 02:43 PM

@sarthakagrawal927
sarthakagrawal927 merged commit 8d8b984 into main Nov 23, 2026
2 checks passed
@sarthakagrawal927
sarthakagrawal927 deleted the agent/reader-244-earlier-inbox-1123 branch November 23, 2026 14:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant