Skip to content

MAIN - #17280

Open
niteeshkanna-sh wants to merge 463 commits into
react:mainfrom
niteeshkanna-sh:main
Open

MAIN#17280
niteeshkanna-sh wants to merge 463 commits into
react:mainfrom
niteeshkanna-sh:main

Conversation

@niteeshkanna-sh

Copy link
Copy Markdown

No description provided.

@meta-cla

meta-cla Bot commented Aug 27, 2026

Copy link
Copy Markdown

Hi @niteeshkanna-sh!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

claude and others added 29 commits September 23, 2026 09:29
The header is the logo, and only the logo
"Some buttons not taking to the pages": on the dashboard, Inquiries, All
bookings and Finance work by setting location.hash. On a page that is
already open that is a same-document navigation -- the browser changes the
address bar and fires hashchange, and that is all. Nothing listened for it.
shell.js read the hash once, at DOMContentLoaded, so the three buttons moved
the address bar and left the Dashboard panel on screen.

So the hash is now read on every change, not only on arrival, which also
gives the back button something to do and makes any #panel link on the page
work. An empty hash means the Dashboard, so backing out of #finance comes
home instead of sitting there with the address bar disagreeing.

The other half: the Inquiries button carried data-quick="enquiries" while
the tab it wanted is called "inquiries", so even a working router would have
found no such panel.

And the tab now writes itself into the address bar -- with replaceState, not
by assigning the hash, which would bounce straight back through the new
listener and put a history entry behind every tab anyone glanced at. A
refresh stays on the panel you were on, and a tab can be linked to.

tools/test-nav-ui.js covers all of it: the sidebar, both kinds of quick
action, a link straight to a panel, the address bar following the tab, a
refresh, and the back button.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
The dashboard's quick actions actually go to the page now
"Save Booking" answered "The server returned an unreadable response." The
endpoint had crashed: creating the customer wrote NULL into customer_type,
which is NOT NULL with a default of 'New', so MySQL refused the insert and
took the whole request with it.

find_or_create_customer() wrote every optional column whether or not it had
been given one, turning "no answer" into NULL. Leaving a column out is not
the same thing: left out, it takes its own default. So it now writes only
the columns it actually has values for. An enquiry has no customer type to
send and should not have to invent one, which is why this only ever bit the
Accept & Create Booking path.

The unreadable response is the second half. A PHP fatal ends a request with
an empty body, a warning prints ahead of the JSON, and either way the panel
has nothing it can parse and says so -- while the message naming the real
fault goes to a log nobody reads. Endpoints under api/ now answer JSON
whatever happens to them: errors never reach the body, the detail is written
to nitesha-storage/logs/panel-errors.log with a short reference, and the
browser shows a message carrying that reference. tools/test-api-failure.php
covers an exception, a fatal, and a notice ahead of a good reply.

The suites found it, once they could run. test-ui.js had one machine's
account and scratch directory written into it, so it never ran anywhere
else; it takes them from the command line now, like its siblings, and looks
for the signed-in name under .ns-who, which is where the redesigned shell
puts it. The four browser suites also stop counting the web font's
certificate as a failure -- it is fetched from Google and refused by any
sandbox that proxies HTTPS with its own certificate.

Run against a real MySQL, panel at the document root: 332 checks across the
API, the ledger, expenses, enquiries, and the booking, enquiry, finance and
navigation flows in a browser, plus 46 money checks and the 7 new ones. All
pass; reverting the one-line cause turns test-enquiries.sh red again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
Saving a booking from an inquiry no longer dies at the server
The panel has no way to delete a booking, and clearing test records by hand
means working out what a booking is attached to: charges, payments, the
deposit and its refund, the KM readings, extras, damages, files, reminders,
approvals and documents all point at it, and the database refuses to let it
go while any of them do.

tools/tidy-records.sql does that in one pass, then renumbers what is left so
the numbering starts at 1 again, and sets the counters to match -- without
which the next booking is handed a number already in use and the save is
refused.

It will not act on a list that does not find what it says it will. A
mistyped number would otherwise put every record in the delete set, so the
lists are counted first and every statement asks that flag before it runs;
the script reports that it stopped and changes nothing. Running it a second
time is the same no-op, since by then the numbers it names are gone.

Money and history are left alone: an expense keeps its amount and loses the
booking, the audit trail keeps rows for records that no longer exist, and
customers stay. The lines that would delete those instead are in the file,
marked, and commented out.

Checked against a real MySQL with five bookings and six enquiries carrying a
full set of attached records: the right one survives and is renumbered, the
kept inquiry keeps its link to it, one child row of each kind remains, the
panel loads every tab with no errors, and the next booking and inquiry come
out as 0002 and 0003.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
A script for keeping a few records and clearing the rest
Both were lists of cards that opened a long modal. They are now the shape of
the ERP the owner asked them to look like: the counts across the top, the
filters under them, a sortable table, and a record that opens in place of
the list with its sections behind tabs.

The counts, the chips and the rows all come from one fetch of the whole
list, filtered in the browser. That is what lets a chip carry its own number
-- a count taken from a list the server has already narrowed is a count of
what is on screen, which is the one number nobody needs -- and it makes
every chip and sort instant. A rental business has hundreds of bookings a
year, not millions.

Sorting is by any column, and clicking the one you are already sorted by
turns it round. Paging is 10 to 100 a page. Search covers the number, the
customer, the phone and the vehicle.

A record was a modal because it started small. It carries payments, a
deposit and its refunds, two odometer readings, documents, damage and a
timeline, which is a page's worth of material: in a dialog it was a long
scroll with the list stranded behind it. It now replaces the list, leads
with a header carrying the number, both statuses -- the booking's and the
money's -- and five figures, and puts the rest behind six tabs. Which tab
you were on survives recording a payment, so you are not thrown back to
Overview every time you do something.

On a phone the columns a record opens with are dropped and the number rides
under the name, so the table fits 390px with no sideways scroll.

The layout follows the ERP; the colours do not. This is the navy and gold
the panel and the website are built from, and a second palette inside one
product reads as a bug.

tools/test-records-ui.js is new and covers the list and the record: counts
against the pager's total, a chip's count against the rows it shows, search,
sorting and turning it round, per-page, Next and Back, the row numbers
restarting, opening a record and coming back, both action buttons, and the
unread mark clearing. 34 checks. The booking and enquiry suites follow the
screens into their tabs.

Run against a real MySQL: 366 checks across the API, the ledger, expenses,
enquiries and six browser suites, plus 46 money checks and 7 on failures.
All pass, no JS errors, nothing overflows at 390px.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
Bookings and Inquiries as a table, and a record you can open
A bin in the action column of both lists, and on the record itself, behind a
dialog that says what is about to go.

