Skip to content

fix: site audit — false feature claims, broken navigation, soft 404s, security headers - #28

Merged
ajitheee merged 2 commits into
mainfrom
site-audit-fixes
Oct 4, 2026
Merged

ajitheee merged 2 commits into
mainfrom
site-audit-fixes

Conversation

@ajitheee

@ajitheee ajitheee commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Merge order: this builds on #27 (craft pass). Merge #27 first, then this — I'll retarget it to main.

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:

Claim Where Reality
QuickBooks integration Pricing (Pro), How It Works No code
Approval workflows Pricing (Pro), Features No code — the app never sets an approved status
SSO / SAML Pricing (Enterprise), login screen No code — a word in a marketing string
API access Pricing (Enterprise) No code
Vendor EDI connections Pricing (Enterprise), login screen No code
"Alerts above your threshold" Features Detection is real, but fixed at 10% and nothing is sent anywhere
"Notifications keep the right people in the loop" Features Only outbound call is the team-invite email
98% accuracy · 10+ hrs saved Stats, Features Never measured
"Full audit trail" Features A second copy survived the earlier fix in #25

Professional 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:

  • Duplicate invoice detection — checkForDuplicate(), scoped per location
  • Per-location access control — access_location_ids
  • Spend analytics by GL category and month — not "by vendor and location", which isn't built
  • "Sysco, US Foods, Freshpoint pre-loaded" — kept, because it's true (v.includes('us food'))
  • Enterprise now offers "custom integrations, scoped with you" — true of a negotiated contract without claiming anything exists
  • The stats row now carries only checkable facts, including "0 invoice images stored"

2. Navigation was broken on every sub-page

Navbar links were bare #features hashes. On /privacy, /terms, /security, /dpa and /setup they 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 /#pricing landed 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, scrollY 0 → 4619.

Every page shared one browser-tab title. Each now names itself.

3. Server behaviour

Before After
Unknown URLs (/blog, /careers, typos) 200 + homepage 404 + branded page
/setupfoo, /security-team 200 + a real page 404
robots.txt HTML app shell text/plain, excludes /app
sitemap.xml HTML app shell Real sitemap, 6 URLs
Security headers HSTS only + X-Frame-Options, nosniff, Referrer-Policy, Permissions-Policy, CSP

No X-Frame-Options meant the /app login 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

  • Play icon on "See How It Works" — there's no video. Now a down arrow.
  • apple-touch-icon was SVG, which iOS ignores; saving to a home screen gave 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.
  • First paint was grey (bg-slate-50) before the stylesheet arrived. Now cream from the first frame.
  • My own Privacy Policy and DPA were inaccurate — both claim to list every third party and omitted Unsplash, which serves the sign-in photo and receives each visitor's IP.

Verification

  • 23/23 routes return the correct status, tested against a Vercel emulation
  • 0 dead links · 0 of the false claims remain in the build
  • All 19 chunks parse · 0 type errors in our source
  • 0 CSP violations under an enforcing policy on every reachable page

To finish after merge

Sign in once and upload an invoice with DevTools open. If no Content-Security-Policy-Report-Only warnings appear, the CSP can be promoted to enforcing — a one-word change in vercel.json.

🤖 Generated with Claude Code

ajitheee and others added 2 commits October 3, 2026 18:34
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]>
@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
chef-code-ai Ready Ready Preview Oct 4, 2026 2:20am UTC

@ajitheee
ajitheee changed the base branch from craft-pass to main October 4, 2026 02:53
@ajitheee
ajitheee merged commit 7c5bfbd into main Oct 4, 2026
3 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 4a64f44e Deployed Oct 4, 2026 by vercel[bot]
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.

1 participant