Commit 8fdef4e
UN-2946 [MISC] Restore Prompt Studio public sharing after lookups V2 wiring (#1963)
* UN-2946 [FIX] Restore Prompt Studio public sharing after lookups V2 wiring
Three issues broke /promptStudio/share/* after the lookups V2 PR:
- The global useAxiosPrivate response interceptor calls logout() on any
401. An authenticated probe leaking into the anonymous share viewer
(e.g. the new useLookupDirtySeed hook on first mount) returned 401 and
redirected the share page through /api/v1/logout. Skip the logout when
the current path is /promptStudio/share/* — the viewer has no session
to expire.
- The local Traefik router only forwarded /api/v1 and /deployment to the
backend; /public/share/* fell through to the Vite dev server and the
share endpoints returned the SPA index instead of JSON. Add /public to
the backend rule (and to the frontend negative match) in both the
compose labels and the sample proxy override.
- The Combined Output JSON view defaulted to the Raw tab even when an
enriched lookup output existed. For anonymous share viewers the
enriched value is the point of the project; default activeView to
Enriched when isPublicSource. The existing useEffect already falls
back to Raw when no enriched data is present, so projects without
lookups are unaffected.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* UN-2946 [DOCS] Tighten public-share guard comments
Drop incident/context references; keep one-line WHYs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* UN-2946 [FIX] Tighten path match and re-sync enriched default (review)
- useAxiosPrivate: trailing slash so the prefix doesn't match unintended
siblings of /promptStudio/share/.
- JsonView: re-sync activeView when isPublicSource or enrichedOutput
changes, not just on first mount, to survive store hydration order.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* UN-2946 [FIX] Use globalThis over window in axios 401 guard
Resolves SonarCloud S7764 findings on useAxiosPrivate.js.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* UN-2946 [FIX] Address review on public-share 401 + Enriched default
- Log a console.warn breadcrumb when a 401 is suppressed on the public
share route so stray authenticated probes don't go silent.
- Gate the JsonView Enriched default behind a first-load ref so the
default fires once and a manual Raw toggle isn't stomped on
re-renders.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a65d017 commit 8fdef4e
4 files changed
Lines changed: 36 additions & 9 deletions
File tree
- docker
- frontend/src
- components/custom-tools/combined-output
- hooks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
39 | 54 | | |
40 | | - | |
| 55 | + | |
41 | 56 | | |
42 | 57 | | |
43 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
19 | 31 | | |
20 | 32 | | |
21 | 33 | | |
| |||
0 commit comments