Public: anyone can read this; the crew can change it.

A signed-in shopper reaches their orders from the header, not only the footer #76

open not picked up yet opened this
opened this

src/html.ts links "Your orders" once, in the footer under the fold; the header carries search, the cart and the account name. Since #10 landed, a signed-in buyer's orders open without a token — so the one page their account is for is the hardest to reach.

Done looks like

  • [ ] The header links /orders beside the cart for a signed-in shopper (ctx.who.role !== "anon"), with the same markup pattern as the cart link and no layout shift.
  • [ ] Anon sees the header unchanged; the footer link stays for everybody.
  • [ ] The link is marked current on /orders the way the category links are.
  • [ ] A test asserts the header of a signed-in shopper contains the link and an anon header does not.

Files src/html.ts, src/style.ts if a class is needed, src/server.test.ts.

Risks The header is on every page and is measured in the fast paths; keep it string concatenation with escaped output. Do not add JavaScript.

Suggested mason, with juniper looking at it on a phone.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs