Skip to content

Claude/plan enhancements uabf2 - #37

Merged
khaitanvaibhav merged 5 commits into
mainfrom
claude/plan-enhancements-UABF2
Aug 1, 2026
Merged

khaitanvaibhav merged 5 commits into
mainfrom
claude/plan-enhancements-UABF2

Conversation

@khaitanvaibhav

Copy link
Copy Markdown
Contributor

No description provided.

claude added 5 commits August 1, 2026 01:44
Margin % was sitting alone on the second line with five empty columns beside
it, while the solver took a whole further row under a divider. The solver is a
grid item now, spanning three columns, so it fills that gap instead of adding
to the height.

Summary 248px -> 194px; the page is 1097px tall against 1298px two commits ago.

It still flows sensibly when quantity is above 1 and the order block appears:
the separator forces its row break as before and the solver lands beside the
order figures rather than below them. On a phone it goes full width and keeps
its divider, since the grid is one or two columns there and it has no gap to
fill.

1356 assertions.
Four things, one of them the reported bug.

Saving a preset from the manager opened the naming dialog behind it. Both are
.modal-overlay at z-index 600, so paint order came down to position in the
markup, and overlay-prompt sits before overlay-presets. The naming and
confirmation dialogs are always secondary — raised from a manager, from
Settings, from a history row — so they are 640 now.

The focus trap had the same shape of bug underneath. It tracked a single
overlay, so opening a second dialog pointed it at the new one and closing that
set it to null, leaving the dialog still on screen untrapped and Tab free to
wander into the page behind. It is a stack now: opening pushes, closing pops
and hands the trap back to whatever remains, and the scroll lock is only
released once nothing is left open.

Currency conversion is gone from the Features grid. It is configured in
Settings → Pricing → Currency and no longer appears on the main screen at all,
so a switch for it was a second place to look for the same setting. Seven
switches now.

Presets gets a header button beside Quote, rather than only the overflow menu
it moved to when the control bar was trimmed.

Settings → Help → Reset everything clears every key the app writes and reloads.
Not localStorage.clear(): the origin may hold something that is not ours.
It names what will go — "1 history entry, 1 preset, 1 quote line" — and warns
that undo goes too, which the other confirmations cannot say.

23 assertions. Verified the stacking one fails without the fix. Two of the new
assertions were wrong when first written: one anchored a regex to the start of
a line against a grouped selector, and one matched localStorage.clear() in the
comment explaining why the code avoids it.

1379 assertions.
Both predated the last several changes: they showed the two-row control bar,
five derived rows per price card, break-even in the summary, stacked incentive
panels, the target-GP solver on its own row, and no Presets button.

Retaken from the running app with the exact scenario the worked-example table
describes, and every figure in that table read back out of the page before
capturing rather than trusted: CP excl ₹600.00, incentives ₹18.00, effective CP
₹582.00, SP excl ₹750.00 / incl ₹885.00, profit ₹168.00, GP 22.40%, margin
28.87%, break-even ₹686.76. All match.

The desktop shot is clipped to the footer now — a tall viewport had left a band
of empty page underneath, which is dead weight in a README. 255KB, down from
275KB.

The mobile one still shows the three things its alt text claims: the sticky
result bar, the floating action button and the bottom navigation.
The framing said "automotive parts distribution" and "Indian distribution",
which described where it was built rather than what it does. The sum it
performs — buy at a discount off a printed price, sell at a smaller one, then
account for rebates that never appear on the invoice — is the same in FMCG,
electronics, pharma, hardware or stationery.

Reframed the intro and the problem statement around list-price trading, kept
auto parts as the origin rather than the boundary, and added a "Who it fits"
table covering any list-price trade, import and export, and use outside India.

Import/export is a genuine fit rather than a stretch: the currency scope shows
the cost side and the sale side in different currencies, which is precisely
buying in one and selling in another, and landed costs are already per-unit
inbound and outbound.

Checked the non-India claims rather than asserting them. At 20% VAT the app
gives CP incl 720 on 600 and SP incl 900 on 750, and profit, GP and margin come
out identical to the 18% case — the tax really is pass-through, so the rate is
just a number and the unit is irrelevant. Twenty currencies, and non-rupee
amounts group in thousands.

Stated the one real limitation plainly instead of glossing it: rupees are the
base unit and the printed-price field is labelled ₹, so a non-Indian trader
works in their own currency by treating that field as their list price. Every
ratio and margin is right because none of them care about the unit, but that
one symbol stays ₹ until the base currency is configurable. Worth doing if this
is aimed at users outside India — happy to.

GST and MRP entries in the terms table now explain themselves to someone who
has neither.
Pointed out that the base currency is already configurable by choosing another
currency for both sides. Checked it: under Cost & Sale everything converted —
CP, SP, landed costs, incentives, profit, break-even, the rounding chips — but
MRP did not, so its input prefix and its excl-GST and GST-amount readouts still
said ₹ while the rest of the screen said £.

That was my rule, and it was too broad. It is right for a one-sided scope: an
exporter quoting in dollars still buys against a rupee MRP, and a rate update
must not restate a figure fixed by law. It is wrong for Cost & Sale, which is
the user saying the whole deal is in another currency — exactly how a trader
outside India works entirely in theirs. MRP follows 'both' now and nothing else,
and is repriced with the other amount fields when the currency changes.

With that, nothing on the calculator is in rupees under Cost & Sale, so the
README's caveat about the base currency has gone rather than being reworded.
Rupees are still the internal unit, but that is now an implementation detail
rather than something on screen.

Four assertions needed updating, three of them mine asserting MRP never
converts. The fourth is worth noting: it read 60000 where it wanted 600, because
the 1000 typed into the MRP field earlier had been typed while dollars were
showing — so it genuinely meant $1,000, and switching back re-expressed it as
₹100,000. The behaviour was right and the test was asserting against a stale
assumption.

1380 assertions.
@netlify

netlify Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for sterlingcalc ready!

Name Link
🔨 Latest commit 3d00545
🔍 Latest deploy log https://app.netlify.com/projects/sterlingcalc/deploys/6a6d56f9e592c1000855889b
😎 Deploy Preview https://deploy-preview-37--sterlingcalc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@khaitanvaibhav
khaitanvaibhav merged commit 88ed548 into main Aug 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants