Skip to content

Commit 631da4e

Browse files
authored
fix: hard reload persists the route (#4651)
* fix: hard reload persists the route * chore: regenerate jawn types * fix: removed duplicate jawn type
1 parent cd93706 commit 631da4e

File tree

6 files changed

+89
-337
lines changed

6 files changed

+89
-337
lines changed

bifrost/lib/clients/jawnTypes/public.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ type JsonValue = string | number | boolean | null | JsonArray | JsonObject;
22
interface JsonArray extends Array<JsonValue> {}
33
interface JsonObject { [key: string]: JsonValue; }
44

5+
type JsonValue = string | number | boolean | null | JsonArray | JsonObject;
6+
interface JsonArray extends Array<JsonValue> {}
7+
interface JsonObject { [key: string]: JsonValue; }
8+
59
/**
610
* This file was auto-generated by openapi-typescript.
711
* Do not make direct changes to the file.

helicone-cron/src/db/database.types.ts

Lines changed: 20 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,39 +1587,6 @@ export type Database = {
15871587
},
15881588
]
15891589
}
1590-
ledger: {
1591-
Row: {
1592-
created_at: string
1593-
credit: number
1594-
debit: number
1595-
event_created_at: string
1596-
id: string
1597-
org_id: string
1598-
reference_id: string | null
1599-
reference_type: string | null
1600-
}
1601-
Insert: {
1602-
created_at?: string
1603-
credit: number
1604-
debit: number
1605-
event_created_at: string
1606-
id?: string
1607-
org_id: string
1608-
reference_id?: string | null
1609-
reference_type?: string | null
1610-
}
1611-
Update: {
1612-
created_at?: string
1613-
credit?: number
1614-
debit?: number
1615-
event_created_at?: string
1616-
id?: string
1617-
org_id?: string
1618-
reference_id?: string | null
1619-
reference_type?: string | null
1620-
}
1621-
Relationships: []
1622-
}
16231590
online_evaluators: {
16241591
Row: {
16251592
config: Json | null
@@ -1659,30 +1626,6 @@ export type Database = {
16591626
},
16601627
]
16611628
}
1662-
org_balance: {
1663-
Row: {
1664-
ch_credit_sum: number
1665-
ch_last_req_created_at: number
1666-
organization_id: string
1667-
pg_debit_sum: number
1668-
updated_at: string
1669-
}
1670-
Insert: {
1671-
ch_credit_sum?: number
1672-
ch_last_req_created_at?: number
1673-
organization_id: string
1674-
pg_debit_sum?: number
1675-
updated_at?: string
1676-
}
1677-
Update: {
1678-
ch_credit_sum?: number
1679-
ch_last_req_created_at?: number
1680-
organization_id?: string
1681-
pg_debit_sum?: number
1682-
updated_at?: string
1683-
}
1684-
Relationships: []
1685-
}
16861629
org_rate_limit_tracker: {
16871630
Row: {
16881631
created_at: string | null
@@ -2024,21 +1967,6 @@ export type Database = {
20241967
},
20251968
]
20261969
}
2027-
processed_webhook_events: {
2028-
Row: {
2029-
id: string
2030-
processed_at: string
2031-
}
2032-
Insert: {
2033-
id: string
2034-
processed_at?: string
2035-
}
2036-
Update: {
2037-
id?: string
2038-
processed_at?: string
2039-
}
2040-
Relationships: []
2041-
}
20421970
prompt_input_keys: {
20431971
Row: {
20441972
created_at: string | null
@@ -3189,6 +3117,10 @@ export type Database = {
31893117
}
31903118
}
31913119
Functions: {
3120+
bytea_to_text: {
3121+
Args: { data: string }
3122+
Returns: string
3123+
}
31923124
check_request_access: {
31933125
Args: { this_auth_hash: string; this_user_id: string }
31943126
Returns: boolean
@@ -3201,8 +3133,8 @@ export type Database = {
32013133
}
32023134
date_count: {
32033135
Args:
3204-
| { prev_period: string; time_increment: string }
32053136
| { time_increment: string }
3137+
| { time_increment: string; prev_period: string }
32063138
Returns: Record<string, unknown>[]
32073139
}
32083140
ensure_one_demo_org: {
@@ -3225,14 +3157,12 @@ export type Database = {
32253157
}
32263158
http_delete: {
32273159
Args:
3228-
| { content: string; content_type: string; uri: string }
32293160
| { uri: string }
3230-
| { content: string; content_type: string; uri: string }
32313161
| { uri: string; content: string; content_type: string }
32323162
Returns: Database["public"]["CompositeTypes"]["http_response"]
32333163
}
32343164
http_get: {
3235-
Args: { data: Json; uri: string } | { uri: string } | { uri: string; data: Json }
3165+
Args: { uri: string } | { uri: string; data: Json }
32363166
Returns: Database["public"]["CompositeTypes"]["http_response"]
32373167
}
32383168
http_head: {
@@ -3251,19 +3181,17 @@ export type Database = {
32513181
}[]
32523182
}
32533183
http_patch: {
3254-
Args: { content: string; content_type: string; uri: string } | { uri: string; content: string; content_type: string }
3184+
Args: { uri: string; content: string; content_type: string }
32553185
Returns: Database["public"]["CompositeTypes"]["http_response"]
32563186
}
32573187
http_post: {
32583188
Args:
3259-
| { content: string; content_type: string; uri: string }
3260-
| { data: Json; uri: string }
32613189
| { uri: string; content: string; content_type: string }
32623190
| { uri: string; data: Json }
32633191
Returns: Database["public"]["CompositeTypes"]["http_response"]
32643192
}
32653193
http_put: {
3266-
Args: { content: string; content_type: string; uri: string } | { uri: string; content: string; content_type: string }
3194+
Args: { uri: string; content: string; content_type: string }
32673195
Returns: Database["public"]["CompositeTypes"]["http_response"]
32683196
}
32693197
http_reset_curlopt: {
@@ -3276,17 +3204,25 @@ export type Database = {
32763204
}
32773205
insert_feedback_and_update_response: {
32783206
Args: {
3207+
response_id: string
3208+
feedback_metric_id: number
32793209
boolean_value: boolean
3210+
numerical_value: number
3211+
string_value: string
32803212
categorical_value: string
32813213
created_by: string
3282-
feedback_metric_id: number
32833214
name: string
3284-
numerical_value: number
3285-
response_id: string
3286-
string_value: string
32873215
}
32883216
Returns: number
32893217
}
3218+
text_to_bytea: {
3219+
Args: { data: string }
3220+
Returns: string
3221+
}
3222+
try_det_decrypt_utf8: {
3223+
Args: { ct: string; aad: string; key_id: string; nonce: string }
3224+
Returns: string
3225+
}
32903226
urlencode: {
32913227
Args: { data: Json } | { string: string } | { string: string }
32923228
Returns: string

valhalla/jawn/src/lib/db/database.types.ts

Lines changed: 20 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,39 +1587,6 @@ export type Database = {
15871587
},
15881588
]
15891589
}
1590-
ledger: {
1591-
Row: {
1592-
created_at: string
1593-
credit: number
1594-
debit: number
1595-
event_created_at: string
1596-
id: string
1597-
org_id: string
1598-
reference_id: string | null
1599-
reference_type: string | null
1600-
}
1601-
Insert: {
1602-
created_at?: string
1603-
credit: number
1604-
debit: number
1605-
event_created_at: string
1606-
id?: string
1607-
org_id: string
1608-
reference_id?: string | null
1609-
reference_type?: string | null
1610-
}
1611-
Update: {
1612-
created_at?: string
1613-
credit?: number
1614-
debit?: number
1615-
event_created_at?: string
1616-
id?: string
1617-
org_id?: string
1618-
reference_id?: string | null
1619-
reference_type?: string | null
1620-
}
1621-
Relationships: []
1622-
}
16231590
online_evaluators: {
16241591
Row: {
16251592
config: Json | null
@@ -1659,30 +1626,6 @@ export type Database = {
16591626
},
16601627
]
16611628
}
1662-
org_balance: {
1663-
Row: {
1664-
ch_credit_sum: number
1665-
ch_last_req_created_at: number
1666-
organization_id: string
1667-
pg_debit_sum: number
1668-
updated_at: string
1669-
}
1670-
Insert: {
1671-
ch_credit_sum?: number
1672-
ch_last_req_created_at?: number
1673-
organization_id: string
1674-
pg_debit_sum?: number
1675-
updated_at?: string
1676-
}
1677-
Update: {
1678-
ch_credit_sum?: number
1679-
ch_last_req_created_at?: number
1680-
organization_id?: string
1681-
pg_debit_sum?: number
1682-
updated_at?: string
1683-
}
1684-
Relationships: []
1685-
}
16861629
org_rate_limit_tracker: {
16871630
Row: {
16881631
created_at: string | null
@@ -2024,21 +1967,6 @@ export type Database = {
20241967
},
20251968
]
20261969
}
2027-
processed_webhook_events: {
2028-
Row: {
2029-
id: string
2030-
processed_at: string
2031-
}
2032-
Insert: {
2033-
id: string
2034-
processed_at?: string
2035-
}
2036-
Update: {
2037-
id?: string
2038-
processed_at?: string
2039-
}
2040-
Relationships: []
2041-
}
20421970
prompt_input_keys: {
20431971
Row: {
20441972
created_at: string | null
@@ -3189,6 +3117,10 @@ export type Database = {
31893117
}
31903118
}
31913119
Functions: {
3120+
bytea_to_text: {
3121+
Args: { data: string }
3122+
Returns: string
3123+
}
31923124
check_request_access: {
31933125
Args: { this_auth_hash: string; this_user_id: string }
31943126
Returns: boolean
@@ -3201,8 +3133,8 @@ export type Database = {
32013133
}
32023134
date_count: {
32033135
Args:
3204-
| { prev_period: string; time_increment: string }
32053136
| { time_increment: string }
3137+
| { time_increment: string; prev_period: string }
32063138
Returns: Record<string, unknown>[]
32073139
}
32083140
ensure_one_demo_org: {
@@ -3225,14 +3157,12 @@ export type Database = {
32253157
}
32263158
http_delete: {
32273159
Args:
3228-
| { content: string; content_type: string; uri: string }
32293160
| { uri: string }
3230-
| { content: string; content_type: string; uri: string }
32313161
| { uri: string; content: string; content_type: string }
32323162
Returns: Database["public"]["CompositeTypes"]["http_response"]
32333163
}
32343164
http_get: {
3235-
Args: { data: Json; uri: string } | { uri: string } | { uri: string; data: Json }
3165+
Args: { uri: string } | { uri: string; data: Json }
32363166
Returns: Database["public"]["CompositeTypes"]["http_response"]
32373167
}
32383168
http_head: {
@@ -3251,19 +3181,17 @@ export type Database = {
32513181
}[]
32523182
}
32533183
http_patch: {
3254-
Args: { content: string; content_type: string; uri: string } | { uri: string; content: string; content_type: string }
3184+
Args: { uri: string; content: string; content_type: string }
32553185
Returns: Database["public"]["CompositeTypes"]["http_response"]
32563186
}
32573187
http_post: {
32583188
Args:
3259-
| { content: string; content_type: string; uri: string }
3260-
| { data: Json; uri: string }
32613189
| { uri: string; content: string; content_type: string }
32623190
| { uri: string; data: Json }
32633191
Returns: Database["public"]["CompositeTypes"]["http_response"]
32643192
}
32653193
http_put: {
3266-
Args: { content: string; content_type: string; uri: string } | { uri: string; content: string; content_type: string }
3194+
Args: { uri: string; content: string; content_type: string }
32673195
Returns: Database["public"]["CompositeTypes"]["http_response"]
32683196
}
32693197
http_reset_curlopt: {
@@ -3276,17 +3204,25 @@ export type Database = {
32763204
}
32773205
insert_feedback_and_update_response: {
32783206
Args: {
3207+
response_id: string
3208+
feedback_metric_id: number
32793209
boolean_value: boolean
3210+
numerical_value: number
3211+
string_value: string
32803212
categorical_value: string
32813213
created_by: string
3282-
feedback_metric_id: number
32833214
name: string
3284-
numerical_value: number
3285-
response_id: string
3286-
string_value: string
32873215
}
32883216
Returns: number
32893217
}
3218+
text_to_bytea: {
3219+
Args: { data: string }
3220+
Returns: string
3221+
}
3222+
try_det_decrypt_utf8: {
3223+
Args: { ct: string; aad: string; key_id: string; nonce: string }
3224+
Returns: string
3225+
}
32903226
urlencode: {
32913227
Args: { data: Json } | { string: string } | { string: string }
32923228
Returns: string

web/components/layout/auth/authLayout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ const AuthLayout = (props: AuthLayoutProps) => {
6464
const checkAuth = async () => {
6565
try {
6666
const user = await auth.getUser();
67+
// Avoid redirecting while the auth client is still initializing
68+
if (user.error === "Supabase client not found") {
69+
return;
70+
}
6771
if (user.error || !user.data) {
6872
router.push("/signin?unauthorized=true");
6973
}
@@ -74,7 +78,7 @@ const AuthLayout = (props: AuthLayoutProps) => {
7478
};
7579

7680
checkAuth();
77-
}, [router]);
81+
}, [router, auth]);
7882

7983
const currentPage = useMemo(() => {
8084
const path = pathname.split("/")[1];

0 commit comments

Comments
 (0)