Skip to content

Orders: show the Activity-linked order even when the list hides it - #115

Merged
BitcoinErrorLog merged 3 commits into
release/shop-v0.6.8from
cursor/activity-hidden-order-card-68d5
Sep 24, 2026
Merged

BitcoinErrorLog merged 3 commits into
release/shop-v0.6.8from
cursor/activity-hidden-order-card-68d5

Conversation

@BitcoinErrorLog

@BitcoinErrorLog BitcoinErrorLog commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Problem

An Activity row links to /marketplace/orders#order-<id>. The Orders page lists buyer checkouts, seller reservations, paid or receipted history, and buyer-abandoned checkouts. A seller's checkout that was cancelled before payment belongs to none of those, so the link opens a page that does not show its order.

In production on Shop v0.6.26, the seller test seat n3pfudgx… has 31 Activity order rows across 25 orders. Every one of them is an unpaid order, cancelled or pending_payment, from buyer tjtigrhb…. The Orders page rendered none of them, only the held reservation Order f0548768. This has been the case since v0.6.25 (#104/#105).

Change

  • If #order-<id> names an order the page loaded but lists in no section, a From Activity card shows that order. The card has the role badge (Your sale / Your purchase), a state badge, the line titles, and the short order ID with Copy. The page scrolls to the card.
  • State labels come from unlistedOrderStateLabel in checkout-phase.ts: "Cancelled before payment" (cancelled with no receipt), "Awaiting payment" (pending_payment), and otherwise the state name in sentence case.
  • The page now reads the anchor into state and follows hashchange, so opening a second Activity link while Orders is open also works.
  • An order already listed in a section never gets a duplicate card. History filters and tab counts are unchanged.
  • The card renders only when the signed-in pubky is that order's buyer or seller. Otherwise nothing renders, the same account scoping every other Orders section applies.
  • Test: a loaded order where the account is neither party, addressed by the hash, renders no card, no titles and no anchor. Removing the ownership check fails exactly this test: the "From Activity" card renders, 1 of 40 fail. With the check in place, the two changed test files pass 48 of 48.
  • Gate on b907ed08: PREPUSH OK b907ed08060329dbdb089a52b9cdba93d402fff0 453. It ran typecheck, 185 related unit tests, and 204 Linux VRT scenes across 9 specs. No baseline changed.

Tests

  • MarketplaceOrders.test.tsx adds four tests: an unpaid seller cancel linked by hash (card, state, short ID, anchor id, scroll target); the same order without a hash (not rendered); a listed order linked by hash (no duplicate card); and a hashchange while the page is open.
  • checkout-phase.test.ts adds label cases.
  • Revert check: restoring MarketplaceOrders.tsx to 56ccc6e5 fails the card test and the hash-change test (2 of 39), and the fix passes all 39.
  • The VRT file MarketplaceOrders.vrt.test.tsx adds the scenes orders-activity-linked-unlisted-{desktop,mobile}. Their Linux baselines (Chromium and Firefox) come from the pinned mcr.microsoft.com/playwright:v1.60.0-noble container with --update=new, so no existing baseline changed. Calibration: the four PNGs have distinct md5s and are 43–55 KB each. Both viewed frames show "From Activity", "Your sale", "Cancelled before payment", "Brass desk lamp × 1" and "Order 018f47d2" above Reservations. Negative check: appending one byte to the desktop Chromium PNG fails the scene, and restoring it passes.
  • The PNGs are in their own commit.

Gate

PREPUSH OK 548ff8f2310d5cc3bed48da0032bba3818430eaa 815. It ran prettier and eslint on the changed files, npm run typecheck, vitest related (14 files, 184 tests), and Linux VRT for the 9 specs that render a changed file (18 files, 204 tests).

Release note

changelog.d/next/activity-hidden-order.fixed.md

Tester notice: reload is enough (no Dexie change).

…list it

An Activity row links to /marketplace/orders#order-<id>. A seller's checkout
that was cancelled before payment is in no Orders section, so the link landed
on a page without its order. When the hash names such an order, a From
Activity card now shows it with its state (Cancelled before payment, Awaiting
payment, ...) and short order ID, and the page scrolls to it. The hash is
followed while the page is open.
…'s orders

The fallback card rendered any loaded order the hash named. It now requires
the signed-in pubky to be that order's buyer or seller, like every other
Orders section, and renders nothing otherwise.
@BitcoinErrorLog
BitcoinErrorLog merged commit 1eb165a into release/shop-v0.6.8 Sep 24, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant