Files
orangecat/scripts
CatoandClaude 45d3f8d0fc feat(public): every public page opens with one header; the visitor menu lists the header's links and a way to sign in (#1689)
* fix(nav): the visitor menu on a phone lists the header's links and a way to sign in

On a phone the public menu showed "Blog" and "Support", dropped the Product
and Ecosystem groups (items with children and no href rendered nothing),
listed the whole footer in their place (27 links, 1,681px in a 780px panel)
and offered no Sign in anywhere in the public chrome. It was a plain div: no
dialog role, no close control, and the button that opened it did not say it
was open.

- The menu lists the header's own destinations in their groups, each with the
  line that says what it is; Blog and Support get that line in the config.
  A hairline separates a group from the plain links after it.
- It ends with Sign In and Get Started as two equal cells. The footer is not
  repeated; it is on the page.
- It is a modal dialog: a close button, a dimmed page behind it, focus kept
  inside while it is open and returned to the menu button after. The menu
  button carries aria-expanded and aria-controls, and closes the menu too.
- HeaderNavigation keeps only the desktop bar and is under its size limit, so
  its exemption is removed.

Measured at 390px in both themes with the menu open: no axe violation.

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

* feat(public): every public page opens with one header

Thirty public pages each built their own first screen: titles from 24px to
60px, centred on some and left on others, an icon above one title, a pill
above another, a raised band behind a third, and six content widths. Fleet
rule "One shape per kind": siblings share one frame.

- PublicPageHeader (src/components/layout/PublicPageHeader.tsx) owns the title
  scale (30/36/48px), the lead line, the space above and below, and the
  alignment: centred for a page about OrangeCat, start-aligned for a document
  read top to bottom. An optional label above the title, small print under
  the lead line, and a slot for buttons or a short form. No icon, pill or
  band, on purpose.
- PUBLIC_PAGE_WIDTH gives a page one of two widths, reading (768px) and wide
  (1152px), in place of six.
- 26 pages and the legal document renderer use it. Titles and lead lines are
  unchanged. The shield, cat, briefcase and play icons, the bitbaum logo above
  its title and three pills are removed; "Founding supporters" and "Open
  source · MIT" stay as the label.
- Articles, a blog post and "What do you need?" set their title in the
  heading face.
- check:public-frame (in verify) fails a page under src/app/(public) that
  writes its own h1, uses PageHeading directly or wraps itself in PageLayout;
  five pages are exempt by name with the reason.
- The code samples on "Sign in with OrangeCat" and the command on "Steal the
  cat" take focus, so a keyboard can scroll them. The first section heading
  on How it works is one step smaller than the page title.

Measured on 30 pages at 390px and 1440px in light and 390px in dark: no
sideways scroll, one h1 each, no axe violation.

Docs: the audit gains a "Second batch" section with before and after images;
CHANGELOG and AGENTS.md name the frame and the gate.

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

* fix(nav): the visitor menu's id lives with the header constants

#1663 added a test that replaces MobileMenu with a stub. Header imported
VISITOR_MENU_ID from MobileMenu, so the stub took the id away and the header
threw while rendering a 404 (11 tests, after main was merged into this
branch). The id now lives in src/constants/header.ts beside the other header
constants; MobileMenu and Header both read it from there.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 22:28:33 +01:00
..
2025-12-10 16:56:40 +01:00

Scripts Directory

This directory contains all automation scripts organized by purpose.

Directory Structure

  • analysis/ - Bundle analysis, documentation checking, and optimization tools
  • auth-fix/ - Scripts to fix authentication and RLS policy issues
  • db/ - Database operations, migrations, and schema management
    • Migration scripts moved from root: apply-migration.js, apply-*-migration.js
  • deployment/ - Deployment, production setup, and monitoring scripts
  • dev/ - Development helpers, local setup, and debugging tools
  • diagnostics/ - Health checks and system diagnostics
  • maintenance/ - Cleanup, optimization, and maintenance scripts
  • monitoring/ - Performance monitoring and bundle size tracking
  • oauth/ - OAuth provider setup and configuration
  • profile-fix/ - Scripts to fix profile-related issues
  • schema-fix/ - Database schema fixes and migrations
  • storage/ - Supabase storage bucket setup and management
  • test/ - Testing utilities and validation scripts
    • Test/debug scripts moved from root: test-*.js, check-*.js, debug-*.js

Usage

Most scripts can be run with:

node scripts/{category}/script-name.js

For deployment scripts:

bash scripts/deployment/script-name.sh

Important Scripts

  • scripts/dev/dev-start.js - Main development server starter
  • scripts/deployment/browser-verify.js - Post-deploy browser smoke test (deploys run from .github/workflows/cd.yml via scripts/deploy-selfhost.sh — see docs/operations/deployment/DEPLOYMENT_PROCESS.md)
  • scripts/apply-migrations.sh - Applies pending supabase/migrations/*.sql on every deploy (run by scripts/deploy-selfhost.sh). scripts/db/apply-migrations.ts is a legacy script, not the deploy path.
  • scripts/maintenance/cleanup-console-logs.ts - Remove console.log statements