Repository navigation
fix: site audit — false feature claims, broken navigation, soft 404s, security headers - #28
Merged
Merged
Conversation
Seven findings from the site audit, none of which were costing a lead today but all of which read as carelessness to anyone who notices them. Focus. Nothing defined a focus style, so Tailwind's preflight left keyboard users with no visible focus anywhere — outline-style computed to `none` on all 38 tabbable elements. A single :focus-visible rule now covers the site. The ring colour is a CSS variable because a green ring on the brand-900 security band would have been the same bug wearing a different hat; .on-dark flips it to a light tone. Contrast. Body copy ran at text-brand-800/60 (3.3:1) and /50 (2.6:1) against a 4.5:1 requirement. Rather than guess, the threshold was computed against every surface the text actually sits on: /75 is the first value that clears 4.5 on cream, white, cream-50 and cream-100 (worst case 4.65). Dark sections move to cream/70. 33 replacements. The +18% spike badge needed its own fix — amber-600 on amber-50 is 3.07:1, amber-800 is 6.84:1. Measured after: 182 text elements checked, 0 failures. Was 21. Press feedback. No button had an :active state, so a tap on a phone gave no acknowledgement at all until the next paint. A .press utility now scales to 0.97 on pointer-down, and degrades to an opacity shift under reduced motion. Reduced motion. 35 elements travelled 24px on scroll and scroll-behavior was globally smooth, with no escape hatch. The reveal now cross-fades without travelling — gentler, not absent. Also handles prefers-reduced-transparency. Mobile menu. Added a dimming scrim, background scroll lock, Escape to close, and aria-expanded/controls. It is kept mounted and toggled by class so it animates closed as well as open; it used to vanish instantly. Mobile product demo. The invoice card was `hidden lg:block`, so phone visitors never saw the product — the most persuasive element on the page was desktop only. Verified no horizontal overflow at 375px. Loading spinner. Was orange on slate, left over from an older theme. The first thing any visitor saw was the wrong brand. Co-Authored-By: Claude Opus 5 <[email protected]>
… security headers
A full audit of chefcode.cc, looking at what earlier passes had not: server
behaviour on the real domain, navigation between pages, and whether the
features the site sells actually exist in the code.
THE SITE WAS SELLING FEATURES THAT DO NOT EXIST
Checked every claim against the application source:
QuickBooks integration no code Pricing (Pro), How It Works
Approval workflows no code Pricing (Pro), Features — and the
app never sets an 'approved' status
SSO / SAML no code Pricing (Enterprise), login screen
API access no code Pricing (Enterprise)
Vendor EDI connections no code Pricing (Enterprise), login screen
"alerts above your detection is real but fixed at 10%; nothing is
threshold" sent anywhere
"notifications keep the the only outbound call is the team invite email
right people in the loop"
98% accuracy, 10+ hrs never measured
"Full audit trail" a second copy survived the earlier fix
Professional at $199 was being sold on QuickBooks and approval workflows. A
customer upgrading for either would have got nothing.
Replaced with features verified in code before they were named: duplicate
invoice detection (checkForDuplicate, scoped per location), per-location
access control (access_location_ids), spend analytics by GL category and
month. Enterprise now offers "custom integrations, scoped with you" — true of
a negotiated contract, without claiming anything is already built. The stats
row now carries only checkable facts, including "0 invoice images stored".
NAVIGATION
- Navbar links were bare "#features" hashes. On /privacy, /terms,
/security, /dpa and /setup every one pointed at an anchor that does not
exist there and did nothing — including "Security" on the Security page.
Rooted at "/".
- Arriving at /#pricing landed at the top of the page: the landing page is
lazy-loaded, so the browser's native jump runs before the section exists.
LandingPage now jumps on mount. Two traps avoided: an implicit smooth
scroll (inherited from CSS) needs animation frames to advance, and so does
requestAnimationFrame — both are suspended in a tab opened in the
background, the normal way people open links from email. The jump is
synchronous and instant, re-aligns after web fonts land, and backs off the
moment the visitor scrolls themselves. Verified with real link clicks from
several pages: target lands exactly at the 80px scroll-padding.
- Every route shared one browser-tab title. Each page now names itself.
SERVER BEHAVIOUR
- Every unknown URL returned 200 with the homepage — /blog, /careers,
typos, all of it. Search engines saw unlimited duplicate homepages and a
lost visitor never learned they were lost. vercel.json now rewrites only
the real routes; anything else gets a real HTTP 404 with a branded page.
The router matches exactly too, so /setupfoo no longer renders a page the
server 404s.
- robots.txt and sitemap.xml were served as the HTML app shell. Both are now
real files; /app is excluded from indexing.
- Security headers: only HSTS was present. Adds X-Frame-Options (the /app
login could be framed — a clickjacking surface), nosniff, Referrer-Policy
and Permissions-Policy. CSP ships as Report-Only: tested ENFORCING against
a local emulation of Vercel's routing, with zero violations on every page
including the login screen and its live Supabase query — but the
signed-in invoice flow (Gemini, a Web Worker) cannot be exercised without
an account, so it reports rather than blocks until that is confirmed.
SMALLER
- "See How It Works" had a play icon; there is no video. Now a down arrow.
- apple-touch-icon was an SVG, which iOS ignores — saving the site to a home
screen produced a screenshot. Now a 180px PNG from the logo geometry.
- Removed a dead esm.sh importmap: zero references in any built chunk, and
as an inline script it would block an enforcing CSP.
- The page painted grey (bg-slate-50) before the stylesheet arrived; it is
now cream from the first frame.
- Privacy Policy and DPA said they listed every third party and omitted
Unsplash, which serves the sign-in photo and receives each visitor's IP.
Verified: 23/23 routes return the right status, 0 dead links, 0 of the false
claims remain in the build, all 19 chunks parse, 0 type errors.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A full audit of chefcode.cc, covering what earlier passes didn't: server behaviour on the real domain, navigation between pages, and whether the features the site sells actually exist.
1. The site was selling features that don't exist
Every claim checked against the application source:
approvedstatusProfessional at $199 was being sold on QuickBooks and approval workflows. A customer upgrading for either would have got nothing.
Replacements were verified in code before being named — I didn't want to swap one false claim for another:
checkForDuplicate(), scoped per locationaccess_location_idsv.includes('us food'))2. Navigation was broken on every sub-page
Navbar links were bare
#featureshashes. On/privacy,/terms,/security,/dpaand/setupthey pointed at anchors that don't exist there, and clicking did nothing — including "Security" while on the Security page. Rooted at/. (I introduced the four legal pages in #25 without catching this.)Arriving at
/#pricinglanded at the top. The landing page is lazy-loaded, so the browser's native jump runs before the section exists. This affected the navbar, the footer, and any section link pasted into an email.The fix had two traps. An implicit smooth scroll (inherited from CSS) needs animation frames to advance — and so does
requestAnimationFrame. Both are suspended in a background tab, which is how people open links from email. The jump is now synchronous and instant, re-aligns after web fonts load, and backs off the moment the visitor scrolls themselves.Verified with real link clicks from several pages: the target lands exactly at the 80px scroll-padding. Controlled before/after — same test,
scrollY0 → 4619.Every page shared one browser-tab title. Each now names itself.
3. Server behaviour
/blog,/careers, typos)/setupfoo,/security-teamrobots.txttext/plain, excludes/appsitemap.xmlNo
X-Frame-Optionsmeant the/applogin could be framed — a clickjacking surface on the page where customers enter passwords.CSP ships as Report-Only, deliberately. I tested it enforcing against a local emulation of Vercel's routing and headers: zero violations on every page, including the login screen with its Unsplash photo and a live Supabase query. But the signed-in invoice flow — the Gemini call and a Web Worker in the app bundle — can't be exercised without an account. An enforcing policy I guessed wrong could break invoice upload for paying customers, so it reports rather than blocks until that's confirmed.
4. Smaller
apple-touch-iconwas SVG, which iOS ignores; saving to a home screen gave a screenshot. Now a 180px PNG from the logo geometry.esm.shimportmap — zero references in any built chunk, and as an inline script it would block an enforcing CSP.bg-slate-50) before the stylesheet arrived. Now cream from the first frame.Verification
To finish after merge
Sign in once and upload an invoice with DevTools open. If no
Content-Security-Policy-Report-Onlywarnings appear, the CSP can be promoted to enforcing — a one-word change invercel.json.🤖 Generated with Claude Code