Highly ambitious ATProtocol AppView service and sdks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

update copy, update login/waitlist error handling logic

+40 -24
+5 -7
frontend/src/features/auth/handlers.tsx
··· 106 106 } catch (error) { 107 107 console.error("OAuth authorize error:", error); 108 108 return Response.redirect( 109 - new URL( 110 - "/login?error=" + encodeURIComponent("OAuth initialization failed"), 111 - req.url 112 - ), 109 + new URL("/login?error=authorization_failed", req.url), 113 110 302 114 111 ); 115 112 } ··· 358 355 return Response.redirect(authResult.authorizationUrl, 302); 359 356 } catch (error) { 360 357 console.error("Waitlist initiate error:", error); 361 - return new Response("Failed to initiate waitlist authorization", { 362 - status: 500, 363 - }); 358 + return Response.redirect( 359 + new URL("/waitlist?error=authorization_failed", req.url), 360 + 302 361 + ); 364 362 } 365 363 } 366 364
+20 -6
frontend/src/features/auth/templates/fragments/LoginForm.tsx
··· 6 6 } 7 7 8 8 export function LoginForm({ error }: LoginFormProps) { 9 + const getErrorMessage = (error: string) => { 10 + switch (error) { 11 + case "authorization_failed": 12 + return "Failed to initiate authorization."; 13 + case "oauth_not_configured": 14 + return "OAuth is not configured. Please try again later."; 15 + case "invalid_callback": 16 + return "Invalid authorization callback."; 17 + case "no_user_info": 18 + return "Could not retrieve user information."; 19 + default: 20 + return error; // For backward compatibility with other error messages 21 + } 22 + }; 9 23 return ( 10 24 <form method="post" action="/oauth/authorize" className="space-y-2"> 25 + {error && ( 26 + <div className="text-white text-sm bg-zinc-950/70 p-4 font-mono rounded"> 27 + {getErrorMessage(error)} 28 + </div> 29 + )} 30 + 11 31 <Input 12 32 id="loginHint" 13 33 name="loginHint" ··· 19 39 <Button type="submit" variant="blue" className="w-full justify-center"> 20 40 Login 21 41 </Button> 22 - 23 - {error && ( 24 - <div className="text-white text-sm bg-zinc-950/70 p-4 font-mono rounded"> 25 - {error} 26 - </div> 27 - )} 28 42 </form> 29 43 ); 30 44 }
+12 -10
frontend/src/features/slices/lexicon/templates/LexiconDetailPage.tsx
··· 53 53 return ( 54 54 <Layout title={`${nsid} - ${slice.name}`} currentUser={currentUser}> 55 55 <div className="max-w-6xl mx-auto px-4 py-8"> 56 - <div className="flex items-center justify-between mb-6"> 57 - <div className="[&>div]:mb-0"> 56 + <div className="flex flex-col gap-4 mb-6 sm:flex-row sm:items-center sm:justify-between"> 57 + <div className="[&>div]:mb-0 min-w-0 flex-1"> 58 58 <Breadcrumb 59 59 items={[ 60 60 { ··· 69 69 ]} 70 70 /> 71 71 </div> 72 - <Button 73 - variant="secondary" 74 - _={`on click call navigator.clipboard.writeText(${JSON.stringify( 75 - lexiconJson 76 - )})`} 77 - > 78 - <span className="flex items-center gap-2">Copy JSON</span> 79 - </Button> 72 + <div className="flex-shrink-0"> 73 + <Button 74 + variant="secondary" 75 + _={`on click call navigator.clipboard.writeText(${JSON.stringify( 76 + lexiconJson 77 + )})`} 78 + > 79 + <span className="flex items-center gap-2">Copy JSON</span> 80 + </Button> 81 + </div> 80 82 </div> 81 83 82 84 <Card>
+3 -1
frontend/src/features/waitlist/templates/fragments/WaitlistForm.tsx
··· 26 26 return "You need an invite to access this service. Join the waitlist to request access."; 27 27 case "already_on_waitlist": 28 28 return "You're already on the waitlist! We'll notify you when your invite is ready."; 29 + case "authorization_failed": 30 + return "Failed to initiate authorization."; 29 31 default: 30 32 return "An error occurred. Please try again."; 31 33 } ··· 71 73 72 74 <Text as="p" size="xs" variant="muted" className="text-center"> 73 75 By joining the waitlist, you'll be notified when Slices is ready 74 - for you. 76 + for you. Keep an eye on your Bluesky DMs! 75 77 </Text> 76 78 </div> 77 79 </div>