You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/pluggableWidgets/maps-web/openspec/changes/archive/2026-06-17-maps-api-key-atom/specs/api-key-atom/spec.md
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,18 +6,26 @@ The Maps container SHALL provide a `ComputedAtom<string | null>` that reactively
6
6
7
7
#### Scenario: Expression value takes priority
8
8
9
-
-**WHEN**`apiKeyExp.value` is a non-empty string
9
+
-**WHEN**`apiKeyExp` is configured (not undefined)
10
+
-**AND**`apiKeyExp.value` is a non-empty string
10
11
-**THEN** the atom returns that value
11
12
13
+
#### Scenario: Returns null while expression is loading
14
+
15
+
-**WHEN**`apiKeyExp` is configured (not undefined)
16
+
-**AND**`apiKeyExp.value` is undefined (still loading)
17
+
-**THEN** the atom returns `null`
18
+
12
19
#### Scenario: Falls back to static apiKey
13
20
14
-
-**WHEN**`apiKeyExp.value` is undefined or empty
21
+
-**WHEN**`apiKeyExp` is undefined (not configured)
15
22
-**AND**`apiKey` is a non-empty string
16
23
-**THEN** the atom returns the static `apiKey` value
17
24
18
25
#### Scenario: Returns null when no key available
19
26
20
-
-**WHEN** both `apiKeyExp.value` and `apiKey` are empty or undefined
27
+
-**WHEN**`apiKeyExp` is undefined
28
+
-**AND**`apiKey` is empty or undefined
21
29
-**THEN** the atom returns `null`
22
30
23
31
### Requirement: API key cached once resolved
@@ -45,18 +53,26 @@ The Maps container SHALL provide a `ComputedAtom<string | null>` that reactively
45
53
46
54
#### Scenario: Expression value takes priority
47
55
48
-
-**WHEN**`geodecodeApiKeyExp.value` is a non-empty string
56
+
-**WHEN**`geodecodeApiKeyExp` is configured (not undefined)
57
+
-**AND**`geodecodeApiKeyExp.value` is a non-empty string
49
58
-**THEN** the atom returns that value
50
59
60
+
#### Scenario: Returns null while expression is loading
61
+
62
+
-**WHEN**`geodecodeApiKeyExp` is configured (not undefined)
63
+
-**AND**`geodecodeApiKeyExp.value` is undefined (still loading)
64
+
-**THEN** the atom returns `null`
65
+
51
66
#### Scenario: Falls back to static geodecodeApiKey
52
67
53
-
-**WHEN**`geodecodeApiKeyExp.value` is undefined or empty
68
+
-**WHEN**`geodecodeApiKeyExp` is undefined (not configured)
54
69
-**AND**`geodecodeApiKey` is a non-empty string
55
70
-**THEN** the atom returns the static `geodecodeApiKey` value
56
71
57
72
#### Scenario: Returns null when no key available
58
73
59
-
-**WHEN** both `geodecodeApiKeyExp.value` and `geodecodeApiKey` are empty or undefined
74
+
-**WHEN**`geodecodeApiKeyExp` is undefined
75
+
-**AND**`geodecodeApiKey` is empty or undefined
60
76
-**THEN** the atom returns `null`
61
77
62
78
### Requirement: Geodecode API key cached once resolved
0 commit comments