Deleting a booking now removes everything it works out. Its charges, the
payments against it, the deposit and any refunds, both odometer readings,
the extras, the damage notes, the attachments, the documents and the
approvals raised for any of them -- so Finance and every report stop
counting a booking that is not there. Before this it deleted six tables of
the eleven, which the database would have refused anyway: an enquiry or an
expense pointing at the booking is a foreign key, and the delete would have
died halfway with a 500.

Two things are kept on purpose. An expense is money that really left the
business, so it keeps its amount and loses the booking; deleting it would
quietly make the business look more profitable than it was. And the audit
trail keeps its rows, now recording what the booking held when it went.

Three other things follow the booking out: the enquiry it came from goes
back to Accepted rather than staying Converted into something that no longer
exists, a car left On Rental by a pickup that has just been deleted is freed,
and the "only a cancelled booking can be deleted" rule is gone -- the dialog
does that job better than an error after the fact.

The dialog replaces confirm(). One line of unstyled browser text is not
consent for something that removes payments: this names the record, lists
what goes with it and what stays, and focuses Cancel, so the reflex press of
enter on a dialog that just appeared deletes nothing. Escape and the
backdrop both cancel.

An enquiry that became a booking still cannot be deleted, and now the two
rules compose: delete the booking and the enquiry goes back to Accepted,
after which it can go too.

Checked against a real MySQL: a booking with a payment, a deposit, readings,
extras, damage, files, documents, approvals, a reminder, an expense and the
enquiry it came from -- all of it gone or unlinked as described, and the
income figure drops by exactly the payment it held. In the browser: the bin
asks first, Escape and Cancel change nothing, confirming removes the row and
the counts above the table agree. 46 checks in the records suite, 31 in the
bookings suite.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
Delete a booking or an inquiry, and take its arithmetic with it
The phone box was the width of the card for a value that is ten digits long.
That room goes to a vehicle instead: two fifths for the number, three for a
dropdown of what is actually on the fleet.

It is the one question worth asking on a banner that was not being asked.
Somebody who picks a car has told us the thing that decides the call back --
it turns "what would you like?" into "yes, that one is free on those dates"
-- and it costs them a tap on a list that is already loaded for the page
behind it.

The choice travels both ways: the real vehicle id, so the panel shows the
inquiry against the vehicle and counts it there rather than leaving the
Asked-for column empty, and the name in the notes, which still reads
correctly years later when that vehicle has been sold. The contact form
sends the id now too; it had the vehicle in hand for the availability grid
and was passing only the name.

An id the panel does not recognise is ignored rather than refused, which is
what makes this safe when the fleet is served from the file of placeholders
after a failed request. In that case the dropdown does not appear at all --
an empty list asks a question with no answers -- and the number keeps the
whole row.

Checked against a real panel and database: the list is the live fleet, the
boxes sit on one row at 135px and 208px on a laptop and 123px and 189px on a
390px phone with nothing overflowing, and a card filled in and sent arrives
as an inquiry carrying vehicle_id 1 and "Vehicle of interest: Maruti Swift
VXi". The home page suites still pass -- 71 on the banner, 16 on the
floating button, 35 on image addresses, and the sixteen-page walk flags
nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
A vehicle beside the number in the banner card
The logo slot in Website content cropped every upload square. That is from
when the header showed a small mark beside the business name set in type --
a square plate was the right shape for it. The header has shown the full
lockup and nothing else since the owner sent one, and a square frame around
a wide lockup cuts the words off the sides of it: upload the real logo and
what the site shows is "NiteSha CARS", with "& BIKES" and the line under it
outside the crop.

A logo is artwork whose margins are already decided by whoever drew it, so
it is not framed at all now. Choosing one uploads it whole -- scaled down to
fit 1280x800 if it is larger, never up, with the transparency kept because
the header it sits on is navy. The slot says "Kept whole", shows the picture
on its own shape, and offers no Edit button, there being nothing to frame.
Every other slot still frames: a page banner has to be wide.

Removing one was already there and stays there, which is what this leaves
the owner to do once: Website content, the bin on the Logo slot, and the
header falls back to the lockup that ships with the site.

Also, while looking at why the panel logged ERR_TOO_MANY_REDIRECTS: index.php
and logout.php sent a relative "Location: dashboard.php". Asked for a path
the server has not been told about -- /site-images/logo.webp on a host
without the rewrite -- the browser resolves that against the address it
asked for, gets /site-images/dashboard.php, is told the same thing again,
and goes round until it gives up. They now redirect from the panel's own
root, wherever the panel is served from.

tools/test-brand-ui.js is new: a 3:1 image uploaded to the logo slot comes
back 3:1 rather than square, no frame is offered for it, a banner still
frames, and the bin empties the slot. 13 checks.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
The logo is not a badge, so stop framing it like one
The note above the pictures still told the owner what looks best "for the
badge", and the file still described the slot as one. Neither is what it is
any more, and the note now says the part that matters: the logo is kept as
it was drawn, the banners are framed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
Say "logo" where the panel used to say "badge"
They were stacked: the form's own button across the card, and WhatsApp in
green across the card under it. Two full-width buttons in a column read as
steps -- do this, then that -- and these are alternatives. Somebody who uses
WhatsApp is not going to fill the form in first.

So: one row, WhatsApp on the left in its own green, Check availability on
the right where the thumb ends up. The label drops to "WhatsApp", which is
what the green and the mark already say, and both fit on one line at every
width down to 360px -- 141px each there, nothing clipped and nothing
wrapped. The card is a row shorter for it, which is the part that matters on
the screen it sits on.

Measured at 1440, 1024, 768, 390 and 360: same row, WhatsApp left, neither
label broken. The banner suite follows the change -- 72 checks -- and the
floating-button, image-address, contrast and page-walk suites are unchanged
and still pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
The favicon was a navy disc with a thin gold ring and a drawn monogram in
it. In a row of tabs that reads as a dark smudge: at sixteen pixels an icon
has one colour, and the one this business has is gold.

So the field is the gold now and the mark is the navy. The gold is the
logo's rather than the site's flat token -- a light edge, a saturated
middle, a dark foot, which is what makes the artwork look like metal -- and
the letters lean forward the way the logo's do, with the sweep from the mark
above them. At sixteen pixels the lean is most of what makes it recognisable
as the one on the cars.

Two things that were missing: iOS ignores an SVG icon entirely, so a phone
that kept this site on its home screen drew a screenshot of the page.
apple-touch-icon.png is the same mark, full bleed because iOS rounds the
corners itself. And theme-color paints the browser's own furniture navy on a
phone, so the top of the screen matches the header under it.

The build now refuses an icon with two hyphens inside a comment. XML forbids
it where HTML does not, the browser then draws nothing at all rather than
complaining, and it is easy to type in a comment explaining a decision --
this file did exactly that, and the icon was invisible until it was
measured. The check names the file, the line and the fix.

