Repository navigation
Merge main into release/v1.50.0 - #1580
Merged
Merged
Conversation
The admin force logout deleted the account's web sessions only. The native app's refresh token family and its paired access token survived, so the app stayed signed in for the rest of its refresh window, and the route's own comment claimed the opposite. The route now runs destroyAllSessions, the function the password change and the admin password reset already use: web sessions, native sign-ins, API tokens and the rest of credentialRevocations, then the push credentials of the devices left signed out. destroyAllSessions moves to its own module, re-exported from the session module, and reports how many web sessions and live device sign-ins it ended, for the route's answer and audit row. The confirmation text names what else stops working. An integration test drives every path that ends an account's sessions (force logout, admin reset, password change, admin and self deletion) and checks from the outside that the browser, the app's access and refresh tokens and an API token are refused and the device takes no more pushes. A guard holds every session.deleteMany to the listed places.
Most data routes sent no Cache-Control, so whether a reading, a medication list or a lab result was kept on disk was left to the browser's heuristics and to whatever proxy sits in front of the server. apiHandler now sends private, no-store (with Pragma: no-cache) on every answer that names no posture of its own. The OAuth routes and the MCP endpoint, which cannot use the wrapper, apply the same policy; the MCP transport's stream no-cache is raised to no-store. The coach and document chat streams send no-store as well. Five reads that used the bfcache-friendly max-age=0 go back to the default: the pages they serve are no-store already, so bfcache never applied, and the helper module goes with them. The routes that keep a weaker posture are listed with their reason in a guard (public files, the static category map, the deprecated flag route, the versioned avatar, the ETag-revalidated dose list and calendar feeds), and the guard fails on a new one or on a route handler outside apiHandler without the policy. The batch routes used no-store to keep a transient failure out of the idempotency cache. Now that every answer is no-store, that signal moves to an internal header (markNotReplayable) that withIdempotency reads and removes on every path. The service worker stores no API answer and the dashboard warm start keeps its data in its own IndexedDB store, so offline behaviour is unchanged. The size baselines grow by the lines the policy call and the marker take: apiHandler and the token route by one and two lines, the idempotency module by its marker.
…ason SECURITY.md and the security model diagram said Strict; the cookie has always been issued Lax. Lax is the right value: the OAuth return of an integration is a top-level navigation from another site that needs the session, and an OIDC sign-in reaches the app through a redirect chain that starts at the identity provider. Under Strict both would land signed out. Cross-site writes are refused separately by the Sec-Fetch-Site and Origin check. SECURITY.md also states that ending a user's sessions ends the native app's sign-ins and API tokens, and that API answers are not cached; the changelog records all three under Security.
A task bound to a named chain reads that chain and nothing else. With no entry in it set up, the capability resolves to no_provider and its action is withheld wherever it would appear, "Read with AI" on a document or the Coach, so the person saw the action vanish with no word about why. The task's row under "Chains per task" now says that nothing in its chain is set up and that the action comes back once a provider is set up or another chain is picked. The row no longer calls such a chain a binding. Refs #1404
The metric page and the rollups keep each day of a ranked vital to the source the user put first. Three readers did not: readDayAggregates, behind readiness's latest-day value, the coincident-deviation flag and the vitals baseline's live fold, averaged every source of the day; and the briefing's signals of the day took the raw rows, so the newest row of any source became today's value. With a ring worn at night and a watch worn in the day both reporting resting heart rate for one date, readiness used the mean of the two and moved whenever the lower-ranked watch revised its estimate, and the briefing could quote the watch. readDayAggregates takes the user's source-priority blob and, for a type with a ladder, keeps each day to its first source in ladder order, the order canonicalMeasurementsCte uses. readLatestDayMean and the baseline's live fold pass it; the signals of the day read through canonicalSignalRows, which applies pickCanonicalSourceRows per local day. Refs #1514
…cache # Conflicts: # CHANGELOG.md # SECURITY.md # src/__tests__/baselines/version-stamp-comments.json
# Conflicts: # CHANGELOG.md
The day readers loaded the source-priority blob once per type, so a dashboard, digest or health-status request read the same row a dozen times and went over its statement budget.
A run in the first two minutes after Berlin midnight put the real reading on yesterday, and the deviation it asserts on was never there.
…e-priority # Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
…e-priority # Conflicts: # CHANGELOG.md
The comprehensive overview averaged SLEEP_DURATION stage rows, so a night read as its mean segment and the latest value was the last stage. Replace its sleep summary with one point per reconstructed night over the 90-day window, the rule the sleep pages and the analytics slices use.
Write steps, mmHg and bpm whole and kg, h and percentages to one decimal, set the change and its percentage in one bracket pair with the reader's digit grouping, name steps, and drop a change that rounds to nothing.
resolveServerLocale now reads the ambient request headers, lets a Bearer request's Accept-Language outrank the cookie and the stored language, and falls back to the operator default before English. The nutrient catalogue, ingredient labels and mood insights resolve through it instead of the stored language alone.
Keeps unit literals out of the display surface, as the unit-preference guard requires.
A patch adds no contract field. The registration still never fails over an optional Live Activity field and still leaves that field out; which fields were left out is noted on the wide event only. The `ignored` answer field comes with the next minor.
…language # Conflicts: # CHANGELOG.md
…patch fix(devices): keep the left-out Live Activity fields off the answer
…language # Conflicts: # CHANGELOG.md
The signed-push check walked remote_sha..local_sha for an existing branch. After main is merged into that branch, the range holds main's own history, so one unsigned commit already on main refused every later push that brings main in. Commits already on a remote are not the push's to fix and cannot be rewritten there; the check now excludes them for existing branches as it already did for new ones. A new unsigned commit of your own is still refused.
fix: sleep nights on the overview, review rounding, app language on Bearer requests
fix(hooks): check only the commits a push brings to a remote
…h its own APNs key The Live Activity pass asked for the device's ordinary push route to be `relay`. On a server with its own APNs key and a relay registration every bound device reads `direct`, so no Activity ever started there. Start, update and the pass's ends now depend on whether the relay reaches the device (`relayReachable`), the operator's switch, the device's Live Activity consent and a usable start token; `routeFor` stays the one rule for ordinary pushes. There is no start over the server's own key, so a dose still gets exactly one Activity. The admin notification diagnostic reports per iPhone whether a Live Activity can start, and the first thing in the way.
…e-priority # Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
…f a diagnostic field A patch adds no contract field. The admin diagnostic stays as it was; the pass names the first reason a device gets no start in its wide event (live_activity_start_blocked).
…uage The insight cards, the overview's rule alerts, the target labels and the metric names on a medication's effect view were English literals built in code, so they stayed English whatever language the request asked for. The alert engine now returns which alert fired and its values; the wording is a catalog entry under serverText.alerts, filled per request after the overview cache. Target and effect-view labels are catalog keys the routes word on the way out. The BP band inside an alert is named through the status pill's own map, now shared under lib/targets. A guard reads the response-building code of these surfaces and fails on a display field set to an English literal.
With API responses no-store, the browser no longer drains an unread body into its cache. The briefing read returned on a 422, 429, 503 or 403 without reading the body, so the request stayed open for the life of the page and held its connection; the tablet shell e2e waited for network idle on /insights and timed out.
fix(insights): read today's ranked vitals from the ladder-winning source
# Conflicts: # CHANGELOG.md
…sh-route fix(push-relay): start Live Activities over the relay on a server with its own APNs key
fix(settings): say when a task's chain has no provider set up
fix(i18n): word the rule alerts and target names in the reader's language
…cache # Conflicts: # src/app/api/insights/targets/route.ts
The day readers memoised the user's source-priority read under their own key, while some sixty other readers called loadUserSourcePriority directly. A digest request reached it from both sides; parallel direct reads went to Prisma, which batched whichever landed in the same tick, so the route sent the read in three to five statements and its count followed the scheduling. loadUserSourcePriority now shares one pending read per request under one key (fresh in a background event, as before), and the day readers use it. The budgets of the summary, snapshot, digest and health status drop to the counts measured on the fixture.
fix(rollups): read the source order once per request
fix: end every sign-in on admin force logout, no-store on API answers
Release keeps the registration's `ignored` answer field and the admin diagnostic's `devices[].liveActivityStart`. The diagnostic now reads the Live Activity pass's own eligibility (`live-activity-eligibility.ts`), so a device the relay does not reach reports `not_bound` instead of null and there is one rule for both. The daily digest budget takes main's lower source-order read on top of release's added reads.
The admin force logout's one end-all-sessions function lives in its own module now; release's Wallet void push moves into it. The morning route drops its own cache header for the API-wide no-store policy. Size and version-stamp baselines rewritten from the merged tree.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings main (through c4d11f4) into the release branch: the Live Activity start eligibility (#1573), the Live Activity token cap and optional-field tolerance (#1567), server-worded text in the reader's language (#1576), the per-request source order (#1578, #1549), the empty-chain notice (#1545), the signed-push hook range (#1571), the session-termination and API no-store work (#1495), and migration 0571.
Resolutions:
POST /api/deviceskeeps release'signoredanswer field; main's removal of it was a patch-only measure.devices[].liveActivityStartnow answers fromlive-activity-eligibility.ts, the rule the start pass follows, so a device the relay does not reach reportsnot_boundinstead of null. NewadminLiveActivityStart.notBoundline in every locale; OpenAPI regenerated.live-activity.tskeeps release's start structure and takes main's eligibility module and thelive_activity_start_blockedlog.destroyAllSessionslives inend-all-sessions.ts(main); release's Wallet void push moved into it./api/daily/morningdrops its own cache header for the API-wide no-store policy.serverTextfrom main, release's additions).Migrations: main's 0571 and release's 0572 onward both stay, numbering untouched.