mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 15:23:29 +00:00
build(deps): bump next and eslint-config-next to 16.4.6
16.4.6 keeps a single header value as a string, so the compression middleware now sees a route handler's Content-Type and gzips the response when the client accepts it. Route handlers were never compressed before. Measured on a production build: JSON and CSV exports go out gzipped with their Content-Disposition intact and still flush chunk by chunk, so a streamed download keeps arriving as it is written. The Coach and document chat streams send Cache-Control: no-transform, which the middleware honours, so they stay uncompressed and each frame arrives when it is written. A guard now holds every text/event-stream surface to that directive. The notification journey failed twice on the release candidate at the same step: the e-mail address typed into the card was wiped. The spec waited for the settings read with waitForResponse, which settles on the headers, and treated that as the card having copied the server value into the input. With compression the body follows the headers after a round through zlib on the thread pool, which a loaded runner can hold up, and the late copy overwrote the typed value. The spec now also waits for each card's enable switch, which is disabled until its read has landed and is enabled in the same render that does the copy.
This commit is contained in:
1 parent
f602336fcb
commit
6debd62326
5 files changed
+136
-56
No files matched your search
@@ -217,8 +217,15 @@ async function attemptCount(page: Page): Promise<number> {
|
||||
* sync-from-server shape, no effect involved. A value typed into the input
|
||||
* before that copy runs is silently replaced by the server's, so the save that
|
||||
* follows persists an empty field and the next request is refused for a reason
|
||||
* that points nowhere near the test. Waiting for the two reads is what makes
|
||||
* the copy already done rather than pending.
|
||||
* that points nowhere near the test.
|
||||
*
|
||||
* Waiting for the two reads alone is not enough. Playwright settles a
|
||||
* response on its headers, and the body can follow later: API responses are
|
||||
* compressed, and the compressed body reaches the socket only after a round
|
||||
* through zlib on the thread pool, which a loaded runner can hold up. The copy
|
||||
* runs only once the body is parsed. Each card keeps its enable switch
|
||||
* disabled until its read has landed and does the copy in that same render,
|
||||
* so an enabled switch is the signal that the seed is in the input.
|
||||
*/
|
||||
async function openChannels(page: Page): Promise<void> {
|
||||
const seeded = ["/api/settings/email", "/api/settings/ntfy"].map((endpoint) =>
|
||||
@@ -231,6 +238,8 @@ async function openChannels(page: Page): Promise<void> {
|
||||
await page.goto("/settings/integrations", { waitUntil: "domcontentloaded" });
|
||||
await expect(page.locator(CHANNELS_PANEL)).toBeVisible({ timeout: 30_000 });
|
||||
await Promise.all(seeded);
|
||||
await expect(page.locator("#email-toggle")).toBeEnabled();
|
||||
await expect(page.locator("#ntfy-toggle")).toBeEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user