Checked on the served site: both icons decode, the tab icon is 63% gold and
14% navy, the home-screen icon 83% and 14%. The page suites are unchanged --
banner 72, floating button 16, image addresses 35, and the sixteen-page walk
flags nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
The owner changed the tab icon and still had the purple bolt this project
shipped with, months after it stopped being referenced anywhere. Nothing was
wrong with the file: /favicon.svg is the same address it has always been, and
a browser caches a favicon by its address and holds it far harder than it
holds a page. Chrome reads a new one when its own store forgets, which can
be months, and an ordinary reload does not hurry it.

So the prerender stamps both icons with a hash of the file: the address
changes when the picture does, nothing cached can match it, and nobody has
to know to clear anything. Every route and the SPA fallback are written from
the same template, so all 26 carry it.

Checked on the served site: the stamped addresses answer 200 and decode, the
tab icon 63% gold and the home-screen one 83%, and the page walk and banner
suite are unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
Address the icons by a hash of themselves
"More keywords" is usually taken to mean a keywords meta tag. Google stopped
reading that one in 2009 and says so plainly, so there is not one here and
adding it would have been a line of markup that does nothing. What does get
found is the site answering, in the words somebody used, a question they
asked -- so that is what this adds.

Ten questions and answers, on the home page and the tariff page: the
deposit, the documents, the kilometre allowance and what going over it
costs, delivery to the station and the airport, crossing into Kerala,
two-wheelers, monthly rates, a car with a driver, how early a wedding car
goes, and how to book. They are the calls the phone takes every day. As
prose they carry the phrasings the pages did not have -- without a driver,
scooty, car hire, international driving permit, railway station, long term
-- without a word of it being stuffed anywhere.

They are editable in the panel under Website content, because they are
business facts and the ones about deposits and Kerala have to be the
owner's answers rather than mine. They are written as <details>, so they
open with no JavaScript and every answer is in the HTML whether it is open
or shut, and the build turns the same content into FAQPage structured data
on exactly the two routes that display it -- Google asks that the data match
the page, and one copy of the text is how that stays true.

The business block on every page now carries an offer catalogue naming the
five things this business hires out, in the words they are searched for
rather than the site's own headings. Seven titles and descriptions gained a
phrase each where one read naturally.

And the build now refuses a title over 62 characters or a description over
160, which is where a search result starts cutting. The town hub's
description was 174 and had been losing its last two towns since it was
written.

Checked on the built site: fifteen pages, each with one h1, one title and
description inside the limits, the business block on every one, and the FAQ
data matching the ten questions actually shown -- on the two pages that show
them and nowhere else. The page walk and the banner suite are unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
Answer the questions people type, and name the services in the markup
Each of the three was an eyebrow, a paragraph, a bordered panel with its own
heading and four bullets, and a full-width gold button. Side by side that is
about a hundred and forty words and twelve bullets in a row of boxes, at the
point in the page where somebody is still deciding whether to keep
scrolling. Nobody reads that, and the owner did not like looking at it.

One sentence each now, and the boxes are gone: three columns divided by
hairlines, which read as one band rather than three objects -- which is what
they are. Sixty-nine words where there were two hundred and fifty, and the
band is 378 pixels tall instead of a thousand.

What is left is enough to earn the click, and the page it links to is where
the detail belongs. The panel's form lost the fields with it: a title, a
sentence, the link text and where it goes.

The emoji went too. They were typed into the panel as 🗓 ✈ 💍, and a browser
draws the first two as flat black glyphs and the third in full colour, so
the row read as two missing icons and a ring. Each service has a drawn mark
now, the same weight as the others, in gold inside a thin gold ring.

Checked at 1440 and 390: three columns on a laptop, three stacked entries
divided by the same hairline on a phone, no overflow either way. The panel
form shows the four fields and nothing else. The page walk flags nothing and
the banner, image-address, accessibility-name and per-page SEO suites are
unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
Three lines on the dark band, not three walls
The dark band goes. The page's own cream carries it now, and the three stop
being three of the same box: the first is the one worth the most, so it is
the big one -- gold, tall, with a solid navy button -- and the other two are
quiet white rows beside it with the mark on the left, where a list's marker
would be.

Three of an identical card says these are three equal choices. They are not.
One is a month of hire, one is a booking made from another country, one is a
wedding, and the layout can say so before a word is read.

Deliberately not the card the fleet grid above it uses -- picture on top,
title, line, link. Two sections of the same card on one page read as one
long list that lost its heading, which is also why this one has a heading
now: without the dark band behind it, a section with no title is a section
that has come loose.

Measured on the real pixels rather than the declared colours, because the
big card is a gradient: the heading is 16.9:1 on it, the sentence 5.6:1, the
button 19.2:1. At 390px the three stack in the same order with nothing
overflowing. The page walk flags nothing and the banner, image-address,
accessibility-name and per-page SEO suites are unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
niteeshkanna-sh and others added 4 commits November 23, 2026 13:59
Each dot under the car carousel was its own button at 10px by 10px.
WCAG 2.5.8 asks for 24px and a thumb lands nearer 45px, so eight of the
smallest targets on the site sat in a row on the page most of its
visitors open on a phone.

The button is now a transparent box around the dot rather than being
the dot: 24px wide for an inactive one, 44px tall because nothing sits
above or below it. The dot itself is unchanged at 10px, and the row's
gap moved into the buttons' padding so they still look the same
distance apart. Centre to centre is 24px between inactive dots and 33px
beside the active pill, which is also what the WCAG spacing exception
measures.

Keyboard focus now shows, which it did not before.

Measured on the built site at 390 and 1280: button widths 42,24,24,24,
24,24,24,24, visual dot still 10x10, no horizontal scroll, and clicking
the fourth dot still changes the car.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
Asked for: the cars should scroll one by one without being touched. One
step every six seconds -- a card here is not a photograph, it carries a
name, four specs, a kilometre limit and two prices, and four seconds is
not enough to read that.

Four things stop it, and each matters on a phone, which is what most of
this site is read on:

  - prefers-reduced-motion. Somebody who has told their phone to stop
    animating things has told this to stop too, and a carousel that
    moves by itself is the clearest case of it.
  - Being off screen, or in a background tab. A timer firing against a
    fan of transformed cards nobody is looking at is battery spent on
    nothing.
  - A pointer resting on it or the keyboard focus inside it, so it does
    not slide out from under somebody mid-sentence.
  - Any deliberate move -- an arrow, a dot, a swipe, an arrow key --
    and then for good, not for a few seconds. Pausing and resuming
    sounds friendlier and is worse: it means the card can still change
    itself while somebody is halfway through reading the one they
    chose. Once a visitor has said which car they want, the page should
    stop having opinions.

Verified against the built site rather than reasoned about: it advances
BMW -> Santro -> Swift while visible; stays put for 13.5s after a dot is
pressed; holds while hovered; never moves under reduced motion; never
moves while scrolled away; and on a Pixel 5 profile it advances and then
holds as soon as a card is touched.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
Asked for, after watching it on a phone. The interval is now a named
constant at the top of the file rather than a number inside the timer,
because it is the one value in there anybody is likely to want to
change again.

