@alliance-droid/status-feedback-system 4.2.2 → 4.2.3
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/CHANGELOG.md +34 -28
- package/dist/components/board/StatusBadgeMenu.svelte +8 -11
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,31 +1,37 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 4.2.
|
|
4
|
-
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
## 4.2.
|
|
10
|
-
|
|
11
|
-
### Fixed
|
|
12
|
-
|
|
13
|
-
- SvelteKit feedback proxy:
|
|
14
|
-
|
|
15
|
-
## 4.2.
|
|
16
|
-
|
|
17
|
-
###
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 4.2.3
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Board status badges now show each item's **real, granular status to every viewer** — not just ProductOwners. Previously non-privileged viewers saw only the coarse public bucket ("In progress") for every internal status, and ProductOwners saw the real status but only after the privilege probe resolved. Each board item already carries its internal `status` from the API, so the badge now renders `internalStatusLabel(item.status)` for everyone on first paint (no privilege check, no per-item transitions fetch, no delay). **Changing** status remains ProductOwner-only. Note: this makes the granular internal statuses (e.g. "QA / UAT", "Technical review") visible to anyone who can see the board.
|
|
8
|
+
|
|
9
|
+
## 4.2.2
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- SvelteKit feedback proxy: read-only board status transition probes now return `200` with `canManage: false` when the browser has no usable management bearer token, avoiding noisy console `401` / `403` errors. Status mutations still require and forward a valid bearer token.
|
|
14
|
+
|
|
15
|
+
## 4.2.1
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- SvelteKit feedback proxy: private-app authentication/authorization now runs before missing proxy configuration is reported, so unauthenticated callers receive `401` instead of learning whether `SF_API_URL` / `SF_API_KEY` are configured.
|
|
20
|
+
|
|
21
|
+
## 4.2.0
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Added `@alliance-droid/status-feedback-system/sveltekit/server`, a server-only SvelteKit proxy adapter that lets consuming apps keep the project API key in private server environment variables. The adapter maps the package's existing `/api/...` client paths to `status-feedback-admin`, injects the private `x-api-key`, strips browser `key` query params, validates request bodies, forwards bearer tokens for privileged status endpoints, and can derive feedback `email` / response `author` from the host app's authenticated user.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- `apiKey` is now optional for `createStatusClient`, `StatusPage`, `StatusBanner`, `FeedbackForm`, `FeedbackButton`, `DevFeedback`, and `createFeedbackBoard`. When omitted, the client no longer appends `?key=...`, which enables same-origin proxy mode with `apiUrl="/svc/feedback"`.
|
|
30
|
+
- Updated README and integration docs to make the SvelteKit proxy the recommended hardened default. Direct admin calls with an embedded project key remain supported for existing consumers.
|
|
31
|
+
|
|
32
|
+
## 4.1.6
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
29
35
|
|
|
30
36
|
- Board status badges: for privileged viewers (Admin / ProductOwner), **every** item now shows its real internal status (e.g. "QA / UAT"), not just the first one. Previously the list badge derived its label solely from the per-item transitions cache, which is only populated lazily (on menu open) plus a one-time privilege probe of `items[0]` — so exactly the first item showed its real status and the rest stayed on the coarse public projection ("In progress"). The badge now derives the privileged label from each item's own `status` (already present on every board item) via a new `internalStatusLabel`, so all rows resolve consistently once privilege is confirmed. Non-privileged viewers are unchanged (they still see the public status bucket).
|
|
31
37
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import { onMount } from 'svelte';
|
|
22
22
|
import type { BoardItem, BoardTransition } from '../../api.js';
|
|
23
23
|
import type { FeedbackBoardState } from './state.svelte.js';
|
|
24
|
-
import { getStatusBadgeVariant,
|
|
24
|
+
import { getStatusBadgeVariant, internalStatusLabel } from './utils.js';
|
|
25
25
|
|
|
26
26
|
interface Props {
|
|
27
27
|
board: FeedbackBoardState;
|
|
@@ -45,15 +45,12 @@
|
|
|
45
45
|
|
|
46
46
|
// Read from the board's shared cache so detail + list reuse the same fetch.
|
|
47
47
|
let txns = $derived(board.transitions[item.id] ?? null);
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
let badgeLabel = $derived(
|
|
54
|
-
txns?.current.display ??
|
|
55
|
-
(board.canManageStatus ? internalStatusLabel(item.status) : publicStatusLabel(item.publicStatus))
|
|
56
|
-
);
|
|
48
|
+
// Everyone sees the item's real granular status — `item.status` is present on
|
|
49
|
+
// every board item (the board endpoint returns it), so all rows render their
|
|
50
|
+
// actual status on first paint, no privilege or transitions fetch required.
|
|
51
|
+
// Only *changing* status is gated (below, on canManageStatus). The loaded
|
|
52
|
+
// transitions display, when present, is the same value and stays authoritative.
|
|
53
|
+
let badgeLabel = $derived(txns?.current.display ?? internalStatusLabel(item.status));
|
|
57
54
|
// Changes whenever the menu's content (and thus its size) changes — drives a
|
|
58
55
|
// reposition so the teleported menu stays anchored after it loads/expands.
|
|
59
56
|
let posKey = $derived(`${menuOpen}:${loading}:${pendingTarget?.status ?? ''}:${txns?.targets.length ?? 0}`);
|
|
@@ -269,6 +266,6 @@
|
|
|
269
266
|
{/if}
|
|
270
267
|
{:else}
|
|
271
268
|
<Badge variant={getStatusBadgeVariant(item.publicStatus)} size="sm">
|
|
272
|
-
{
|
|
269
|
+
{badgeLabel}
|
|
273
270
|
</Badge>
|
|
274
271
|
{/if}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@alliance-droid/status-feedback-system",
|
|
3
|
-
"version": "4.2.
|
|
2
|
+
"name": "@alliance-droid/status-feedback-system",
|
|
3
|
+
"version": "4.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Drop-in system status pages and user feedback forms for SvelteKit apps",
|
|
6
6
|
"svelte": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"svelte": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./sveltekit/server": {
|
|
14
|
-
"types": "./dist/sveltekit/server.d.ts",
|
|
15
|
-
"default": "./dist/sveltekit/server.js"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"svelte": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./sveltekit/server": {
|
|
14
|
+
"types": "./dist/sveltekit/server.d.ts",
|
|
15
|
+
"default": "./dist/sveltekit/server.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
|
20
20
|
"!dist/**/*.test.*",
|