diff --git a/agent/PATCH-webux.md b/agent/PATCH-webux.md new file mode 100644 index 0000000..a79bd11 --- /dev/null +++ b/agent/PATCH-webux.md @@ -0,0 +1,59 @@ +# PROMPT — UX fixes: inline Bluesky post embeds + login flow cleanup + +You are working on this website: an app that lets a user log in with Bluesky +and displays their posts. Make the two sets of changes below. + +Before writing code, inspect the codebase to identify: +- the site's own name — referred to below as `verifier`, +- the login page and OAuth callback handler. + +Rules: +- Apply both Part A and Part B. +- Do not redesign anything beyond what is described. +- Follow the site's existing component and style conventions. +- Keep all existing functionality working. + +--- + +## Part A — Login/navigation flow cleanup + +Make the login flow reach the tool directly, with correct branding. Check each +of the following and fix any that apply: + +1. **Root goes straight to the tool.** The site root (`/`) and any unknown + route should land on `https://verifier.psingletary.com/verifier`, not on a separate landing/home page + that only re-links to the tool. If such a redundant landing page exists, + remove the hop and delete the now-unused component and styles. +2. **Login page branding.** The login page heading must say + "Login to verifier". Watch for copy-pasted headings and stray copy left + over from another project, and replace them with this site's own name. +3. **Correct return URL after login.** After OAuth sign-in the user must land + back on `https://verifier.psingletary.com/verifier`, never on a wrong or nonexistent path. Check BOTH + places that compute the post-login destination and make both default to + `https://verifier.psingletary.com/verifier`: + - the login page's default `returnUrl` (the fallback used when no query + param is present), and + - the OAuth callback handler's default `returnUrl`. + Stale defaults pointing at a route from another project are a known + leftover — fix them if found. +4. **Unauthenticated access redirects to login with a return URL.** When a + logged-out user opens `https://verifier.psingletary.com/verifier`, redirect to the login page with a + `returnUrl` query param pointing back to the tool (e.g. + `/login?returnUrl=https://verifier.psingletary.com/verifier`), so login returns the user where they + wanted to go. +5. **Minor polish.** Capitalize login/logout button labels consistently. + +--- + +## Acceptance criteria + +- A real, non-deleted public post renders as a live embedded iframe served + from `embed.bsky.app/embed/...` — verify in a browser that the blockquote is + replaced by an iframe after `scan()` runs, not left as a static blockquote. +- A deleted/redacted post falls back to a "View on Bluesky" link rather than + showing an error or nothing. +- The `at://` URI is visible on each post card. +- Visiting the site root while logged out redirects to login, and after + signing in the user lands on `https://verifier.psingletary.com/verifier` — no 404, no wrong destination. +- The login page shows `verifier`, not another project's name. +- Build, lint, and tests pass; no unrelated changes. diff --git a/src/App.css b/src/App.css index 77e977c..c616a8a 100644 --- a/src/App.css +++ b/src/App.css @@ -103,8 +103,8 @@ button:disabled { opacity: 0.6; cursor: not-allowed; } font-size: 0.9em; } -/* Home & Login */ -.home-page, .login-page { +/* Login */ +.login-page { display: flex; justify-content: center; align-items: center; @@ -113,7 +113,7 @@ button:disabled { opacity: 0.6; cursor: not-allowed; } text-align: center; } -.home-content, .login-content { +.login-content { max-width: 500px; width: 100%; padding: 30px; @@ -122,21 +122,8 @@ button:disabled { opacity: 0.6; cursor: not-allowed; } border-radius: 8px; } -.home-content h1, .login-content h1 { margin-top: 0; } -.home-content p, .login-content p { margin-bottom: 20px; } - -.home-button { - display: inline-block; - padding: 12px 30px; - background: var(--button-bg); - color: var(--button-text); - border-radius: 6px; - text-decoration: none; - font-weight: 600; - font-size: 1.1em; -} - -.home-button:hover { background: var(--button-hover-bg); text-decoration: none; } +.login-content h1 { margin-top: 0; } +.login-content p { margin-bottom: 20px; } /* Verifier */ .verifier-container { max-width: 600px; margin: 30px auto; padding: 0 20px; } diff --git a/src/App.jsx b/src/App.jsx index 77df3c1..37ad044 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -2,7 +2,6 @@ import React from 'react'; import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom'; import Navbar from './components/Navbar/Navbar'; import Footer from './components/Footer/Footer'; -import Home from './components/Home/Home'; import Login from './components/Login/Login'; import LoginCallback from './components/Login/LoginCallback'; import Verifier from './components/Verifier/Verifier'; @@ -20,7 +19,6 @@ const App = () => { } /> } /> - } /> { } /> - } /> - } /> + } /> + } />