Repository navigation
Conversation
…; a host draws its own plans (0.3.13) The Quick setup card stood on the rows' pill edge, 8px left of every word and mark above it (52 against 60 at 1440), and the foot row and the rail's account sat on one line only beside the rail: in the drawer the rail's 8px foot put the account 8px above Upgrade plan. The cards now stand inside a row's inset (ROW.px), 16px in on both sides, with Setup's padding that inset so its title keeps its words; the foot row and the account stand on the pane's bottom edge (Sidebar and Rail pb 0) beside the rail and in the drawer, as the title row and the first mark stand on its top. The upgrade press already went straight to https://hanzo.ai/pay/cart, which answers 200; nothing in this package names billing.hanzo.ai. payUrl now writes the path on the checkout's own origin and the whole address from any other, and term keeps the same form. Host takes `upgrade`: a host that draws its own plans passes it, and every upgrade press (useUpgrade) calls it and leaves nothing: the sidebar's and the shell's Upgrade plan, Chat's header, the bar's Upgrade, the account menu's Get Pro and plans row, Dev's plans (leave), the composer's usage and Settings' model controls. Chat's paywall hands its ask to the host instead of drawing its dialog. On Host and not App, because the shell's presses are drawn outside App. Claude-Session: https://claude.ai/code/session_016DKtyuzxU43Gsc6Pm9vKTF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The sidebar's foot is now aligned with the rest of the sidebar. The Quick setup card's edges sit on the same column as the words and icons above it, 16px in on both sides. Upgrade plan and the rail's account share one line on the pane's bottom edge, beside the rail and in the phone drawer, the same way the title row and the first rail icon sit on its top edge.
This PR also adds one optional prop,
upgrade, onHost. A host that draws its own plans passes it, and every upgrade press in the package then calls it and does not navigate. Version 0.3.13.The foot
Measured on hanzo.ai's own export, signed in on the free plan with the card showing:
$2, a row's inset)Beside the rail the sidebar's foot had 8px of padding. In the drawer it had none, while the rail's foot kept its 8px. So the account and Upgrade plan were on one line in one layout and 8px apart in the other. Now both feet are 0 (
SidebarandRailpb), and the foot row stands on the pane's bottom edge. The space above the card is Recents' own flex fill and nothing more.The upgrade link
The press already went straight to
https://hanzo.ai/pay/cart?returnUrl=..., which answers 200 with no redirect. Nothing in this package writes billing.hanzo.ai. (Thebilling: "https://billing.hanzo.ai"in hanzo.ai's chunks is @hanzogui/shell's links map, read only by its Billing links, none of them an upgrade press.)payUrlis still the one writer of the checkout address. On the checkout's own origin it now writes a path (/pay/cart?...); from any other origin, and in the prerender, it writes the whole address.termfollows the same rule (local).pay chooses the plan from
?plan=itself and reads what the viewer holds from their subscriptions, so no parameter for the viewer's current plan is added.The host's plans
Hosttakesupgrade?: () => void. Every upgrade press goes throughuseUpgrade(host.tsx):leave)Chat's paywall (Upgrade.tsx) hands its ask to the host instead of drawing its dialog. The prop is on
Hostrather thanAppbecause the shell's presses are drawn outsideApp.Checks
pnpm typecheckpnpm lint:designpnpm build, and the dist root loads in Nodevitest run: 61 files, 577 testsNew tests:
upgradetakes Dev's plans press and the page goes nowhere (fails whenuseUpgradeignores it).payUrlandtermon hanzo.ai, on other origins (a lookalike included) and in the prerender.https://claude.ai/code/session_016DKtyuzxU43Gsc6Pm9vKTF