Open-order (listed/unlisted) state never refreshes in the acquisitions view #20

Closed
opened 2026-07-09 11:31:04 +02:00 by Sirttas · 0 comments
Owner

Summary

In the acquisitions view, the open-order / listed-vs-unlisted state does not refresh. After you list an acquisition for sale (create a sell order), the row keeps showing as "unlisted" until a full page reload.

The order data comes from getListedSellTypeIds() (src/market/order/order.tsmarketApi.findAllMarketOrders()), used in AcquisitionResultTable.vue as a standalone one-shot:

const listedTypeIds = computedAsync(getListedSellTypeIds, new Set<number>());

This computedAsync has no reactive dependency, so it runs once on mount and never re-fetches — not on the manual Refresh button, not on the auto-refresh tick, not on the SSE "processed" event. listedTypeIds drives the "Unlisted only" filter (matchesFilter), so freshly-listed items stay marked unlisted.

Note: this is about order data only. The appraisal price cache is unrelated and out of scope.

Scope

  • In AcquisitionResultTable.vue, move the getListedSellTypeIds() fetch into the useSort(...) source function — the same function that builds the Result[] rows and already reads props.items. Since useSort accepts a MaybeRefOrGetter, that source becomes an async computedAsync, awaiting the listed ids and using them in matchesFilter locally.
  • Drop the separate top-level const listedTypeIds = computedAsync(...).
  • Because the source function genuinely reads props.items, it re-evaluates (and re-fetches the listed ids) whenever the items change. AcquisitionsPanel.refresh() reassigns enriched (→ the table's props.items) on every refresh, so this covers all three triggers:
    • manual Refresh button → refresh()
    • auto-refresh tick → refresh()
    • SSE processed event → parent pages reload props.items via useProcessedResourcewatch(() => props.items, refresh)refresh()

Out of scope

  • The appraisal price cache / getPrices behaviour — unrelated to this bug.
  • Any change to AcquisitionsPanel.vue, appraisal.ts, or useAutoRefresh.ts.

Acceptance criteria

  • After listing an acquisition for sale, the "Unlisted only" filter / listed state updates without a page reload once a refresh occurs.
  • The open-order state re-fetches on the manual Refresh button, on each auto-refresh tick, and on an SSE processed event.
  • The fix is contained to AcquisitionResultTable.vue; no throwaway prop reads.

Related

  • Open-order source: src/market/order/order.ts (getListedSellTypeIdsfindAllMarketOrders).
  • Consumer: src/market/acquisition/AcquisitionResultTable.vue ("Unlisted only" filter, useSort row builder).
## Summary In the acquisitions view, the **open-order / listed-vs-unlisted** state does not refresh. After you list an acquisition for sale (create a sell order), the row keeps showing as "unlisted" until a full page reload. The order data comes from `getListedSellTypeIds()` (`src/market/order/order.ts` → `marketApi.findAllMarketOrders()`), used in `AcquisitionResultTable.vue` as a standalone one-shot: ```ts const listedTypeIds = computedAsync(getListedSellTypeIds, new Set<number>()); ``` This `computedAsync` has no reactive dependency, so it runs **once on mount and never re-fetches** — not on the manual **Refresh** button, not on the auto-refresh tick, not on the SSE "processed" event. `listedTypeIds` drives the **"Unlisted only"** filter (`matchesFilter`), so freshly-listed items stay marked unlisted. Note: this is about **order** data only. The appraisal price cache is unrelated and out of scope. ## Scope - In `AcquisitionResultTable.vue`, move the `getListedSellTypeIds()` fetch **into the `useSort(...)` source function** — the same function that builds the `Result[]` rows and already reads `props.items`. Since `useSort` accepts a `MaybeRefOrGetter`, that source becomes an async `computedAsync`, awaiting the listed ids and using them in `matchesFilter` locally. - Drop the separate top-level `const listedTypeIds = computedAsync(...)`. - Because the source function genuinely reads `props.items`, it re-evaluates (and re-fetches the listed ids) whenever the items change. `AcquisitionsPanel.refresh()` reassigns `enriched` (→ the table's `props.items`) on every refresh, so this covers all three triggers: - manual **Refresh** button → `refresh()` - **auto-refresh** tick → `refresh()` - **SSE processed** event → parent pages reload `props.items` via `useProcessedResource` → `watch(() => props.items, refresh)` → `refresh()` ## Out of scope - The appraisal price cache / `getPrices` behaviour — unrelated to this bug. - Any change to `AcquisitionsPanel.vue`, `appraisal.ts`, or `useAutoRefresh.ts`. ## Acceptance criteria - [x] After listing an acquisition for sale, the "Unlisted only" filter / listed state updates without a page reload once a refresh occurs. - [x] The open-order state re-fetches on the manual Refresh button, on each auto-refresh tick, and on an SSE processed event. - [x] The fix is contained to `AcquisitionResultTable.vue`; no throwaway prop reads. ## Related - Open-order source: `src/market/order/order.ts` (`getListedSellTypeIds` → `findAllMarketOrders`). - Consumer: `src/market/acquisition/AcquisitionResultTable.vue` ("Unlisted only" filter, `useSort` row builder).
Sirttas added the Kind/Bug label 2026-07-09 19:23:05 +02:00
Sirttas added the
Status
To Refine
label 2026-07-09 19:30:22 +02:00
Sirttas changed title from Auto-refresh on AcquisitionsPanel doesn't refresh prices/orders (served from stale cache) to Auto-refresh & Refresh on AcquisitionsPanel don't update prices (served from stale cache) 2026-07-14 17:30:54 +02:00
Sirttas added
Priority
Medium
3
and removed
Status
To Refine
labels 2026-07-14 17:30:55 +02:00
Sirttas added a new dependency 2026-07-14 17:53:23 +02:00
Sirttas removed a dependency 2026-07-14 17:53:49 +02:00
Sirttas changed title from Auto-refresh & Refresh on AcquisitionsPanel don't update prices (served from stale cache) to Auto-refresh on AcquisitionsPanel doesn't refresh prices/orders (served from stale cache) 2026-07-14 18:09:40 +02:00
Sirttas added
Status
To Refine
and removed
Priority
Medium
3
labels 2026-07-14 18:09:41 +02:00
Sirttas changed title from Auto-refresh on AcquisitionsPanel doesn't refresh prices/orders (served from stale cache) to Open-order (listed/unlisted) state never refreshes in the acquisitions view 2026-07-14 18:24:32 +02:00
Sirttas removed the
Status
To Refine
label 2026-07-14 18:24:36 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eveal/gemory#20