@remit/web-client 0.0.78 → 0.0.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/hooks/useToggleStar.test.ts +1 -0
- package/src/hooks/useToggleTrusted.test.ts +1 -0
- package/src/lib/brief.test.ts +1 -0
- package/src/lib/dedupe-thread-messages.test.ts +1 -0
- package/src/lib/display-category.test.ts +4 -1
- package/src/lib/display-category.ts +4 -2
- package/src/test-support/fixtures.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remit/web-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.79",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Remit web client, published as composable primitives — the app shell, auth shells, and runtime config. A distributor imports what it composes and bundles it.",
|
|
6
6
|
"exports": {
|
package/src/lib/brief.test.ts
CHANGED
|
@@ -10,7 +10,10 @@ describe("toDisplayCategory", () => {
|
|
|
10
10
|
assert.strictEqual(toDisplayCategory("uncategorized"), "uncategorized");
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
test("treats
|
|
13
|
+
test("treats an absent category as unclassified", () => {
|
|
14
|
+
// No caller can reach this today — both response fields are required —
|
|
15
|
+
// but an absent category must resolve to `uncategorized`, never to
|
|
16
|
+
// `personal`, wherever one arrives from.
|
|
14
17
|
assert.strictEqual(toDisplayCategory(undefined), "uncategorized");
|
|
15
18
|
});
|
|
16
19
|
|
|
@@ -11,8 +11,10 @@ import type { ThreadCategory } from "@remit/ui";
|
|
|
11
11
|
* decided was personal, so a classification gap read as a large personal inbox
|
|
12
12
|
* rather than as missing work (issue #45).
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* Both response fields that feed this are required, so no caller reaches the
|
|
15
|
+
* `undefined` branch. The parameter stays tolerant anyway: this is the one place
|
|
16
|
+
* an absent category is turned into a value, and the answer has to be
|
|
17
|
+
* `uncategorized` rather than a crash or a `personal` default.
|
|
16
18
|
*/
|
|
17
19
|
export function toDisplayCategory(
|
|
18
20
|
category: RemitImapMessageCategory | undefined,
|