Skip to content

Commit 8431d9d

Browse files
committed
refactor(web): retire metal-based find copy for notability rule (om-ihcs)
ADR-008 (a): the single-entry rule is notability-based, not metal-based — any individually-notable coin (silver OR clad) is a taxonomy CRH find. Retire the 'silver find(s)/face/found' UI copy that ties finds to the metal: - Reconcile.svelte: 'Silver find' quick-add heading -> 'Notable find'; matching code comment; reword the keeper double-count warning off the false 'this session' claim to 'recorded against it' (the condition is all-time per box); drop 'this session' from the recorded-counter comment. Warning WIRING unchanged (copy only). - Do.svelte / Dashboard.svelte / Composition.svelte / grids.ts / HuntYield.svelte: 'silver finds'/'Silver found' -> metal-neutral 'finds'/'CRH finds'/'Find value'. - LoggedFinds.svelte: success toast 'in silver face' -> 'in find face' (the form accepts clad finds too); update the qa e2e assertion to match. No calc/accounting, routing, presets, or genuine silver-metal (spot/buyback/ SILVER_PRESETS/ADR-006 categories) references changed.
1 parent a4e2bfc commit 8431d9d

8 files changed

Lines changed: 14 additions & 14 deletions

File tree

qa/do-tab.e2e.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ try {
7777
await sb().nth(2).fill('10') // keeper count (find: qty,face ; keeper: count,face)
7878
await sb().nth(2).dispatchEvent('input')
7979
await page.getByRole('button', { name: 'Save finds' }).click()
80-
await page.getByText('in silver face', { exact: false }).waitFor({ timeout: 5000 })
80+
await page.getByText('in find face', { exact: false }).waitFor({ timeout: 5000 })
8181
const finds = (await api('/lots')).filter((l) => l.activity === 'crh')
8282
ok('find recorded (crh holding)', finds.length === 1, `${finds.length} finds`)
8383
ok('find linked to box', finds[0]?.roll_txn_id === buys1[0].id, `roll_txn_id ${finds[0]?.roll_txn_id}`)

web/app/src/lib/components/Composition.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
const cap = (s: string) => (s ? s[0].toUpperCase() + s.slice(1) : s)
1717
// Where your value sits: bullion bucketed by actual metal (so Pt/Pd show too),
18-
// plus CRH silver finds at their haircut-adjusted realizable value.
18+
// plus CRH finds at their haircut-adjusted realizable value.
1919
const segs = $derived.by(() => {
2020
const byMetal = new Map<string, number>()
2121
for (const l of r.lots) {
@@ -26,7 +26,7 @@
2626
for (const [metal, value] of byMetal) {
2727
out.push({ label: `${cap(metal)} bullion`, value, color: METAL_COLORS[metal] ?? '#64748b' })
2828
}
29-
if (r.find_realizable > 0) out.push({ label: 'CRH silver finds', value: r.find_realizable, color: '#10b981' })
29+
if (r.find_realizable > 0) out.push({ label: 'CRH finds', value: r.find_realizable, color: '#10b981' })
3030
return out.filter((s) => s.value > 0).sort((a, b) => b.value - a.value)
3131
})
3232
const total = $derived(segs.reduce((t, s) => t + s.value, 0))

web/app/src/lib/components/Dashboard.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<div class="text-sm/relaxed opacity-90">Is coin roll hunting costing you money?</div>
9999
<div class="mt-1 text-2xl font-bold tnum">{v} &nbsp; {money(r.crh_net_real)}</div>
100100
<div class="mt-1.5 text-sm opacity-95">
101-
Near-free silver finds ({oz(r.find_oz)} oz) vs logged costs of {money(r.op_cost + r.losses)}{#if r.losses > 0}
101+
Near-free finds ({oz(r.find_oz)} oz) vs logged costs of {money(r.op_cost + r.losses)}{#if r.losses > 0}
102102
(incl. {money(r.losses)} shrinkage){/if}. Bullion is a separate long-term hold.
103103
</div>
104104
</Card>

web/app/src/lib/components/Do.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
{
4444
id: 'finds',
4545
title: 'Logged finds',
46-
sub: 'Silver finds + keepers from a box',
46+
sub: 'Notable finds + keepers from a box',
4747
icon: Search,
4848
enabled: true,
4949
},

web/app/src/lib/components/HuntYield.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
// Which banks/boxes actually pay off: silver found (realizable, after haircut)
2+
// Which banks/boxes actually pay off: find value (realizable, after haircut)
33
// vs face searched, attributed to the box each find came from. Aggregated by
44
// bank (the headline question) and listed box-by-box, newest first (the
55
// over-time view). All $derived from the report.
@@ -42,7 +42,7 @@
4242
<section class="space-y-2">
4343
<h2 class="text-lg font-semibold">Hunt yield by bank &amp; box</h2>
4444
<p class="text-sm text-muted-foreground">
45-
Silver found (realizable) vs face searched, attributed to the box it came from. Set a find's
45+
Find value (realizable) vs face searched, attributed to the box it came from. Set a find's
4646
<span class="font-medium">From box</span> in Entry → Holdings to populate this.
4747
</p>
4848

@@ -53,7 +53,7 @@
5353
<th class="px-3 py-2 font-medium">Bank</th>
5454
<th class="px-3 py-2 text-right font-medium">Boxes</th>
5555
<th class="px-3 py-2 text-right font-medium">Face searched</th>
56-
<th class="px-3 py-2 text-right font-medium">Silver found</th>
56+
<th class="px-3 py-2 text-right font-medium">Find value</th>
5757
<th class="px-3 py-2 text-right font-medium">Yield</th>
5858
</tr>
5959
</thead>

web/app/src/lib/components/workflows/LoggedFinds.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
<div class="flex items-start gap-2 text-positive">
221221
<Check class="mt-0.5 size-5 shrink-0" />
222222
<div>
223-
<p class="font-semibold text-foreground">Logged {money(done.findValue)} in silver face.</p>
223+
<p class="font-semibold text-foreground">Logged {money(done.findValue)} in find face.</p>
224224
<p class="text-sm text-muted-foreground">
225225
Attributed {done.bank ? `to ${done.bank}` : ''} — see the per-box yield on the Overview. Return
226226
the culls when you're done searching.

web/app/src/lib/components/workflows/Reconcile.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// --- step 1: record forgotten inventory -----------------------------------
3131
let buys = $state<RollTxn[]>([])
3232
let catalog = $state<ItemType[]>([])
33-
let recorded = $state(0) // how many inventory rows we've added this session
33+
let recorded = $state(0) // how many inventory rows we've added so far
3434
let note = $state('') // transient "added X" confirmation
3535
3636
// quick-add keeper (bulk/uncategorized clad only — ADR-008)
@@ -50,7 +50,7 @@
5050
const keeperDoubleCount = $derived(crhFindsForBox.length > 0)
5151
const kBoxDate = $derived(kBox ? (buys.find((b) => String(b.id) === kBox)?.date ?? '') : '')
5252
53-
// quick-add silver find
53+
// quick-add notable find
5454
let fProduct = $state('')
5555
let fMetal = $state('silver')
5656
let fFineness = $state('')
@@ -307,7 +307,7 @@
307307
<TriangleAlert class="mt-0.5 size-3.5 shrink-0" />
308308
<span>
309309
This box already has {crhFindsForBox.length} taxonomy find{crhFindsForBox.length === 1 ? '' : 's'} recorded
310-
this session. If any of those coins are in this keeper batch, you'd double-count them — keepers are for
310+
against it. If any of those coins are in this keeper batch, you'd double-count them — keepers are for
311311
bulk / uncategorized clad only.
312312
</span>
313313
</p>
@@ -316,7 +316,7 @@
316316

317317
<!-- find quick-add -->
318318
<div class="space-y-1.5">
319-
<p class="text-xs font-medium text-muted-foreground">Silver find</p>
319+
<p class="text-xs font-medium text-muted-foreground">Notable find</p>
320320
<div class="grid grid-cols-[1fr_auto_auto_auto] items-end gap-2">
321321
<label class="flex flex-col gap-1 text-xs text-muted-foreground">
322322
Product

web/app/src/lib/grids.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function toHolding(row: Omit<FlatHolding, 'id'>, item_type_id: number): Omit<Hol
177177
export const holdingsGrid: GridConfig<FlatHolding> = {
178178
title: 'Holdings',
179179
description:
180-
'Bullion lots and CRH silver finds. Type the product, metal, fineness and metal-oz; we keep the catalog tidy for you.',
180+
'Bullion lots and CRH finds. Type the product, metal, fineness and metal-oz; we keep the catalog tidy for you.',
181181
columns: [
182182
{ accessorKey: 'activity', header: 'Activity', meta: { editor: 'select', options: ['bullion', 'crh'], width: '110px' } },
183183
{

0 commit comments

Comments
 (0)