Three seconds is faster than a card this full really wants -- there is a
name, four specs, a kilometre limit and two prices on it. What makes it
defensible is that the carousel stops dead the moment anybody touches
it, so nobody reading one is racing the clock. The comment says so.

Timed on the built site with a MutationObserver on aria-current: six
consecutive gaps of 2998, 3001, 2999, 3001, 2999 and 3000ms. An earlier
reading that showed a 6009ms gap was my own 200ms polling loop competing
with React's render, not the carousel.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
Reported as not changing cars at all, and it was -- for the person
reporting it. The timer was right: measured on the live site, three
advances at 2999 and 3000ms with the cursor parked away from the
carousel, and not one with the cursor on it.

Pausing on hover is the obvious thing to do and it is what I added. On a
desktop it is also self-defeating: you move the pointer towards whatever
you are looking at, so the one visitor actually watching the cars was
the one visitor who never saw them change.

Hover no longer holds it. The guards that earn their place stay:

  - keyboard focus inside it still holds, because advancing would move
    the focused link offstage and out of the tab order while somebody
    is standing on it
  - off screen, background tab, reduced motion, and any deliberate move
    are all unchanged

The cost is that a card can change while somebody reads it with the
mouse over it. One click, swipe or arrow key stops it for good, which is
the control that actually matters.

Measured after the change: cursor on it, 3 advances at 2999 and 3003ms;
cursor away, 3 at 3000 and 2999ms; dot pressed, none; focus inside,
none; reduced motion, none.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
niteeshkanna-sh and others added 9 commits November 24, 2026 09:53
The section lays out six frames and the owner had filled two of them --
why-us-1 and why-us-2 -- so it drew two. A wall with two pictures on it
reads as a wall somebody gave up on.

It now tops up from photographs the site already has: cars, bikes,
wedding cars and tourist vehicles, all uploaded for other parts of the
site, all of this business's own vehicles. Nothing is invented and
nothing new has to be uploaded. The owner's own choices still come
first, and anything they put in why-us-3 and up pushes a top-up out --
their pick beats a sensible guess.

Site-image slots rather than the fleet's own photographs, which was the
first idea. The fleet's arrive only in the browser: fetch-fleet.mjs
deliberately leaves them out of the build because a panel URL can be
gone by the time a crawler reads the markup. Using those would have
meant two frames in the prerendered HTML and six a moment later. These
are baked, so it is six from the first paint -- confirmed in
dist/index.html, six frames, no duplicates.

De-duplicated by address, because the same file can sit in two slots:
the car in chooser-1 is quite likely the one already chosen for
why-us-1, and showing it twice would look like a mistake.

All six verified 200 on the host, 53KB to 156KB.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
Two of the things a local search result is built from were missing from
the business block.

Opening hours were already wired to the panel's field, but emitted as
the legacy openingHours string. Both forms are valid and Google reads
both; only openingHoursSpecification carries enough for it to say "Open
now" or "Closes 8 pm" beside a result. The panel asks for
"Mo-Sa 08:00-20:00, Su 09:00-18:00" and that is what the parser takes.

Anything it cannot parse falls back to publishing the string as typed,
and that is not a theoretical branch: the panel currently holds "24 H",
which does not parse and is being published as-is today. A specification
with Tuesday quietly missing from it would be worse than none at all --
somebody would drive to a closed shop on the strength of it -- so the
parser returns null for any part it does not fully understand rather
than a partial answer. Twelve cases checked, including a week that wraps
(Sa-Mo), lowercase input, and six malformed strings that must fall back.

Coordinates are read from seo.json when they are there, and nothing is
emitted while they are not. Google will not pin a business from a
locality and a postcode, and this site has no street address to give it:
the panel's address lines are the town, the district and the state,
which the existing code rightly refuses to pass off as a street. The
values themselves are the owner's to supply -- a mistyped coordinate
puts the business somewhere it is not, which is worse than saying
nothing, since being exact is the whole point of the property.

Verified on the built site: hours still fall back to "24 H", geo not
emitted, JSON-LD still parses.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
PR #168 removed the six service pages and the town page under each of
them. Nothing was left behind for the addresses, so every one has been
answering 404 ever since, and Google still has them.

Not hypothetical. Searching "bike rental nagercoil" today returns
/bikes/nagercoil at about fifth place, titled "Self Drive Bike & Scooty
Rental in Nagercoil - By the Hour". That address is a 404. Somebody
looking to hire a scooter finds this business in the results, clicks,
and is told the page does not exist. All eighteen addresses tested were
dead, with no redirect on any of them.

  /<service>          -> /services/#<service>
  /<service>/<town>   -> /car-rental/<town>/ when that page exists
  /<service>/<other>  -> /services/#<service>

The middle rule checks the town directory is really there first:
redirecting to another 404 would be worse than the 404 it replaces,
because it costs a round trip to say the same thing. NE on the two that
target a fragment, which would otherwise be sent as %23 and land at the
top of the page rather than the section.

A 301 keeps both halves: the visitor lands somewhere useful, and
whatever standing the old address earned passes to the page that
replaced it.

In my-app/public/.htaccess, which is the source; the root copy is a
build output and an edit there is discarded by the next publish.

Apache cannot be exercised in the build container, so this is verified
against the live site after deploy.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
Two gaps found by checking real search results rather than guessing.

The town pages carried no price at all. The rest of the first page of
results leads with one -- "From Rs 1990/Day", "from Rs 2,000" -- and a
visitor comparing three rental firms has no reason to click the one
that will not say. The cheapest daily rate in each shape of vehicle now
sits on the page, read from the live fleet rather than written down
here: a figure typed into a component is one nobody can correct without
a deploy, and these are exactly the ones that go stale.

The heading says "car rental" and not "self drive car rental". Every
page here is written for the longer phrase and ranks for it -- first
for "self drive car kanyakumari", second for "self drive car
nagercoil" -- while "car rental nagercoil" does not reach the first
page, because nothing on the site is written in those words.

No new pages, as asked: this is a section on the pages that already
exist.

On duplication, since these pages exist to not be each other: the first
draft used one identical paragraph on all twenty and took the closest
pair from 31.7% to 36.0% alike -- the exact figure the note above the
car cards gives as the reason those were removed. Rewording it from
each town's own distance left it at 36.9%, so the rows of figures are
what the overlap is, not the prose. Kept, because seo-audit's own limit
is 45% and it reports nothing flagged: there is room, and a price is
the thing these pages were missing.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
Every photograph on the site was being sent at the size it was uploaded.
Measured across the pages, that is 6.5 MB of images, and not one of them
was within twice the width of the box it is drawn into:

  contact banner   1920 wide, 2.4 MB JPEG   drawn 1440
  place photos     up to 1280 wide          drawn 409
  car photos       1200 wide                drawn 382 at most
  collage frames   1200 wide                drawn 300

