docs/BANK-HOLDINGS.md

Bank holdings desk

Route: #holders in RS-BLACKROCK. This is a dedicated primary navigation destination; Players & fleet keeps its own #fleet destination. The desk answers: "Which of my bots has this item in its published bank preview?"

Current implementation

  • Shared catalog-backed item suggestions offer sprites, exact IDs, recent selections and keyboard navigation. Selecting a bank suggestion runs its name query and preserves the exact chosen item filter.

  • src/blackrock/BankHoldings.tsx: item search, relationship scopes, exact-item/player/team/minimum filters, sortable holder table, totals, player/item dossiers, Palantir handoff, filtered JSON export and a prepared assistant prompt. Preparing a prompt does not send it.

  • bank-holdings-model.ts: deterministic identity join and filtering. Alias normalization matches server/friendlies.ts. Ambiguous aliases and identity conflicts cannot confer friendly/owned status. My bots requires explicit ownership; Friendlies includes owned, allies and shared Palantir roster entries. Known includes any matched fleet identity.

  • /research/bank?query=...: existing read-only public Bank Hiscores adapter. At most 50 returned accounts and six displayed items per account. Five-minute source cache. No server contract changes.

  • /fleet: existing shared identity projection. Errors/partial sources are visible. Ownership changes in Teams & data refresh the desk. Local saved watches do not confer ownership.

  • Quantities and definition GP are summed with bigint. Exact item totals and per-item totals use only filtered returned previews. Whole-bank row values are never presented as selected-item totals. Definition GP is not resale value. Mixed item quantities are not combined or sorted as interchangeable units.

  • Desk state stays mounted after first visit. Opening dossiers or changing workspace preserves search/filter/results. Cmd/Ctrl+K targets the bank search on this page. Superseded requests are aborted and request IDs prevent old results overwriting new queries.

  • Dotted bars compare a holder's exact-item quantity to the largest holding in the current filtered view. These are relative quantities, not a percentage of game supply.

Evidence boundaries

Fetched time is when we read the public page, not when a bank was saved. Missing accounts, missing previews and empty filters do not prove zero holdings. This desk does not connect game accounts or access carried inventories. Export and assistant context include filters and coverage caveats. Current source cannot comprehensively answer every owned account; never disguise the public top-50 limit as a complete scan.

Find stock, then plan a goal (2026-10-27)

  • BankGoalPlanner.tsx and bank-plans.ts add browser-local, per-exact-item drafts: target, selected owned accounts, proposed quantities and the original observed quantity/fetch time. Candidate accounts come from all returned previews, independent of table filters. Identity unavailable, changed ownership, missing item, changed evidence or over-allocation excludes the affected contribution from coverage. The preview review action rebases evidence explicitly; it still does not verify the bank-save time.
  • Coverage reads Eligible proposed units / Not covered by this plan, always Needs verification. It is never an exact buying deficit or executable stock. Bigint arithmetic preserves integer totals. Individual quantities use the existing safe-integer target range.
  • The existing service accumulation target is displayed separately. Use it in the local draft or explicitly save/replace it. Before writing, the UI rereads the watchlist and rejects a changed target. This is a frontend stale-read guard, not a transactional cross-client compare-and-swap. Shared targets may activate an item watch; draft edits never do. Existing active target collection remains governed by the service's enabled state.
  • rs-blackrock:bank-plans:v1: up to 20 versioned item drafts with at most 50 account contributions. rs-blackrock:bank-views:v1: up to 20 named searches with exact item, filters, sort and density. Same view name replaces; malformed entries are rejected; storage failures display an in-memory-only warning. These keys do not synchronize between devices.
  • Applying a saved view starts a new search and restores its filters after the response; it does not restore stale result snapshots. Draft evidence remains separate from new results. Removing a saved view does not change current results.
  • Desktop search/scope controls are sticky. Filters are collapsible, with removable chips; phone filters start collapsed. Comfortable/compact density affects table rows. BankHolderPreview.tsx expands one row on desktop and uses the existing Frosted Dialog as a phone sheet with Escape/focus restoration. Full dossier and Locate remain deliberate handoffs.
  • Market and production links use existing item dossier tabs. Assistant buttons prepare a prompt including source limits and proposed contributions; they do not send it. JSON export includes evidence and nonexecution status.

Verification for this pass is recorded in reports/palantir-validation/bank-goals-20261027/. bank-plans.test.ts covers source changes, account eligibility, exact-item isolation, integer bounds, over-allocation, missing evidence and browser-state validation.

Planned next tools (not implemented)

  1. Owned-bank snapshot connector: ingest authorized existing controller snapshots, with account, item ID, exact quantity, source, observed-at and coverage (complete bank vs partial). Do not open competing sessions. Deduplicate by account/source/version and expose stale/unknown coverage.
  2. Materials finder: recipe quantities against per-account observations; separate bank from carried inventory and show unobserved accounts. Use this to answer "Which bots have the steel for 10,000 cannonballs?"
  3. Stockpile targets and changes: compare compatible snapshots, explain deposits/withdrawals only when evidence supports them, and show collection gaps. Unknown does not become zero.
  4. Verified allocation planning: extend the implemented preview planner to authorized complete controller snapshots. Transfers remain a separately approved gameplay workflow; a research result is not execution permission.
  5. Coverage queue: list owned accounts missing recent authorized snapshots, with explicit refresh through their existing controller when supported.

Design references

  • Origin holdings: dedicated holdings destination, account scope and search above sortable holdings.
  • Quicken holdings: summary metrics alongside account scope, searchable aligned quantity/value table.

These financial products informed layout structure only. The implementation retains Frosted primitives, Radix tokens and functional dither. Game bank evidence limitations are specific to RS-SDK.

Verification

Run pnpm run check in apps/rs-palantir. Focused tests cover canonical identity joins, ownership vs friendliness, identity collisions, filtered exact totals, sort order, large integer sums and navigation preservation. Browser evidence lives in reports/palantir-validation/bank-holdings-20261027/ at repository root.