Skip to content

User Contract ​

Home replaces lifetime acquisition P&L with the price change of the complete current portfolio over a rolling 86400000-millisecond period chosen by the server. The same current quantities of raw cards, graded cards and sealed products are valued at both instants, so acquisitions and removals are not market performance.

The label includes (24h): positive is green, negative red, zero neutral and an incomplete comparison is Indisponible (24h). This is the explicitly requested Home indicator exception to the neutral portfolio-chart convention; other P&L calculations and charts retain their existing behavior.

Every possession needs matching exact-market automatic values at both instants. One unsupported, unpriced, stale or mismatched possession makes the entire change unavailable; missing prices are never zero. Personal overrides currently lack comparable market history, so portfolios containing them are also unavailable.

History And Deployment ​

Backend migration 0048_valuation_quote_history.sql stores immutable global market observations, not users, portfolio membership or quantities. Batch pricing reads record real M1/M2/M3 quotes without additional provider searches. Duplicate cache reads do not add observations, and failure to record does not break current prices.

POST /valuations/history reads up to 5000 exact markets in one server-anchored comparison, with no-store responses. Historical selection requires the quote to have been both observed and known at the target instant, with the existing 48-hour validity bound. Late discovery cannot create yesterday's history; an older cache observation cannot replace a newer provider quote. No interpolation or calendar-day proxy is used. Redis remains a latest-price cache rather than historical evidence.

The app retains each possession's exact valuation identity, checks complete coverage against the currently displayed quotes and refreshes once per minute. Changes to the account, basket or readiness cancel in-flight results. HTTP failures and an older backend without this endpoint display unavailable, never a fabricated zero.

Apply migration 0048 before deploying the API, then deliver the app. Until real observations have accumulated for 24 hours, the indicator remains unavailable. This task does not deploy, migrate, purge, change user data or launch the emulator.

Validation ​

Backend tests cover endpoint validation, server-period anchoring, passive capture, idempotent migration/observation recording, expiry, late discovery and cache races. SQL is exercised in an isolated PGlite PostgreSQL engine, not against the VPS. The source build and API suite pass. The extended test TypeScript check reports pre-existing nullability errors in unchanged onepieceDisplayPolicy.test.ts.

Mobile tests cover complete mixed-engine quantities, gains, losses, zero, purchase price independence, missing/malformed/duplicate history, exact-market propagation, unavailable older backends, refresh cadence and stale account-result cancellation. Existing Home/beta tests are retained and adapted. The user approved the targeted 12-file mobile scope to preserve all coverage. A controlled Maestro flow is supplied but not executed, because the emulator must remain stopped.