The site cannot fix this from the markup: there is one file per picture
and no smaller one to ask for, so the browser downloads the big one
whatever srcset says. Nothing in the panel has ever resized anything --
an upload is written to disk exactly as it arrived -- so the only place
it can be fixed is on the way out, which also fixes the photographs
already uploaded rather than only the next ones.

All three public readers already funnelled through image_stream, so this
puts one step in front of it. A cached copy is made once, at the width
that kind of picture is actually drawn, and kept beside the original
above the document root.

  6,540 KB -> 2,184 KB   for a browser that reads WebP
  6,540 KB -> 3,028 KB   for one that does not

The format is negotiated rather than assumed: a JPEG or PNG becomes WebP
only for a client whose Accept header says it reads WebP, and otherwise
keeps its own format, so resizing never costs anyone a picture they
cannot display. That answer depends on the request, so it sends Vary.

The widths are measured, not guessed, and measuring corrected two
guesses that would have made the site worse. The page banners are stored
at 1600 and drawn at 1440, so they are already narrower than a dense
screen wants and are left alone. A place photograph looks small on the
home page but is drawn 409 across on /places/, so capping it at 600 --
which the home page alone suggested -- would have blurred the gallery.

Site images are not one kind of picture and do not share a number: a
collage frame is drawn 300 and a banner 1440, from the same directory
through the same reader. The slot each file fills already declares the
space it fills, and site_image_warning has been calling that number "the
space it fills" all along; read the other way it says when a picture is
too big. Looked up by filename, because a file is now named for what it
shows rather than for its slot, and kept in a small file beside the
cached copies -- brand.php never opened a database connection before
this, and making every photograph wait for one would cost more than the
bytes it saves. An upload drops that file, and any name not in it
rebuilds once, which is reliable because every upload gets a fresh
random suffix.

Every way this can fail ends in the original being sent exactly as
before: no gd on the host, a file gd cannot decode, a picture already
small enough, a re-encode that came out bigger. install.php now lists gd
so it is visible when a host does not have it.

The cache is keyed on the file and then on its version, so replacing a
picture is a new key and the copies made from the old one are swept up
rather than kept for ever.

Two of the new tests failed at first against code that was working: the
fixture drew flat blocks, which PNG stores almost for free, so the "is
it actually smaller" guard correctly refused to replace it. The fixture
now generates per-pixel noise, which is what decides the question for a
real photograph.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
The panel now sends a photograph no wider than that kind of picture is
drawn anywhere on the site. "Anywhere" was the remaining waste: the six
service cards are drawn 612 across on /cars/ and 286 on the home page,
from one file, so the cap has to be the larger of the two and the home
page carried four times the pixels it shows. A phone is worse again --
a page banner is 390 points wide there and 1600 in the file.

The page knows better than the file can, so it says so. The three
readers accept ?w=, and the markup carries a srcset so the browser can
also pick by its own pixel density.

?w= is bounded at both ends. Only the six widths in IMAGE_WIDTHS are
answered, because the answer is written to disk and an open parameter is
an invitation to fill it one width at a time; and a width above the
slot's cap is clamped back to the cap, because above that is a file
bigger than anything on the site displays. Anything else -- 401, a
negative, a float, an array -- is ignored and the default applies.

Every width in the markup is measured in a browser at seven viewport
widths rather than guessed, and the sizes attribute beside each srcset
describes the same measurements:

  page banner       full width everywhere          100vw
  service card      350 phone, 704 at 768, 612     up to 1200
  home service card 230 phone, 286 from 1280       up to 600
  car card          334 phone, 382 at most         up to 800
  place card        348 phone, 409 from 1440       up to 800
  places strip      167 phone, 229 from 1280       up to 600
  collage frame     169 phone, 344 at 768, 300     up to 600
  chooser tile      159 phone, 333 at 768, 233     up to 600
  steps             350 phone, 704 at 768, 336     up to 800

Each is twice the widest that call site draws, so a dense screen is
still served a sharp image, and nothing above that is offered -- the
panel would only clamp it, and a candidate that does not deliver the
width it claims makes the browser choose badly.

src keeps the plain address. It is what the sitemap and the structured
data name, so it stays the one a crawler fetches and the one that
answers if srcset is ignored; the variants hang off it rather than
replacing it.

Faq carried a comment explaining that only the committed file could have
narrower copies, because a panel upload came back at one size and
inventing -800w addresses for it would have been inventing files that
404. That is no longer true, so it now asks through the same helper. Its
AVIF sources stay on the committed file alone, which is where AVIF is
encoded at build time.

A test reads the width ladder out of the site's helper and compares it
with the panel's, because a width in one list and not the other is
either a file nobody downloads or a 404 at exactly the screen size that
asks for it, and nothing else would catch it.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
The srcset shipped in the last change asked for ?w=600 and got the full
width back. Nothing errored. The markup was right and the panel honoured
the parameter; the rewrite between them threw it away.

A RewriteRule whose substitution carries its own query string replaces
the request's rather than adding to it, so

    RewriteRule ^site-images/(...)$ /admin/brand.php?f=$1 [L]

turns /site-images/x.webp?w=600 into brand.php?f=x.webp and the width is
gone. QSA is what appends it. All three image readers were missing it.

Found by fetching one file at all six widths the markup can ask for and
getting six identical answers -- 71958 bytes every time. Reading either
side on its own shows nothing wrong, because neither side is wrong.

So publish-site now refuses to publish a .htaccess where a rewrite hands
a request to the panel with its own query string and no QSA. That is the
gate this already guards -- it is the script that exists because a
missing index.html once 403'd the domain -- and this failure is the same
shape: silent, invisible in the markup, and only findable by asking the
live site the same question six ways.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
Sizing a picture to the slot it fills made the panel's own crop tool work
from the sized copy. Re-framing the collage reads a 700-wide copy of a
1200-wide photograph and saves at 700, so a crop that zooms in stretches
what it has to fill the frame, and each pass loses a little more. Four
slots are affected today -- the two collage frames, the step picture and
the contact banner -- because those are the ones stored wider than they
are drawn.

The tool now asks for the stored picture with ?full=1, honoured only for
a signed-in panel session. brand.php is public by design, so without
that check anyone could ask for the full-size copy of everything and the
sizing would be decoration. A visitor who sends it gets the ordinary
sized answer rather than an error: there is nothing secret in these
pictures, it is simply not their copy to ask for.

Exactly "1" and nothing else, so a stray ?full= on a public address
cannot quietly turn the sizing off.

current_user() starts a session and reads a row, which is why auth.php is
required here for its functions only -- nothing runs unless ?full=1 is
actually present, so a public request still reaches no database.

Only the site images have a re-frame button; the vehicle and place
photographs are uploaded and replaced, never re-cropped in place.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
One quality for every picture was wrong in both directions. A page
banner is looked at across a whole window and wants the detail; a
collage frame is drawn 300 points across in a grid of six, where the
artefacts shrink with everything else and nobody can see them.

