No description
Find a file
David aa1e75e399 Mobile: the menu button was indenting every page
The whole site sat 36px to the right on phones and tablets, with a narrow empty
gutter down the left that held nothing but the hamburger.

Sidebar rendered the mobile trigger as a plain child of the content flex row in
the root layout. Below lg the desktop rail is display:none and the drawer is
position:fixed, so that button was the only sibling still taking width before
<main> — and main is flex-1, so it filled only what was left.

Measured on the dev server: at 375px main was x=36 w=339; at 768px x=36 w=732.
1280px was correct (x=256 w=1024), because the button is lg:hidden there. This
was never a horizontal-scroll bug — scrollWidth equalled clientWidth at both
widths. It was a permanent indent, and the content was 36px narrower than the
screen.

The side menu itself was fine: the drawer is fixed, so it contributed nothing to
layout and opened at x=0, 288x812, with scroll lock working. Only its trigger
was in the wrong place.

- Sidebar now exports the desktop rail on its own — hidden lg:block, so it can
  never take width on mobile — plus MobileNav, which owns the trigger and drawer.
- The trigger moved into the full-bleed header, so the button costs no content
  width, and it is w-11 h-11 (44x44) with -ml-3, which puts its icon's left edge
  on the logo's 16px edge without moving the logo.
- The drawer and overlay are portalled to document.body. The header carries
  backdrop-blur, and a backdrop-filter makes an element the containing block for
  its position:fixed descendants — inline, the drawer would have sized itself to
  the 64px header box. Commented in place so the portal is not removed later.
- The desktop rail and the drawer now render one shared NavList, so the two navs
  cannot drift apart.
- Header row gap is gap-2 on mobile: the 44px trigger narrows the search field
  from 247px to 215px at 375px, and the search is the only thing that yields.

Verified in the browser: main is x=0 w=375 at 375px and x=0 w=768 at 768px, with
no page overflow at either. The drawer is still full-viewport height and paints
correctly above Leaflet on /plant/map; tapping a drawer link navigates and closes
it; the scroll lock releases. /income/invoices, the widest table, has no element
wider than the viewport. Typecheck and build green.
2026-10-03 16:08:04 +02:00
.mavis/canvas-assets Mega Plant dashboard — fix & harden (Parts 0-5) 2026-09-12 09:35:48 +02:00
app Mobile: the menu button was indenting every page 2026-10-03 16:08:04 +02:00
components Mobile: the menu button was indenting every page 2026-10-03 16:08:04 +02:00
data/source Invoices: add PHI 169 (Rooihuiskraal) 2026-10-02 06:44:10 +02:00
lib Invoices: keep the PDF on the invoice, and search the invoice's own words 2026-10-02 19:09:16 +02:00
public Brand logo: 3D cube/map icon replaces the M gradient mark 2026-09-12 12:12:30 +02:00
scripts Sites: auto-allocate container lines to the container the site hires 2026-10-02 18:32:12 +02:00
.dockerignore Round 4: regressions fixed + mobile standard 2026-09-12 12:05:43 +02:00
.env.example Mega Plant dashboard — fix & harden (Parts 0-5) 2026-09-12 09:35:48 +02:00
.gitignore Housekeeping: the surface token, and ignore the verification screenshots 2026-10-03 09:20:24 +02:00
AGENTS.md Invoices: a machine chosen in the dropdown was never actually booked 2026-10-03 15:43:46 +02:00
COOLIFY.md Round 4: regressions fixed + mobile standard 2026-09-12 12:05:43 +02:00
Dockerfile Round 4: regressions fixed + mobile standard 2026-09-12 12:05:43 +02:00
HANDOFF-PROMPT-2.md Round 2 (Parts B-D): asset register restructure, type field, sequential codes, flat sortable table, cost_lines, removed synthetic code, fail loudly 2026-09-12 10:24:26 +02:00
HANDOFF-PROMPT-3.md Round 3 (Parts A-B): charts fixes + expenses/overheads cleanup 2026-09-12 11:24:18 +02:00
HANDOFF-PROMPT-4.md Round 4: regressions fixed + mobile standard 2026-09-12 12:05:43 +02:00
HANDOFF-PROMPT.md Auto-create synthetic assets for unmatched machines in seed; update open-questions report 2026-09-12 09:40:18 +02:00
next.config.ts Invoices: the app ingests PDFs itself, with a problem-invoice inbox 2026-10-02 14:30:17 +02:00
package-lock.json Sites: give every site coordinates 2026-10-02 16:33:43 +02:00
package.json Sites: give every site coordinates 2026-10-02 16:33:43 +02:00
postcss.config.mjs Mega Plant dashboard — fix & harden (Parts 0-5) 2026-09-12 09:35:48 +02:00
tsconfig.json Mega Plant dashboard — fix & harden (Parts 0-5) 2026-09-12 09:35:48 +02:00