Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/development/PERFORMANCE_BASELINE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ Current Hosts also filter individual rolls by status, ownership, material,
vendor, location and low-stock policy before grouping. Opening the filter panel
requests distinct materials and vendors from the whole stock in the same read
transaction. Older Hosts and offline Clients filter the complete live or saved
list. List view, labels and selection use the complete stock so they cover every matching roll.
list. Opening and closing Add spool keeps the loaded cards and reads the
registration catalog on demand. A successful registration refreshes stock
so the new roll can be opened. List view, labels and selection use the
complete stock so they cover every matching roll.
A Client without a complete offline capture obtains one on its first full read.
Older Hosts and disconnected Clients use the existing full-list or scoped
offline path. Reading a card page preserves the last complete capture and its
Expand Down
8 changes: 8 additions & 0 deletions scripts/run-loan-dialog-regressions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ async function checkStockCards({page, state, fixture, calls, fallback, openWorks
state.invoke = (command,payload) => {
switch (command) {
case "get_library_sync_page_status": return status;
case "fetch_library_sync_catalog_masters": return fixture.catalogRows;
case "get_loan_workspace_counts": return {stock:10, locations:0, loans:2, purchases:0};
case "fetch_library_sync_loans":
case "fetch_library_sync_active_loans": return fixture.loanRows;
Expand Down Expand Up @@ -253,6 +254,13 @@ async function checkStockCards({page, state, fixture, calls, fallback, openWorks
await panel.getByRole("button",{name:"Show more",exact:true}).click();
await panel.getByRole("heading",{name:/Dialog b/}).waitFor();
assert.deepEqual(reads,[0,3,1,0,1]);
const readsBeforeRegistration = reads.length;
await page.getByRole("button", {name: "Add spool", exact: true}).click();
const registration = page.getByRole("dialog");
await registration.getByRole("button", {name: "Close", exact: true}).click();
await registration.waitFor({state: "detached"});
await panel.getByRole("heading", {name: /Dialog b/}).waitFor();
assert.equal(reads.length, readsBeforeRegistration, "Closing registration must retain the loaded card pages");
assert.ok(!calls.some(c=>c.command==="fetch_library_sync_spool_snapshot"));
const searchBox = page.getByPlaceholder(/Search by material/i);
calls.length = 0;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/inventory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ export default function InventoryPage({
setRequiresFullStock(false);
setPendingStockAction(null);
}, [activeWorkspaceView, locationAuthorityKey]);
const requestCards = !requiresFullStock && inventoryView === "CARDS" && !navigationIntent && !addModalActive && !showRollModal &&
const requestCards = !requiresFullStock && inventoryView === "CARDS" && !navigationIntent && !showRollModal &&
!recentlyAddedSpoolId && !detailVisualFixture;
const requestCardsRef = useRef(requestCards);
useEffect(() => { requestCardsRef.current = requestCards; }, [requestCards]);
Expand Down
Loading