The "why rent from us" collage is where it shows. Six photographs, every
one decorative, 241 KB between them at a quality meant for a banner --
and four of the six are the service card pictures the collage tops up
with, encoded for a 1200-wide card and sent at 600.

Rendered side by side at the size they are actually drawn, 82 and 68 are
indistinguishable. So is 60, on the family photograph, where faces show
compression before anything else does. 68 is a third less to download,
and below it the savings flatten out.

So the quality now comes from the width of the copy: 68 up to 600, 76 up
to 1000, 82 above that. Nothing drawn full-width loses anything, and
every small copy on the site gets lighter -- the collage, the chooser
tiles, the places strip, and the phone-sized copy of everything else.

The cache needed a recipe number for this to mean anything. It is keyed
on which picture and which version of it, so without one a change to how
a copy is made would never reach a copy already made: the old files
would answer for ever and the change would look like it had done
nothing, which is the hardest kind of result to doubt. Bumping it makes
every existing copy a different key, so the next request writes a fresh
one and the sweep clears what it replaced.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
niteeshkanna-sh and others added 15 commits November 28, 2026 12:12
A page is laid out, styled and painted in full before anybody has
scrolled to most of it. The home page is ten sections and about 1,750
elements, and on a mid-range phone that is real time spent at exactly
the moment the visitor is waiting for the first screen.

content-visibility lets the browser skip all of that for a section until
it comes near the viewport. Measured on a throttled Pixel 5, three runs,
median:

    largest contentful paint   2864ms -> 2428ms
    total blocking time         182ms ->  113ms
    cumulative layout shift        0  ->     0

From the third section down, never the first two -- those are the banner
and the enquiry form, which are on screen immediately, and skipping them
would delay the paint this is meant to bring forward. Checked on every
page: the earliest section this touches starts at 908px, below the fold
on even a tall phone.

contain-intrinsic-size: auto is what keeps the scrollbar honest, and it
does what it claims. The page measures 8,840px before anything below the
fold has rendered, 12,338px once it has, and 12,338px every time after --
the estimate is used on the first pass down and never again. An earlier
check said the geometry was permanently wrong; it was scrolling in 40ms
steps, too fast for a section to render at all.

900px rather than the 600 I started with. The number only matters on that
first pass, and 600 was not a central guess: these sections are between
616 and 2,041px tall on a phone, so the page read 28% short and the
scrollbar grew under the thumb the whole way down. 900 brings it to 9%.

Back-to-top is watched rather than polled. It read window.scrollY in a
scroll handler -- main-thread work for every scroll event a finger
generates, dozens a second, to answer one yes-or-no question that changes
twice in a whole page. An observer on a marker 600px down is told when
that line is crossed and costs nothing in between.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
Side by side under the heading they are three badges in a row, which is
what they were drawn as. A phone has no row. At 390px the column is 350
wide and the badges measure 231, 192 and 187, so they break one to a line
and land as a ragged left-aligned stack -- three stray tags floating on
the photograph, between the white chooser card above and the white
enquiry card below. Nothing about it reads as a decision.

Below 640px they stop being badges and become one panel with three rows:
same words, same gold ticks, but every edge lines up, the three belong to
each other, and the block sits against the two white cards as a third
deliberate thing rather than as debris between them. Measured at 320,
360, 390, 430, 600 and 639: the rows come out equal width at every one.

In CSS under a max-width query rather than as responsive classes on the
element, so the desktop arrangement cannot be touched by it. Checked at
640, 768, 1024 and 1280: the list is still a flex row, the panel border
is 0, and the chips keep their full radius and their original widths.

The hover lift is cancelled in the panel. There is no hover on a touch
screen, and it would otherwise fire on tap and shift a row inside a fixed
frame; the divider above a hovered row is put back, which the lift rule
would otherwise clear.

Still a ul of li, so the list is read as a list either way.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
It was never only a phone. Measured across the range, the three badges
need 664px on one line and the column gives them that at 744-1023 and
again from 1280 up. Everywhere else they break onto two:

    640-743    column 576-656   the chooser card is beside them
    1024-1279  column 521-636   the desktop grid hands the list 7 of 12

So the ragged two-row stack was showing across most of tablet and most of
laptop as well, not just below 640 where it was first noticed.

The panel now runs to 1279 rather than 639. Stacked rows stay on a phone.
From 640 the same panel turns three across, because a column that reaches
936px before the desktop grid takes over is mostly empty panel with three
short phrases down its left edge. Equal columns use the width and keep the
block reading as one thing.

The divider turns with the layout: between rows it is horizontal, between
columns vertical, and the rule the stacked case sets has to be cleared or
both draw at once. The tick is nudged to the first line of a phrase that
takes two, which at 166px cells most of them do.

Measured at eighteen widths from 390 to 1600. Every cell comes out equal,
nothing wraps to a second row anywhere, and at 1280 and up the badges are
untouched at 244, 203 and 197 -- the arrangement they were drawn for.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
At the page's own 86rem the panel is 1280 wide, the words stop 600px
into it and the handset starts at 885. A third of the last block on the
page -- the one whose entire job is to be clicked -- was dark gap between
the two. Above it sat 192px of white, there to clear a phone that leaned
that far past the top.

The panel stops at 64rem from the laptop up. The words and the handset
sit together, the gap falls from 284px to 67, and the section comes down
from 599px to 487. Its own padding drops with it: py-14 to py-10 inside,
pt-48 to pt-32 outside, pb-20 to pb-16.

Two things this turned up.

The handset had a step at 1280 -- right: 7rem, width: 15.5rem -- from when
the panel grew with the page and the phone had to grow and move out with
it. The panel does not grow any more, so that step made the phone keep
growing past a panel that had stopped: at 1152 it fitted, at 1440 it sat
on top of the words by 60px. Removed; it is the same panel at 1024 as at
1600 and it wants the same phone.

And the first pass cut the top padding to 7rem by eye. The phone leans
102px past the top of the panel at the widest the panel gets, so 7rem
cleared it by a hair at some widths and not at all at others -- it was
overlapping the questions band above by 91px at 1440, which is exactly
what the 12rem was there to stop. Measured, then set to 8rem, which
clears by 37 to 103px at every width from 1024 to 1600.

Below 1024 nothing changes: 704x434 at 768 and 350x456 at 390, the same
as before.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
A 768px screen was being shown the phone's arrangement, and still was at
1023px: every multi-column layout on the home page waits for lg, so for
256px of width there is one column and cards stack down a screen wide
enough for two. The page measures 12,006px at 768 and 7,936px at 1280 --
the narrower screen is half as long again as the wider one.

Three sections carry most of it.

Why rent from us, 2495px: the collage and the words were one above the
other. Side by side from md, 1391px.

