Phase 3 of the console rewrite, part 2. Stacked on #124, so merge that first.
Rewritten from what they do, with new tests written first:
the JMAP client: requests, the registry-write listener, batched gets and query paging
the auth, account, cache, schema and UI stores
the permissions hook, whose checks are now a plain function with tests
types/jmap.ts
The client and the stores had little or no test coverage before; the new client and store tests were also run against the old code and pass there too. Storage keys (inbuxa-auth, inbuxa-ui), exports and behavior are unchanged. Removed because nothing used them: jmapQuery, the cache's per-type invalidation, the permissions hook's edition checks, and two unused JMAP types. The suite goes from 701 to 724 tests.
Visual check: see #124. That check covered both phase 3 PRs and found no change in the UI.
Typecheck, lint, i18n:check, tests, build and notice check pass locally. No new strings.
Phase 3 of the console rewrite, part 2. Stacked on #124, so merge that first.
Rewritten from what they do, with new tests written first:
- the JMAP client: requests, the registry-write listener, batched gets and query paging
- the auth, account, cache, schema and UI stores
- the permissions hook, whose checks are now a plain function with tests
- `types/jmap.ts`
The client and the stores had little or no test coverage before; the new client and store tests were also run against the old code and pass there too. Storage keys (`inbuxa-auth`, `inbuxa-ui`), exports and behavior are unchanged. Removed because nothing used them: `jmapQuery`, the cache's per-type invalidation, the permissions hook's edition checks, and two unused JMAP types. The suite goes from 701 to 724 tests.
| | Not upstream's | Upstream lines left | Dual headers |
|---|---|---|---|
| #124 | 79.7% | 15,098 in 62 files | 50 |
| this PR | 81.5% | 13,775 in 51 files | 39 |
That ends phase 3. The plan expected 81.4%.
**Visual check:** see #124. That check covered both phase 3 PRs and found no change in the UI.
Typecheck, lint, i18n:check, tests, build and notice check pass locally. No new strings.
OAuth (discovery, PKCE with S256, the redirect, the code trade, the
end-session URL), the client id, the login page, the callback and the API
wrapper are rewritten from what they do, with new tests: RFC 7636's worked
example for the challenge, the state check, refusal versus no answer on
refresh, a shared refresh, the retry after a 401.
The callback's checks move out of the page into services/auth/callback.ts,
where they are tested directly. Storage keys, the sign-in parameters,
strings and behavior are unchanged. Checked on a local server: a deep link
through sign-in, a refresh, sign-out and a forged callback.
The client, the auth, account, cache, schema and UI stores, the permissions
hook and types/jmap.ts are rewritten from their behavior, with new tests
for each (the client's and the store tests also pass on the old code).
Storage keys, exports and behavior are unchanged. Dropped, as unused:
jmapQuery, the cache's per-type invalidation, the permissions hook's
edition checks, and the JmapRequest and JmapGetResponse types.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Phase 3 of the console rewrite, part 2. Stacked on #124, so merge that first.
Rewritten from what they do, with new tests written first:
types/jmap.tsThe client and the stores had little or no test coverage before; the new client and store tests were also run against the old code and pass there too. Storage keys (
inbuxa-auth,inbuxa-ui), exports and behavior are unchanged. Removed because nothing used them:jmapQuery, the cache's per-type invalidation, the permissions hook's edition checks, and two unused JMAP types. The suite goes from 701 to 724 tests.That ends phase 3. The plan expected 81.4%.
Visual check: see #124. That check covered both phase 3 PRs and found no change in the UI.
Typecheck, lint, i18n:check, tests, build and notice check pass locally. No new strings.