Commit c024a4b
committed
fix(search): render HTTPProxy + ExportPolicy hits in result list
kindToHref switch had no cases for HTTPProxy or ExportPolicy, so
SearchResultItem's null-href guard returned null for every row —
making the rows silently disappear while the group header still
rendered (kindDisplayName is a separate map). Symptom: a group
with no visible items.
Three coordinated updates across the three kind-keyed switches:
- kindToHref: add detail-page URL mappings for HTTPProxy
(/project/[id]/edge/[proxyId]) and ExportPolicy
(/project/[id]/export-policies/[exportPolicyId])
- KindIcon: GaugeIcon for HTTPProxy + ChartSplineIcon for
ExportPolicy, matching the project sidebar nav icons
- kindDisplayName: group header labels read 'AI Edge' and
'Metrics' so they mirror the sidebar nav titles exactly
Tests updated to assert positive URL returns for both kinds and
to document the API's all-caps HTTPProxy casing contract (Pascal
'HttpProxy' is still in the null list because the server never
sends that form).
The three kind-keyed switches (kindToHref, KindIcon, kindDisplayName)
remain independent — adding a kind still requires updating all three.
A future refactor could merge them into a single kind-registry
record so kinds become a single source of truth.1 parent 6e1ba3f commit c024a4b
3 files changed
Lines changed: 42 additions & 3 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
46 | 60 | | |
47 | 61 | | |
48 | 62 | | |
49 | 63 | | |
50 | | - | |
51 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
52 | 69 | | |
53 | 70 | | |
54 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
42 | 54 | | |
43 | 55 | | |
44 | 56 | | |
| |||
0 commit comments