How it works, 1934px: four steps and a portrait photograph stacked, of
which 880px was the photograph alone. Three columns is not the answer
either -- steps either side of the picture leaves each about 160px. So
the picture goes across the top, cropped wide, and the steps run two-up
beneath it: 1162px, and the grid stays 89% full. The crop needs the
corners changed with it, because how-leaf rounds by percentage and the
same percentages that shape it at 4:5 draw an ellipse at 16:7.

The closing panel: the handset was sized for a 928px panel and the same
rule ran at 768, where the panel is 704 and the words had 336px of it --
less than half, heading on two lines, to leave room for a picture. A
smaller handset gives them 416px.

    768   12,006 -> 10,684   -11%
    834   12,127 -> 10,634   -12%
    900   12,281 -> 10,602   -14%
   1023   12,578 -> 10,730   -15%

The hero is left alone, and that is deliberate. Two columns there saves
483px and squashes the chooser's four tiles into unreadable slivers at
293px. Shorter is not the point.

Nothing changes below 768 or above 1023: 12,346px at 390 and 11,784px at
640, the same to the pixel.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
The one section the tablet pass left alone, because two columns there
squashed the chooser's four tiles into slivers. The tiles were the whole
obstacle, so this moves them.

The card is 359px wide on a laptop and its two middle tiles are 155px
each. Beside the words on a tablet the card is 275px, and two-up those
tiles would be 114px -- a line of type per word. One per row instead
gives each of them 237px, which is wider than any tile gets on a laptop.
The card grows taller and reads.

    768   hero 1180 -> 788
    900   hero 1161 -> 778
   1023   hero 1161 -> 778

grid-column has to be reset along with the column count, and that is what
broke the first attempt. The two lead tiles carry col-span-2, and `span 2`
in a one-column grid does not clamp to the one column -- it creates a
second, implicit one and puts the tile there. All four ended up in a row
as 32px slivers, which I read as "the chooser cannot take this width"
rather than as a bug in the rule I had just written.

Nothing changes on a phone or a laptop: 1199px at 390, 1167 at 640, 1180
at 767, 679 at 1024 and 652 at 1440, each the same to the pixel, with the
tiles at their existing widths.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
It was measuring the tallest card and writing the result back as the
stage's inline height, and that could not work. The card is h-full of the
slide, the slide took its height from the stage, and the stage was
measured from the card -- so once a number had been written, offsetHeight
only reported that number back. The first measurement, taken before
anything had settled, was the last one that meant anything.

The cost was not the drift between builds, which is how I noticed it. It
was the phones:

    390   stage 532   four cards at four heights, 21px apart
    640   stage 543   a card hanging 12px past the stage, onto the dots

Which is exactly the complaint the measuring was added to fix.

The slides are stacked in one grid cell now, rather than positioned
absolutely out of flow. The row is as tall as the tallest card's own
content and align-items stretches the rest to match, so the cards stay a
set and the stage fits them -- at layout time, every time, with nothing
measured. The ResizeObserver, the state and the h-[37rem] floor all go
with it; the browser does not need to be told when a font arrives or a
phone turns.

    390   532 -> 532   cards equal, nothing past the stage
    640   543 -> 543   cards equal, nothing past the stage
    768   555 -> 531   cards equal, nothing past the stage
   1440   555 -> 531   cards equal, nothing past the stage

531 at the desktop widths is the cards' own height; 555 was the stale
measurement, and the 24px between them is the drift that has been showing
up in every page total this week.

Checked with the webfont held back 2.5 seconds, which is the case a
one-shot measurement gets wrong: the stage is still right and the cards
are still equal.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
The contact page scrolled sideways on anything 320px wide: the card
holding the contact rows came out 325px inside a 320px viewport, and the
row with the email address was what forced it.

The markup already said break-words, and that is the wrong one.
overflow-wrap: break-word breaks a word once it would overflow the line
it is on, but it does not change what the element reports as its
narrowest possible width -- so niteshacars045@gmail.com, one unbreakable
token, still asked the row for its full width and the row could not
shrink. `anywhere` is the value that counts for intrinsic sizing.

The address now wraps onto two lines below 390px and stays on one above
it, and there is no horizontal overflow at 300, 320, 360, 390 or 430.

Found by sweeping nine pages at twelve widths. That sweep is now clean
everywhere -- 108 combinations, no overflow on any of them.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
The icons were glossy plates: a diagonal gradient, a white gloss across the
top half, a rim inside the edge and a drop shadow under it. Four tricks to
make a flat shape look like a physical object, which reads today as stock
art rather than as this business.

They were also hard to see. Every mark was white, whatever the plate under
it, and white on the gold plate measures 2.28 -- under the 3 that any
non-text graphic needs. The phone and the pin were pale shapes you resolved
from the label beside them rather than from the icon itself.

So each icon is now one flat tile in one solid colour, with a mark chosen
to be read against it: dark on the light tiles, light on the dark ones,
nothing below 4.2. The mark is also drawn 1.2x larger, since the gloss is
gone and the tile no longer needs clear space around its edge to show it.

The second sum is the tile against the page, which is tighter than the
first. A fill clears 3:1 against both a near-white card and the near-black
footer only when its relative luminance lands between about 0.135 and 0.23.
Bright gold sits at 0.52 and cream at 0.88, so both vanish on white, and
the near-black navy vanishes on the footer -- which is exactly what the
footer's mail icon did: a dark plate on a dark band, a gold envelope
floating in a hole where the other three had discs.

The tones are therefore in two groups. Bronze, green and the brand pink and
blue sit inside that band and are safe wherever they are dropped, and they
are now the defaults. Gold, cream and navy are for a background the caller
knows about, and the footer asks for gold by name because gold on near-black
is 9.3 and a bright gold disc is what that column should look like.

Two smaller things that follow from flattening them. The floating buttons
take a drop shadow of their own, since the plate used to carry one and they
sit over whatever is scrolling past. And the line icons' default stroke goes
from 1.6 to 1.9: at 20px beside Poppins at 700, a 1.6 hairline read as a
faint sketch of the icon rather than as part of the line.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
Four places on the site put a boxed drawing next to a heading that already
said the same thing:

  hero stats      a person beside "1000+ customers", a car beside "20+ cars
                  and bikes", a pin beside "20 towns we deliver to"
  service cards   a car beside "Self drive cars", a bike beside "Bike
                  rental", a star beside "Wedding cars"
  why-us claims   a wallet beside "The price you agree is the price you
                  pay", a pin beside "Anywhere in the district"
  about, what we  the same four drawings again, next to the same four names
  rent

None of them told you anything the words did not, and each one was a tinted
box with a border -- so a page of plain headings became a page of boxes with
headings beside them. The hero's three were worse than redundant: three gold
boxes sat directly above the one gold button, which is three things
competing with the thing the banner is asking you to press. The stylesheet
had already half-noticed this, and settled for making them squircles instead
of discs.

That is 17 icons off the home page (96 to 79) and 4 off the about page
(16 to 12), and the component that drew them, which nothing imports now.

What stays, because it carries something the words do not:

  place chips     the icon is a pin, a train or a bus -- it says whether
                  "Nagercoil Railway Station" is a town, a station or a
                  stand, which the name alone does not
  about cards     the four stepped folders have no photograph; the 40px
                  mark is the only picture on them
  fleet specs,    seats, fuel, transmission; the chevrons, the arrows, the
  controls        date field, the contact rows and the footer

The `icon` fields stay in the panel's copy, unread. Nothing on the site
looks at them, and leaving them means the badges can come back without
anyone retyping what they were.

The hero's three figures lose their badges and gain the space instead:
gap-x-6 to gap-x-11, so "1000+ 20+ 20" reads as three facts rather than a
run of numbers.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
Six 3:4 frames at the full width of their column made a block 772px tall on
a phone and 1352px at 1440 -- a screenful of snapshots standing between the
heading and the three claims that are what the section actually says, and on
a wide screen the photographs rather than the words were setting the height
of the whole section.

Square and capped at 25rem instead. The squares also crop these pictures
less, not more: every one of them is a landscape photograph, so the 3:4
frame was cutting the sides off all six.

                      before            after
  phone 390 @3x       772px  175 KB     591px  102 KB
  tablet 768 @2x      792px  175 KB     596px  102 KB
  desktop 1280 @2x   1256px  175 KB     692px  102 KB
  desktop 1440 @1x   1352px  102 KB     692px   48 KB

The section itself goes 1512px to 878px at 1440, and 1416 to 927 at 1280.

The weight falls out of the same change rather than from compressing
anything harder. A frame capped near 192 points means 400 is a dense
screen's worth of pixels, where a 276 or 300 point frame asked for 600 --
and six of those rungs is 173 KB against 99. So the srcset stops offering
600, which it was only offering for a 3x phone to take, and the sizes
attribute now says what the frames actually measure rather than the
310/230 it claimed before.

Two smaller things that follow. The cap sits on the positioned wrapper
rather than on the list, so the spinning badge stays pinned to the
collage's corner instead of to the column's. And with the collage no
longer needing half the row, the two columns go 1:1 to 0.75:1.25, which
gives the claims the width the pictures were holding.

What this does not fix: four of the six photographs are still borrowed
from the service cards, and they are the heavy ones -- the bikes, wedding
and tourist shots are 21-23 KB each at w=400 against 9-13 KB for the two
real why-us uploads. Four pictures in the panel's why-us-3 to why-us-6
slots would take this section under 70 KB.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
* Put the logo in the footer

The foot of every page opened with the business name set in type. The
header has carried the lockup since the owner sent one, and the footer
never did -- so the mark appeared once on a page and only at the top.

It replaces the typed name rather than sitting above it. The name is drawn
into the artwork, so printing it underneath would say "NiteSha Cars &
Bikes" twice in two faces at two sizes, which is the thing the header was
changed to stop doing. The name is still in the copyright line below as
text, which is where a crawler reads it anyway, and the alt text carries it
for a screen reader.

Drawn at exactly the header's size, which is the part worth being careful
about. The logo is served off a width ladder, and the browser picks a rung
from the `sizes` attribute: declare some other width in the footer and it
fetches a second file for a mark the page already has. Matching the header
means one request serves both. Measured on /contact/: one 10 KB AVIF, at
110x64 in the header and 110x64 in the footer.

It must not inherit the header's loading behaviour, though. That copy is
the one picture above the fold on every page and asks to be fetched first;
the footer's is the furthest thing from the fold there is. So Logo takes a
`lazy` flag, which drops fetchPriority and adds loading="lazy", and the
footer is the only caller that passes it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

* Drop Tariff and Enquire from the footer's bottom bar

They were the seventh and eighth links in a footer that already lists
Tariff under Quick links and Contact under Company, four inches above.
A second offer of the same two pages, in smaller type, under a rule, is
not a shortcut -- it is the same column twice.

Nothing becomes unreachable: /tariff is in Quick links and /contact in
Company, and the enquiry form is the first thing on the contact page.

The row under the rule is the copyright and nothing else now, so it is no
longer a flex row with one child in it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

---------

Co-authored-by: Claude <noreply@anthropic.com>
The field is optional and sending it empty is fine, which is what "Any
vehicle" was saying. But a default that reads as an answer already given
is a default nobody opens -- the list of ten vehicles underneath it was
sitting behind a box that looked settled.

A prompt gets it opened. Nothing about the form changes: the option still
carries an empty value, the field is still not required, and an enquiry
sent without a vehicle is the same enquiry it was before.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
Was three. One constant, DWELL, at the top of the file, which is where it
was put so that this change would be one line.

Measured on the built page: four advances at 1500, 1500, 1500 and 1503ms.

Everything that stops it still stops it, which matters more at this speed
than at the old one. Measured too: with prefers-reduced-motion set to
reduce it never moves at all, and one click of an arrow ends the autoplay
for good -- zero further changes in the six seconds after, where it would
otherwise have made four.

Worth saying plainly: the slide itself takes 450ms of the 1500, so each
car is still for about a second and the fan is in motion a third of the
time rather than a seventh. Nobody reads a name, four specs, a kilometre
limit and two prices in a second. The card stopping dead on the first
touch is what makes that defensible rather than the dwell being long
enough to read.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>
before   after
  phone 320/390     553     478
  tablet 768        555     497
  desktop 1280      555     497

Four changes, in order of what they were costing.

The four facts lose their boxes. A bordered, filled, gold-ruled plate
around two words, four times over, directly under a photograph and above
a price, was 76 points of a card that is mostly those four facts. The
gold mark is enough to find them by. Same two-by-two grid, so two cars
are still compared by looking at one spot twice; 76 points becomes 50.

The picture obeys the ratio it declares. The frame said aspect-[16/9]
and drew 16/10, because aspect-ratio yields to whatever the content
inside makes the box, and nothing was pinning the content. Pinning it
takes 24 points off a desktop card and 21 off a phone -- and the card is
now the shape its own code says it is, which it has not been.

"150 km/day included" becomes "150 km/day". The word was true and cost a
whole line: with it, the three terms wrapped at both widths. 36 points
becomes 16.

Then the paddings, which is the small change that is actually small:
py-4 to py-3.5, the specs' margin from mt-3 to mt-2.5, "per day" from
mt-1 to mt-0.5.

One thing tried and reverted. Putting "per day" beside the figure rather
than under it saves another 16 points, and it pushes the Book button off
the right edge of the card -- "Rs 10,000 - Rs 12,000" at this size plus a
suffix plus a button is wider than the card is. The stacked line stays.
The figure is whitespace-nowrap now, though, so a band never splits
across two lines in the attempt.

Checked at 320, 390, 768 and 1280: no card overflows its own box and no
page gains a horizontal scrollbar.


Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf

Co-authored-by: Claude <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

5 participants